/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  --color-primary: #FF5F1F;
  --color-primary-hover: #FF7A45;
  --color-primary-pale: #FFF5F0;
  --color-dark: #1a1a1a;
  --color-dark-hover: #2d3748;
  --color-white: #ffffff;
  --color-off-white: #f8f9fa;
  --color-text: #2d3748;
  --color-text-light: #718096;
  --color-border: #e2e8f0;
  --color-success: #48bb78;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  --gradient-primary: linear-gradient(135deg, #FF5F1F 0%, #FF7A45 100%);
  --gradient-dark: linear-gradient(135deg, #2d3748 0%, #1a1a1a 100%);
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --container-max: 1200px;
  --container-narrow: 800px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-off-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-dark);
}

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-hover); }

/* Container */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 1rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1rem; }

/* ============================================================
   Navigation
   ============================================================ */
.site-nav {
  background: var(--color-dark);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-brand img {
  height: 36px;
  width: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  font-size: 0.875rem;
  text-decoration: none;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: color 150ms, background 150ms;
}
.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.nav-user {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  padding: 0.5rem 0.75rem;
}
.nav-form { display: inline; }
.nav-btn {
  display: inline-block;
  padding: 0.4rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: #fff;
  transition: all 150ms;
}
.nav-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
.nav-btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: #fff;
}
.nav-btn-primary:hover {
  opacity: 0.9;
  color: #fff;
}
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-dark);
    padding: 1rem;
    gap: 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.nav-open { display: flex; }
  .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
  }
  .nav-hamburger { display: block; }
  .site-nav { position: relative; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.7);
  margin-top: 4rem;
}
.footer-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 3rem 1rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: 0.75rem;
  max-width: 320px;
}
.footer-brand img {
  height: 32px;
  width: auto;
  margin-bottom: 0.25rem;
}
.footer-tagline {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: var(--color-primary);
  margin-top: 0.5rem;
}
.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 150ms;
}
.footer-col a:hover { color: var(--color-primary); }
.footer-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1.5rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}
.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}
.footer-bottom-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.8125rem;
}
.footer-bottom-links a:hover { color: rgba(255,255,255,0.8); }

@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

/* Legacy footer compat */
.footer {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #888;
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-text);
  cursor: pointer;
  min-width: 80px;
  text-align: center;
  transition: all 150ms;
}
.btn:hover { background: #f0f0f0; color: var(--color-text); }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
.btn-gradient { background: var(--gradient-primary); color: #fff; border: none; }
.btn-gradient:hover { opacity: 0.9; color: #fff; }
.btn-outline-white { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); color: #fff; }
.btn-outline-primary { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline-primary:hover { background: var(--color-primary-pale); color: var(--color-primary); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-danger { background: var(--color-error); color: #fff; border-color: var(--color-error); }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--color-success); color: #fff; border-color: var(--color-success); }
.btn-success:hover { background: #38a169; color: #fff; }

/* Page Header */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; font-family: var(--font-heading); }

/* Auth Page */
.auth-page { max-width: 400px; margin: 0 auto; }
.auth-page h1 { margin-bottom: 1.5rem; }
.auth-alt { margin-top: 1.5rem; text-align: center; font-size: 0.875rem; color: #666; }
.auth-alt a { color: var(--color-primary); }

/* Role Toggle */
.role-toggle {
  display: flex;
  gap: 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}
.role-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  background: #fff;
  color: #555;
  transition: background 150ms, color 150ms;
  border-right: 1px solid #ccc;
}
.role-option:last-child { border-right: none; }
.role-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.role-option:has(input:checked) { background: var(--color-primary); color: #fff; }
.role-option:hover:not(:has(input:checked)) { background: #f0f0f0; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.25rem; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: #333; }

.input {
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 150ms;
}
.input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(255, 95, 31, 0.1); }
.input-error { border-color: #dc2626; }

.field-error { font-size: 0.8125rem; color: #dc2626; }
.form-error {
  padding: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  font-size: 0.875rem;
}

/* Flash Messages */
.flash {
  padding: 0.75rem 1rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  color: #065f46;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Toast */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  animation: toast-in 200ms ease;
}
.toast-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.toast-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.toast-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* Page Subtitle */
.page-subtitle { font-size: 0.9375rem; color: #666; margin-top: 0.25rem; }

/* Form Layout Helpers */
.form-row { display: flex; gap: 1rem; }
.form-row > .form-group { flex: 1; }
.form-row-2 > .form-group { flex: 1; }
.form-row-3 > .form-group { flex: 1; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }

select.input { appearance: auto; }
textarea.input { resize: vertical; font-family: inherit; }

/* Text helpers */
.text-muted { color: #999; }

/* Task List */
.task-list { display: flex; flex-direction: column; gap: 1rem; }

.task-section {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.task-section.task-complete {
  border-color: #a7f3d0;
}

.task-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.task-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
  background: #f0f0f0;
  color: #666;
}
.task-complete .task-icon {
  background: #065f46;
  color: #fff;
}

.task-info { flex: 1; min-width: 0; }
.task-info h3 { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.task-summary {
  font-size: 0.8125rem;
  color: #666;
  margin-top: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid #f0f0f0;
}

/* AddressFinder */
.af-address-wrap { position: relative; }

.af-suggestions,
#af-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.af-suggestions {
  background: #fff;
  border: 1px solid var(--color-primary);
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 240px;
  overflow-y: auto;
}
.af-suggestion {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 100ms;
}
.af-suggestion:hover,
.af-active {
  background: #eff6ff;
  color: var(--color-primary);
}
.af-verified-tick {
  display: none;
  font-size: 0.75rem;
  color: #065f46;
  background: #ecfdf5;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 0.5rem;
}
.af-verified-tick.visible { display: inline; }

.af-address-wrap .input:focus {
  border-radius: 6px 6px 0 0;
}

/* Add-on Cards */
.addon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.addon-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
  background: #fff;
}
.addon-card:hover { border-color: #bfdbfe; background: #f8faff; }
.addon-selected { border-color: var(--color-primary); background: #eff6ff; }

.addon-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 4px;
  border: 2px solid #ccc;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.125rem;
}
.addon-selected .addon-check {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.addon-info { flex: 1; min-width: 0; }
.addon-info h4 { font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
.addon-info p { font-size: 0.75rem; color: #666; margin-top: 0.125rem; line-height: 1.4; }

.addon-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.addon-summary {
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  border-top: 1px solid #e0e0e0;
}

/* Review Section */
.review-section { margin-bottom: 1.5rem; }
.review-section h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #f0f0f0;
}

.review-dl { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; font-size: 0.875rem; }
.review-dl dt { color: #666; font-weight: 500; }
.review-dl dd { color: #1a1a1a; }

.review-costs {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}
.review-costs td {
  padding: 0.375rem 0;
}
.review-cost-amount { text-align: right; }
.review-costs-total td {
  border-top: 2px solid #1a1a1a;
  padding-top: 0.5rem;
}

.review-incomplete {
  padding: 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #92400e;
}
.review-incomplete ul { margin-top: 0.5rem; padding-left: 1.25rem; }

.review-payment-note {
  font-size: 0.8125rem;
  color: #666;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Payment result page */
.payment-result {
  max-width: 480px;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
}
.payment-result-icon {
  font-size: 3rem;
  color: #16a34a;
  background: #f0fdf4;
  width: 5rem;
  height: 5rem;
  line-height: 5rem;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}
.payment-result h1 {
  margin-bottom: 0.5rem;
}
.payment-result .text-muted {
  color: #999;
  font-size: 0.875rem;
}

/* Dashboard */
.listing-table { overflow-x: auto; }
.listing-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.listing-table th {
  text-align: left;
  padding: 0.75rem 0.75rem;
  border-bottom: 2px solid var(--color-border);
  font-weight: 600;
  color: var(--color-text-light);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.listing-table td {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.listing-table tr:hover td {
  background: var(--color-off-white);
}
.listing-address { font-weight: 500; color: var(--color-dark); }
.listing-meta { font-size: 0.75rem; color: var(--color-text-light); margin-top: 0.125rem; }
.listing-actions { display: flex; gap: 0.375rem; flex-wrap: wrap; }

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.badge-draft { background: #f3f4f6; color: #6b7280; }
.badge-pending_review { background: #fef3c7; color: #92400e; }
.badge-live { background: #d1fae5; color: #065f46; }
.badge-sold { background: #dbeafe; color: #1e40af; }
.badge-withdrawn { background: #fee2e2; color: #991b1b; }
.badge-reval { background: #fef3c7; color: #92400e; font-size: 0.7rem; margin-left: 0.25rem; }

/* Sync queue */
.sync-row-reval { background: #fffbeb; }
.text-warning { color: #b45309; font-weight: 600; }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-light);
  max-width: 500px;
  margin: 0 auto;
}
.empty-state h3 {
  font-family: var(--font-heading);
  color: var(--color-text);
  margin-bottom: 0.5rem;
}
.empty-state p { margin-bottom: 1rem; font-size: 0.9375rem; }

/* Image Grid */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.image-thumb-wrap {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
  aspect-ratio: 4 / 3;
  cursor: grab;
}
.image-thumb-wrap:active { cursor: grabbing; }
.image-thumb-wrap.image-dragging { opacity: 0.4; }

.image-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-actions {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
  padding: 0.25rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, transparent 100%);
}

.image-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 4px;
  background: rgba(255,255,255,0.85);
  color: #333;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 150ms;
  padding: 0;
  line-height: 1;
}
.image-action-btn:hover { background: #fff; }
.image-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.image-delete-btn { color: #dc2626; font-size: 1.125rem; }
.image-delete-btn:hover { background: #fef2f2; }

.image-star-btn { color: #eab308; font-size: 1rem; }
.image-star-btn:hover { background: #fefce8; }

.image-enhance-btn {
  font-size: 0.625rem;
  font-weight: 700;
  color: #7c3aed;
}
.image-enhance-btn:hover { background: #f5f3ff; }

.image-primary-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  color: #eab308;
  font-size: 1.125rem;
  background: rgba(255,255,255,0.85);
  border-radius: 4px;
  line-height: 1;
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 150ms, background 150ms;
  margin-top: 0.75rem;
}
.upload-dropzone:hover { border-color: #93c5fd; }
.upload-drop-active {
  border-color: var(--color-primary);
  background: #eff6ff;
}

.dropzone-hint {
  font-size: 0.875rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.upload-buttons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.upload-progress {
  margin-top: 0.75rem;
}
.upload-progress-bar {
  height: 6px;
  background: var(--color-primary);
  border-radius: 3px;
  transition: width 150ms;
  width: 0%;
}
.upload-progress-text {
  display: block;
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.25rem;
}

/* --- Floorplans & Video section --- */
.subsection-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
  margin: 1rem 0 0.5rem;
}
.subsection-heading:first-child { margin-top: 0; }

.floorplan-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.floorplan-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.floorplan-name {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-item {
  margin-bottom: 0.75rem;
}
.video-item video {
  width: 100%;
  max-width: 480px;
  border-radius: 6px;
  background: #000;
}
.video-item .floorplan-item {
  margin-top: 0.5rem;
  max-width: 480px;
}

.btn-danger-text {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.btn-danger-text:hover { background: #fef2f2; }
.btn-danger-text:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Open Inspection Management (Dashboard) --- */
.inspection-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.inspection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.inspection-datetime {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.inspection-date {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a1a1a;
}
.inspection-time {
  font-size: 0.8125rem;
  color: #666;
}

.inspection-actions {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.inspection-editing {
  background: #f8faff;
  border-color: #bfdbfe;
}

.inspection-edit-inline {
  width: 100%;
}
.inspection-edit-inline .form-row {
  display: flex;
  gap: 0.75rem;
}
.inspection-edit-inline .form-group {
  flex: 1;
}

.inspection-form-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem;
}
.inspection-form-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.inspection-form .form-row {
  display: flex;
  gap: 0.75rem;
}
.inspection-form .form-group {
  flex: 1;
}

/* --- Public Listing Detail --- */
.listing-detail {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  padding: 1.5rem 0;
}
.listing-detail-main {
  min-width: 0;
}
.listing-detail-sidebar {
  position: sticky;
  top: 1.5rem;
  align-self: start;
}

/* Price card in sidebar */
.listing-price-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
}
.listing-price-card .listing-detail-price {
  margin-top: 0;
  margin-bottom: 0.75rem;
}
.listing-price-card .listing-detail-features {
  margin-bottom: 0;
}

.listing-detail-header {
  margin-bottom: 1.5rem;
}
.listing-detail-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  font-family: var(--font-heading);
  color: var(--color-dark);
}
.listing-detail-address {
  font-size: 1rem;
  color: var(--color-text-light);
  margin-top: 0.25rem;
}
.listing-detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 0.5rem;
}

.listing-detail-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.listing-feature {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--color-off-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--color-text);
  font-weight: 500;
  text-transform: capitalize;
}

.listing-detail-description {
  margin-bottom: 1.5rem;
}
.listing-detail-description h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}
.listing-detail-description p {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.7;
  white-space: pre-wrap;
}

.listing-detail-inspections {
  margin-bottom: 1.5rem;
}
.listing-detail-inspections h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-dark);
}

.ofi-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ofi-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.ofi-datetime {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.ofi-date {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-dark);
}
.ofi-time {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.ofi-ical-btn {
  white-space: nowrap;
  font-size: 0.8125rem;
}

.listing-detail-meta {
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}
.listing-meta-item {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  text-transform: capitalize;
}

/* --- Image Gallery on detail page --- */
.listing-gallery {
  margin-bottom: 1.5rem;
}
.gallery-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-off-white);
  margin-bottom: 0.5rem;
}
.gallery-hero img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  display: block;
}
.gallery-count {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.8125rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius);
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.375rem;
}
.gallery-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-off-white);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 150ms;
}
.gallery-thumb:hover img {
  opacity: 0.8;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 10;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms;
}
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: #fff;
  font-size: 0.9375rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
}

/* Floorplan section on detail page */
.listing-detail-floorplans {
  margin-bottom: 1.5rem;
}
.listing-detail-floorplans h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-dark);
}
.floorplan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.floorplan-item {
  position: relative;
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-off-white);
  transition: box-shadow 200ms;
}
.floorplan-item:hover {
  box-shadow: var(--shadow-lg);
}
.floorplan-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 400px;
  background: #fff;
}
.floorplan-expand {
  display: block;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
}

/* Floorplan badge on browse cards */
.listing-card-badge-fp {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.625rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-dark);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Enquiry section */
.enquiry-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.enquiry-section h2 { margin-bottom: 1rem; }
.enquiry-form { max-width: 480px; }
.enquiry-form .form-group { margin-bottom: 1rem; }
.enquiry-form textarea {
  resize: vertical;
  min-height: 80px;
}
.enquiry-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 1.5rem;
}
.enquiry-success h2 { color: #166534; }
.enquiry-success p { margin-top: 0.5rem; color: #333; }

/* Enquiry code section */
.enquiry-code-section {
  background: var(--color-primary-pale);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
}
.enquiry-code-section h2 {
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}
.enquiry-phone {
  font-size: 1.1rem;
}
.enquiry-code-display {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.3em;
  background: var(--color-white);
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius);
  border: 2px dashed var(--color-primary);
  margin: 0.75rem 0;
}
.enquiry-code-hint {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* Call event results */
.call-event-result {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}
.call-event-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.call-event-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Offer section (public listing page) */
.offer-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}
.offer-section h2 {
  margin-bottom: 1rem;
}
.offer-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 1.5rem;
  color: #166534;
}
.form-checkbox {
  display: flex;
  align-items: center;
}
.form-checkbox label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: normal;
}
.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* LOI Form */
.loi-form-section {
  max-width: 900px;
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.loi-header {
  text-align: center;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid #FF5F1F;
}
.loi-title {
  font-size: 1.75rem;
  color: #333;
  margin: 0 0 0.25rem;
  letter-spacing: 0.5px;
}
.loi-subtitle {
  font-size: 1.25rem;
  color: #FF5F1F;
  margin: 0;
  font-weight: 600;
}
.loi-form {
  max-width: 100%;
}
.loi-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e5e7eb;
}
.loi-grid {
  display: grid;
  gap: 1rem;
}
.loi-grid-2 {
  grid-template-columns: 1fr 1fr;
}
.loi-grid-3 {
  grid-template-columns: 2fr 1fr 2fr;
}
.loi-grid-sig {
  grid-template-columns: 2fr 1fr;
}
@media (max-width: 768px) {
  .loi-grid-2,
  .loi-grid-3,
  .loi-grid-sig {
    grid-template-columns: 1fr;
  }
  .loi-form-section {
    padding: 1rem;
  }
}
.input-readonly {
  background: #f3f4f6;
  cursor: not-allowed;
  color: #6b7280;
}
.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix {
  position: absolute;
  left: 12px;
  color: #6b7280;
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}
.input-currency {
  padding-left: 28px;
}
.loi-radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
}
.loi-radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-weight: normal;
}
.loi-radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.loi-hint {
  font-size: 0.8rem;
  color: #666;
  margin: 0.25rem 0 0;
}
.loi-inline-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.loi-inline-row > label {
  white-space: nowrap;
}
.loi-inline-field {
  margin-bottom: 0;
}
.input-medium {
  max-width: 220px;
}
.loi-conditions-box {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.loi-conditions-box .loi-section-title {
  margin-top: 0;
}
.loi-disclaimer {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  color: #856404;
  font-size: 0.9rem;
}
.loi-disclaimer p {
  margin: 0.5rem 0;
}
.loi-disclaimer p:first-child {
  margin-top: 0;
}
.loi-disclaimer p:last-child {
  margin-bottom: 0;
}
.loi-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1.05rem;
  margin-top: 1rem;
}

/* Submit Offer button on listing detail */
.btn-submit-offer {
  display: inline-block;
  font-size: 1.1rem;
  padding: 0.875rem 2.5rem;
  min-width: 220px;
  text-align: center;
  text-decoration: none;
}
.offer-login-hint {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #6b7280;
}

/* Standalone offer page */
.offer-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.9rem;
}
.back-link:hover {
  color: #374151;
}
.offer-page-property-summary {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #FF5F1F;
}
.offer-page-property-summary h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}
.offer-page-address {
  margin: 0 0 0.25rem;
  color: #6b7280;
}
.offer-page-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: #059669;
}

/* Offer table (seller dashboard) */
.offer-table {
  margin-top: 1rem;
}
.offer-table table {
  width: 100%;
  border-collapse: collapse;
}
.offer-table th,
.offer-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
.offer-table th {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
}
.offer-amount {
  font-weight: 600;
  color: #059669;
}

/* Offer status badges */
.badge-pending {
  background: #fef3c7;
  color: #92400e;
}
.badge-accepted {
  background: #d1fae5;
  color: #065f46;
}
.badge-declined {
  background: #fee2e2;
  color: #991b1b;
}
.badge-countered {
  background: #dbeafe;
  color: #1e40af;
}

/* Offer conditions expandable */
.offer-conditions {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}
.offer-conditions summary {
  cursor: pointer;
  color: var(--color-primary);
  font-size: 0.85rem;
}
.offer-conditions p {
  margin: 0.5rem 0 0;
  padding: 0.5rem;
  background: #f9fafb;
  border-radius: 4px;
  white-space: pre-wrap;
}

/* Offer counter form (inline in table) */
.offer-counter-row td {
  background: #eff6ff;
  padding: 1rem;
}
.offer-counter-form {
  max-width: 700px;
}
.offer-counter-form h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

/* Page subtitle */
.page-subtitle {
  color: #6b7280;
  margin-top: 0.25rem;
}

/* --- Inbox (Enquiries & Offers) --- */
.inbox-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 1.5rem;
}
.inbox-tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 150ms, border-color 150ms;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.inbox-tab:hover { color: #1a1a1a; }
.inbox-tab-active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Badge count (small pill) */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 9999px;
  background: #dc2626;
  color: #fff;
  line-height: 1;
}
.badge-count-blue {
  background: var(--color-primary);
}

/* Inbox table */
.inbox-table { overflow-x: auto; }
.inbox-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.inbox-table th {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid #e0e0e0;
  font-weight: 600;
  color: #555;
  font-size: 0.8125rem;
}
.inbox-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

/* Unread enquiry row */
.enquiry-unread {
  background: #eff6ff;
}
.enquiry-unread td {
  border-bottom-color: #dbeafe;
}

/* Enquiry message cell */
.enquiry-message-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile: stack inbox table */
@media (max-width: 768px) {
  .inbox-table table,
  .inbox-table thead,
  .inbox-table tbody,
  .inbox-table tr,
  .inbox-table th,
  .inbox-table td {
    display: block;
  }
  .inbox-table thead { display: none; }
  .inbox-table tr {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #fff;
  }
  .inbox-table tr.enquiry-unread { background: #eff6ff; }
  .inbox-table td {
    border-bottom: none;
    padding: 0.25rem 0;
  }
  .inbox-table td:first-child {
    font-weight: 600;
    color: #555;
    font-size: 0.75rem;
  }
  .listing-actions { flex-wrap: wrap; }
  .enquiry-message-cell {
    max-width: none;
    white-space: normal;
  }
}

/* Auction form section title */
.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 1.25rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}
.field-hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.125rem;
}

/* Bid panel */
.bid-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.bid-panel h3 { margin: 0 0 0.75rem; font-size: 1.125rem; }
.bid-current { margin-bottom: 0.75rem; }
.bid-label { display: block; font-size: 0.8125rem; color: #64748b; margin-bottom: 0.25rem; }
.bid-amount { display: block; font-size: 1.75rem; font-weight: 700; color: #1e293b; }
.bid-count { font-size: 0.8125rem; color: #64748b; }
.bid-status-flags { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.bid-ends, .bid-increment { font-size: 0.875rem; color: #475569; margin: 0.25rem 0; }
.bid-form { margin-top: 1rem; }
.bid-form label { font-size: 0.875rem; font-weight: 500; color: #333; display: block; margin-bottom: 0.25rem; }
.bid-form-row { display: flex; gap: 0.5rem; }
.bid-input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 1rem; }
.bid-error { color: #dc2626; font-size: 0.875rem; margin-bottom: 0.5rem; }
.bid-register-section { margin-top: 1rem; }
.bid-register-prompt { font-size: 0.875rem; color: #475569; margin-bottom: 0.5rem; }
.bid-registered-msg { font-size: 0.875rem; color: #059669; margin-top: 0.5rem; }
.bid-login-prompt { font-size: 0.875rem; color: #475569; margin-top: 0.5rem; }
.bid-scheduled-time { font-size: 1rem; color: #475569; }
.bid-history { margin-top: 1.25rem; }
.bid-history h4 { font-size: 0.9375rem; margin: 0 0 0.5rem; }
.bid-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.bid-table th { text-align: left; padding: 0.375rem 0.5rem; border-bottom: 1px solid #e2e8f0; color: #64748b; font-weight: 500; }
.bid-table td { padding: 0.375rem 0.5rem; border-bottom: 1px solid #f1f5f9; }

/* Vendor bid styles */
.vendor-bid-section {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 2px solid #f59e0b;
  border-radius: 0.5rem;
  background: #fffbeb;
}
.vendor-bid-section h4 { margin: 0 0 0.375rem; color: #92400e; font-size: 1rem; }
.vendor-bid-section p { font-size: 0.875rem; color: #78350f; margin: 0 0 0.75rem; }
.btn-vendor-bid {
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.875rem;
}
.btn-vendor-bid:hover { background: #d97706; }
.btn-vendor-bid:disabled { opacity: 0.6; cursor: not-allowed; }
.vendor-bid-row { background: #fffbeb; }
.vendor-bid-label {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.vendor-bid-used {
  font-size: 0.875rem;
  color: #92400e;
  font-style: italic;
  margin-top: 0.75rem;
}

/* Auction status line */
.bid-status-line { margin-bottom: 0.75rem; }
.bid-status-text { font-size: 0.9375rem; font-weight: 600; margin: 0; }
.bid-status-reserve-not-met { color: #b45309; }
.bid-status-on-market { color: #059669; }

/* Countdown timer */
.auction-countdown {
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #1e293b;
  margin-bottom: 0.5rem;
  min-height: 1.5rem;
}
.auction-countdown-urgent { color: #dc2626; }
.auction-countdown-ended { color: #64748b; font-weight: 500; }

/* Dashboard auction badges */
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-default { background: #f3f4f6; color: #6b7280; }
.badge-danger { background: #fee2e2; color: #991b1b; }

.badge { display: inline-block; padding: 0.125rem 0.5rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }

/* --- Browse Page --- */
.browse-header {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
}
.browse-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}
.browse-header .page-subtitle {
  color: var(--color-text-light);
  font-size: 1rem;
}

/* --- Browse Listing Grid --- */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-bottom: 2rem;
  width: 100%;
}
@media (max-width: 1024px) {
  .listing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.listing-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 200ms, transform 200ms;
  box-shadow: var(--shadow-sm);
}
.listing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.listing-card-img {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--color-off-white);
  overflow: hidden;
}
.listing-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms;
}
.listing-card:hover .listing-card-img img {
  transform: scale(1.03);
}
.listing-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.875rem;
  color: var(--color-text-light);
  background: var(--color-off-white);
}
.listing-card-type {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.625rem;
  background: var(--color-dark);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.listing-card-body {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}
.listing-card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-body);
}
.listing-card-headline {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: var(--color-dark);
}
.listing-card-address {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin: 0;
}
.listing-card-address .location-link {
  color: var(--color-text-light);
  text-decoration: none;
}
.listing-card-address .location-link:hover {
  color: var(--color-primary);
}
.listing-card-features {
  display: flex;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text);
  font-weight: 500;
}
.listing-card-features span {
  white-space: nowrap;
}

/* --- Add-on Purchase Grid --- */
.addon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.addon-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.addon-card-body {
  padding: 1rem;
}
.addon-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.addon-name {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}
.addon-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}
.addon-description {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}
.addon-purchased-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.125rem 0.5rem;
  background: #dcfce7;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}
.addon-card-footer {
  padding: 0 1rem 1rem;
}

/* Nav link */
.nav-link {
  font-size: 0.875rem;
  text-decoration: none;
  color: #555;
  font-weight: 500;
}
.nav-link:hover { color: #1a1a1a; }

/* ============================================================
   Valuation / CMA report
   ============================================================ */
.valuation-page {
  max-width: 640px;
  margin: 0 auto;
}
.valuation-intro {
  text-align: center;
  margin-bottom: 2rem;
}
.valuation-intro h1 {
  margin-bottom: 0.5rem;
}
.valuation-intro .page-subtitle {
  color: #666;
  max-width: 480px;
  margin: 0 auto 1rem;
}
.valuation-price-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
}
.valuation-price-badge span {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
}
.valuation-form h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}
.valuation-summary {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}
.valuation-cta {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  text-align: center;
}
.valuation-cta-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
}
.valuation-cta-link:hover {
  text-decoration: underline;
}

/* Valuation detail grid */
.valuation-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: capitalize;
}
.status-queued { background: #fef3c7; color: #92400e; }
.status-in_progress { background: #dbeafe; color: #1e40af; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-pending_payment { background: #f3f4f6; color: #6b7280; }

/* Upload area for admin PDF uploads */
.upload-area {
  padding: 1.5rem;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  text-align: center;
}
.upload-status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #666;
}
.upload-error { color: #dc2626; }
.upload-success { color: #059669; }

/* ============================================================
   Savings Calculator
   ============================================================ */
.calc-page {
  max-width: 800px;
  margin: 0 auto;
}
.calc-intro {
  text-align: center;
  margin-bottom: 2rem;
}
.calc-intro h1 { margin-bottom: 0.5rem; }

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

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

/* Input panel */
.calc-input-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
}
.calc-input-panel h2 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}
.calc-input-hint {
  font-size: 0.8125rem;
  color: #666;
  margin-bottom: 1rem;
}

/* Slider */
.calc-slider-wrap {
  margin-bottom: 1rem;
}
.calc-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e5e7eb;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.calc-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.calc-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.25rem;
}

/* Price input */
.calc-price-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.calc-dollar-sign {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
}
.calc-price-input {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  flex: 1;
}

.calc-btn {
  margin-top: 0.5rem;
}

/* Result panel */
.calc-result-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
}

.calc-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  text-align: center;
  color: #999;
  font-size: 0.9375rem;
}

/* Savings hero */
.calc-savings-hero {
  text-align: center;
  padding: 1rem 0 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1.25rem;
}
.calc-savings-label {
  display: block;
  font-size: 0.8125rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.calc-savings-amount {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  color: #059669;
  line-height: 1.2;
  margin: 0.25rem 0;
}
.calc-savings-sub {
  display: block;
  font-size: 0.875rem;
  color: #555;
}

/* Comparison columns */
.calc-comparison {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.calc-compare-col {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}
.calc-compare-col h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.calc-compare-traditional {
  background: #fef2f2;
  border-color: #fecaca;
}
.calc-compare-traditional h3 { color: #991b1b; }
.calc-compare-traditional .calc-compare-total { color: #dc2626; }

.calc-compare-ours {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.calc-compare-ours h3 { color: #166534; }
.calc-compare-ours .calc-compare-total { color: #059669; }

.calc-compare-total {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.calc-compare-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.calc-compare-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #555;
}

.calc-cta {
  margin-top: 0.5rem;
}

.calc-footnote {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: #999;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Homepage widget */
.calc-widget {
  margin-top: 3rem;
  padding: 2rem 0;
}
.calc-widget-inner {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}
.calc-widget-inner h2 {
  font-size: 1.375rem;
  margin-bottom: 0.375rem;
}
.calc-widget-inner > p {
  font-size: 0.9375rem;
  color: #555;
  margin-bottom: 1.25rem;
}
.calc-widget-example {
  margin-bottom: 1.25rem;
}
.calc-widget-stat {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
}
.calc-widget-stat-label {
  font-size: 0.875rem;
  color: #666;
}
.calc-widget-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #059669;
}

/* =========================================
   Fulfilment Queue
   ========================================= */
.fulfilment-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.fulfilment-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.fulfilment-badge:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.fulfilment-badge-active {
  background: #1f2937;
  color: #fff;
  border-color: #1f2937;
}
.fulfilment-badge-active:hover {
  background: #374151;
  border-color: #374151;
}
.fulfilment-badge strong {
  font-weight: 700;
}
.badge-fulfilment-task {
  background: #ede9fe;
  color: #5b21b6;
}
.badge-fulfilment-sync {
  background: #fef3c7;
  color: #92400e;
}
.badge-fulfilment-val {
  background: #dbeafe;
  color: #1e40af;
}
.badge-fulfilment-ad {
  background: #d1fae5;
  color: #065f46;
}

/* ============================================================
   Home Page — Hero
   ============================================================ */
.home-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: -2rem -1rem 0;
  padding: 4rem 1rem;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,26,26,0.65) 0%, rgba(26,26,26,0.4) 100%);
}
.home-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.home-hero h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.home-hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.home-hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .home-hero { min-height: 400px; padding: 3rem 1rem; }
  .home-hero h1 { font-size: 2rem; }
  .home-hero p { font-size: 1rem; }
}

/* ============================================================
   Home Page — Trust Bar
   ============================================================ */
.trust-bar {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 1rem;
  margin: 0 -1rem;
}
.trust-bar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.trust-stat {
  text-align: center;
}
.trust-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-heading);
}
.trust-stat-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-top: 0.125rem;
}

/* ============================================================
   Home Page — Value Props
   ============================================================ */
.value-section {
  padding: 4rem 1rem;
  max-width: var(--container-max);
  margin: 0 auto;
}
.value-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.value-section > p {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 3rem;
  font-size: 1.0625rem;
}
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.value-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 200ms, box-shadow 200ms;
}
.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.value-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.75rem;
}
.value-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}
.value-card p {
  font-size: 0.9375rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .value-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .value-section h2 { font-size: 1.5rem; }
}

/* ============================================================
   Home Page — How It Works
   ============================================================ */
.how-section {
  background: var(--color-white);
  padding: 4rem 1rem;
  margin: 0 -1rem;
}
.how-section-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}
.how-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  counter-reset: step;
}
.how-step {
  text-align: center;
  position: relative;
}
.how-step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.how-step h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}
.how-step p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .how-steps { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .how-section h2 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .how-steps { grid-template-columns: 1fr; }
}

/* ============================================================
   Home Page — Savings Preview
   ============================================================ */
.savings-preview {
  background: var(--color-primary-pale);
  padding: 4rem 1rem;
  margin: 0 -1rem;
  text-align: center;
}
.savings-preview-inner {
  max-width: 640px;
  margin: 0 auto;
}
.savings-preview h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.savings-preview > p,
.savings-preview-inner > p {
  font-size: 1.0625rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}
.savings-highlight {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  font-family: var(--font-heading);
  margin-bottom: 0.25rem;
}
.savings-context {
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

/* ============================================================
   Home Page — Featured Listings
   ============================================================ */
.featured-section {
  padding: 4rem 1rem;
  max-width: var(--container-max);
  margin: 0 auto;
}
.featured-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}
.featured-cta {
  text-align: center;
  margin-top: 2rem;
}

/* ============================================================
   Home Page — CTA Banner
   ============================================================ */
.cta-banner {
  background: var(--color-dark);
  padding: 4rem 1rem;
  margin: 0 -1rem;
  text-align: center;
}
.cta-banner h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.cta-banner p {
  color: rgba(255,255,255,0.7);
  font-size: 1.0625rem;
  margin-bottom: 2rem;
}
.cta-banner-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   Help Pages
   ============================================================ */
.help-hero {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  margin: -2rem -1rem 0;
  padding: 3rem 1rem;
}
.help-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26,26,26,0.8) 0%, rgba(26,26,26,0.4) 100%);
}
.help-hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}
.help-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.help-hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.8);
}

.help-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 3rem 1rem;
}
.help-toc {
  position: sticky;
  top: 80px;
  align-self: start;
}
.help-toc h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
}
.help-toc ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.help-toc a {
  font-size: 0.875rem;
  color: var(--color-text-light);
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-left: 2px solid transparent;
  display: block;
  transition: all 150ms;
}
.help-toc a:hover {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  background: var(--color-primary-pale);
}
.help-content {
  min-width: 0;
}
.help-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
}
.help-content h2:first-child { margin-top: 0; padding-top: 0; }
.help-content h3 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.help-content p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 1rem;
}
.help-content ul, .help-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.help-content li {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}
.help-callout {
  background: var(--color-primary-pale);
  border-left: 4px solid var(--color-primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.help-callout p { margin-bottom: 0; }

/* FAQ Accordion */
.faq-section { margin-top: 2rem; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
}
.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 200ms;
}
.faq-item.faq-open .faq-question::after {
  content: '-';
}
.faq-answer {
  display: none;
  padding: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--color-text-light);
  line-height: 1.7;
}
.faq-item.faq-open .faq-answer { display: block; }

.help-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.help-related h3 {
  margin-bottom: 1rem;
  font-family: var(--font-body);
}
.help-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.help-related-card {
  display: block;
  padding: 1.25rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 150ms;
}
.help-related-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.help-related-card h4 {
  font-size: 0.9375rem;
  font-family: var(--font-body);
  color: var(--color-text);
  margin-bottom: 0.25rem;
}
.help-related-card p {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin: 0;
}

@media (max-width: 768px) {
  .help-layout { grid-template-columns: 1fr; gap: 0; }
  .help-toc { display: none; }
  .help-hero h1 { font-size: 1.75rem; }
  .listing-detail {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem 0;
  }
  .listing-detail-sidebar {
    position: static;
  }
  .listing-detail-header h1 {
    font-size: 1.375rem;
  }
  .listing-detail-price {
    font-size: 1.25rem;
  }
  .listing-grid {
    grid-template-columns: 1fr;
  }
  .browse-header h1 {
    font-size: 1.5rem;
  }
}

/* ============================================================
   Addon Showcase (Help Page)
   ============================================================ */
.addon-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.addon-showcase .addon-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 150ms;
  display: block;
  cursor: default;
}
.addon-showcase .addon-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.addon-showcase .addon-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.addon-showcase .addon-card-header h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}
.addon-showcase .addon-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.addon-price-period {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-light);
}
.addon-showcase .addon-card > p {
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.addon-showcase .addon-card ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
}
.addon-showcase .addon-card ul li {
  margin-bottom: 0.25rem;
}
.pkg-check {
  color: var(--color-success);
  font-weight: 600;
  text-align: center;
}
.pkg-empty {
  color: var(--color-text-light);
  text-align: center;
}
.package-total-row td {
  border-top: 2px solid var(--color-dark);
  font-size: 1.0625rem;
}
.package-savings-row td {
  color: var(--color-primary);
  background: var(--color-primary-pale);
}
.package-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}
.package-table th:nth-child(3) {
  background: var(--color-primary);
}
.package-table td:nth-child(2),
.package-table td:nth-child(3),
.package-table td:nth-child(4) {
  text-align: center;
}

/* Package comparison table */
.package-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.package-table th, .package-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9375rem;
}
.package-table th {
  background: var(--color-dark);
  color: #fff;
  font-weight: 600;
}
.package-table th:first-child { border-radius: var(--radius) 0 0 0; }
.package-table th:last-child { border-radius: 0 var(--radius) 0 0; }
.package-table tr:hover { background: var(--color-primary-pale); }
.package-highlight {
  background: var(--color-primary-pale);
  border-left: 3px solid var(--color-primary);
}

/* ============================================================
   Auth Pages Polish
   ============================================================ */
.auth-page {
  max-width: 440px;
  margin: 3rem auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}
.auth-page h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
  color: var(--color-dark);
}
.auth-alt {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-light);
}
.auth-alt a {
  color: var(--color-primary);
  font-weight: 600;
}

/* ============================================================
   Dashboard Polish
   ============================================================ */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.dash-header h1 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  margin: 0;
}
.dash-header-actions {
  display: flex;
  gap: 0.5rem;
}
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.dash-stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.dash-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-heading);
}
.dash-stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-top: 0.25rem;
}

/* Location link in cards */
.location-link {
  color: var(--color-text-light);
  text-decoration: none;
}
.location-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ============================================================
   Breadcrumbs
   ============================================================ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--color-text-light);
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs span { color: var(--color-text-light); }

/* ============================================================
   Full-width section helper
   ============================================================ */
.full-width {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
}

/* ============================================================
   Global Mobile Overrides
   ============================================================ */
@media (max-width: 768px) {
  .auth-page {
    margin: 1.5rem 1rem;
    padding: 1.5rem;
  }
  .dash-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .dash-header-actions {
    width: 100%;
  }
  .dash-header-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
  }
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .addon-showcase {
    grid-template-columns: 1fr;
  }
  .package-table {
    font-size: 0.8125rem;
  }
  .package-table th, .package-table td {
    padding: 0.5rem;
  }
}

/* ============================
   Settlement & Final Inspection
   ============================ */
.settlement-section { margin-bottom: 2rem; }

.settlement-date-confirmed {
  background: #f0fdf4;
  padding: 8px 16px;
  border-radius: 6px;
  border-left: 4px solid #16a34a;
  color: #166534;
  font-weight: 600;
}

.settlement-date-pending {
  background: #fffbeb;
  padding: 8px 16px;
  border-radius: 6px;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.badge-proposed { background: #dbeafe; color: #1e40af; }
.badge-satisfactory { background: #dcfce7; color: #166534; }
.badge-issues_found { background: #fef2f2; color: #991b1b; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }
.badge-completed { background: #dcfce7; color: #166534; }
.badge-scheduled { background: #dbeafe; color: #1e40af; }
.badge-settled { background: #dcfce7; color: #166534; }
.btn-active { background: var(--primary); color: #fff; }

.inspection-report {
  background: var(--bg-card, #f8fafc);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
}

.report-outcome-group {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}
.report-outcome-group label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================
   Report Section (listing detail sidebar)
   ============================ */
.report-section {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-card, #f8fafc);
}
.report-section h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.report-intro {
  font-size: 0.85rem;
  color: var(--muted, #6b7280);
  margin-bottom: 0.75rem;
}
.report-intro a { color: var(--primary, #2563eb); }
.report-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.report-success {
  color: #16a34a;
  font-weight: 500;
}
.report-error {
  color: #dc2626;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.btn-report-submit {
  background: #e5e7eb;
  color: var(--text, #1f2937);
  border: 1px solid var(--border, #e2e8f0);
}
.btn-report-submit:hover {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

/* Report bid button in bid history */
.btn-report-bid {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted, #6b7280);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  line-height: 1;
}
.btn-report-bid:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}
.bid-report-hint {
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
  margin-top: 0.5rem;
}
.bid-report-hint a { color: var(--primary, #2563eb); }

/* Admin report badges */
.badge-report-open { background: #fef2f2; color: #991b1b; }
.badge-report-reviewed { background: #dbeafe; color: #1e40af; }
.badge-report-dismissed { background: #f3f4f6; color: #6b7280; }

/* Auction guide warning callout */
.help-callout-warning {
  border-left-color: #dc2626;
  background: #fef2f2;
}

/* Admin report detail list */
.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
}
.detail-list dt {
  font-weight: 600;
  color: var(--muted, #6b7280);
  font-size: 0.85rem;
}
.detail-list dd { margin: 0; }
