/* =========================================================
   ULTD Real Estate — Design System
   ========================================================= */

/* ── 1. CSS Variables ──────────────────────────────────── */
:root {
  /* Brand */
  --midnight:   #0a1628;
  --navy:       #1a3a5c;
  --blue:       #2563eb;
  --gold:       #c9a84c;
  --gold-light: #f0d68a;
  --gold-dark:  #a07830;

  /* Neutrals */
  --white:     #ffffff;
  --cream:     #faf8f4;
  --gray-50:   #f8fafc;
  --gray-100:  #f1f5f9;
  --gray-200:  #e2e8f0;
  --gray-300:  #cbd5e1;
  --gray-400:  #94a3b8;
  --gray-500:  #64748b;
  --gray-600:  #475569;
  --gray-700:  #334155;
  --gray-800:  #1e293b;
  --gray-900:  #0f172a;

  /* Semantic */
  --success:        #059669;
  --success-bg:     #ecfdf5;
  --success-border: #a7f3d0;
  --danger:         #dc2626;
  --danger-bg:      #fef2f2;
  --danger-border:  #fecaca;

  /* Legacy aliases (keep admin templates working) */
  --bg:      var(--gray-50);
  --surface: var(--white);
  --ink:     var(--gray-800);
  --muted:   var(--gray-500);
  --primary: var(--navy);
  --accent:  var(--gold);
  --line:    var(--gray-200);

  /* Typography */
  --font-sans:    'Inter', 'Segoe UI', -apple-system, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.15), 0 10px 10px rgba(0,0,0,.04);

  /* Radii */
  --r-sm:   6px;
  --r:      10px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-full: 9999px;

  /* Transitions */
  --t:      200ms cubic-bezier(.4,0,.2,1);
  --t-slow: 400ms cubic-bezier(.4,0,.2,1);
}

/* ── 2. Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5,h6 { line-height: 1.2; font-weight: 700; color: var(--gray-900); }

/* ── 3. Layout helpers ─────────────────────────────────── */
.container    { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.container-sm { max-width:  780px; margin: 0 auto; padding: 0 1.25rem; }
.page         { padding: 2rem 1rem 3.5rem; }

/* =========================================================
   ADMIN NAV (topbar)
   ========================================================= */
.topbar {
  background: var(--midnight);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.topbar-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  min-height: 60px; gap: 1rem;
  position: relative;
}
.brand {
  font-weight: 800; font-size: 1.1rem;
  color: var(--white) !important;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.brand span { color: var(--gold); }

/* ── Top nav container ──────────────────────────────────── */
.topnav {
  display: flex;
  align-items: center;
  gap: .1rem;
}

/* ── Plain nav links ────────────────────────────────────── */
.topnav-link {
  color: rgba(255,255,255,.72);
  font-size: .875rem; font-weight: 500;
  padding: .4rem .75rem;
  border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.topnav-link:hover { color: var(--white); background: rgba(255,255,255,.1); }

/* ── Dropdown group ─────────────────────────────────────── */
.nav-group { position: relative; }

.nav-group-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-sans);
  font-size: .875rem; font-weight: 500;
  color: rgba(255,255,255,.72);
  padding: .4rem .75rem;
  border-radius: var(--r-sm);
  display: flex; align-items: center; gap: .35rem;
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.nav-group-btn:hover,
.nav-group.open .nav-group-btn {
  color: var(--white);
  background: rgba(255,255,255,.1);
}

.nav-caret {
  width: 10px; height: 6px;
  flex-shrink: 0;
  transition: transform var(--t);
}
.nav-group.open .nav-caret { transform: rotate(180deg); }

/* ── Dropdown panel ─────────────────────────────────────── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  min-width: 175px;
  background: #111827;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  padding: .3rem;
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 300;
}
.nav-dropdown--right { left: auto; right: 0; }
.nav-group.open .nav-dropdown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.nav-dropdown a {
  display: flex; align-items: center; gap: .55rem;
  padding: .5rem .7rem;
  color: rgba(255,255,255,.78);
  font-size: .85rem; font-weight: 500;
  border-radius: var(--r-sm);
  transition: background var(--t), color var(--t);
}
.nav-dropdown a:hover { background: rgba(255,255,255,.1); color: var(--white); }

.nav-dd-icon { font-size: .85rem; flex-shrink: 0; width: 1.1em; text-align: center; }

.nav-dd-divider {
  height: 1px;
  background: rgba(255,255,255,.1);
  margin: .25rem .4rem;
}

/* ── Hamburger (mobile) ─────────────────────────────────── */
.nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: .35rem;
  flex-direction: column; gap: 5px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}

/* ── Mobile nav ─────────────────────────────────────────── */
@media (max-width: 820px) {
  .nav-hamburger { display: flex; }

  .topnav {
    display: none;
    position: absolute;
    top: 60px; left: -1.25rem; right: -1.25rem;
    background: #0d1a2d;
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-direction: column;
    align-items: stretch;
    padding: .6rem .75rem .9rem;
    gap: .15rem;
    z-index: 150;
    box-shadow: 0 6px 20px rgba(0,0,0,.4);
  }
  .topnav.open { display: flex; }

  .topnav-link { padding: .55rem .75rem; }

  .nav-group { width: 100%; }
  .nav-group-btn { width: 100%; justify-content: space-between; padding: .55rem .75rem; }

  .nav-dropdown {
    position: static;
    opacity: 1; transform: none; pointer-events: auto;
    display: none;
    background: rgba(255,255,255,.04);
    border: none;
    box-shadow: none;
    border-radius: var(--r-sm);
    margin: .2rem 0 .1rem .5rem;
    padding: .2rem;
  }
  .nav-group.open .nav-dropdown { display: block; }
  .nav-dropdown a { padding: .45rem .7rem; }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; padding: .5rem 1rem;
  border: 1px solid var(--gray-200);
  background: var(--white); color: var(--gray-700);
  border-radius: var(--r); font-size: .875rem; font-weight: 500;
  font-family: var(--font-sans); cursor: pointer;
  transition: all var(--t); white-space: nowrap; line-height: 1;
}
.btn:hover { border-color: var(--gray-300); background: var(--gray-50); box-shadow: var(--shadow-sm); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn.primary:hover { background: var(--midnight); border-color: var(--midnight); box-shadow: var(--shadow); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--midnight); font-weight: 600; }
.btn.gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn.danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.btn.danger:hover { background: #fde8e8; }
.btn.success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }

/* ── Forms ──────────────────────────────────────────────── */
.form-grid { display: grid; gap: 1rem; }
.form-grid.wide { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid label { display: flex; flex-direction: column; gap: .375rem; font-size: .875rem; font-weight: 500; color: var(--gray-700); }
.form-grid .full { grid-column: 1 / -1; }
input, select, textarea {
  border: 1.5px solid var(--gray-200); border-radius: var(--r);
  padding: .625rem .75rem; font-size: .95rem;
  font-family: var(--font-sans); color: var(--gray-800);
  background: var(--white); transition: all var(--t); width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,92,.12);
}
textarea { min-height: 120px; resize: vertical; }

/* ── Cards & Panels ─────────────────────────────────────── */
.panel, .hero-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.auth-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-xl); padding: 2.5rem;
  max-width: 460px; margin: 3rem auto;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 1.75rem; margin-bottom: .5rem; color: var(--midnight); }
.auth-card .subtitle { color: var(--gray-500); margin-bottom: 1.5rem; font-size: .95rem; }
.auth-divider { text-align: center; color: var(--gray-400); font-size: .8rem; margin: 1rem 0; }

/* ── Tables ─────────────────────────────────────────────── */
.header-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.filter-bar { display: flex; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
table {
  width: 100%; border-collapse: collapse;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
thead { background: var(--gray-50); }
th {
  text-align: left; padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500);
}
td {
  text-align: left; padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: .9rem; vertical-align: middle; color: var(--gray-700);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }
.actions-cell { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ── Stat Cards (Admin Dashboard) ───────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); padding: 1.25rem;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
}
.stat-card h2 { font-size: 2rem; font-weight: 800; color: var(--midnight); margin: 0 0 .25rem; }
.stat-card p  { margin: 0; color: var(--gray-500); font-size: .85rem; font-weight: 500; }

/* ── Layout helpers ─────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  background: var(--gray-100); color: var(--gray-700);
  border-radius: var(--r-full); padding: .3rem .75rem;
  font-size: .8rem; font-weight: 500;
}
.pill.navy { background: rgba(26,58,92,.1); color: var(--navy); }
.pill.gold { background: rgba(201,168,76,.15); color: var(--gold-dark); }
.pill.success { background: var(--success-bg); color: var(--success); }
.pill.danger { background: var(--danger-bg); color: var(--danger); }

/* ── Flash messages ─────────────────────────────────────── */
.flash-wrap { margin-bottom: 1rem; display: grid; gap: .5rem; }
.flash {
  border-radius: var(--r); padding: .75rem 1rem;
  border: 1px solid; font-size: .9rem; font-weight: 500;
}
.flash.success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.flash.error   { background: var(--danger-bg);  border-color: var(--danger-border);  color: var(--danger);  }

/* ── Misc ───────────────────────────────────────────────── */
.muted   { color: var(--muted); font-size: .875rem; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: 700; }
.lead    { color: var(--gray-600); max-width: 60ch; line-height: 1.7; }

/* Admin hero (landing.html uses this when user is logged in) */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.25rem; align-items: stretch; }

/* =========================================================
   PUBLIC NAVIGATION
   ========================================================= */
.public-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(10,22,40,.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: all var(--t);
}
.public-nav.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,.35); }
.public-nav-inner {
  display: flex; align-items: center;
  justify-content: space-between; min-height: 70px; gap: 1rem;
}
.public-nav .brand { font-size: 1.3rem; font-weight: 800; color: var(--white); letter-spacing: -.03em; }
.public-nav .brand span { color: var(--gold); }
.public-nav-links { display: flex; align-items: center; gap: .25rem; }
.public-nav-links a {
  color: rgba(255,255,255,.72); font-size: .875rem; font-weight: 500;
  padding: .5rem .875rem; border-radius: var(--r); transition: all var(--t);
}
.public-nav-links a:hover { color: var(--white); background: rgba(255,255,255,.1); }
.public-nav-links a.nav-cta {
  background: var(--gold); color: var(--midnight);
  font-weight: 700; margin-left: .5rem;
  border-radius: var(--r);
}
.public-nav-links a.nav-cta:hover { background: var(--gold-dark); }

/* =========================================================
   PUBLIC HERO
   ========================================================= */
.public-hero {
  position: relative; min-height: 92vh;
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--midnight) 0%, #142540 45%, #0d2035 75%, var(--midnight) 100%);
  overflow: hidden;
}
.public-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 78% 45%, rgba(201,168,76,.09) 0%, transparent 55%),
    radial-gradient(ellipse at 12% 80%, rgba(37,99,235,.1) 0%,  transparent 50%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px;
}
.public-hero-content { position: relative; z-index: 2; max-width: 700px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(201,168,76,.15); border: 1px solid rgba(201,168,76,.3);
  border-radius: var(--r-full); padding: .35rem 1.1rem;
  color: var(--gold); font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1.25rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 600;
  color: var(--white); line-height: 1.05;
  margin-bottom: 1.25rem; letter-spacing: -.02em;
}
.hero-title em { font-style: italic; color: var(--gold); }
.hero-subtitle {
  font-size: 1.15rem; color: rgba(255,255,255,.68);
  max-width: 52ch; line-height: 1.75; margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-hero-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 1rem 2rem; background: var(--gold); color: var(--midnight);
  border-radius: var(--r-lg); font-size: 1rem; font-weight: 700;
  border: 2px solid var(--gold); transition: all var(--t);
}
.btn-hero-primary:hover {
  background: var(--gold-dark); border-color: var(--gold-dark);
  transform: translateY(-2px); box-shadow: 0 12px 30px rgba(201,168,76,.3);
}
.btn-hero-secondary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 1rem 2rem; background: transparent; color: var(--white);
  border-radius: var(--r-lg); font-size: 1rem; font-weight: 600;
  border: 2px solid rgba(255,255,255,.3); transition: all var(--t);
}
.btn-hero-secondary:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.55); }

/* ── Stats Band ─────────────────────────────────────────── */
.stats-band {
  background: var(--white);
  border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200);
  padding: 3.5rem 0;
}
.stats-band-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; text-align: center; }
.stat-item-number {
  font-family: var(--font-display); font-size: 3.2rem; font-weight: 600;
  color: var(--midnight); line-height: 1; margin-bottom: .5rem;
}
.stat-item-number span { color: var(--gold); }
.stat-item-label { color: var(--gray-500); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }

/* ── Sections ───────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section.dark { background: var(--midnight); }
.section.light { background: var(--cream); }
.section.gray  { background: var(--gray-50); }
.section-header { text-align: center; max-width: 620px; margin: 0 auto 3.5rem; }
.section-eyebrow {
  display: inline-block; color: var(--gold);
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; margin-bottom: .75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 600;
  color: var(--midnight); line-height: 1.18; margin-bottom: 1rem;
  letter-spacing: -.01em;
}
.section.dark .section-title { color: var(--white); }
.section-desc { color: var(--gray-500); font-size: 1.05rem; line-height: 1.75; }
.section.dark .section-desc { color: rgba(255,255,255,.6); }

/* ── Services Grid ──────────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.service-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-xl); padding: 2.25rem;
  transition: all var(--t-slow); position: relative; overflow: hidden;
}
.service-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  transform: scaleX(0); transition: transform var(--t-slow); transform-origin: left;
}
.service-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-xl); transform: translateY(-6px); }
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
  width: 56px; height: 56px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--midnight), #1e4d80);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem; font-size: 1.5rem;
}
.service-card h3 { font-size: 1.25rem; font-weight: 700; color: var(--midnight); margin-bottom: .75rem; }
.service-card p  { color: var(--gray-500); font-size: .95rem; line-height: 1.72; margin-bottom: 1.5rem; }
.service-features { list-style: none; }
.service-features li {
  display: flex; align-items: center; gap: .5rem;
  color: var(--gray-600); font-size: .875rem;
  padding: .45rem 0; border-bottom: 1px solid var(--gray-100);
}
.service-features li:last-child { border-bottom: none; }
.service-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ── Feature Row (alternating) ──────────────────────────── */
.features-row { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.features-row.reverse { direction: rtl; }
.features-row.reverse > * { direction: ltr; }
.feature-visual {
  background: linear-gradient(135deg, var(--midnight), var(--navy));
  border-radius: var(--r-xl); aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem; position: relative; overflow: hidden;
}
.feature-visual::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(201,168,76,.12) 0%, transparent 70%);
}
.feature-list { list-style: none; margin-top: 1.5rem; }
.feature-list li {
  display: flex; gap: .75rem;
  padding: .75rem 0; border-bottom: 1px solid var(--gray-100);
  font-size: .95rem; color: var(--gray-600); align-items: flex-start;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li strong { color: var(--gray-800); }
.feature-list li::before {
  content: '▸'; color: var(--gold); font-size: .75rem;
  flex-shrink: 0; margin-top: .2rem;
}

/* ── CTA Band ───────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--midnight) 0%, #0d1f36 100%);
  padding: 5.5rem 0; text-align: center; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(201,168,76,.1) 0%, transparent 65%);
}
.cta-band > .container { position: relative; }
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--white); margin-bottom: 1rem; font-weight: 600;
}
.cta-band p {
  color: rgba(255,255,255,.62); font-size: 1.1rem;
  max-width: 50ch; margin: 0 auto 2.5rem; line-height: 1.75;
}
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Page Header (inner pages) ──────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--midnight), var(--navy));
  padding: 5rem 0 6rem; text-align: center;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 110%, rgba(201,168,76,.1) 0%, transparent 60%);
}
.page-header-content { position: relative; z-index: 1; }
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem); color: var(--white);
  font-weight: 600; margin-bottom: 1rem; letter-spacing: -.02em;
}
.page-header p { color: rgba(255,255,255,.62); font-size: 1.1rem; max-width: 50ch; margin: 0 auto; line-height: 1.75; }
.eyebrow-tag {
  display: inline-block;
  background: rgba(201,168,76,.15); border: 1px solid rgba(201,168,76,.3);
  border-radius: var(--r-full); padding: .35rem 1.1rem;
  color: var(--gold); font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1.25rem;
}

/* ── Values Grid (About) ────────────────────────────────── */
.values-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.value-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-xl); padding: 2rem; text-align: center;
  transition: all var(--t-slow);
}
.value-card:hover { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow-lg); transform: translateY(-4px); }
.value-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.value-card h3 { font-size: 1.1rem; color: var(--midnight); margin-bottom: .75rem; }
.value-card p  { color: var(--gray-500); font-size: .9rem; line-height: 1.75; }

/* ── Contact Page ───────────────────────────────────────── */
.contact-layout { display: grid; grid-template-columns: 1fr 1.35fr; gap: 3rem; align-items: start; }
.contact-info h2 { font-family: var(--font-display); font-size: 1.9rem; color: var(--midnight); margin-bottom: 1rem; }
.contact-info > p { color: var(--gray-500); line-height: 1.75; margin-bottom: 2rem; }
.contact-methods { display: grid; gap: 1rem; }
.contact-method {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem; border-radius: var(--r-lg);
  background: var(--gray-50); border: 1px solid var(--gray-200);
}
.contact-method-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: var(--r); background: linear-gradient(135deg, var(--midnight), var(--navy));
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.1rem;
}
.contact-method-info h4 { font-size: .875rem; font-weight: 600; color: var(--midnight); margin-bottom: .2rem; }
.contact-method-info p, .contact-method-info a { color: var(--gray-500); font-size: .875rem; transition: color var(--t); }
.contact-method-info a:hover { color: var(--gold); }
.contact-form-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-xl); padding: 2.5rem; box-shadow: var(--shadow-lg);
}
.contact-form-card h2 { font-size: 1.5rem; color: var(--midnight); margin-bottom: 1.75rem; }

/* ── Footer ─────────────────────────────────────────────── */
.public-footer { background: var(--gray-900); padding: 5rem 0 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3,1fr); gap: 3rem; margin-bottom: 3.5rem; }
.footer-brand .brand-mark { font-size: 1.5rem; font-weight: 800; color: var(--white); display: block; margin-bottom: 1rem; }
.footer-brand .brand-mark span { color: var(--gold); }
.footer-brand p { color: var(--gray-400); font-size: .9rem; line-height: 1.75; max-width: 28ch; }
.footer-col h4 {
  color: var(--white); font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .75rem; }
.footer-col ul li a { color: var(--gray-400); font-size: .9rem; transition: color var(--t); }
.footer-col ul li a:hover { color: var(--gold); }
.footer-col address { color: var(--gray-400); font-size: .9rem; font-style: normal; line-height: 1.85; }
.footer-col address a { transition: color var(--t); }
.footer-col address a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07); padding-top: 1.75rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.footer-bottom p { color: var(--gray-500); font-size: .85rem; }
.footer-bottom a { color: var(--gray-400); transition: color var(--t); }
.footer-bottom a:hover { color: var(--gold); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .values-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .hero, .two-col, .stats-grid, .form-grid.wide { grid-template-columns: 1fr; }
  .features-row, .features-row.reverse { grid-template-columns: 1fr; direction: ltr; }
  .contact-layout { grid-template-columns: 1fr; }
  .stats-band-grid { grid-template-columns: repeat(2,1fr); }
  table { display: block; overflow-x: auto; }
}
@media (max-width: 640px) {
  .public-hero { min-height: 100svh; }
  .hero-title { font-size: 2.75rem; }
  .services-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .auth-card { padding: 1.75rem; margin: 1.5rem auto; }
  .nav-hide-mobile { display: none !important; }
  .stats-band-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

/* ── Profile page ───────────────────────────────────────── */
@media (max-width: 860px) {
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* =========================================================
   COOKIE BANNER
   ========================================================= */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: .875rem 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.3);
}
.cookie-banner-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 1.5rem;
}
.cookie-text {
  color: rgba(255,255,255,.7); font-size: .875rem; flex: 1; margin: 0; line-height: 1.5;
}
.cookie-text strong { color: var(--white); }
.cookie-actions { flex-shrink: 0; }

/* =========================================================
   CONTRACTS
   ========================================================= */

/* Document preview */
.contract-doc {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow);
}
.contract-doc-parties {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem; padding: 1.75rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}
.contract-doc-section {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--gray-100);
}
.contract-doc-section:last-child { border-bottom: none; }
.contract-doc-section-title {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gray-400);
  padding-bottom: .6rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}
.contract-details-grid {
  display: grid; grid-template-columns: 140px 1fr;
  gap: .3rem .75rem; font-size: .9rem;
}
.contract-detail-label {
  font-weight: 600; color: var(--gray-600); padding: .25rem 0;
}
.contract-details-grid > span { padding: .25rem 0; }
.contract-body-text {
  font-size: .9rem; line-height: 1.75; color: var(--gray-700);
  white-space: pre-wrap;
}
.contract-sig-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
.contract-sig-box { padding-top: .5rem; }
.contract-sig-img {
  max-width: 200px; max-height: 60px; object-fit: contain;
  border: 1px solid var(--gray-200); border-radius: var(--r);
  padding: .35rem; background: var(--white);
  margin-bottom: .5rem; display: block;
}
.contract-sig-line {
  border-bottom: 1.5px solid var(--gray-700);
  width: 100%; margin-bottom: .5rem; height: 40px;
}
.contract-sig-name { font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
.contract-sig-role { font-size: .8rem; }

/* Signature pad */
.sig-pad-wrap {
  border: 1.5px solid var(--gray-300); border-radius: var(--r-lg);
  overflow: hidden; background: var(--white); cursor: crosshair;
}
.sig-pad-wrap canvas { display: block; width: 100%; max-height: 160px; touch-action: none; }
.sig-pad-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .4rem .75rem;
  border-top: 1px solid var(--gray-200); background: var(--gray-50);
  cursor: default;
}

@media (max-width: 640px) {
  .contract-doc-parties { grid-template-columns: 1fr; }
  .contract-sig-row { grid-template-columns: 1fr; }
  .contract-details-grid { grid-template-columns: 110px 1fr; }
}

/* ── Blockchain panel ───────────────────────────────────── */
.blockchain-panel {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
.blockchain-panel--registered {
  border-color: var(--success-border);
  box-shadow: 0 0 0 1px var(--success-border), var(--shadow-sm);
}
.blockchain-panel__header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.blockchain-panel--registered .blockchain-panel__header {
  background: var(--success-bg);
  border-bottom-color: var(--success-border);
}
.blockchain-panel__body {
  display: grid; grid-template-columns: 1fr auto;
  gap: 1.5rem; padding: 1.25rem 1.5rem; align-items: start;
}
.blockchain-details { display: grid; gap: .5rem; }
.blockchain-detail {
  display: flex; gap: .75rem; align-items: baseline; font-size: .875rem;
}
.blockchain-detail-label {
  font-weight: 600; color: var(--gray-500); font-size: .75rem;
  text-transform: uppercase; letter-spacing: .05em; min-width: 110px; flex-shrink: 0;
}
.blockchain-detail-value { color: var(--gray-800); word-break: break-all; }
.blockchain-hash { font-family: 'Courier New', monospace; font-size: .82rem; color: var(--navy); }
.blockchain-visuals { display: flex; gap: 1.25rem; align-items: flex-start; }
.blockchain-qr { width: 120px; height: 120px; border: 1px solid var(--gray-200); border-radius: var(--r); }
.blockchain-badge { max-width: 140px; border-radius: var(--r); }

@media (max-width: 640px) {
  .blockchain-panel__body { grid-template-columns: 1fr; }
  .blockchain-visuals { flex-wrap: wrap; }
}

/* =========================================================
   REPORTS PAGE
   ========================================================= */

/* Health score */
.health-score-display {
  display: flex; align-items: baseline; justify-content: center; gap: .2rem;
  margin: .75rem 0 .5rem;
}
.health-score-number {
  font-family: var(--font-display); font-size: 4.5rem;
  font-weight: 600; line-height: 1;
}
.health-score-number.good     { color: var(--success); }
.health-score-number.warn     { color: #d97706; }
.health-score-number.critical { color: var(--danger); }
.health-score-denom { font-size: 1.4rem; color: var(--gray-400); font-weight: 500; }
.health-grade { font-size: .9rem; font-weight: 700; }
.health-grade-good     { color: var(--success); }
.health-grade-warn     { color: #d97706; }
.health-grade-critical { color: var(--danger); }

/* Top grid */
.report-top-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Recommendations */
.rec-list { list-style: none; display: grid; gap: .4rem; }
.rec-item {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .55rem .75rem; border-radius: var(--r);
  font-size: .875rem; line-height: 1.5;
}
.rec-item.rec-critical { background: var(--danger-bg);  color: #991b1b; }
.rec-item.rec-warn     { background: #fffbeb;            color: #92400e; }
.rec-item.rec-info     { background: rgba(37,99,235,.07); color: #1e40af; }
.rec-item.rec-good     { background: var(--success-bg);  color: #065f46; }
.rec-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex-shrink: 0; margin-top: .4rem;
}

/* Section label */
.report-section-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gray-400);
  padding-bottom: .5rem; margin: 1.5rem 0 .75rem;
  border-bottom: 1px solid var(--gray-200);
}

/* KPI grid */
.report-kpi-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.report-kpi {
  background: var(--white); border: 1px solid var(--gray-200);
  border-left: 4px solid var(--gray-300);
  border-radius: var(--r-lg); padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.report-kpi.kpi-good     { border-left-color: var(--success); }
.report-kpi.kpi-warn     { border-left-color: #f59e0b; }
.report-kpi.kpi-critical { border-left-color: var(--danger); }
.report-kpi.kpi-neutral  { border-left-color: var(--gray-300); }

.kpi-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .75rem;
}
.kpi-label {
  font-size: .72rem; font-weight: 600; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .05em;
}
.kpi-badge {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: .15rem .45rem; border-radius: var(--r-full);
}
.kpi-badge-good     { background: var(--success-bg); color: var(--success); }
.kpi-badge-warn     { background: #fffbeb;            color: #92400e; }
.kpi-badge-critical { background: var(--danger-bg);  color: var(--danger); }
.kpi-badge-neutral  { background: var(--gray-100);   color: var(--gray-500); }

.kpi-value {
  font-size: 2.25rem; font-weight: 800;
  color: var(--midnight); line-height: 1; margin-bottom: .75rem;
}
.kpi-unit { font-size: 1.1rem; font-weight: 600; color: var(--gray-400); }
.kpi-na   { font-size: 1.5rem; color: var(--gray-300); }

.kpi-bar {
  height: 5px; background: var(--gray-100); border-radius: var(--r-full);
  margin-bottom: .55rem; overflow: hidden;
}
.kpi-bar-fill { height: 100%; border-radius: var(--r-full); transition: width var(--t-slow); }
.kpi-bar-fill.kpi-bar-good     { background: var(--success); }
.kpi-bar-fill.kpi-bar-warn     { background: #f59e0b; }
.kpi-bar-fill.kpi-bar-critical { background: var(--danger); }
.kpi-bar-fill.kpi-bar-neutral  { background: var(--gray-300); }

.kpi-meta { font-size: .74rem; color: var(--gray-400); }

/* Two / three column panels */
.report-two-col {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.report-three-col {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}

/* Breakdown rows */
.breakdown-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: .55rem 0; border-bottom: 1px solid var(--gray-100); font-size: .875rem;
}
.breakdown-item:last-child { border-bottom: none; }
.breakdown-label { color: var(--gray-600); }
.breakdown-value { font-weight: 700; color: var(--gray-800); }
.breakdown-value.good     { color: var(--success); }
.breakdown-value.warn     { color: #d97706; }
.breakdown-value.critical { color: var(--danger); }

/* Lease funnel */
.funnel { display: flex; flex-direction: column; gap: .35rem; }
.funnel-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .45rem .65rem; border-radius: var(--r);
  background: var(--gray-50); font-size: .875rem;
}
.funnel-period { color: var(--gray-500); font-size: .78rem; min-width: 90px; }
.funnel-bar-wrap {
  flex: 1; height: 6px; background: var(--gray-200);
  border-radius: var(--r-full); overflow: hidden;
}
.funnel-bar { height: 100%; border-radius: var(--r-full); }
.funnel-count { font-weight: 700; min-width: 24px; text-align: right; color: var(--gray-700); }

/* Pill variants for reference table */
.pill.danger { background: var(--danger-bg); color: var(--danger); }

/* Responsive */
@media (max-width: 860px) {
  .report-top-grid,
  .report-kpi-grid,
  .report-two-col,
  .report-three-col { grid-template-columns: 1fr; }
}

/* ── Companies & Tax Summary ─────────────────────────── */
.field-hint {
  display: block;
  font-size: .78rem;
  color: var(--gray-500);
  margin-top: .25rem;
}

.tax-properties-bar {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin: 1.25rem 0;
}

.tax-section {
  margin-top: 1.5rem;
}

.tax-section-title {
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  margin-bottom: .6rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--gray-200);
}

.tax-table {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.tax-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 1rem;
  font-size: .9rem;
  border-bottom: 1px solid var(--gray-100);
}
.tax-row:last-child { border-bottom: none; }

.tax-subtotal {
  background: var(--gray-50);
  font-weight: 600;
  border-top: 2px solid var(--gray-200) !important;
}

.tax-total {
  font-size: 1rem;
  font-weight: 700;
  padding: .85rem 1rem;
}

.tax-total--income { background: #ecfdf5; color: var(--success); }
.tax-total--loss   { background: #fef2f2; color: var(--danger); }

.tax-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.tax-disclaimer {
  margin-top: 1.5rem;
  padding: .85rem 1rem;
  background: var(--gray-50);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .82rem;
  color: var(--gray-600);
  line-height: 1.6;
}
.tax-disclaimer a { color: var(--navy); }
