/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  --color-primary: #FF5F1F;
  --color-primary-hover: #FF7A45;
  --color-primary-pale: #FFF5F0;
  --color-primary-text: #BF4400;
  --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-text); }
a:hover { color: #A03A00; }

/* 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: #fff;
  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-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;
}

/* Admin dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--color-dark);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 0.375rem 0;
  z-index: 200;
}
.nav-dropdown-menu.open {
  display: flex;
  flex-direction: column;
}
.nav-dropdown-menu a {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: background 150ms;
}
.nav-dropdown-menu a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* User dropdown toggle */
.nav-user-toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 999px;
  transition: background 150ms;
}
.nav-user-toggle:hover {
  background: rgba(255,255,255,0.1);
}
.nav-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: var(--font-body);
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}
.nav-user-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-chevron {
  color: rgba(255,255,255,0.6);
  font-size: 0.625rem;
  transition: transform 150ms;
}
.nav-user-toggle[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}
.nav-user-label {
  padding: 0.625rem 1rem 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}
.nav-dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 0.25rem 0;
}
.nav-dropdown-logout {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 150ms;
}
.nav-dropdown-logout:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.nav-user-menu {
  min-width: 200px;
}

@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: flex; }
  .site-nav { position: relative; }
  .nav-dropdown-menu {
    position: static;
    border: none;
    box-shadow: none;
    min-width: 0;
    padding: 0 0 0 1rem;
  }
  .nav-user-toggle {
    width: 100%;
    padding: 0.5rem 1rem;
    justify-content: flex-start;
    gap: 0.75rem;
  }
  .nav-chevron { display: none; }
}

/* ============================================================
   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-heading {
  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: #fff; }
.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); }
.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.8125rem;
  line-height: 1.4;
}

@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: #666;
  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: #C84800; color: #fff; border-color: #C84800; }
.btn-primary:hover { background: #B54000; border-color: #B54000; 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-text); }
.btn-outline-primary:hover { background: var(--color-primary-pale); color: var(--color-primary-text); }
.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: #dc2626; color: #fff; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-outline-danger { background: transparent; color: #c81e1e; border: 1px solid var(--color-error); }
.btn-outline-danger:hover { background: var(--color-error); color: #fff; }
.btn-success { background: #2f855a; color: #fff; border-color: #2f855a; }
.btn-success:hover { background: #276749; border-color: #276749; color: #fff; }
.btn-warning { background: #f59e0b; color: #333; border-color: #f59e0b; }
.btn-warning:hover { background: #d97706; color: #333; }

/* 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; }

/* Google Sign-In Button */
.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Roboto', 'Montserrat', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.btn-google:hover {
  background: #f7f8f8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.btn-google svg { flex-shrink: 0; }

/* Google Sign-In Hero (unified auth page) */
.google-signin-hero { text-align: center; margin: 1.5rem 0; }
.btn-google-lg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: #fff;
  color: #3c4043;
  border: 2px solid #dadce0;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Roboto', 'Montserrat', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.btn-google-lg:hover {
  background: #f7f8f8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-color: #bdc1c6;
}
.btn-google-lg svg { flex-shrink: 0; }
.google-hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Auth Mode Toggle Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin: 1.5rem 0 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}
.auth-tab {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  color: #64748b;
  border: none;
  transition: background 150ms, color 150ms;
}
.auth-tab:first-child { border-right: 1px solid var(--color-border); }
.auth-tab-active { background: var(--color-primary); color: #fff; }
.auth-tab:hover:not(.auth-tab-active) { background: #f1f5f9; }

/* Auth Panels (show/hide) */
.auth-panel { margin-top: 1.5rem; }
.auth-panel-hidden { display: none; }

/* Profile Tabs */
.profile-tabs {
  display: flex;
  gap: 0;
  margin: 1.5rem 0 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}
.profile-tab {
  flex: 1;
  padding: 0.75rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  color: #64748b;
  cursor: pointer;
  background: #f8fafc;
  border: none;
  transition: background 150ms, color 150ms;
}
.profile-tab:not(:last-child) { border-right: 1px solid var(--color-border); }
.profile-tab-active { background: var(--color-primary); color: #fff; }
.profile-tab:hover:not(.profile-tab-active) { background: #f1f5f9; }
.profile-tab-content { margin-top: 1.5rem; }

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary-text);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 0;
}
.btn-link:hover { color: var(--color-primary-dark, #1a56db); }

/* Dev Quick Login */
.dev-login-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed #ccc;
  text-align: center;
}
.dev-label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.dev-login-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-dev {
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f9f9f9;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.btn-dev:hover { background: #eee; border-color: #666; }
.btn-dev-buyer { border-left: 3px solid #3b82f6; }
.btn-dev-seller { border-left: 3px solid #10b981; }
.btn-dev-conveyancer { border-left: 3px solid #f59e0b; }
.btn-dev-admin { border-left: 3px solid #ef4444; }

/* 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: #C84800; 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.15); }
.input:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.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;
}

.form-success {
  padding: 0.75rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  color: #065f46;
  font-size: 0.875rem;
}
.form-help {
  font-size: 0.875rem;
  color: #555;
  margin-bottom: 0.25rem;
}
.form-link {
  margin-top: 0.25rem;
  text-align: right;
  font-size: 0.8125rem;
}
.form-link a { color: var(--color-primary-text); }
.form-link a:hover { text-decoration: underline; }

/* 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;
}
.flash-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

/* 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; }

@media (max-width: 480px) {
  .form-row { flex-direction: column; gap: 0.5rem; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; text-align: center; }
}

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

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

.pro-tip {
  font-size: 0.8125rem;
  color: #555;
  background: #fdf8e8;
  border-left: 3px solid #e2c44d;
  padding: 0.5rem 0.75rem;
  margin: 0.75rem 0;
  border-radius: 4px;
}

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

.task-section {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
}
.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;
}

@media (max-width: 640px) {
  .task-list { gap: 0.625rem; }
  .task-header { padding: 0.875rem 1rem; gap: 0.75rem; }
  .task-icon { width: 1.5rem; height: 1.5rem; font-size: 0.6875rem; }
  .task-info h3 { font-size: 0.9375rem; }
  .task-summary {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 0.75rem;
    line-height: 1.4;
  }
  .task-header .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    min-width: 60px;
    flex-shrink: 0;
  }
  .task-body { padding: 0 1rem 1rem; }
  .page-header { margin-bottom: 1.25rem; }
  .page-header h1 { font-size: 1.375rem; }
}

/* 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-text);
}
.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-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.addon-summary {
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.addon-summary .addon-note { flex-basis: 100%; }
.addon-grand-total { font-size: 1rem; }

/* 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-exclusive-check {
  background: #fff8e1;
  border: 1px solid #ffcc02;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}
.review-exclusive-check .checkbox-label {
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
}
.review-exclusive-check input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.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: #666;
  font-size: 0.875rem;
}

/* Checkout (embedded Stripe) */
.checkout-page {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.checkout-header {
  margin-bottom: 1.5rem;
}
.checkout-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.checkout-header p {
  color: #666;
  font-size: 0.9rem;
}
.checkout-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.checkout-line {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}
.checkout-line + .checkout-total {
  border-top: 1px solid #e5e7eb;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}
.checkout-cancel {
  text-align: center;
  margin-top: 1.5rem;
}

/* Dashboard */
.listing-table { overflow-x: auto; max-width: 100%; }
.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: #555; }
.badge-pending_review { background: #fef3c7; color: #92400e; }
.badge-live { background: #d1fae5; color: #065f46; }
.badge-under_offer { background: #fed7aa; color: #9a3412; }
.badge-sold { background: #dbeafe; color: #1e40af; }
.badge-withdrawn { background: #fee2e2; color: #991b1b; }
.badge-buyer { background: #e0e7ff; color: #3730a3; }
.badge-seller { background: #d1fae5; color: #065f46; }
.badge-admin { background: #fce7f3; color: #9d174d; }
.badge-conveyancer { background: #fef3c7; color: #92400e; }
.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-view-btn { color: #2563eb; font-size: 0.875rem; }
.image-view-btn:hover { background: #eff6ff; }

.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: #666;
  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-text);
  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;
}

/* Property Features — expandable section on detail page */
.listing-features-expand {
  margin-bottom: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}
.listing-features-summary {
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-dark);
  user-select: none;
}
.listing-features-summary::-webkit-details-marker {
  color: var(--color-muted);
}
.listing-features-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.375rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.listing-feature-groups {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.listing-feature-group-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin: 0 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--color-border);
}
.listing-feature-group-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.listing-feature-item {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  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;
  white-space: nowrap;
}

/* Property Features — checkbox groups in sell form */
.feature-checkbox-groups {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.feature-group-detail {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-off-white);
}
.feature-group-summary {
  padding: 0.625rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
  color: var(--color-dark);
}
.feature-group-summary::-webkit-details-marker {
  color: var(--color-muted);
}
.feature-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.25rem 0.75rem;
  padding: 0 1rem 0.75rem;
}
.feature-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-text);
  padding: 0.25rem 0;
  cursor: pointer;
}
.feature-checkbox-label input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.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-active {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}
.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-text);
  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;
}

.listing-card-badge-bin {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  background: #166534;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: var(--radius);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Under Offer badge on listing cards */
.listing-card-badge-uo {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.3rem 0.75rem;
  background: #ea580c;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Sold badge on listing cards */
.listing-card-badge-sold {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.3rem 0.75rem;
  background: #dc2626;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Sold card muted overlay */
.listing-card-sold .listing-card-img img {
  opacity: 0.7;
}

/* Under Offer banner on detail page */
.listing-under-offer-banner {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.4rem 1rem;
  background: #ea580c;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius);
  letter-spacing: 0.04em;
  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-cta {
  text-align: center;
  padding: 2rem 1.5rem;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.enquiry-cta-text {
  color: #475569;
  margin-bottom: 1rem;
}
.enquiry-cta-sub {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}
.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-text);
  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;
}

/* Seller phone section (no phone privacy) */
.seller-phone-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;
}
.seller-phone-section h2 {
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}
.seller-phone-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-text);
  text-decoration: none;
  display: block;
  margin: 0.5rem 0;
}
.seller-phone-number:hover { text-decoration: underline; }
.seller-phone-name {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.seller-email-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;
}
.seller-email-section h2 {
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}
.seller-email-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary-text);
  text-decoration: none;
  display: block;
  margin: 0.5rem 0;
}
.seller-email-link:hover { text-decoration: underline; }

/* Click-to-reveal contact button */
.btn-reveal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px dashed var(--color-primary);
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-reveal:hover {
  background: rgba(var(--color-primary-rgb, 0,0,0), 0.05);
  border-style: solid;
}
.btn-reveal[disabled] {
  opacity: 0.6;
  cursor: wait;
}
.reveal-masked {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: 0.5px;
}
.reveal-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-text);
  white-space: nowrap;
}

/* 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) */
.buy-it-now-section {
  margin-top: 1rem;
  padding: 1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  text-align: center;
}
.buy-it-now-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #166534;
  margin-bottom: 0.25rem;
}
.buy-it-now-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #166534;
}
.buy-it-now-hint {
  font-size: 0.8rem;
  color: #4b5563;
  margin-top: 0.25rem;
  margin-bottom: 0;
}
.field-hint-success {
  color: #166534;
}
.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: #555;
}
.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix {
  position: absolute;
  left: 12px;
  color: #555;
  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: #555;
}

/* Standalone offer page */
.offer-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: #555;
  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: #555;
}
.offer-page-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: #047857;
}

/* 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: #555;
  font-weight: 600;
}
.offer-amount {
  font-weight: 600;
  color: #047857;
}

/* 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-text);
  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 action forms (inline in table and detail page) */
.offer-counter-row td {
  background: #f8fafc;
  padding: 1rem;
  border-left: 3px solid #3b82f6;
}
.offer-counter-form,
.offer-action-form {
  max-width: 700px;
}
.offer-counter-form h3,
.offer-action-form h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

/* Email preview box */
.email-preview {
  margin: 0.75rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}
.email-preview-label {
  background: #f1f5f9;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}
.email-preview-body {
  padding: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #334155;
  background: #fff;
}

/* AI button */
.btn-ai {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.btn-ai:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: #fff;
}
.btn-ai[disabled] {
  opacity: 0.6;
  cursor: wait;
}

/* Enquiry reply original message box */
.enquiry-original-message {
  margin: 0.75rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}
.enquiry-original-message .email-preview-body {
  white-space: pre-wrap;
  word-break: break-word;
}

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

/* --- Offer Detail Page --- */
.offer-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
  .offer-detail-grid {
    grid-template-columns: 1fr;
  }
}
.detail-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem;
}
.detail-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 0.5rem;
}
.detail-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: #047857;
  margin-bottom: 0.75rem;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.95rem;
}
.detail-row + .detail-row {
  border-top: 1px solid #f9fafb;
}
.detail-label {
  color: #555;
  flex-shrink: 0;
  margin-right: 1rem;
}
.offer-detail-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* --- 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: #555;
  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-text);
  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: #C84800;
}

/* 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 status badges */
.badge-unread { background: #fef3c7; color: #92400e; }
.badge-read { background: #d1fae5; color: #065f46; }
.badge-replied { background: #dbeafe; color: #1e40af; }

/* Clickable badge (for status cycling) */
.badge-clickable {
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.badge-clickable:hover {
  border-color: currentColor;
  opacity: 0.85;
}

/* Copy icon button next to email */
.copy-email-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-copy-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 0.85rem;
  color: #555;
  line-height: 1;
  transition: color 0.15s ease;
}
.btn-copy-icon:hover {
  color: #111827;
}

/* Enquiry message cell */
.enquiry-message-cell {
  max-width: 400px;
}

.enquiry-message-full {
  white-space: pre-wrap;
  margin: 0;
  word-break: break-word;
}

.enquiry-extra-info {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.8rem;
  color: #4b5563;
}

.enquiry-extra-row {
  margin-bottom: 0.25rem;
}

.enquiry-extra-label {
  font-weight: 600;
  color: #374151;
}

/* 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;
  }
}

/* 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; }
.register-options { display: flex; gap: 1rem; margin-top: 1rem; }
.register-option { flex: 1; padding: 1.25rem; border: 1px solid #e2e8f0; border-radius: 8px; text-align: center; }
.register-option h4 { margin: 0 0 0.5rem; font-size: 0.9375rem; }
.register-option p { font-size: 0.8125rem; color: #64748b; margin-bottom: 0.75rem; }
.register-option .btn { width: 100%; }
.register-option-divider { display: flex; align-items: center; font-weight: 600; color: #94a3b8; font-size: 0.8125rem; }
@media (max-width: 600px) {
  .register-options { flex-direction: column; gap: 0.5rem; }
  .register-option-divider { justify-content: center; padding: 0.25rem 0; }
}
.bid-registered-msg { font-size: 0.875rem; color: #047857; 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; }

/* Auto-bid section */
.auto-bid-section { margin-top: 1rem; }
.auto-bid-active {
  padding: 0.75rem;
  border: 1px solid #a7f3d0;
  border-radius: 0.5rem;
  background: #ecfdf5;
  font-size: 0.875rem;
}
.auto-bid-active p { margin: 0 0 0.5rem; color: #065f46; }
.auto-bid-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.auto-bid-details { font-size: 0.875rem; }
.auto-bid-details summary { cursor: pointer; color: #4f46e5; font-weight: 500; }
.auto-bid-details summary:hover { text-decoration: underline; }
.auto-bid-hint { font-size: 0.8125rem; color: #64748b; margin: 0.375rem 0 0.75rem; }
.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: #047857; }
.bid-status-winning { color: #047857; margin-top: 0.5rem; }

/* Countdown timer (bid panel) */
.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;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  text-align: center;
  animation: countdown-pulse 1.5s ease-in-out infinite;
}
.auction-countdown-ended { color: #64748b; font-weight: 500; }

@keyframes countdown-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Countdown on listing cards (browse/home) */
.listing-card-countdown {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #1e40af;
  background: #dbeafe;
  border-radius: 4px;
  padding: 0.125rem 0.5rem;
  margin-top: 0.25rem;
}
.listing-card-countdown-urgent {
  color: #991b1b;
  background: #fee2e2;
  animation: countdown-pulse 1.5s ease-in-out infinite;
}
.listing-card-countdown-ended {
  color: #64748b;
  background: #f1f5f9;
}

/* Ending-soon card highlighting (applied to .listing-card via JS) */
.listing-card.listing-card-ending-soon {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b, var(--shadow-sm);
}
.listing-card.listing-card-ending-soon:hover {
  box-shadow: 0 0 0 1px #f59e0b, var(--shadow-lg);
}
.listing-card.listing-card-ending-very-soon {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px #dc2626, 0 0 8px rgba(220, 38, 38, 0.15);
  animation: card-urgent-pulse 2s ease-in-out infinite;
}
.listing-card.listing-card-ending-very-soon:hover {
  box-shadow: 0 0 0 1px #dc2626, 0 0 12px rgba(220, 38, 38, 0.25);
}
@keyframes card-urgent-pulse {
  0%, 100% { box-shadow: 0 0 0 1px #dc2626, 0 0 8px rgba(220, 38, 38, 0.15); }
  50% { box-shadow: 0 0 0 1px #dc2626, 0 0 12px rgba(220, 38, 38, 0.3); }
}

/* "Ending Soon" badge on card image (shown via JS class on parent) */
.listing-card-ending-soon .listing-card-img::after,
.listing-card-ending-very-soon .listing-card-img::after {
  content: "Ending Soon";
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--radius);
  pointer-events: none;
  background: #f59e0b;
  color: #fff;
}
.listing-card-ending-very-soon .listing-card-img::after {
  content: "Ending Soon!";
  background: #dc2626;
  animation: countdown-pulse 1.5s ease-in-out infinite;
}

/* Dashboard auction badges */
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-default { background: #f3f4f6; color: #555; }
.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-text);
  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-text);
}
.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-text);
  white-space: nowrap;
}
.addon-description {
  font-size: 0.8125rem;
  color: #555;
  margin: 0;
  line-height: 1.4;
}
.addon-card-purchased {
  border-color: #86efac;
  background: #f0fdf4;
}
.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: 600;
  border-radius: 9999px;
}
/* REA group box — mutually exclusive portal upgrades */
.rea-group-box {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
}
.rea-group-header {
  margin-bottom: 1rem;
}
.rea-group-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #1e293b;
}
.rea-group-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0;
}
.rea-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

/* Addon group headings — span full grid width */
.addon-group-heading {
  grid-column: 1 / -1;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 1rem 0 0;
  padding-bottom: 0.375rem;
  border-bottom: 2px solid #e2e8f0;
}
.addon-group-heading:first-child {
  margin-top: 0;
}

/* Admin settings table — group header rows */
.addon-group-row td {
  background: #f8fafc;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #1e293b;
  padding-top: 1.25rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 2px solid #e2e8f0;
}

.addon-out-of-stock,
.addon-unavailable {
  display: block;
  text-align: center;
  padding: 0.375rem 0;
  color: #991b1b;
  font-weight: 600;
  font-size: 0.875rem;
}
.addon-stock-info {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: #666;
  font-weight: 500;
}
.addon-card-footer {
  padding: 0 1rem 1rem;
}

/* REA Premiere discount pricing */
.addon-price-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}
.addon-price-original {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 500;
}
.addon-price-discount {
  color: #16a34a;
  font-weight: 700;
}
.addon-discount-info {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
}
.addon-discount-note {
  font-size: 0.8125rem;
  color: #166534;
  margin: 0;
  line-height: 1.4;
}
.addon-discount-admin-note {
  font-size: 0.8125rem;
  color: #15803d;
  font-style: italic;
  margin: 0.25rem 0 0;
  line-height: 1.4;
}
.addon-discount-pending {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
}
.addon-discount-pending p {
  font-size: 0.8125rem;
  color: #92400e;
  margin: 0;
  line-height: 1.4;
}
.addon-premiere-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.addon-discount-explainer {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* Phone privacy panel (dashboard addons page) */
.phone-privacy-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.toggle-label {
  font-size: 0.875rem;
  color: #334155;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
  background: #16a34a;
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Purchased add-ons list (edit mode on sell page) */
.addon-purchased-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.addon-purchased-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.addon-purchased-check {
  color: #16a34a;
  font-weight: 600;
  flex-shrink: 0;
}
.addon-purchased-name {
  flex: 1;
  font-size: 0.875rem;
}
.addon-purchased-price {
  font-size: 0.875rem;
  color: #555;
  flex-shrink: 0;
}

/* Cart panel (sticky bottom bar) */
.cart-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 2px solid var(--color-primary, #2563eb);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  z-index: 100;
  padding: 0.75rem 1rem;
}
.cart-panel-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cart-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9375rem;
}
.cart-total {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-primary-text, #1e40af);
}
.cart-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-in-cart {
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #fff !important;
}
.btn-in-cart:hover {
  background: #15803d !important;
  border-color: #15803d !important;
}

/* ============================================================
   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: #C84800;
  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;
}
.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);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
}
.valuation-cta-link:hover {
  text-decoration: underline;
}
.valuation-listing-note {
  background: #f0f7f0;
  border: 1px solid #c3e6c3;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: #2d6a2d;
  line-height: 1.5;
}
.valuation-listing-note p { margin: 0; }
.valuation-form .btn-google {
  width: 100%;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
}
.valuation-form .google-icon {
  flex-shrink: 0;
}

/* 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: #555; }

/* 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: #047857; }

/* ============================================================
   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: #666;
  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: #666;
  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: #047857;
  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: #047857; }

.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: #666;
  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: #047857;
}

/* =========================================
   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;
}

/* Task comments */
.task-comments {
  padding: 12px 16px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}
.task-comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.task-comment {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.85rem;
}
.task-comment-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 2px;
  font-size: 0.8rem;
}
.task-comment-body {
  white-space: pre-wrap;
  line-height: 1.4;
}
.task-comment-form {
  margin-top: 6px;
}

/* ============================================================
   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-text);
  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-text);
  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-heading {
  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-text);
  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%;
  padding: 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-primary-text);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 200ms;
}
.faq-item[open] .faq-question::after {
  content: '-';
}
.faq-answer {
  padding: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.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-text);
  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-text);
  background: var(--color-primary-pale);
}
.package-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}
.package-table th:nth-child(3) {
  background: #C84800;
}
.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: 0.5rem;
  font-family: var(--font-heading);
  color: var(--color-dark);
}
.auth-subtitle {
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.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-text);
  font-weight: 600;
}
.verify-card {
  text-align: center;
  line-height: 1.6;
}
.verify-card p { margin-bottom: 1rem; }
.verify-hint {
  font-size: 0.85rem;
  color: var(--color-text-light);
}
.link-btn {
  background: none;
  border: none;
  outline: none;
  color: var(--color-primary);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}
.link-btn:hover { color: var(--color-primary-hover); }

/* ============================================================
   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;
}
.admin-viewing-banner {
  width: 100%;
  background: var(--color-light, #f0f4ff);
  border: 1px solid var(--color-primary, #2563eb);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--color-primary, #2563eb);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.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-text);
  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);
  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-text); }
.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;
  }

  /* --- Dashboard listing table → card layout on mobile --- */
  .listing-table table,
  .listing-table thead,
  .listing-table tbody,
  .listing-table tr,
  .listing-table th,
  .listing-table td {
    display: block;
  }
  .listing-table thead {
    display: none;
  }
  .listing-table tr {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  .listing-table td {
    border: none;
    padding: 0.25rem 0;
    position: relative;
  }
  .listing-table td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: block;
    margin-bottom: 0.125rem;
  }
  /* Property cell already has its own address/meta styling, hide the label prefix */
  .listing-table td[data-label="Property"]::before {
    display: none;
  }
  .listing-table .listing-actions {
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
    margin-top: 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: #555; }
.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 link (listing detail sidebar)
   ============================ */
.report-link {
  margin-top: 1.5rem;
  text-align: center;
}
.report-link a {
  font-size: 0.8rem;
  color: var(--muted, #555);
}
.report-link a:hover {
  color: #dc2626;
}

/* ============================
   Report page (standalone)
   ============================ */
.report-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.report-page h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.report-page-address {
  font-size: 0.9rem;
  color: var(--muted, #555);
  margin-bottom: 1.5rem;
}
.report-page-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.report-page-form .input {
  width: 100%;
}
.report-page-form .btn-primary {
  width: 100%;
}
.report-page-form .cf-turnstile {
  margin-top: 0.5rem;
}

/* Report bid button in bid history */
.btn-report-bid {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted, #555);
  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, #555);
  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: #555; }

/* 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, #555);
  font-size: 0.85rem;
}
.detail-list dd { margin: 0; }

/* ============================================================
   Accessibility — Skip Link
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: #C84800;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top 150ms;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  color: #fff;
}

/* ============================================================
   Accessibility — Focus Styles
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-gradient:focus-visible,
.btn-danger:focus-visible,
.btn-success:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(255, 95, 31, 0.2);
}
.nav-link:focus-visible,
.nav-btn:focus-visible,
.nav-user:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.nav-hamburger:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.listing-card:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: var(--shadow-md);
}
.footer-col a:focus-visible,
.footer-bottom-links a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ============================================================
   Accessibility — Touch Target Minimum Sizes (44x44px)
   ============================================================ */
.nav-hamburger {
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.btn-report-bid {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Accessibility — Colour Contrast Fixes
   ============================================================ */
/* #718096 on white = 4.48:1 → bump to #5a6878 = 5.34:1 for AA */
:root {
  --color-text-light: #5a6878;
}
/* Footer links: rgba(255,255,255,0.5) on #1a1a1a = ~3.9:1 → bump to 0.65 */
.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.65);
}
.footer-bottom-links a:hover { color: rgba(255, 255, 255, 0.9); }
/* .text-muted was #999 = 2.85:1 → bump to #767676 = 4.54:1 */
.text-muted { color: #666; }
/* .page-subtitle was #666 = 5.74:1 — fine as-is */

/* ============================================================
   Accessibility — Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .value-card:hover { transform: none; }
}

/* ============================================================
   Bookmark Button
   ============================================================ */
.btn-bookmark {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  width: 100%;
  justify-content: center;
}
.btn-bookmark:hover {
  color: #c0392b;
  border-color: #c0392b;
}
.btn-bookmark-active {
  color: #c0392b;
  border-color: #c0392b;
}
.btn-bookmark-active:hover {
  color: var(--text-secondary);
  border-color: var(--border);
}
.bookmark-section {
  margin-top: 0.75rem;
}

/* ============================================================
   Favourites Page
   ============================================================ */
.favourites-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.favourite-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.favourite-card-main {
  display: flex;
  gap: 0;
}
.favourite-card-img {
  flex-shrink: 0;
  width: 280px;
  min-height: 200px;
  position: relative;
  display: block;
  overflow: hidden;
}
.favourite-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.favourite-card-body {
  flex: 1;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.favourite-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.favourite-card-top h3 {
  margin: 0.25rem 0;
}
.favourite-card-top h3 a {
  color: var(--text);
  text-decoration: none;
}
.favourite-card-top h3 a:hover {
  color: var(--primary);
}
.favourite-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: stretch;
  min-width: 120px;
}
.favourite-card-actions .btn-bookmark {
  width: auto;
}

/* Offer history within favourite card */
.favourite-offers {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.favourite-offers h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.favourite-offers-table {
  width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
}
.favourite-offers-table th {
  text-align: left;
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8rem;
}
.favourite-offers-table td {
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}

/* Responsive — stack card on small screens */
@media (max-width: 768px) {
  .favourite-card-main {
    flex-direction: column;
  }
  .favourite-card-img {
    width: 100%;
    height: 200px;
  }
  .favourite-card-top {
    flex-direction: column;
  }
  .favourite-card-actions {
    flex-direction: row;
    min-width: 0;
  }
  .favourite-card-actions .btn-bookmark {
    width: auto;
    flex: 1;
  }
}

/* Notification preferences */
.notif-group-heading {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1.5rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid #e5e7eb;
}
.notif-group-heading:first-of-type {
  margin-top: 0;
}
.notif-prefs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.notif-prefs-table th,
.notif-prefs-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}
.notif-prefs-table thead th {
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #d1d5db;
}
.notif-col {
  width: 80px;
  text-align: center !important;
}
.notif-toggle {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ---- Confirm Dialog ---- */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
}
.confirm-overlay[hidden] { display: none; }
.confirm-box {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: min(400px, 90vw);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.confirm-message {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.5;
}
.confirm-actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
}

/* ============================================================
   Inspection Registration (attendee sign-up)
   ============================================================ */

.inspection-reg-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--color-surface);
}
.inspection-reg-section h2 {
  margin: 0 0 .25rem;
  font-size: 1.25rem;
}
.section-hint {
  color: var(--color-text-muted);
  font-size: .875rem;
  margin: 0 0 1rem;
}

/* Form row: phone + email + name + button */
.inspection-reg-form-row {
  display: flex;
  gap: .75rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.inspection-reg-field {
  flex: 1;
  min-width: 140px;
}
.inspection-reg-autofill {
  display: contents;
}
.inspection-reg-btn-wrap {
  flex-shrink: 0;
}
.inspection-reg-btn-label {
  display: block;
  visibility: hidden;
  height: 1.4em;
  margin-bottom: .25rem;
}

/* Registrations table */
.inspection-reg-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.inspection-reg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.inspection-reg-table th,
.inspection-reg-table td {
  padding: .5rem .75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.inspection-reg-table th {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.inspection-reg-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: nowrap;
}

/* Badges */
.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-neutral { background: #f3f4f6; color: #555; }

/* Mobile: stack name under phone, hide email/name columns */
.reg-name-mobile { display: none; }
.show-mobile { display: none; }
.hide-mobile {}

@media (max-width: 640px) {
  .inspection-reg-form-row {
    flex-direction: column;
    gap: .5rem;
  }
  .inspection-reg-field {
    min-width: 100%;
  }
  .inspection-reg-btn-wrap {
    width: 100%;
  }
  .inspection-reg-btn-wrap .btn {
    width: 100%;
  }
  .inspection-reg-btn-label {
    display: none;
  }
  .hide-mobile { display: none; }
  .show-mobile { display: block; }
  .reg-name-mobile {
    display: block;
    font-size: .8rem;
    color: var(--color-text-muted);
  }
  .inspection-reg-actions {
    flex-direction: column;
    gap: .35rem;
  }
  .inspection-reg-table th,
  .inspection-reg-table td {
    padding: .4rem .5rem;
  }
}

/* --- Message preview (SMS/email draft) --- */
.msg-preview {
  margin-top: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}
.msg-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-muted, #f9fafb);
  border-radius: var(--radius) var(--radius) 0 0;
}
.msg-preview-meta {
  padding: .5rem 1rem;
  font-size: .875rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.msg-preview-body {
  padding: 1rem;
  font-size: .875rem;
  line-height: 1.6;
}
.msg-preview-sms {
  background: #f0fdf4;
  border-left: 3px solid #22c55e;
  margin: .75rem;
  border-radius: var(--radius);
  padding: .75rem 1rem;
  font-family: system-ui, sans-serif;
}
.msg-preview-sms p { margin: 0; }
.msg-preview-email {
  border: 1px dashed var(--color-border);
  margin: .75rem;
  border-radius: var(--radius);
  padding: .75rem 1rem;
}
.msg-preview-email p { margin: 0 0 .5rem; }
.msg-preview-info {
  padding: .5rem 1rem .75rem;
  font-size: .8rem;
  color: var(--color-text-muted);
}
.msg-preview-info ul {
  margin: .25rem 0 0;
  padding-left: 1.25rem;
}
.msg-preview-info li { margin-bottom: .25rem; }
.msg-preview-info code {
  font-size: .75rem;
  background: var(--color-bg-muted, #f3f4f6);
  padding: .1rem .3rem;
  border-radius: 3px;
}
.msg-preview-actions {
  display: flex;
  gap: .5rem;
  padding: .75rem 1rem;
  border-top: 1px solid var(--color-border);
}

/* ============================================================
   OFI Check-in — mobile-first attendee registration page
   ============================================================ */

.ofi-checkin {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

.ofi-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ofi-back {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.ofi-title {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0;
}

.ofi-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
}

/* Inspection selector */
.ofi-selector {
  margin-bottom: 1rem;
}

.ofi-select-input {
  width: 100%;
  font-size: 1rem;
  padding: 0.75rem;
}

/* Inspection info card */
.ofi-card {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.ofi-address {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
}

.ofi-headline {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.ofi-time-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.ofi-time {
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Status badges */
.ofi-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ofi-badge-live {
  background: #dcfce7;
  color: #166534;
  animation: ofi-pulse 2s ease-in-out infinite;
}

@keyframes ofi-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.ofi-badge-upcoming {
  background: #dbeafe;
  color: #1e40af;
}

.ofi-badge-finished {
  background: #f3f4f6;
  color: #555;
}

.ofi-badge-self {
  background: #dbeafe;
  color: #1e40af;
}

.ofi-badge-sms {
  background: #dcfce7;
  color: #166534;
}

.ofi-badge-email {
  background: #fef3c7;
  color: #92400e;
}

/* Sections */
.ofi-section {
  margin-top: 1.5rem;
}

.ofi-section-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
}

.ofi-count {
  display: inline-block;
  background: var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.25rem;
}

/* Register form */
.ofi-register-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ofi-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ofi-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.ofi-input {
  font-size: 1rem !important;
  padding: 0.75rem !important;
  border-radius: 0.375rem;
}

.ofi-autofill {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ofi-register-btn {
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  min-height: 48px;
}

/* Attendee cards */
.ofi-attendees {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ofi-attendee-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

.ofi-attendee-info {
  min-width: 0;
  flex: 1;
}

.ofi-attendee-name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.ofi-attendee-phone {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.ofi-attendee-email {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  word-break: break-all;
}

.ofi-attendee-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.375rem;
}

.ofi-attendee-actions {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex-shrink: 0;
}

.ofi-attendee-actions .btn-sm {
  min-width: 56px;
  min-height: 36px;
  font-size: 0.8125rem;
}

.ofi-empty-attendees {
  text-align: center;
  padding: 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Tablet+ : side-by-side email/name fields */
@media (min-width: 480px) {
  .ofi-autofill {
    flex-direction: row;
    gap: 0.75rem;
  }

  .ofi-autofill .ofi-field {
    flex: 1;
  }

  .ofi-attendee-actions {
    flex-direction: row;
  }
}

/* ============================================================
   Forum
   ============================================================ */

.forum-intro {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.forum-breadcrumb {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.forum-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}
.forum-breadcrumb a:hover {
  text-decoration: underline;
}

/* Category cards */
.forum-category-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.forum-category-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.forum-category-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.forum-category-card h2 {
  font-size: 1.125rem;
  margin: 0 0 0.25rem;
  font-weight: 600;
}
.forum-category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.forum-category-stats {
  flex-shrink: 0;
  text-align: right;
}
.forum-stat {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Thread list */
.forum-thread-title {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.forum-thread-title:hover {
  color: var(--primary);
  text-decoration: underline;
}
.forum-pin-icon,
.forum-closed-icon {
  font-size: 0.875rem;
}
tr.forum-pinned {
  background: #fefce8;
}
tr.forum-closed {
  opacity: 0.7;
}

/* Posts */
.forum-post {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.forum-post:last-child {
  border-bottom: none;
}
.forum-post-op {
  background: #f9fafb;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.forum-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  flex-wrap: wrap;
}
.forum-author {
  font-weight: 600;
}
.forum-time {
  color: var(--muted);
}
.forum-edited {
  color: var(--muted);
  font-style: italic;
  font-size: 0.75rem;
}
.forum-body {
  line-height: 1.6;
  font-size: 0.9375rem;
  word-break: break-word;
}
.forum-replies-header {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.forum-replies-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

/* Post actions (edit, delete) */
.forum-post-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.forum-admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.inline-form {
  display: inline;
}
.forum-edit-form {
  margin-top: 0.75rem;
}

/* Reply form */
.forum-reply-form {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.forum-reply-form h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Discord community banner */
.forum-discord-banner {
  margin-bottom: 1.5rem;
}
.forum-discord-banner-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #5865F2;
  border-radius: var(--radius);
  color: #fff;
}
.forum-discord-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.forum-discord-banner-inner strong {
  display: block;
  font-size: 0.9375rem;
}
.forum-discord-banner-inner span {
  font-size: 0.8125rem;
  opacity: 0.85;
}
.forum-discord-btn {
  margin-left: auto;
  flex-shrink: 0;
  background: #fff;
  color: #5865F2;
  border-color: #fff;
  font-weight: 600;
}
.forum-discord-btn:hover {
  background: #eef0ff;
  color: #4752C4;
}
@media (max-width: 600px) {
  .forum-discord-banner-inner {
    flex-direction: column;
    text-align: center;
  }
  .forum-discord-btn {
    margin-left: 0;
    width: 100%;
  }
}

/* Closed thread notice */
.forum-closed-notice {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  color: #92400e;
  font-size: 0.875rem;
}

/* ── DB Maintenance ── */
.db-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.db-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.875rem 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
}
.db-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
}
.db-stat-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #111;
}
.db-stat-path {
  font-size: 0.8125rem;
  word-break: break-all;
  font-family: monospace;
}
.db-stat-warn {
  border-color: #f59e0b;
  background: #fffbeb;
}
.db-stat-hint {
  font-size: 0.75rem;
  color: #92400e;
}
.db-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.db-action-card {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
}
.db-action-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}
.db-action-card p {
  font-size: 0.8125rem;
  color: #555;
  margin: 0 0 1rem;
  line-height: 1.5;
}
.db-action-card code {
  font-size: 0.75rem;
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
}

/* Inline verification on forms */
.verified-tick {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  color: #065f46;
  background: #ecfdf5;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-weight: 500;
}

/* ── Admin Log Viewer ── */
.log-summary {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.log-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.log-badge-info { background: #dbeafe; color: #1e40af; }
.log-badge-warn { background: #fef3c7; color: #92400e; }
.log-badge-error { background: #fee2e2; color: #991b1b; }

.log-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.log-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.log-filter-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-light);
}
.log-filter-group select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.log-auto-refresh {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--color-text-light);
  cursor: pointer;
}

.log-table { margin-top: 1rem; }
.log-table table { font-size: 0.8125rem; }
.log-table td { padding: 0.4rem 0.75rem; font-size: 0.8125rem; }
.log-table th { font-size: 0.75rem; }

.log-level {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.log-level-INFO  { background: #dbeafe; color: #1e40af; }
.log-level-WARN  { background: #fef3c7; color: #92400e; }
.log-level-ERROR { background: #fee2e2; color: #991b1b; }

.log-row-ERROR td { background: #fef2f2; }
.log-row-WARN td  { background: #fffbeb; }

.log-attrs {
  font-size: 0.75rem;
  color: var(--color-text-light);
  word-break: break-all;
}
