:root {
  /* Colors */
  --primary: #04154b; /* Main dark color */
  --accent: #fdb700; /* Gold / highlight */
  --accent-rgb: 255, 102, 0;
  --muted: #374151; /* Soft text / secondary */
  --white: #ffffff;
  --mildbg: #e8f1f5;
  --bg: white; /* Page background */
  --secondarybg: #f9fafb;

  /* Sizes & Effects */
  --radius: 30px; /* Border radius for cards/buttons */
  --shadow: 0 5px 5px rgba(0, 0, 0, 0.18);
  --font-heading: "Manrope", sans-serif;
  --font-body: "Manrope", sans-serif;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--primary);
  line-height: 1.6;
}

/* =============================
   3. Typography
============================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--primary);
}

p {
  color: var(--muted);
}

/* =============================
   4. Buttons
============================= */
button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-wrap: nowrap;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: none;
}

.btn-primary:hover::before {
  left: 150%;
  transition: left 0.8s ease-in-out;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
}

.new-property-btn {
  background-color: var(--accent);
  color: var(--primary);
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.2s ease;
  text-align: left;
  max-width: 400px;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

.authSection .fa-landmark {
  font-size: 2.5rem;
  color: #181717;
  margin-bottom: 1rem;
}

.authBtn button {
  background: white;
  border: 1px solid #181717;
  color: #181717;
  border-radius: 10px;
  padding: 0.8rem 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "Inter", sans-serif;
}

.authSection {
  display: block;
  position: fixed; /* needed for top/left/transform */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 800px;
  width: 100%;
  z-index: 1000; /* ensure it’s on top */
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.authSection.show {
  visibility: visible;
  opacity: 1;
}

.authFormWrapper {
  justify-self: center;
  border: 1px solid #cacaca;
  padding: 2rem;
  margin: 2rem;
  border-radius: 8px;
  background-color: #fff;
  text-align: center;
  width: 500px;
}

.authFormWrapper .logo {
  width: 60px;
  margin: 0 auto 1rem auto;
}

.authSection h2 {
  font-size: 1.8rem;
}

.authSection h2 + p {
  color: #555;
  margin-bottom: 1.5rem;
}

.authFormWrapper label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-align: left;
}

.authFormWrapper input {
  width: 100%;
  padding: 0.5rem;
  height: 2.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.authFormWrapper button {
  width: 100%;
  margin: 1rem 0;
  justify-content: center;
  font-family: var(--font-body);
}

/* Spinner Animation */
.spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
  font-size: 1.2rem;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Button Loading State */
.btn-primary.loading {
  pointer-events: none; /* Prevent double clicks */
  opacity: 0.8;
}

.btn-primary.loading .btn-text {
  display: none;
}

#forgotPassword {
  color: #181717;
  text-decoration: none;
  font-weight: 600;
}

#forgotPassword:hover {
  text-decoration: underline;
}

.form-group {
  margin-top: 1rem;
  width: 100%;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.authFormWrapper input::placeholder {
  color: #999898;
  opacity: 1;
  font-size: 0.9rem;
  padding-left: 0.5rem;
  font-family: "Inter", sans-serif;
}

.hamburger {
  display: none; /* Hidden on desktop */
  position: fixed; /* Changed from relative */
  top: 40px;
  right: 20px;
  width: 30px;
  height: 24px;
  cursor: pointer;
  z-index: 2000; /* Highest priority */
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  position: absolute;
  width: 100%;
  height: 3px; /* thinner lines */
  background: var(--primary);
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

.hamburger.active span {
  background-color: var(--white);
}

.hamburger span:nth-child(1) {
  transform: translateY(-8px);
}

.hamburger span:nth-child(2) {
  transform: translateY(0);
}

.hamburger span:nth-child(3) {
  transform: translateY(8px);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
}

.mobile-menu {
  display: flex;
  position: fixed;
  top: 0;
  right: -260px; /* Start hidden off-screen to the right */
  width: 260px;
  height: 100vh;
  background-color: var(--primary);
  z-index: 998;
  transition: right 0.3s ease-in-out; /* Smooth slide */
  flex-direction: column;
  padding-top: 60px;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

.mobile-menu .logo {
  margin-left: 1rem;
  margin-bottom: 1rem;
}

.mobile-menu.active {
  /* display: flex; */
  right: 0; /* Slide into view */
}

.mobile-inquiry-badge {
  background: red;
  color: white;
  padding: 2px 6px;
  border-radius: 50%;
  font-size: 10px;
  margin-left: 8px;
}

.mobile-menu li {
  padding: 20px;
  border-bottom: 1px solid var(--muted);
  color: white;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
}

.mobile-menu li:hover {
  background-color: var(--accent);
}

/* The dimming overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Deep dark dimming */
  backdrop-filter: blur(2px); /* Optional: adds a premium blurred look */
  z-index: 997; /* Just below the mobile menu (998) */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

/* When active, make it visible */
.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Ensure your dashboard container doesn't have its own 
   z-index that fights with the overlay */
main,
.main-content {
  position: relative;
  z-index: 1;
}

.mobile-menu .logout-container {
  margin-top: auto;
  padding: 1rem;
}

/* Mobile Menu Active State */
.mobile-menu li.active {
  background-color: var(--accent); /* Your Accent Gold */
  color: #000; /* Black text for high contrast */
  font-weight: bold;
}

/* Ensure the icon also changes color if needed */
.mobile-menu li.active i {
  color: #000;
}

.mobile-menu li:not(.active):hover {
  background-color: #222; /* Subtle dark gray on hover */
  cursor: pointer;
}

.mobile-menu li.active .badge {
  background: #000;
  color: var(--accent);
}

/* --- SIDEBAR --- */
.dashboard-sidebar {
  width: 260px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--primary);
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.logo {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}

.dashboard-sidebar .logo img,
.mobile-menu .logo img {
  width: 40px;
}

.dashboard-sidebar .logo h2,
.mobile-menu .logo h2 {
  color: var(--accent);
  font-size: 0.9rem;
}
.dashboard-sidebar .logo span {
  color: var(--white);
}

.menu li {
  list-style: none;
  color: var(--white);
  padding: 10px;
  margin-bottom: 5px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.menu li:hover,
.menu li.active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--accent);
}

.badge {
  background: red;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
}

.logout-container p {
  font-size: 0.9rem;
  color: var(--secondarybg);
  padding: 1rem 0.5rem;
}

.logout {
  margin-top: auto;
  color: var(--accent);
  background: none;
  border: 1px solid var(--accent);
  width: 100%;
}

.logout:hover {
  border: 1px solid var(--white);
  color: var(--white);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.admin-nav ul {
  list-style: none;
  padding: 2rem 0;
}

.admin-nav a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 0.8rem;
  border-radius: 5px;
}

.admin-nav a:hover {
  background: var(--accent); /* Your Gold color */
}

/* --- TABS --- */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}
.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recentPropertyRow {
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  padding: 3rem 1rem 2rem 1rem;
}

.recent-properties,
.property-listings-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  column-gap: 1rem;
  row-gap: 2rem;
  padding: 2rem 0;
}

.recentPropertyRow .card {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.recentPropertyRow .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

/* .featuredImgBox { 
  flex: 0 0 calc((100% - 2rem) / 4);
  width: calc((100% - 2rem) / 4);
}*/

.featured-pic {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 200px;
}

.badge-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  position: absolute;
  z-index: 10;
  top: 15px;
  padding: 0.5rem 1rem;
}

.badge-row span {
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.85rem;
  padding: 0.2rem 0.5rem;
}

.badge-row .status {
  color: red;
}

.featuredText {
  padding: 1.5rem;
}

.listings-box:hover h4 {
  color: var(--accent);
}

.featuredText button {
  width: 100%;
  justify-content: center;
}

.card-specs {
  display: flex;
  gap: 1rem;
}

.card-specs p {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.card-specs i {
  font-size: 0.7rem;
}

.card-location {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.card-location i {
  font-size: 0.7rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.2s ease;
  text-align: left;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card img:hover {
  transform: scale(1.06);
}

.card-body {
  padding: 0.5rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-location {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.card-specs {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.card-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.3rem;
}

.card-btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.management-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.action-bar {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

#searchForm {
  display: flex;
  gap: 1rem;
  align-items: center;
  width: 100%;
}

#searchForm .form-group {
  display: flex;
  align-items: center;
  margin: 0;
}

#searchForm input {
  width: 100%;
  min-width: 300px;
  border: 1px solid var(--primary);
}

#searchForm select {
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  appearance: none; /* Removes default browser arrow */
  padding: 0.5rem 0.5rem;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="grey" viewBox="0 0 16 16"><path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  width: 100%;
  min-width: 130px;
}

#searchForm .search-btn {
  gap: 0.5rem; /* Adds space between the search icon and the word "Search" */
  cursor: pointer;
  width: 100%;
  justify-content: center;
}

#searchForm input,
#searchForm select {
  vertical-align: stretch;
}

#searchForm select option {
  font-family: var(--font-body);
}

/* --- INQUIRIES (Grid) --- */
.inquiry-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.header-left,
.card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-left {
  flex-wrap: wrap;
}

.inquiry-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.15);
  border-left: 4px solid transparent;
}
.inquiry-card.new {
  border-left: 4px solid var(--accent);
}

.inquiry-card h4 {
  margin-bottom: 5px;
}

.read-badge {
  background-color: var(--secondarybg);
  color: var(--accent);
  padding: 0.2rem 1rem;
  border-radius: 50px;
  margin-left: 5px;
  font-weight: 400;
}
.read-badge {
  background: #10b981;
  color: white;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  margin-left: 8px;
}
.inquiry-contact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.inquiry-contact p {
  font-size: 0.85rem;
  color: var(--grey);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.inquiry-card .subject {
  font-weight: 600;
}

.inquiry-card .message {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #555;
  margin-bottom: 15px;
}

.new-badge {
  background: #ff4d4f;
  color: white;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

.inquiry-card.new {
  border-left: 4px solid #fdb700;
  background: #fffdf6;
}

.source-property {
  background: #fdb700;
  color: black;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.source-contact {
  background: #4f46e5;
  color: white;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.btn-sm.danger {
  background: #ef4444;
  color: white;
  border: none;
}

.btn-sm.danger:hover {
  background: #dc2626;
}

.inquiry-property-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8f9fa;
  padding: 8px;
  border-radius: 6px;
  margin: 10px 0;
  border: 1px solid #eee;
}

.inquiry-property-preview img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.prop-details {
  display: flex;
  flex-direction: column;
}

.prop-details small {
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
}

.prop-details strong {
  font-size: 13px;
  color: #333;
}

/* --- MODAL STYLES --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px); /* Modern frosted glass effect */
  z-index: 1000;
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 600px; /* Limits width on large screens */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  max-height: 90vh; /* Prevents it from being taller than screen */
  overflow-y: auto; /* Scrollable if form is too long */
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
  font-family: var(--font-body);
}

.form-group input:focus {
  border-color: var(--accent);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

#dashboard h2,
#properties h2 {
  font-size: 1.5rem;
}

.overviewRow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem 0;
}

.overviewCard {
  background: var(--secondarybg);
  border: 1px solid #cecccc;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.overview-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.overviewCard i {
  display: inline-flex;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.3s ease;
  text-decoration: none;
  gap: 1rem;
  flex-shrink: 0;
}
.overviewCard h3 {
  font-size: 1rem;
}

.overviewCard .cardNo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: black;
}

.overviewCard p {
  font-size: 0.9rem;
  color: #555;
}

.recentProperties {
  padding: 2rem 0;
}

.recentProperties .message {
  display: none;
  text-align: center;
  margin: 2rem auto;
  color: #777;
  max-width: 500px;
  justify-self: center;
}

.recentProperties .message h3 {
  font-size: 1.5rem;
  color: #111;
}

.tab-content {
  display: none; /* Hidden by default */
}

.tab-content.active {
  display: block; /* Shows only the active tab */
}

.content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  margin-left: 260px;
}

.image-upload-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cover-image-container {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.cover-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #ccc;
  padding: 2rem;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  height: 120px;
  width: 120px;
  line-height: 1;
}

.upload-box {
  border: 2px dashed #ccc;
  padding: 2rem;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.upload-box:hover,
.cover-box:hover,
.upload-box:hover p,
.cover-box:hover p,
.upload-box:hover i,
.cover-box:hover i {
  border-color: #000;
  color: #000;
}

.upload-box i,
.cover-box i {
  font-size: 2rem;
  color: #777;
}

.upload-box p,
.cover-box p {
  color: #777;
}

.upload-box span {
  font-size: 0.8rem;
  color: #777;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

/* 1. Make the container a relative bounding box */
.image-preview {
  position: relative;
  display: inline-block; /* Keeps the box tight around the image */
  width: 120px; /* Adjust this to your preferred thumbnail size */
  height: 120px;
  margin: 5px;
  border-radius: 8px; /* Optional: smooth corners */
  overflow: hidden; /* Keeps the image cleanly inside the borders */
}

/* 2. Standardize the image sizes so the grid looks neat */
.image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Prevents stretching */
}

/* 3. Position all the different 'X' buttons absolutely at the top right */
.image-preview button,
.remove-image,
.remove-existing-cover,
.remove-existing-gallery {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: rgba(255, 0, 0, 0.8); /* Semi-transparent red */
  color: white;
  border: none;
  border-radius: 50%; /* Makes it a circle */
  width: 24px;
  height: 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background-color 0.2s;
  flex-shrink: 0; /* Prevents the button from shrinking if the container is too small */
}

/* Add a nice hover effect so the user knows it's clickable */
.image-preview button:hover {
  background-color: rgba(255, 0, 0, 1); /* Solid red on hover */
}

#editPropertyModal .modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* .cover-image-preview img {
  height: 120px;
  width: 120px;
  border-radius: 10px;
}*/

#editFeatureBtn,
#addFeatureBtn {
  margin-top: 1rem;
}

/* The Spinner Animation */
.fa-spin {
  animation: spin 1s infinite linear;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Button loading state styling */
.btn-primary:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loader {
  font-size: 1.2rem;
}

/* Feature input container */
.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.feature-item input.featureInput {
  flex: 1;
}

.feature-item .removeFeatureBtn {
  background: red;
  color: white;
  border: none;
  padding: 0 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  height: 2.5rem;
  border-radius: 4px;
}

.form-wrapper {
  max-width: 800px;
  box-shadow: var(--shadow);
  border-radius: 20px;
  width: 100%;
  padding: 2rem;
  background-color: var(--secondarybg);
  justify-self: center;
  margin-bottom: 2rem;
}

#settings form button {
  justify-content: center;
  align-self: center;
  width: 100%;
  max-width: 800px;
}

.save-changes-btn {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

/* =============================
    SUBSCRIBERS TABLE
============================= */
.subscribers-table-container {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  width: 100%;
  overflow-x: auto;
}

.subscribers-table-container::-webkit-scrollbar {
  height: 6px;
}
.subscribers-table-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--muted);
  color: var(--primary);
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
}

.delete-sub-btn {
  background: none;
  border: none;
  color: #ff4d4d;
  cursor: pointer;
  font-size: 1.2rem;
}

/* =============================
    NOTIFICATION SETTINGS
============================= */
/* Container for the label and toggle */
.notification-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.setting-info p {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

/* Color when checked (Use your gold/blue accent color here) */
input:checked + .slider {
  background-color: #001f3f;
}

input:focus + .slider {
  box-shadow: 0 0 1px #001f3f;
}

/* Move the circle when checked */
input:checked + .slider:before {
  transform: translateX(24px);
}

@media (max-width: 1150px) {
  #searchForm {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 1rem;
    row-gap: 2rem;
    flex-wrap: wrap;
  }

  #searchForm .btn-secondary {
    justify-content: center;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 1024px) {
  .recentPropertyRow,
  .property-listings-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1rem;
    row-gap: 2rem;
    flex-wrap: wrap;
  }

  #searchForm {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 1rem;
    row-gap: 2rem;
    flex-wrap: wrap;
  }

  #searchForm input,
  #searchForm select {
    width: 100%;
  }

  #searchForm input {
    min-width: 0;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .card-actions button {
    padding: 0.75rem 1rem;
  }

  .card-actions span {
    display: none;
  }
}

@media (max-width: 768px) {
  .authFormWrapper {
    width: 90%;
    max-width: 400px;
  }

  .hamburger {
    display: flex;
  }
  .dashboard-sidebar {
    display: none;
  }

  .content {
    margin-left: 0;
  }

  .recentPropertyRow,
  .property-listings-row {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }

  .listings-box {
    justify-self: center;
    width: 100%;
  }

  .management-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 2rem;
  }

  #searchForm {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1rem;
    row-gap: 2rem;
    flex-wrap: wrap;
  }

  .modal-content {
    margin: 0 1rem;
  }

  .image-preview-grid .image-preview {
    width: 100%;
    height: auto;
    min-height: 120px;
  }
}
