body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  background: #f6f7f9;
}

.wrap {
  width: 92%;
  max-width: 1200px;
  margin: auto;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  gap: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  color: #0f3d5e;
}

.topbar p {
  margin: 5px 0 0;
  color: #6b7280;
  opacity: 1;
}

.hero-space {
  height: 110px;
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  background: #0f3d5e;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.btn-light {
  background: #fff;
  color: #0f3d5e;
  border: 1px solid #dbe2e8;
}

.btn-danger {
  background: #c62828;
  color: #fff;
}

.top-actions {
  display: flex;
  gap: 12px;
}

.property-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin: 40px auto;
}

.side-card {
  background: #fff;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  height: auto;
  align-self: start;
}

.full {
  display: block;
  text-align: center;
  margin-bottom: 10px;
}

.price {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 20px;
}

.bullets {
  padding-left: 18px;
  line-height: 1.9;
}

.contact-box,
.form-wrap {
  background: #fff;
  padding: 30px;
  border-radius: 14px;
  margin: 40px auto;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
  background: #fff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

label {
  display: block;
  font-weight: 700;
  margin: 0 0 8px;
  font-size: 14px;
  color: #222;
}

.submit-btn {
  margin-top: 20px;
  width: 100%;
  font-size: 18px;
}

.footer {
  padding: 25px 0;
  text-align: center;
  color: #666;
}

.contact-form textarea {
  margin-top: 14px;
}

.mini-note {
  margin-top: 15px;
  font-size: 14px;
  color: #666;
}

.reference-box {
  border: 1px solid #e3e3e3;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 18px;
  background: #fafafa;
}

.reference-box h3 {
  margin: 0 0 15px;
  font-size: 18px;
}

/* ---------- PHOTO GALLERY ---------- */

.photo-gallery {
  margin-top: 25px;
}

.gallery-main {
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  height: 620px;
  box-sizing: border-box;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.gallery-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  max-width: 80%;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.gallery-thumb {
  background: #ffffff;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  padding: 6px;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.gallery-thumb:hover {
  transform: translateY(-2px);
}

.gallery-thumb.active {
  border-color: #0f3d5e;
}

.gallery-thumb img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 82px;
  object-fit: contain;
}

/* ---------- ADMIN ---------- */

.admin-wrap {
  margin-top: 40px;
  max-width: 1280px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.status-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #f3f3f3;
  font-weight: 700;
}

.status-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-transform: capitalize;
}

.status-new {
  background: #eef2ff;
}

.status-reviewing {
  background: #fff7e6;
}

.status-approved {
  background: #eaf8ea;
}

.status-denied {
  background: #fdecec;
}

.status-waitlist {
  background: #f1ecff;
}

.admin-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  margin-bottom: 24px;
  background: #fafafa;
}

.inline-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.detail-row {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.detail-label {
  font-weight: 700;
  margin-bottom: 8px;
}

.detail-value {
  overflow-wrap: break-word;
}

.file-name {
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
  word-break: break-all;
}

.quick-statuses {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-statuses form {
  margin: 0;
}

.status-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.status-field {
  min-width: 220px;
}

.save-status-btn {
  align-self: flex-end;
  margin-left: auto;
}

.review-sections {
  display: grid;
  gap: 20px;
}

.review-section {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 20px;
}

.review-section h2 {
  margin: 0 0 16px;
  font-size: 22px;
  color: #0f3d5e;
}

.review-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid #eef1f4;
}

.review-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.review-label {
  font-weight: 700;
  color: #374151;
}

.review-value {
  color: #111827;
  white-space: pre-wrap;
}

.empty-value {
  color: #9ca3af;
}

/* ---------- FORM HELPERS ---------- */

.inline-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.address-line {
  display: grid;
  grid-template-columns: 2fr 0.9fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.address-line input,
.address-line select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ---------- DASHBOARD ---------- */

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 16px;
}

.stat-card span {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.stat-card strong {
  font-size: 28px;
  color: #0f3d5e;
}

.dashboard-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 22px;
}

.filter-actions {
  display: flex;
  gap: 10px;
  align-items: end;
}

.table-name {
  font-weight: 700;
}

.table-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

.score-badge {
  display: inline-block;
  min-width: 42px;
  text-align: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.score-high {
  background: #eaf8ea;
  color: #1f6b2a;
}

.score-mid {
  background: #fff7e6;
  color: #8a5a00;
}

.score-low {
  background: #fdecec;
  color: #a12626;
}

.row-new td {
  background: #fcfdff;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .property-layout,
  .grid2,
  .dashboard-stats,
  .dashboard-filters,
  .address-line,
  .inline-pair,
  .review-row {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero-space {
    height: 145px;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

.gallery-main {
  height: 420px;
  padding: 12px;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
  .thumb-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-thumb {
    min-height: 82px;
    padding: 4px;
  }

  .gallery-thumb img {
    max-height: 70px;
  }

  .review-row {
    gap: 6px;
  }
}