/* ===== Listings Page ===== */
.listings-hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  padding: 140px 0 60px;
  text-align: center;
  color: var(--white);
}
.listings-hero h1 { color: var(--white); margin-bottom: 12px; }
.listings-hero p { color: rgba(255,255,255,0.7); font-size: 1.1rem; }

.listings-section { padding: 40px 0 80px; background: var(--bg-light); }

.listings-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 16px;
}

.type-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  padding: 10px 24px;
  border: 2px solid var(--gray-light);
  border-radius: 30px;
  background: var(--white);
  color: var(--black);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}
.tab:hover { border-color: var(--teal); color: var(--teal); }
.tab.active { background: var(--teal); color: var(--white); border-color: var(--teal); }

.results-info { color: var(--gray-dark); font-size: 0.9rem; }

.listings-layout { display: grid; grid-template-columns: 280px 1fr; gap: 30px; }

.filters-sidebar {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
  height: fit-content;
}
.filters-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.filters-header h3 { margin: 0; font-size: 1.1rem; }
.filters-close { display: none; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--black); }

.filter-group { margin-bottom: 16px; }
.filter-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; color: var(--navy); }
.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--white);
  transition: var(--transition);
}
.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(9, 183, 182, 0.1);
}

.search-box { position: relative; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: 0.85rem; }
.search-box input { padding-left: 36px; }

.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { flex: 1; }
.price-range span { color: var(--gray); }

.listings-main { min-width: 0; }

.mobile-filter-btn {
  display: none;
  padding: 10px 20px;
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-dark);
}
.no-results i { font-size: 3rem; margin-bottom: 16px; display: block; }

.listings-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-dark);
  font-size: 1rem;
}
.listings-loading i { margin-right: 8px; color: var(--teal); }

/* ===== Listing Cards ===== */
.listing-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: cardFadeIn 0.4s ease both;
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-image { position: relative; height: 220px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.listing-card:hover .card-image img { transform: scale(1.05); }

.card-status {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-status.for-sale { background: #27ae60; color: #fff; }
.card-status.for-rent { background: #2980b9; color: #fff; }
.card-status.sold { background: #e74c3c; color: #fff; }
.card-status.under-contract { background: #f39c12; color: #fff; }
.card-status.pending { background: #8e44ad; color: #fff; }

.card-featured {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(244, 196, 48, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
}

.card-content { padding: 20px; }
.card-price { font-family: 'Space Grotesk'; font-size: 1.3rem; font-weight: 700; color: var(--teal); margin-bottom: 4px; }
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--navy); line-height: 1.3; }
.card-location { font-size: 0.85rem; color: var(--gray-dark); margin-bottom: 12px; }
.card-location i { color: var(--teal); margin-right: 4px; }

.card-details { display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.card-details span { font-size: 0.85rem; color: var(--gray-dark); }
.card-details i { color: var(--teal); margin-right: 4px; }

.card-type-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.card-type-badge.property { background: rgba(9, 183, 182, 0.1); color: var(--teal); }
.card-type-badge.land { background: rgba(255, 152, 0, 0.1); color: #e67e22; }

.card-price-sqm { font-size: 0.8rem; color: var(--gray-dark); margin-bottom: 8px; }

.card-utilities, .card-features { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.card-utilities span, .card-features span {
  padding: 3px 10px;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 0.7rem;
  color: var(--gray-dark);
}
.card-utilities i { margin-right: 3px; color: var(--teal); font-size: 0.65rem; }

/* ===== Detail Pages ===== */
.detail-page { padding: 100px 0 60px; min-height: 80vh; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 24px;
  font-size: 0.9rem;
}
.back-link:hover { color: var(--teal-dark); }

.detail-loading { text-align: center; padding: 60px; color: var(--gray-dark); font-size: 1.1rem; }
.detail-loading i { margin-right: 8px; }

.detail-gallery { margin-bottom: 32px; }
.gallery-main {
  position: relative;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--gray-light);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.gallery-status {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}
.gallery-status.for-sale { background: #27ae60; color: #fff; }
.gallery-status.for-rent { background: #2980b9; color: #fff; }
.gallery-status.sold { background: #e74c3c; color: #fff; }
.gallery-status.under-contract { background: #f39c12; color: #fff; }

.gallery-prev, .gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.gallery-prev:hover, .gallery-next:hover { background: var(--teal); color: #fff; }
.gallery-prev { left: 16px; }
.gallery-next { right: 16px; }

.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gallery-thumbs img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  opacity: 0.6;
}
.gallery-thumbs img.active, .gallery-thumbs img:hover { border-color: var(--teal); opacity: 1; }

.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; }

.detail-header { margin-bottom: 24px; }
.detail-header h1 { font-size: 1.8rem; margin-bottom: 8px; }
.detail-location { color: var(--gray-dark); font-size: 0.95rem; }
.detail-location i { color: var(--teal); margin-right: 4px; }
.detail-price {
  font-family: 'Space Grotesk';
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal);
  margin-top: 8px;
}
.price-per-sqm { display: block; font-size: 0.9rem; color: var(--gray-dark); font-weight: 400; }

.detail-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.spec { text-align: center; }
.spec i { font-size: 1.2rem; color: var(--teal); margin-bottom: 6px; display: block; }
.spec span { display: block; font-weight: 700; font-size: 1rem; color: var(--navy); }
.spec small { color: var(--gray-dark); font-size: 0.8rem; }

.detail-section { margin-bottom: 28px; }
.detail-section h3 { font-size: 1.1rem; margin-bottom: 12px; color: var(--navy); }
.detail-section p { line-height: 1.8; color: var(--black); }

.amenities-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.amenity-item {
  padding: 10px 14px;
  background: var(--bg-light);
  border-radius: 8px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.amenity-item i { color: var(--teal); font-size: 0.85rem; }

.detail-sidebar { display: flex; flex-direction: column; gap: 24px; }

.agent-card, .quick-specs {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.agent-card h3, .quick-specs h3 { font-size: 1rem; margin-bottom: 16px; color: var(--navy); }

.agent-info { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.agent-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.agent-name { font-weight: 700; margin-bottom: 4px; }
.agent-info p { font-size: 0.85rem; color: var(--gray-dark); margin-bottom: 2px; }
.agent-info p i { width: 16px; color: var(--teal); margin-right: 4px; }

.agent-card .btn { margin-top: 8px; }

.quick-specs ul { list-style: none; padding: 0; }
.quick-specs li { padding: 8px 0; border-bottom: 1px solid var(--gray-light); font-size: 0.9rem; }
.quick-specs li:last-child { border-bottom: none; }
.quick-specs li strong { color: var(--navy); }

/* ===== Admin Panel ===== */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  padding: 20px;
}
.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
}
.login-logo { height: 50px; margin-bottom: 20px; }
.login-card h2 { margin-bottom: 24px; }
.login-card .form-group { text-align: left; margin-bottom: 16px; }
.login-card .form-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; }
.login-card .form-group input {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
.login-card .form-group input:focus { border-color: var(--teal); outline: none; }
.form-error { color: #dc3545; font-size: 0.85rem; margin-bottom: 12px; }
.login-back { display: inline-block; margin-top: 16px; color: var(--gray-dark); font-size: 0.85rem; text-decoration: none; }
.login-back:hover { color: var(--teal); }

.admin-panel { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 260px;
  background: var(--navy-dark);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo { height: 32px; }
.sidebar-header span { font-weight: 700; font-size: 1.1rem; }
.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}
.sidebar-close:hover { background: rgba(255,255,255,0.15); }

.sidebar-nav { flex: 1; padding: 16px 0; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}
.sidebar-link:hover, .sidebar-link.active { color: var(--white); background: rgba(255,255,255,0.08); }
.sidebar-link.active { border-left: 3px solid var(--teal); }
.sidebar-link i { width: 20px; text-align: center; }

.sidebar-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.1); }
.sidebar-footer .btn { padding: 10px 16px; font-weight: 600; font-size: 0.9rem; width: 100%; }

.admin-main { flex: 1; margin-left: 260px; background: var(--bg-light); min-height: 100vh; }

.admin-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-header h2 { flex: 1; font-size: 1.2rem; }
.admin-menu-toggle { display: none; background: none; border: none; font-size: 1.2rem; cursor: pointer; }
.admin-header-actions .btn { padding: 10px 20px; font-weight: 600; font-size: 0.9rem; }

.admin-content { padding: 32px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card-admin {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.stat-card-admin h4 { font-size: 0.85rem; color: var(--gray-dark); margin-bottom: 8px; }
.stat-card-admin .number { font-family: 'Space Grotesk'; font-size: 2rem; font-weight: 700; color: var(--navy); }
.stat-card-admin small { color: var(--gray-dark); font-size: 0.8rem; }
.stat-card-admin.property { border-left: 4px solid var(--teal); }
.stat-card-admin.land { border-left: 4px solid #e67e22; }
.stat-card-admin.featured { border-left: 4px solid #f4c430; }

.recent-listings, .admin-table-wrap { background: var(--white); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; overflow-x: auto; }
.recent-listings h3 { margin-bottom: 16px; font-size: 1rem; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 10px 12px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-dark); border-bottom: 2px solid var(--gray-light); }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--gray-light); font-size: 0.9rem; vertical-align: middle; }
.admin-table tr:hover { background: rgba(9, 183, 182, 0.03); }

.table-thumb { width: 48px; height: 36px; object-fit: cover; border-radius: 6px; }

.type-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.type-pill.property { background: rgba(9, 183, 182, 0.1); color: var(--teal); }
.type-pill.land { background: rgba(255, 152, 0, 0.1); color: #e67e22; }

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}
.status-pill.for-sale { background: rgba(39, 174, 96, 0.1); color: #27ae60; }
.status-pill.for-rent { background: rgba(41, 128, 185, 0.1); color: #2980b9; }
.status-pill.sold { background: rgba(231, 76, 60, 0.1); color: #e74c3c; }
.status-pill.under-contract { background: rgba(243, 156, 18, 0.1); color: #f39c12; }
.status-pill.pending { background: rgba(142, 68, 173, 0.1); color: #8e44ad; }

.toggle-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid transparent;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-btn.on { background: rgba(39, 174, 96, 0.15); color: #27ae60; border-color: rgba(39, 174, 96, 0.2); }
.toggle-btn.off { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border-color: rgba(231, 76, 60, 0.2); }
.toggle-btn:hover { opacity: 0.8; }

.actions-cell { white-space: nowrap; }
.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  margin-right: 6px;
  transition: var(--transition);
}
.action-btn.edit { background: rgba(41, 128, 185, 0.15); color: #2980b9; border-color: rgba(41, 128, 185, 0.2); }
.action-btn.edit:hover { background: #2980b9; color: #fff; }
.action-btn.delete { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border-color: rgba(231, 76, 60, 0.2); }
.action-btn.delete:hover { background: #e74c3c; color: #fff; }

.listings-toolbar-admin { margin-bottom: 20px; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; }
.filter-row select, .filter-row input {
  padding: 10px 12px;
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--white);
}
.filter-row select:focus, .filter-row input:focus { border-color: var(--teal); outline: none; }

/* ===== Admin Forms ===== */
.admin-form {
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 900px;
}
.admin-form h3 { margin-bottom: 24px; }

.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.admin-form .form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.admin-form .form-group { margin-bottom: 16px; }
.admin-form .form-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; color: var(--navy); }
.admin-form .form-group input,
.admin-form .form-group select,
.admin-form .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
}
.admin-form .form-group input:focus,
.admin-form .form-group select:focus,
.admin-form .form-group textarea:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(9, 183, 182, 0.1);
}

.form-section { margin: 24px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--gray-light); }
.form-section h4 { font-size: 0.95rem; color: var(--navy); }

.checkbox-label { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: auto; }

.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.form-actions .btn { padding: 12px 28px; font-size: 0.95rem; font-weight: 600; }

/* ===== Upload Zone ===== */
.upload-zone {
  border: 2px dashed var(--gray-light);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 24px;
  background: var(--bg-light);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--teal);
  background: rgba(9, 183, 182, 0.04);
}
.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-dark);
}
.upload-placeholder i { font-size: 2rem; color: var(--teal); margin-bottom: 4px; }
.upload-placeholder p { margin: 0; font-size: 0.9rem; }
.upload-browse { color: var(--teal); font-weight: 600; text-decoration: underline; cursor: pointer; }
.upload-placeholder small { color: var(--gray); font-size: 0.8rem; }

.upload-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.upload-previews:empty { display: none; }

.upload-preview {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--gray-light);
  transition: var(--transition);
}
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview.uploaded { border-color: #27ae60; }
.upload-preview.upload-error { border-color: #e74c3c; }
.upload-preview.uploading { opacity: 0.7; }

.upload-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  opacity: 0;
  transition: var(--transition);
}
.upload-preview:hover .upload-preview-remove { opacity: 1; }
.upload-preview-remove:hover { background: #e74c3c; }

.upload-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0,0,0,0.2);
}
.upload-progress-bar {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  animation: uploadPulse 1.5s ease-in-out infinite;
}
@keyframes uploadPulse {
  0%, 100% { width: 20%; margin-left: 0; }
  50% { width: 60%; margin-left: 20%; }
}
.upload-progress small {
  display: block;
  padding: 4px 8px;
  font-size: 0.7rem;
  color: #e74c3c;
  text-align: center;
}

/* ===== Collapsible Toggle ===== */
.collapsible-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-light);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: var(--transition);
  border: 1px solid var(--gray-light);
}
.collapsible-toggle:hover { border-color: var(--teal); }
.collapsible-toggle span { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.collapsible-toggle small { color: var(--gray-dark); font-size: 0.8rem; }
.collapsible-toggle i { margin-right: 8px; transition: transform 0.3s ease; }
.collapsible-toggle.open i { transform: rotate(90deg); }
.collapsible-content { margin-bottom: 16px; padding: 16px; background: var(--white); border-radius: 8px; border: 1px solid var(--gray-light); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-card {
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.modal-card h3 { margin-bottom: 12px; }
.modal-card p { color: var(--gray-dark); margin-bottom: 24px; line-height: 1.6; }
.modal-actions { display: flex; gap: 12px; justify-content: center; }
.modal-actions .btn { padding: 10px 24px; font-weight: 600; }
.btn-delete-confirm { background: #dc3545; color: #fff; border: 1.5px solid #dc3545; padding: 10px 24px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: var(--transition); }
.btn-delete-confirm:hover { background: #c82333; border-color: #c82333; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #27ae60; }
.toast.error { background: #e74c3c; }

/* ===== Sidebar Overlay (mobile) ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.visible {
  display: block;
  opacity: 1;
}

/* ===== Admin Mobile Card Layout ===== */
.admin-card-list {
  display: none;
}
.admin-card-item {
  background: var(--white);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gray-light);
}
.admin-card-item.property-card { border-left-color: var(--teal); }
.admin-card-item.land-card { border-left-color: #e67e22; }
.admin-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.admin-card-thumb {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.admin-card-title {
  flex: 1;
  min-width: 0;
}
.admin-card-title strong {
  display: block;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-card-title small {
  color: var(--gray-dark);
  font-size: 0.78rem;
}
.admin-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.admin-card-meta .type-pill,
.admin-card-meta .status-pill {
  font-size: 0.65rem;
}
.admin-card-price {
  font-family: 'Space Grotesk';
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}
.admin-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--gray-light);
}
.admin-card-actions .toggle-btn {
  font-size: 0.72rem;
  padding: 4px 10px;
}

/* ===== Admin Dashboard Mobile Cards ===== */
.admin-dashboard-cards {
  display: none;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .listings-layout { grid-template-columns: 240px 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr 300px; }

  .admin-header { padding: 14px 24px; }
  .admin-content { padding: 24px; }
  .admin-form { padding: 24px; }
}

@media (max-width: 768px) {
  .listings-layout { grid-template-columns: 1fr; }

  .filters-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    z-index: 200;
    border-radius: 0;
    transition: left 0.3s ease;
    overflow-y: auto;
  }
  .filters-sidebar.open { left: 0; }
  .filters-close { display: block; }
  .mobile-filter-btn { display: inline-flex; align-items: center; gap: 8px; }

  .listings-grid { grid-template-columns: 1fr; }
  .detail-specs { grid-template-columns: repeat(2, 1fr); }
  .amenities-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .gallery-main { height: 300px; }

  /* Admin Sidebar mobile */
  .admin-sidebar {
    transform: translateX(-100%);
    z-index: 200;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-menu-toggle { display: block; }
  .sidebar-close { display: block; }
  .admin-content { padding: 16px; }
  .admin-header { padding: 12px 16px; }
  .admin-header h2 { font-size: 1rem; }
  .admin-header-actions .btn { padding: 8px 14px; font-size: 0.8rem; }
  .admin-header-actions .btn i { display: none; }

  /* Admin forms mobile */
  .admin-form { padding: 20px; border-radius: 10px; }
  .admin-form .form-row, .admin-form .form-row-3 { grid-template-columns: 1fr; gap: 0; }
  .admin-form .form-group { margin-bottom: 12px; }
  .form-actions { flex-direction: column; gap: 10px; }
  .form-actions .btn { width: 100%; justify-content: center; }

  /* Admin stats mobile */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card-admin { padding: 16px; }
  .stat-card-admin .number { font-size: 1.6rem; }

  /* Admin table → hide, show cards */
  .admin-table-wrap .admin-table { display: none; }
  .admin-card-list { display: block; }

  /* Dashboard recent listings → cards */
  .recent-listings .admin-table-wrap .admin-table { display: none; }
  .admin-dashboard-cards { display: block; }

  /* Filter row mobile */
  .filter-row { flex-direction: column; }
  .filter-row select, .filter-row input { width: 100%; }

  /* Upload zone mobile */
  .upload-zone { padding: 16px; }
  .upload-placeholder i { font-size: 1.5rem; }
  .upload-placeholder p { font-size: 0.82rem; }
  .upload-previews { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }

  /* Action buttons mobile */
  .action-btn { width: 32px; height: 32px; font-size: 0.8rem; margin-right: 3px; }
  .toggle-btn { padding: 4px 8px; font-size: 0.7rem; }

  /* Toast mobile */
  .toast { left: 16px; right: 16px; bottom: 16px; text-align: center; }

  /* Modal mobile */
  .modal-card { padding: 24px; margin: 16px; }
  .modal-actions { flex-direction: column; gap: 8px; }
  .modal-actions .btn { width: 100%; }

  /* Login mobile */
  .login-card { padding: 28px 20px; margin: 16px; }
  .login-logo { height: 40px; }

  .listings-hero { padding: 120px 0 40px; }
}

@media (max-width: 480px) {
  .listings-toolbar { flex-direction: column; align-items: flex-start; }
  .type-tabs { width: 100%; overflow-x: auto; }
  .tab { padding: 8px 16px; font-size: 0.8rem; white-space: nowrap; }
  .detail-header h1 { font-size: 1.4rem; }
  .detail-price { font-size: 1.5rem; }
  .gallery-main { height: 240px; }

  /* Admin single column everything */
  .stats-grid { grid-template-columns: 1fr; gap: 10px; }
  .stat-card-admin { padding: 14px; }
  .stat-card-admin .number { font-size: 1.4rem; }
  .stat-card-admin h4 { font-size: 0.78rem; }

  .admin-header { padding: 10px 12px; gap: 10px; }
  .admin-header h2 { font-size: 0.9rem; }
  .admin-header-actions .btn { padding: 7px 10px; font-size: 0.75rem; }

  .admin-content { padding: 12px; }
  .admin-form { padding: 16px; }
  .admin-form h3 { font-size: 1rem; margin-bottom: 16px; }

  .upload-zone { padding: 12px; }
  .upload-placeholder p { font-size: 0.78rem; }
  .upload-placeholder small { font-size: 0.72rem; }

  .collapsible-toggle { padding: 10px 12px; }
  .collapsible-toggle span { font-size: 0.82rem; }
  .collapsible-toggle small { display: none; }
  .collapsible-content { padding: 12px; }

  .admin-card-item { padding: 12px; }
  .admin-card-thumb { width: 44px; height: 34px; }
  .admin-card-title strong { font-size: 0.82rem; }
  .admin-card-price { font-size: 0.85rem; }
}
