/* ═══════════════════════════════════════════════════════════
   CHAD Property — IP Analysis Tool
   main.css  |  Foundation styles, tokens, layout
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ─── CSS TOKENS ─────────────────────────────────────────── */
:root {
  /* Brand */
  --brand-navy:       #152B52;
  --brand-navy-mid:   #1F407B;
  --brand-navy-light: #2A5299;
  --brand-gold:       #E8C825;
  --brand-gold-dark:  #C5A815;
  --brand-gold-light: #EDD453;
  --brand-white:      #FFFFFF;

  /* Semantic — DARK (default) */
  --bg:               #0C1A2E;
  --bg-deep:          #080F1C;
  --surface:          #112240;
  --surface-2:        #162B4A;
  --surface-3:        #1A3359;
  --border:           #1E3D64;
  --border-light:     #243F68;

  --text-1:           #E8EDF7;
  --text-2:           #94ADC8;
  --text-3:           #526A85;

  --sidebar-bg:       #080F1C;
  --sidebar-border:   rgba(255,255,255,0.06);
  --sidebar-hover:    rgba(232,200,37,0.08);
  --sidebar-active:   rgba(232,200,37,0.14);
  --sidebar-text:     rgba(255,255,255,0.75);
  --sidebar-sub:      rgba(255,255,255,0.35);

  --gold-muted:       rgba(232,200,37,0.15);
  --navy-muted:       rgba(21,43,82,0.4);

  --positive:         #22C55E;
  --positive-bg:      rgba(34,197,94,0.10);
  --negative:         #F87171;
  --negative-bg:      rgba(248,113,113,0.10);
  --warning:          #FBBF24;

  --shadow-sm:        0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:        0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg:        0 12px 40px rgba(0,0,0,0.5);

  --radius-sm:        6px;
  --radius-md:        10px;
  --radius-lg:        14px;
  --radius-xl:        20px;

  --transition:       0.2s ease;
  --font:             'Open Sans', system-ui, -apple-system, sans-serif;

  --sidebar-width:    240px;
  --topbar-height:    56px;
}

/* LIGHT THEME overrides */
[data-theme="light"] {
  --bg:               #F0F4FA;
  --bg-deep:          #E4EAF5;
  --surface:          #FFFFFF;
  --surface-2:        #F4F7FC;
  --surface-3:        #EAF0F8;
  --border:           #D4DCE8;
  --border-light:     #E2E8F0;

  --text-1:           #0F1E38;
  --text-2:           #4A5E78;
  --text-3:           #8FA3BB;

  --sidebar-bg:       #152B52;
  --sidebar-border:   rgba(255,255,255,0.07);
  --sidebar-hover:    rgba(232,200,37,0.10);
  --sidebar-active:   rgba(232,200,37,0.18);
  --sidebar-text:     rgba(255,255,255,0.80);
  --sidebar-sub:      rgba(255,255,255,0.42);

  --gold-muted:       rgba(197,168,21,0.12);
  --navy-muted:       rgba(21,43,82,0.08);

  --positive:         #16A34A;
  --positive-bg:      rgba(22,163,74,0.09);
  --negative:         #DC2626;
  --negative-bg:      rgba(220,38,38,0.08);

  --shadow-sm:        0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:        0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:        0 12px 40px rgba(0,0,0,0.15);
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.5;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }
img { max-width: 100%; }

/* Scrollbars */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ─── UTILITY ─────────────────────────────────────────────── */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.flex     { display: flex; }
.flex-1   { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2    { gap: 8px; }
.gap-3    { gap: 12px; }
.gap-4    { gap: 16px; }
.text-gold { color: var(--brand-gold); }
.text-pos  { color: var(--positive); }
.text-neg  { color: var(--negative); }
.font-bold { font-weight: 700; }

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600; border: none;
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap; line-height: 1;
}
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 14px; font-weight: 700; }

.btn-primary {
  background: var(--brand-gold);
  color: #0A1628;
}
.btn-primary:hover { background: var(--brand-gold-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--brand-gold-dark); color: var(--text-1); }
[data-theme="dark"] .btn-secondary:hover { border-color: var(--brand-gold); color: var(--brand-gold); }

.btn-ghost {
  background: transparent;
  color: var(--text-3);
  border: none;
  padding: 7px 12px;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text-1); }

.btn-danger {
  background: var(--negative-bg);
  color: var(--negative);
  border: 1px solid var(--negative);
}
.btn-danger:hover { background: var(--negative); color: white; }

/* ─── FORM ELEMENTS ──────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.6px;
  margin-bottom: 5px;
}
.form-input, .form-select {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-1);
  font-size: 13px;
  transition: border-color var(--transition), background var(--transition);
  outline: none;
  appearance: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--brand-gold);
  background: var(--surface);
}
.form-input::placeholder { color: var(--text-3); }
.form-input-prefix { position: relative; }
.form-input-prefix .prefix {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 13px; font-weight: 600; pointer-events: none;
}
.form-input-prefix .form-input { padding-left: 22px; }
.form-input-suffix { position: relative; }
.form-input-suffix .suffix {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 12px; pointer-events: none;
}
.form-input-suffix .form-input { padding-right: 30px; }
.form-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-error { font-size: 11px; color: var(--negative); margin-top: 4px; }

/* ─── CARDS / PANELS ──────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: background var(--transition), border-color var(--transition);
}
.card-body { padding: 20px 24px; }
.card-header {
  padding: 16px 24px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.card-title { font-size: 13px; font-weight: 700; color: var(--text-1); }
.card-subtitle { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.card-divider { height: 1px; background: var(--border); margin: 16px 24px; }

/* ─── BADGES / TAGS ───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
}
.badge-gold { background: var(--gold-muted); color: var(--brand-gold); }
[data-theme="light"] .badge-gold { color: var(--brand-gold-dark); }
.badge-navy { background: rgba(21,43,82,0.6); color: rgba(255,255,255,0.8); }
[data-theme="light"] .badge-navy { background: var(--navy-muted); color: var(--brand-navy); }
.badge-pos  { background: var(--positive-bg); color: var(--positive); }
.badge-neg  { background: var(--negative-bg); color: var(--negative); }
.badge-gray { background: var(--surface-2); color: var(--text-3); }

/* Live indicator */
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 700;
  background: var(--positive-bg); color: var(--positive);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--positive);
  animation: livepulse 1.8s ease-in-out infinite;
}
@keyframes livepulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.85)} }

/* ─── DIVIDER ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.divider-label {
  display: flex; align-items: center; gap: 12px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-3); margin: 20px 0;
}
.divider-label::before, .divider-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ─── APP LAYOUT ──────────────────────────────────────────── */
#app-shell {
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 200;
  border-right: 1px solid var(--sidebar-border);
  transition: background var(--transition);
  overflow-y: auto; overflow-x: hidden;
}

/* Sidebar logo */
.sidebar-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  flex-shrink: 0;
}
.sidebar-logo-img {
  width: 100%; max-width: 170px; height: auto; display: block;
}
.sidebar-brand-tag {
  display: block;
  color: var(--brand-gold);
  font-size: 9px; font-weight: 700;
  letter-spacing: 1.8px; text-transform: uppercase;
}

/* Sidebar nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}
.sidebar-section-label {
  font-size: 9px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--sidebar-sub);
  padding: 0 8px;
  margin: 16px 0 5px;
}
.sidebar-section-label:first-child { margin-top: 6px; }

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 1px;
  user-select: none;
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--brand-white); }
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--brand-gold);
  font-weight: 700;
}
.nav-item .nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item .nav-label { flex: 1; }
.nav-item .nav-badge {
  background: var(--brand-gold);
  color: #0A1628;
  font-size: 9px; font-weight: 800;
  padding: 1px 6px; border-radius: 10px;
  flex-shrink: 0;
}
.nav-item .nav-badge.new { animation: badgepop 0.3s ease; }
@keyframes badgepop { from{transform:scale(0.6)} to{transform:scale(1)} }

/* Analysis list items */
.nav-item.analysis-item { padding: 7px 10px; }
.nav-item.analysis-item .nav-label {
  font-size: 12px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Status dots on analysis list items */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.status-dot.feasibility  { background: var(--text-3); }
.status-dot.offer        { background: var(--brand-gold); box-shadow: 0 0 0 2px rgba(232,200,37,0.25); }
.status-dot.won          { background: var(--positive); box-shadow: 0 0 0 2px rgba(34,197,94,0.25); }
.status-dot.unsuccessful { background: var(--negative); }

/* Analysis filter tabs */
.analysis-filter-tabs {
  display: flex; gap: 2px; padding: 6px 10px 4px;
}
.analysis-filter-tab {
  flex: 1; text-align: center;
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 2px; border-radius: 4px;
  color: var(--sidebar-sub); background: transparent;
  cursor: pointer; border: none; transition: all 0.15s;
  white-space: nowrap;
}
.analysis-filter-tab:hover { color: var(--sidebar-text); background: var(--sidebar-hover); }
.analysis-filter-tab.active { color: var(--brand-gold); background: var(--gold-muted); }

/* Collapsible past-offers group in sidebar */
.sidebar-past-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px; cursor: pointer;
}
.sidebar-past-toggle .sidebar-section-label { margin: 0; padding: 0; }
.sidebar-past-arrow { font-size: 9px; color: var(--sidebar-sub); transition: transform 0.2s; }
.sidebar-past-arrow.open { transform: rotate(90deg); }
#past-offers-list { overflow: hidden; transition: max-height 0.25s ease; }
#past-offers-list.collapsed { max-height: 0; }

.nav-item.nav-add {
  color: var(--brand-gold);
  font-weight: 600;
}
.nav-item.nav-add:hover { background: var(--gold-muted); }

/* ─── ANALYSIS STATUS BANNER (Offer Details page) ──────────── */
.status-banner {
  display: flex; align-items: stretch;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px;
}
.status-step {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 14px 8px; gap: 6px; cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background 0.15s; position: relative; text-align: center;
}
.status-step:last-child { border-right: none; }
.status-step:hover { background: var(--surface-2); }
.status-step.active { background: var(--surface-2); }
.status-step-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface-3); border: 2px solid var(--border-light);
  transition: all 0.15s;
}
.status-step.active .status-step-dot { border-color: currentColor; background: currentColor; }
.status-step-label { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.status-step-sub { font-size: 9px; color: var(--text-3); }

/* Status colours */
.status-step.s-feasibility { color: var(--text-3); }
.status-step.s-feasibility.active { color: var(--text-2); background: rgba(148,173,200,0.08); }
.status-step.s-offer { color: var(--brand-gold); }
.status-step.s-offer.active { background: rgba(232,200,37,0.07); }
.status-step.s-won { color: var(--positive); }
.status-step.s-won.active { background: rgba(34,197,94,0.07); }
.status-step.s-unsuccessful { color: var(--negative); }
.status-step.s-unsuccessful.active { background: rgba(248,113,113,0.07); }

/* Active step left border accent */
.status-step.active::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: currentColor;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-gold);
  color: #0A1628;
  font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-name { font-size: 12px; font-weight: 700; color: var(--brand-white); }
.sidebar-user-role { font-size: 10px; color: var(--sidebar-sub); margin-top: 1px; }
.sync-status {
  font-size: 10px; font-weight: 600;
  text-align: center;
  padding: 3px 10px;
  border-radius: 20px;
  margin: 6px 0 8px;
  transition: background 0.3s, color 0.3s;
}
.sync-synced  { background: var(--positive-bg);           color: var(--positive); }
.sync-syncing { background: rgba(232,200,37,0.12);        color: var(--brand-gold); }
.sync-error   { background: rgba(180, 50, 50, 0.15);      color: #e05050; }
.sync-offline { background: rgba(180,100, 30, 0.15);      color: #e07a30; }

.sidebar-actions {
  display: flex; gap: 6px;
}
.sidebar-action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 10px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600; color: var(--sidebar-sub);
  background: transparent; border: 1px solid var(--sidebar-border);
  cursor: pointer; transition: all var(--transition);
}
.sidebar-action-btn:hover { background: var(--sidebar-hover); color: var(--brand-white); border-color: rgba(255,255,255,0.15); }

/* ─── MAIN WRAPPER ────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ─── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 100;
  transition: background var(--transition), border-color var(--transition);
  gap: 16px;
}
.topbar-title { flex: 1; }
.topbar-title h1 { font-size: 15px; font-weight: 700; color: var(--text-1); }
.topbar-title p {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
  margin-top: 1px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* Theme toggle */
.theme-toggle-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.theme-toggle-btn:hover { border-color: var(--brand-gold); color: var(--brand-gold); }
.toggle-track {
  width: 30px; height: 16px; border-radius: 10px;
  background: var(--surface-3); position: relative;
  transition: background var(--transition);
}
.toggle-track.on { background: var(--brand-gold); }
.toggle-knob {
  position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: white; transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle-track.on .toggle-knob { transform: translateX(14px); }

/* Topbar separator */
.topbar-sep { width: 1px; height: 24px; background: var(--border); }

/* ─── PAGE CONTENT ────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 28px;
  overflow-x: hidden;
}

/* ─── LOGIN PAGE ──────────────────────────────────────────── */
#login-screen {
  min-height: 100vh;
  display: flex;
  background: var(--bg-deep);
}

.login-left {
  width: 420px; flex-shrink: 0;
  background: var(--brand-navy);
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 48px 40px;
  position: relative; overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232,200,37,0.12) 0%, transparent 60%);
  border-radius: 50%;
  animation: goldPulse 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes goldPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.15); opacity: 1; }
}
.login-left::after {
  content: '';
  position: absolute; bottom: -60px; left: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(232,200,37,0.04);
  pointer-events: none;
}
.login-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.login-logo-img { width: 220px; height: auto; display: block; }
.login-logo-tag { color: var(--brand-gold); font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }

.login-hero { position: relative; z-index: 1; }
.login-hero h2 {
  font-size: 28px; font-weight: 800; color: white;
  line-height: 1.25; margin-bottom: 16px; letter-spacing: -0.5px;
}
.login-hero h2 span { color: var(--brand-gold); }
.login-hero p { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.7; }
.login-features { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.login-feature {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: rgba(255,255,255,0.75);
}
.login-feature-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-gold); flex-shrink: 0;
}

.login-footer { font-size: 11px; color: rgba(255,255,255,0.3); position: relative; z-index: 1; }

.login-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px;
}
.login-box {
  width: 100%; max-width: 380px;
  border-left: 3px solid var(--brand-gold);
  padding-left: 24px;
}
.login-box h3 {
  font-size: 22px; font-weight: 800; color: var(--text-1);
  margin-bottom: 6px;
}
.login-box p { font-size: 13px; color: var(--text-2); margin-bottom: 32px; }

.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
  font-size: 11px; color: var(--text-3); font-weight: 600;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.login-footer-note {
  text-align: center; font-size: 11px; color: var(--text-3);
  margin-top: 24px; line-height: 1.6;
}
.login-footer-note a { color: var(--brand-gold); font-weight: 600; }

/* Login error */
.login-error {
  background: var(--negative-bg);
  border: 1px solid var(--negative);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px; color: var(--negative);
  margin-bottom: 16px;
}

/* ─── KPI CARDS ──────────────────────────────────────────── */
.kpi-grid { display: grid; gap: 16px; }
.kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid-2 { grid-template-columns: repeat(2, 1fr); }

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: background var(--transition), border-color var(--transition);
}
.kpi-card-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-3);
  margin-bottom: 8px;
}
.kpi-card-value {
  font-size: 24px; font-weight: 800;
  color: var(--text-1); line-height: 1;
}
.kpi-card-value.gold { color: var(--brand-gold); }
[data-theme="light"] .kpi-card-value.gold { color: var(--brand-gold-dark); }
.kpi-card-value.pos  { color: var(--positive); }
.kpi-card-value.neg  { color: var(--negative); }
.kpi-card-sub {
  font-size: 11px; color: var(--text-3);
  margin-top: 6px;
}
.kpi-card.highlight {
  background: var(--brand-navy);
  border-color: var(--brand-navy-mid);
}
[data-theme="dark"] .kpi-card.highlight {
  background: rgba(21,43,82,0.6);
  border-color: var(--brand-navy-mid);
}
.kpi-card.highlight .kpi-card-label { color: rgba(255,255,255,0.45); }
.kpi-card.highlight .kpi-card-value { color: var(--brand-gold); }
.kpi-card.highlight .kpi-card-sub   { color: rgba(255,255,255,0.4); }

/* ─── KPI GROUP LABEL ─────────────────────────────────────── */
.kpi-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-3);
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

/* ─── INFO ROWS ───────────────────────────────────────────── */
.info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.info-row:last-child { border-bottom: none; }
.info-key { color: var(--text-2); }
.info-val { font-weight: 600; color: var(--text-1); }
.info-val.gold { color: var(--brand-gold); }
[data-theme="light"] .info-val.gold { color: var(--brand-gold-dark); }
.info-val.pos { color: var(--positive); }
.info-val.neg { color: var(--negative); }

/* ─── DATA TABLE ──────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr { background: var(--brand-navy); }
[data-theme="light"] .data-table thead tr { background: var(--brand-navy); }
.data-table thead th {
  padding: 10px 14px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: rgba(255,255,255,0.75);
  text-align: right; white-space: nowrap;
}
.data-table thead th:first-child { text-align: left; border-radius: var(--radius-sm) 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }
.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table td {
  padding: 10px 14px;
  font-size: 12px; color: var(--text-1);
  text-align: right; white-space: nowrap;
}
.data-table td:first-child { text-align: left; color: var(--text-2); font-weight: 500; }
.data-table .section-row td {
  background: var(--surface-2);
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-3); padding: 6px 14px;
}
.data-table .total-row td { font-weight: 700; border-top: 2px solid var(--border); }
.data-table td.pos { color: var(--positive); font-weight: 600; }
.data-table td.neg { color: var(--negative); font-weight: 600; }

/* ─── FORM SECTION HEADING ────────────────────────────────── */
.form-section { margin-bottom: 28px; }
.form-section-title {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--brand-gold);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
[data-theme="light"] .form-section-title { color: var(--brand-navy); border-bottom-color: var(--brand-gold); }

/* ─── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 24px;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--text-1); margin-bottom: 8px; }
.empty-desc  { font-size: 13px; color: var(--text-3); margin-bottom: 24px; max-width: 340px; margin-left: auto; margin-right: auto; }

/* ─── LOADING SPINNER ─────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--brand-gold);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-deep);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
}
.loading-logo { width: 80px; height: auto; }
.loading-overlay p { font-size: 13px; color: var(--text-3); }

/* ─── TOAST NOTIFICATIONS ─────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 13px; font-weight: 500; color: var(--text-1);
  pointer-events: all;
  animation: toastin 0.25s ease;
  min-width: 260px; max-width: 360px;
}
.toast.success { border-color: var(--positive); }
.toast.error   { border-color: var(--negative); }
@keyframes toastin { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

/* ─── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
  animation: fadein 0.15s ease;
}
@keyframes fadein { from{opacity:0} to{opacity:1} }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: modalpop 0.2s ease;
}
@keyframes modalpop { from{opacity:0;transform:scale(0.95)} to{opacity:1;transform:scale(1)} }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: none;
  color: var(--text-3); font-size: 16px; cursor: pointer;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--negative-bg); color: var(--negative); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ─── DISCLAIMER ──────────────────────────────────────────── */

/* Persistent footer bar */
.disclaimer-bar {
  position: fixed; bottom: 0; left: var(--sidebar-width); right: 0;
  z-index: 150;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 7px 28px;
  display: flex; align-items: center; gap: 10px;
  transition: left var(--transition), background var(--transition);
}
.disclaimer-bar-icon {
  font-size: 13px; flex-shrink: 0; opacity: 0.6;
}
.disclaimer-bar p {
  font-size: 10px; color: var(--text-3); line-height: 1.4; flex: 1;
}
.disclaimer-bar a {
  font-size: 10px; color: var(--brand-gold); font-weight: 600;
  white-space: nowrap; flex-shrink: 0; text-decoration: none;
  opacity: 0.85;
}
.disclaimer-bar a:hover { opacity: 1; }

/* Push page content up so it isn't hidden behind footer bar */
.page-content { padding-bottom: 48px; }

/* Login disclaimer checkbox */
.disclaimer-check-wrap {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  cursor: pointer;
}
.disclaimer-check-wrap input[type="checkbox"] {
  width: 16px; height: 16px; flex-shrink: 0;
  accent-color: var(--brand-gold);
  margin-top: 1px; cursor: pointer;
}
.disclaimer-check-wrap label {
  font-size: 11px; color: var(--text-2); line-height: 1.55; cursor: pointer;
}
.disclaimer-check-wrap label a { color: var(--brand-gold); font-weight: 600; }

/* First-login modal disclaimer */
.disclaimer-modal-body {
  max-height: 340px; overflow-y: auto;
  padding-right: 4px;
}
.disclaimer-modal-body h4 {
  font-size: 13px; font-weight: 700; color: var(--text-1);
  margin: 16px 0 6px;
}
.disclaimer-modal-body h4:first-child { margin-top: 0; }
.disclaimer-modal-body p {
  font-size: 12px; color: var(--text-2); line-height: 1.7; margin-bottom: 10px;
}
.disclaimer-modal-body ul {
  font-size: 12px; color: var(--text-2); line-height: 1.7;
  margin-left: 18px; margin-bottom: 10px;
}
.disclaimer-modal-body ul li { margin-bottom: 4px; }
.disclaimer-accept-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.disclaimer-accept-check input[type="checkbox"] {
  width: 16px; height: 16px; flex-shrink: 0;
  accent-color: var(--brand-gold); margin-top: 2px; cursor: pointer;
}
.disclaimer-accept-check label {
  font-size: 12px; color: var(--text-1); font-weight: 600;
  line-height: 1.5; cursor: pointer;
}

/* Inline page disclaimer (bottom of dashboard etc) */
.page-disclaimer {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 20px;
}
.page-disclaimer-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; opacity: 0.7; }
.page-disclaimer p {
  font-size: 10px; color: var(--text-3); line-height: 1.7; margin: 0;
}

/* ─── FORM SECTIONS (Offer Details etc.) ─────────────────── */
.form-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px;
}
.form-section-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.form-section-icon  { font-size: 15px; }
.form-section-title { font-size: 13px; font-weight: 700; color: var(--text-1); letter-spacing: 0.02em; }

/* Dollar prefix on inputs */
.inp-pfx {
  display: flex; align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  transition: border-color 0.15s;
}
.inp-pfx:focus-within { border-color: var(--brand-gold); }
.inp-pfx-sym {
  padding: 9px 8px 9px 12px;
  font-size: 13px; font-weight: 700;
  color: var(--text-3); background: transparent; flex-shrink: 0; user-select: none;
}
.inp-sfx-sym {
  padding: 9px 12px 9px 4px;
  font-size: 12px; color: var(--text-3); flex-shrink: 0; user-select: none;
}
.inp-pfx .form-input {
  border: none !important; background: transparent !important;
  padding-left: 2px !important; flex: 1; min-width: 0;
}
.inp-pfx .form-input:focus { border: none !important; background: transparent !important; }

/* Forecast Assumptions section — editable styling */
.form-section-header--assumptions {
  background: linear-gradient(90deg, rgba(232,200,37,0.08), transparent) !important;
  border-bottom-color: rgba(232,200,37,0.25) !important;
}
.form-section-editable-tag {
  margin-left: auto;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gold); background: rgba(232,200,37,0.12);
  border: 1px solid rgba(232,200,37,0.3);
  border-radius: 20px; padding: 2px 9px;
}
.form-section-hint {
  font-size: 11px; color: var(--text-3); line-height: 1.5;
  padding: 8px 18px; border-bottom: 1px solid var(--border);
  background: rgba(232,200,37,0.04);
}

/* Feasibility — inline rate edit */
.fs-card-title-hint { font-size: 10px; font-weight: 400; color: var(--text-3); text-transform: none; letter-spacing: 0; }
.fs-rate-edit { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.fs-rate-input {
  width: 72px; padding: 4px 8px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-3);
  color: var(--text-1); font-size: 12px; font-weight: 600; text-align: right; outline: none;
}
.fs-rate-input:focus { border-color: var(--gold); }
.fs-rate-pct { font-size: 12px; color: var(--text-3); }
.form-grid {
  display: grid; gap: 14px 18px;
  padding: 18px;
}
.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.form-group  { display: flex; flex-direction: column; gap: 5px; }
.form-span-2 { grid-column: span 2; }
.form-label  { font-size: 11px; font-weight: 700; color: var(--text-2); letter-spacing: 0.03em; text-transform: uppercase; }
.form-label-hint { font-weight: 400; text-transform: none; opacity: 0.7; }
.form-input {
  padding: 9px 12px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-1); font-size: 13px; font-family: inherit;
  transition: border-color 0.15s; outline: none;
}
.form-input:focus   { border-color: var(--brand-gold); background: var(--surface-3); }
.form-input::placeholder { color: var(--text-3); }
.form-select { cursor: pointer; }
.form-select option { background: var(--surface-2); color: var(--text-1); }
.form-textarea { min-height: 80px; resize: vertical; line-height: 1.6; }

/* Light theme form overrides */
[data-theme="light"] .form-input { background: #F8FAFD; }
[data-theme="light"] .form-input:focus { background: #FFFFFF; }


/* ─── DUE DILIGENCE — TRAFFIC LIGHT CONTROLS ─────────────── */
.dd-page { display: flex; flex-direction: column; gap: 20px; }

.dd-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.dd-section-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.dd-section-icon { font-size: 16px; }
.dd-section-title { font-size: 13px; font-weight: 700; color: var(--text-1); letter-spacing: 0.02em; }
.dd-section-body { padding: 0; }

.dd-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  max-width: 860px;
}
.dd-item:last-child { border-bottom: none; }
.dd-item:hover { background: var(--surface-2); }
.dd-item-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dd-item-label { font-size: 13px; color: var(--text-1); font-weight: 500; }
.dd-item-sub { font-size: 11px; color: var(--text-3); }

/* Traffic light button group */
.tl-group { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tl-btn {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 11px; font-weight: 700; color: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; opacity: 0.25;
  user-select: none;
}
.tl-btn.red   { background: #EF4444; border-color: #EF4444; }
.tl-btn.amber { background: #F59E0B; border-color: #F59E0B; }
.tl-btn.green { background: #22C55E; border-color: #22C55E; }
.tl-btn.active { opacity: 1; box-shadow: 0 0 0 3px rgba(255,255,255,0.15); }
.tl-btn:hover:not(.active) { opacity: 0.6; }

/* 2-option Yes/No style */
.yn-group { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.yn-btn {
  padding: 4px 12px; border-radius: 4px;
  border: 1.5px solid transparent;
  font-size: 11px; font-weight: 700; cursor: pointer;
  transition: all 0.15s; opacity: 0.28; letter-spacing: 0.04em;
}
.yn-btn.yes-red   { background: rgba(239,68,68,0.15);  border-color: #EF4444; color: #F87171; }
.yn-btn.no-green  { background: rgba(34,197,94,0.15);  border-color: #22C55E; color: #22C55E; }
.yn-btn.yes-amber { background: rgba(245,158,11,0.15); border-color: #F59E0B; color: #FBBF24; }
.yn-btn.yes-green { background: rgba(34,197,94,0.15);  border-color: #22C55E; color: #22C55E; }
.yn-btn.active { opacity: 1; }
.yn-btn:hover:not(.active) { opacity: 0.6; }

/* DD status summary pill */
.dd-status { display: flex; align-items: center; gap: 8px; padding: 10px 18px 12px; }
.dd-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dd-status-text { font-size: 12px; font-weight: 600; color: var(--text-2); }

/* State links grid */
.dd-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; padding: 14px 18px; }
.dd-link-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 12px; font-weight: 500;
  text-decoration: none; transition: all 0.15s; cursor: pointer;
}
.dd-link-btn:hover { border-color: var(--brand-gold); color: var(--brand-gold); background: var(--gold-muted); }
.dd-link-icon { font-size: 14px; }

/* DD Notes */
.dd-notes { padding: 14px 18px; }
.dd-notes textarea {
  width: 100%; min-height: 100px; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-1);
  font-size: 13px; font-family: inherit; resize: vertical;
  line-height: 1.6; transition: border-color 0.15s; box-sizing: border-box;
}
.dd-notes textarea:focus { outline: none; border-color: var(--brand-gold); }
.dd-notes textarea::placeholder { color: var(--text-3); }

/* Hard-no section highlight */
.dd-section.hard-no .dd-section-header { background: rgba(239,68,68,0.08); }
.dd-section.hard-no .dd-section-title { color: #F87171; }

/* ─── DEFINITIONS PAGE ────────────────────────────────────── */
.def-page { display: flex; flex-direction: column; gap: 24px; }
.def-section { }
.def-section-heading {
  font-size: 11px; font-weight: 700; color: var(--brand-gold);
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0 0 8px; border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.def-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.def-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
  transition: border-color 0.15s;
}
.def-card:hover { border-color: var(--border-light); }
.def-card-term {
  font-size: 13px; font-weight: 700; color: var(--text-1);
  margin-bottom: 5px; display: flex; align-items: center; gap: 6px;
}
.def-card-abbr {
  font-size: 10px; font-weight: 600; color: var(--brand-gold);
  background: var(--gold-muted); padding: 1px 6px;
  border-radius: 3px; letter-spacing: 0.05em;
}
.def-card-body { font-size: 12px; color: var(--text-2); line-height: 1.65; }

/* ─── HAMBURGER BUTTON ────────────────────────────────────── */
.hamburger-btn {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  flex-shrink: 0; padding: 4px;
}
.hamburger-btn span {
  display: block; width: 20px; height: 2px;
  background: var(--text-1); border-radius: 2px;
  transition: var(--transition);
}

/* ─── SETTLEMENT PERIOD ───────────────────────────────────── */
/* ─── Purchaser cards ────────────────────────────────────── */
.purchasers-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.purchasers-list { display: flex; flex-direction: column; gap: 12px; }
.purchaser-card {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.purchaser-card-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.purchaser-number {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-3);
}
.btn-add-purchaser {
  font-size: 12px; font-weight: 600; color: var(--gold);
  background: rgba(232,200,37,0.1); border: 1px solid rgba(232,200,37,0.3);
  border-radius: var(--radius-sm); padding: 5px 12px; cursor: pointer;
  transition: all 0.15s;
}
.btn-add-purchaser:hover { background: rgba(232,200,37,0.2); }
.btn-remove-purchaser {
  font-size: 11px; font-weight: 600; color: var(--negative);
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm); padding: 3px 10px; cursor: pointer;
  transition: all 0.15s;
}
.btn-remove-purchaser:hover { background: rgba(239,68,68,0.2); }

/* ─── Extra Conditions (dynamic list) ───────────────────── */
.extra-conditions-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px;
}
.extra-conditions-hint {
  font-size: 11px; color: var(--text-3); margin-bottom: 10px; line-height: 1.5;
}
.extra-conditions-list {
  display: flex; flex-direction: column; gap: 8px;
}
.extra-condition-item {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.extra-condition-main {
  display: flex; align-items: center; gap: 8px;
}
.extra-condition-text {
  flex: 1;
}
.extra-condition-days {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.condition-days-optional {
  color: var(--text-3); font-weight: 400;
}
.btn-add-condition {
  font-size: 12px; font-weight: 600; color: var(--gold);
  background: rgba(232,200,37,0.1); border: 1px solid rgba(232,200,37,0.3);
  border-radius: var(--radius-sm); padding: 5px 12px; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.btn-add-condition:hover { background: rgba(232,200,37,0.2); }
.btn-remove-condition {
  font-size: 11px; font-weight: 600; color: var(--negative);
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm); padding: 3px 8px; cursor: pointer;
  transition: all 0.15s; flex-shrink: 0;
}
.btn-remove-condition:hover { background: rgba(239,68,68,0.2); }

/* ─── Condition toggles ──────────────────────────────────── */
.condition-toggle {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px;
}
.condition-opt {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface-2);
  cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--text-2); transition: all 0.15s; user-select: none;
}
.condition-opt:has(input:checked) { border-color: var(--gold); color: var(--gold); background: rgba(232,200,37,0.08); }
.condition-opt input[type="radio"] { display: none; }
.condition-days-label { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.condition-days-sep   { font-size: 12px; color: var(--border); }

/* ─── Offer expiry row ───────────────────────────────────── */
.offer-expiry-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px;
}
.offer-expiry-row .form-input { width: auto; }

/* ─── Settlement toggle ──────────────────────────────────── */
.settlement-mode-toggle {
  display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.settlement-mode-opt {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface-2);
  cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--text-2); transition: all 0.15s; user-select: none;
}
.settlement-mode-opt:has(input:checked) {
  border-color: var(--brand-gold); color: var(--brand-gold);
  background: rgba(232,200,37,0.08);
}
.settlement-mode-opt input { display: none; }
.settlement-result {
  margin-top: 12px; padding: 14px 16px;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--surface-2);
}
.settlement-result-date {
  font-size: 17px; font-weight: 800; color: var(--brand-gold); margin-bottom: 3px;
}
.settlement-result-sub { font-size: 12px; color: var(--text-3); }
.settlement-result-warning {
  margin-top: 8px; padding: 7px 11px; border-radius: var(--radius-sm);
  background: rgba(232,200,37,0.08); border-left: 3px solid var(--brand-gold);
  font-size: 12px; color: var(--text-2);
}
.settlement-result-invalid .settlement-result-date { color: var(--negative); }
.settlement-result-invalid { border-color: rgba(248,113,113,0.4); }

/* ─── CONTACT CARDS ───────────────────────────────────────── */
.contact-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 16px; margin-bottom: 12px; background: var(--surface-2);
}
.contact-card:last-child { margin-bottom: 0; }
.contact-card-header {
  display: flex; align-items: center; gap: 8px;
  justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap;
}
.ct-pick-select {
  background: var(--surface-1); border: 1px solid var(--brand-gold);
  color: var(--text-1); border-radius: var(--radius-sm);
  padding: 4px 10px; font-size: 12px; font-weight: 500; cursor: pointer;
  max-width: 220px;
}
.ct-pick-select:focus { outline: 2px solid var(--brand-gold); outline-offset: 1px; }
.ct-pick-select option { background: #1a2744; color: #e2e8f0; }
.contact-card-role {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-3);
}
.btn-ghl {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 20px;
  border: 1px dashed var(--border); background: transparent;
  font-size: 11px; font-weight: 600; color: var(--text-3);
  cursor: pointer; transition: all 0.15s;
}
.btn-ghl:hover { border-color: var(--brand-gold); color: var(--brand-gold); }
.form-grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
@media (max-width: 640px) { .form-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .form-grid-3 { grid-template-columns: 1fr; } }

/* ─── SIDEBAR OVERLAY (mobile) ────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }

/* ─── RESPONSIVE ──────────────────────────────────────────── */

/* Tablet (≤900px) */
@media (max-width: 900px) {
  .kpi-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr 1fr; }
  .status-banner { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .status-step { flex: 0 0 130px; border-right: none; border-bottom: 1px solid var(--border); }
  .def-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* Mobile (≤768px) — sidebar becomes off-canvas drawer */
@media (max-width: 768px) {
  /* ── Base font size ── */
  html { font-size: 16px; }

  /* ── Sidebar drawer ── */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px !important;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    z-index: 100;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }

  /* ── Main wrapper full width ── */
  .main-wrapper { margin-left: 0; }
  .disclaimer-bar { left: 0; }

  /* ── Show hamburger ── */
  .hamburger-btn { display: flex; }

  /* ── Topbar ── */
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-title h1 { font-size: 13px; }
  .topbar-title p  { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
  .topbar-sep { display: none; }
  .btn-secondary { display: none; } /* hide Export PDF on mobile */

  /* ── KPI cards 2-col ── */
  .kpi-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .kpi-card { padding: 14px; }
  .kpi-card-value { font-size: 20px; }

  /* ── Forms single col ── */
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .form-span-2, .form-span-3 { grid-column: span 1; }

  /* ── Page content ── */
  .page-content { padding: 14px; }

  /* ── Charts stack vertically ── */
  .chart-equity-row { flex-direction: column; }

  /* ── DD links grid ── */
  .dd-links-grid { grid-template-columns: 1fr 1fr; }

  /* ── Data table scroll hint ── */
  .data-table-wrap {
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
  }
  .data-table-wrap::after {
    content: '← scroll →';
    display: block;
    text-align: center;
    font-size: 11px;
    color: var(--text-3);
    padding: 6px;
    border-top: 1px solid var(--border);
  }
  .data-table td, .data-table th {
    font-size: 11px;
    padding: 8px 10px;
  }

  /* ── Disclaimer bar ── */
  .disclaimer-bar {
    padding: 5px 12px;
    flex-wrap: wrap;
  }
  .disclaimer-bar p {
    font-size: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .disclaimer-bar a {
    font-size: 10px;
  }

  /* ── Theme toggle label ── */
  .toggle-label-text { display: none; }

  /* ── Portfolio stat row ── */
  .pf-stat-row { grid-template-columns: repeat(2, 1fr); }

  /* ── Login page mobile ── */
  #login-screen { flex-direction: column; }
  .login-left {
    width: 100%;
    padding: 32px 24px 24px;
    min-height: auto;
  }
  .login-features { display: none; }
  .login-hero h2 { font-size: 20px; margin-bottom: 8px; }
  .login-hero p  { font-size: 13px; }
  .login-right { padding: 24px 20px 40px; }
  .login-box h3 { font-size: 18px; }
  .login-box p  { font-size: 13px; margin-bottom: 20px; }
}

/* Small phones (≤480px) */
@media (max-width: 480px) {
  .kpi-grid-4, .kpi-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .kpi-card { padding: 12px 10px; }
  .kpi-card-value { font-size: 18px; }
  .kpi-card-label { font-size: 11px; }
  .kpi-card-sub   { font-size: 12px; }
  .page-content { padding: 10px; }
  .topbar-title p {
    display: block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
  }
  .btn.btn-primary.btn-sm { font-size: 11px; padding: 6px 10px; }
  .dd-links-grid { grid-template-columns: 1fr; }
  .def-grid { grid-template-columns: 1fr; }
  .status-step { flex: 0 0 110px; }

  /* ── DD item stacking ── */
  .dd-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .tl-group, .yn-group {
    align-self: flex-start;
  }

  /* ── Portfolio stat row ── */
  .pf-stat-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .pf-stat-value { font-size: 18px; }
}

/* ═══════════════════════════════════════════════════════════
   PORTFOLIO TRACKER STYLES
   ═══════════════════════════════════════════════════════════ */

/* ─── Page shell ─────────────────────────────────────────── */
.pf-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─── Stat row ───────────────────────────────────────────── */
.pf-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.pf-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.pf-stat-label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.pf-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
}
.pf-stat-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}

/* ─── Section label ──────────────────────────────────────── */
.pf-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: -8px;
}

/* ─── Controls bar ──────────────────────────────────────── */
.pf-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pf-search-input {
  flex: 1;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-1);
  font-size: 13px;
  font-family: var(--font);
  transition: border-color var(--transition);
}
.pf-search-input:focus { outline: none; border-color: var(--brand-gold); }
.pf-search-input::placeholder { color: var(--text-3); }
.pf-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pf-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  color: var(--text-1);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color var(--transition);
}
.pf-select:focus { outline: none; border-color: var(--brand-gold); }
.pf-client-count {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}
.pf-no-results {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

/* ─── Client list (all-clients view) ────────────────────── */
.pf-client-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pf-client-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.pf-client-card:hover {
  border-color: var(--brand-gold);
  background: var(--surface-2);
}
.pf-client-info {
  flex: 0 0 185px;
}
.pf-client-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.pf-client-sub  { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.pf-client-arrow { font-size: 20px; color: var(--text-3); flex-shrink: 0; }

/* List metrics — horizontal columns */
.pf-list-metrics {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}
.pf-list-metric {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 14px;
  border-right: 1px solid var(--border);
  min-width: 0;
}
.pf-list-metric--last { border-right: none; }
.pf-lm-label   { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1px; }
.pf-lm-primary { font-size: 14px; font-weight: 700; color: var(--text-1); white-space: nowrap; }
.pf-lm-sub     { font-size: 11px; color: var(--text-3); }

/* ─── Avatar ─────────────────────────────────────────────── */
.pf-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.pf-avatar--lg {
  width: 52px; height: 52px;
  font-size: 18px;
}

/* ─── Client hero (individual client view) ───────────────── */
.pf-client-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pf-back-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-2); font-size: 13px; font-family: var(--font);
  padding: 0; display: inline-flex; align-items: center; gap: 4px;
  transition: color var(--transition);
}
.pf-back-btn:hover { color: var(--brand-gold); }
.pf-client-hero {
  display: flex; align-items: center; gap: 14px;
}
.pf-client-hero-name {
  font-size: 22px; font-weight: 700; color: var(--text-1); margin: 0;
}
.pf-client-hero-sub {
  font-size: 12px; color: var(--text-3); margin-top: 4px;
}

/* ─── Property cards ─────────────────────────────────────── */
.pf-prop-list { display: flex; flex-direction: column; gap: 18px; }
.pf-prop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}
.pf-prop-card--pending { border-left: 3px solid var(--warning); }
.pf-prop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}
.pf-prop-street   { font-size: 15px; font-weight: 600; color: var(--text-1); }
.pf-prop-location { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.pf-prop-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Property specs pills */
.pf-prop-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.pf-spec {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  color: var(--text-2);
}
.pf-spec--reno { background: var(--gold-muted); border-color: var(--brand-gold-dark); color: var(--brand-gold); }

/* Entity type tags */
.pf-client-entities { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pf-ent-tag {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap;
}
.pf-ent--indiv   { background: rgba(96,165,250,0.15);  color: #60A5FA; }
.pf-ent--joint   { background: rgba(167,139,250,0.15); color: #A78BFA; }
.pf-ent--company { background: rgba(251,191,36,0.15);  color: #FBB824; }
.pf-ent--ft      { background: rgba(52,211,153,0.15);  color: #34D399; }
.pf-ent--smsf    { background: rgba(251,146,60,0.15);  color: #FB923C; }
.pf-ent--bt      { background: rgba(232,200,37,0.15);  color: #E8C825; }
.pf-ent--unknown { background: rgba(156,163,175,0.12); color: var(--text-3); font-style: italic; }

.pf-prop-header-entity {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}
.pf-ent-edit-select {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); border-radius: var(--radius-sm);
  padding: 3px 8px; font-size: 11px; cursor: pointer;
}
.pf-ent-edit-select--unset { border-color: var(--brand-gold); color: var(--brand-gold); }
.pf-ent-edit-select option { background: #1a2744; color: #e2e8f0; }

.pf-entity-summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 8px 0 4px; margin-bottom: 4px;
}
.pf-entity-summary-label {
  font-size: 11px; color: var(--text-3); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; margin-right: 2px;
}
.pf-entity-summary .pf-ent-tag { font-size: 11px; padding: 3px 10px; }

/* Badges */
.pf-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pf-badge--reviewed  { background: var(--positive-bg); color: var(--positive); }
.pf-badge--pending   { background: rgba(148,173,200,0.10); color: var(--text-3); }
.pf-badge--due-soon  { background: rgba(251,191,36,0.12); color: var(--warning); }
.pf-badge--overdue   { background: var(--negative-bg); color: var(--negative); }

/* Review due notice */
.pf-review-due {
  font-size: 12px;
  color: var(--text-3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.pf-review-due--soon    { color: var(--warning); border-color: rgba(251,191,36,0.25); background: rgba(251,191,36,0.06); }
.pf-review-due--overdue { color: var(--negative); border-color: rgba(248,113,113,0.25); background: var(--negative-bg); }

/* REA link button */
.pf-link-btn {
  font-size: 10px; font-weight: 600; color: var(--text-3);
  text-decoration: none; border: 1px solid var(--border);
  border-radius: 4px; padding: 3px 8px;
  transition: color var(--transition), border-color var(--transition);
}
.pf-link-btn:hover { color: var(--brand-gold); border-color: var(--brand-gold); }

/* CMA buttons */
.pf-cma-btn {
  font-size: 10px; font-weight: 600; cursor: pointer;
  border-radius: 4px; padding: 3px 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-3); transition: all var(--transition);
}
.pf-cma-btn:hover { color: var(--brand-gold); border-color: var(--brand-gold); }
.pf-cma-btn--has { color: var(--brand-gold); border-color: var(--brand-gold); background: rgba(232,200,37,0.08); }
.pf-cma-btn--has:hover { background: rgba(232,200,37,0.16); }
.pf-cma-btn--del { color: var(--text-4); border: none; padding: 3px 4px; }
.pf-cma-btn--del:hover { color: #f87171; }

/* URL fill button (offer form listing URL) */
.url-fill-btn {
  font-size: 10px; font-weight: 600; cursor: pointer;
  border-radius: 4px; padding: 2px 8px;
  border: 1px solid var(--brand-gold); background: transparent;
  color: var(--brand-gold); transition: all var(--transition);
  white-space: nowrap;
}
.url-fill-btn:hover { background: rgba(232,200,37,0.12); }

/* Metrics grid */
.pf-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}
.pf-metric-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.pf-metric-value { font-size: 16px; font-weight: 700; color: var(--text-1); }
.pf-metric-sub   { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* Notes */
.pf-notes {
  font-size: 12px; color: var(--text-3);
  border-left: 2px solid var(--border);
  padding-left: 10px;
  margin-bottom: 14px;
  font-style: italic;
}

/* Valuation history */
.pf-val-history { margin-bottom: 14px; }
.pf-val-history-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.pf-val-header {
  display: grid;
  grid-template-columns: 130px 1fr 90px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em;
}
.pf-val-row {
  display: grid;
  grid-template-columns: 130px 1fr 90px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px; color: var(--text-2);
  align-items: center;
}
.pf-val-row:last-child { border-bottom: none; }
.pf-val-date  { color: var(--text-3); }
.pf-val-value { font-weight: 600; color: var(--text-1); }
.pf-val-note  { color: var(--text-3); font-style: italic; font-size: 11px; }

/* Property actions */
.pf-prop-actions { padding-top: 10px; border-top: 1px solid var(--border); }

/* Valuation modal preview */
.pf-val-preview {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 12px;
}
.pf-val-preview-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}
.pf-val-preview-row:last-child { border-bottom: none; }
.pf-val-preview-row span:first-child { color: var(--text-2); }
.pf-val-preview-row span:last-child  { font-weight: 600; }

/* ─── Positive / negative colours ───────────────────────── */
.pf-positive { color: var(--positive) !important; }
.pf-negative { color: var(--negative) !important; }
.pf-muted    { color: var(--text-3)   !important; }

/* ═══════════════════════════════════════════════════════════
   FEASIBILITY & VALUATION PAGES  (Stage 7)
   ═══════════════════════════════════════════════════════════ */

.fs-page { padding: 20px; display: flex; flex-direction: column; gap: 18px; }

/* Hero */
.fs-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--navy, #152B52), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  flex-wrap: wrap;
}
.fs-hero-main { flex: 0 0 auto; }
.fs-hero-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 4px; }
.fs-hero-value { font-size: 36px; font-weight: 800; color: var(--gold); line-height: 1; }
.fs-hero-sub   { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.fs-hero-disclaimer { font-size: 11px; color: var(--text-3); margin-top: 8px; font-style: italic; opacity: 0.75; max-width: 420px; line-height: 1.5; }
.fs-hero-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-left: auto; }
.fs-hero-stat { text-align: center; }
.fs-hero-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin-bottom: 3px; }
.fs-hero-stat-value { font-size: 16px; font-weight: 700; color: var(--text-1); }

/* Body grid */
.fs-body { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.fs-right-col { display: flex; flex-direction: column; gap: 14px; }

/* Card */
.fs-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; }
.fs-card-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); margin-bottom: 14px; }

/* Cost table */
.fs-cost-table { display: flex; flex-direction: column; }
.fs-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-2);
  gap: 8px;
}
.fs-cost-row:last-child { border-bottom: none; }
.fs-cost-header {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-3); padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.fs-cost-section-head {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-3); padding-top: 12px; border-bottom: none;
}
.fs-cost-muted { color: var(--text-3) !important; font-size: 12px; }
.fs-muted { color: var(--text-3) !important; }
.fs-cost-divider { height: 1px; background: var(--border); margin: 8px 0; }
.fs-cost-total { font-size: 15px; font-weight: 700; color: var(--gold); border-bottom: none; padding-top: 10px; }
.fs-cost-total-sub { font-size: 11px; color: var(--text-3); border-bottom: none; padding-top: 0; }
.fs-chad-row { color: var(--text-1); font-weight: 500; }
.fs-badge {
  font-size: 10px; background: var(--surface-3); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; color: var(--text-3); font-weight: 500; margin-left: 4px;
}
.fs-editable-hint { font-size: 10px; color: var(--text-3); font-style: italic; }

/* Fee editor */
.fs-fee-editor { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.fs-fee-label { font-size: 11px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 6px; }
.fs-fee-row {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; width: fit-content;
}
.fs-fee-prefix { background: var(--surface-3); border-right: 1px solid var(--border); padding: 7px 10px; font-size: 13px; color: var(--text-2); }
.fs-fee-input {
  border: none; background: var(--surface-2); color: var(--text-1);
  padding: 7px 12px; font-size: 13px; font-weight: 600; outline: none; width: 120px;
}
.fs-fee-hint { font-size: 11px; color: var(--text-3); margin-top: 5px; }

/* Info grid */
.fs-info-grid { display: flex; flex-direction: column; }
.fs-info-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid var(--border-light); font-size: 12px; gap: 8px;
}
.fs-info-row:last-child { border-bottom: none; }
.fs-info-label { color: var(--text-3); }
.fs-info-value { font-weight: 600; color: var(--text-1); text-align: right; }
.fs-info-highlight .fs-info-label { color: var(--text-2); font-weight: 600; }
.fs-info-highlight .fs-info-value { color: var(--gold); }

/* Stamp duty note */
.fs-stamp-note { background: var(--surface-3) !important; border-color: var(--border-light) !important; }
.fs-stamp-note-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.fs-stamp-note-body { font-size: 11px; color: var(--text-3); line-height: 1.6; }

/* Colour helpers */
.fs-pos { color: var(--positive) !important; }
.fs-neg { color: var(--negative) !important; }

/* ── Editable cost rows in Acquisition table ── */
.fs-cost-editable {
  align-items: center;
}
.fs-cost-editable .fs-fee-row {
  margin: 0;
  justify-content: flex-end;
}
.fs-cost-editable .fs-fee-input {
  width: 80px;
  padding: 3px 6px;
  font-size: 13px;
}

/* ── Analysis Assumptions Accordion ── */
.fs-assumptions-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.fs-assumptions-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-1);
  background: var(--surface-3);
  user-select: none;
  list-style: none;
}
.fs-assumptions-summary::-webkit-details-marker { display: none; }
.fs-assumptions-summary::before {
  content: '▶';
  font-size: 0.7rem;
  color: var(--gold);
  transition: transform 0.2s;
  flex-shrink: 0;
}
details[open].fs-assumptions-panel > .fs-assumptions-summary::before { transform: rotate(90deg); }
.fs-assumptions-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-3);
}
.fs-assumptions-body {
  padding: 18px;
  border-top: 1px solid var(--border);
}
.fs-assumptions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.fs-assumptions-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.fs-assumptions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.82rem;
}
.fs-assumptions-row label {
  color: var(--text-2);
  flex: 1;
  min-width: 0;
}
.fs-assumptions-row .form-input {
  width: 90px;
  padding: 4px 8px;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.fs-assumptions-row .form-select {
  width: auto;
  min-width: 100px;
  padding: 4px 8px;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.fs-assumptions-row .inp-pfx {
  flex-shrink: 0;
}
.fs-assumptions-row .inp-pfx .form-input {
  width: 80px;
}

/* ── Forecast note (replaces Forecast Assumptions block) ── */
.fs-forecast-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--brand-gold-dark);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin-top: 4px;
}
.fs-forecast-note-icon { flex-shrink: 0; font-size: 14px; }
.fs-forecast-note-link {
  color: var(--brand-gold);
  text-decoration: underline;
  font-weight: 600;
}
[data-theme="light"] .fs-forecast-note-link { color: var(--brand-gold-dark); }

/* ── Valuation Scenarios ── */
.vs-explainer { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; }
.vs-explainer-title { font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 8px; }
.vs-explainer-body  { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 14px; }
.vs-explainer-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.vs-stat { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--text-3); }
.vs-stat strong { font-size: 14px; font-weight: 700; color: var(--text-1); }

.vs-table-wrap { overflow-x: auto; }
.vs-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.vs-table thead th {
  padding: 10px 14px; text-align: right; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3);
  border-bottom: 2px solid var(--border); background: var(--surface-3);
}
.vs-table thead th:first-child { text-align: left; }
.vs-table tbody td {
  padding: 9px 14px; text-align: right; border-bottom: 1px solid var(--border-light); color: var(--text-2);
}
.vs-table tbody td:first-child { text-align: left; font-weight: 600; color: var(--text-1); }
.vs-table tbody tr:last-child td { border-bottom: none; }
.vs-row-base   td { background: rgba(232,200,37,0.06); }
.vs-row-warn   td { background: rgba(251,191,36,0.05); }
.vs-row-danger td { background: rgba(239,68,68,0.06); }
.vs-neg { color: var(--negative) !important; }
.vs-warn-val { color: #f59e0b !important; }
.vs-badge { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; letter-spacing: 0.02em; }
.vs-badge-ok     { background: rgba(34,197,94,0.12);  color: var(--positive); }
.vs-badge-warn   { background: rgba(251,191,36,0.15); color: #d97706; }
.vs-badge-danger { background: rgba(239,68,68,0.12);  color: var(--negative); }
.vs-table-note { font-size: 11px; color: var(--text-3); padding: 10px 14px; border-top: 1px solid var(--border-light); background: var(--surface-3); }

/* ═══════════════════════════════════════════════════════════
   OFFER EMAIL PAGE  (Stage 8)
   ═══════════════════════════════════════════════════════════ */

.em-page { padding: 20px; display: flex; flex-direction: column; gap: 14px; max-width: 860px; margin: 0 auto; }

/* Toolbar */
.em-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.em-toolbar-left, .em-toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; }

/* Post-acceptance notifications */
.em-post-accept {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.em-post-accept-header {
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.em-post-accept-title {
  font-size: 13px; font-weight: 700; color: var(--text-1);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px;
}
.em-post-accept-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.em-post-accept-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.em-pac-card {
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.em-pac-card:last-child { border-right: none; }
.em-pac-role {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--brand-gold); margin-bottom: 2px;
}
.em-pac-name  { font-size: 13px; font-weight: 600; color: var(--text-1); }
.em-pac-firm  { font-size: 12px; color: var(--text-2); }
.em-pac-email { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.em-pac-missing { color: var(--text-3); font-style: italic; font-weight: 400; }
.em-pac-btn   { margin-top: auto; align-self: flex-start; }
@media (max-width: 680px) {
  .em-post-accept-grid { grid-template-columns: 1fr; }
  .em-pac-card { border-right: none; border-bottom: 1px solid var(--border); }
  .em-pac-card:last-child { border-bottom: none; }
}

/* Subject bar */
.em-subject-bar {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.em-subject-label { font-weight: 700; color: var(--text-3); flex-shrink: 0; }
.em-subject-value { font-weight: 600; color: var(--text-1); }

/* Preview card */
.em-preview {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-1);
}

.em-greeting { font-size: 14px; margin-bottom: 8px; }
.em-intro    { color: var(--text-2); margin-bottom: 24px; }
.em-placeholder { color: var(--text-3); font-style: italic; }

/* Sections */
.em-section {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 6px 20px;
  padding: 14px 0;
  border-top: 1px solid var(--border-light);
  align-items: start;
}
.em-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  padding-top: 3px;
}
.em-section-body { color: var(--text-1); }
.em-section-special .em-section-body { color: var(--text-2); font-style: italic; }

.em-address { font-weight: 600; font-size: 14px; }
.em-price   { font-size: 22px; font-weight: 700; color: var(--gold); letter-spacing: -0.01em; }

/* Entity */
.em-entity-line { font-weight: 600; margin-bottom: 10px; }
.em-purchasers  { display: flex; flex-direction: column; gap: 8px; }
.em-purchaser-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.em-purchaser-num {
  width: 20px; height: 20px;
  background: var(--navy);
  color: var(--gold);
  font-size: 10px; font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.em-purchaser-label {
  font-size: 10px; font-weight: 700;
  color: var(--gold); background: var(--navy);
  border-radius: 4px; padding: 2px 7px;
  flex-shrink: 0; margin-top: 2px; white-space: nowrap;
}
.em-purchaser-detail { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.em-purchaser-name   { font-weight: 600; }
.em-purchaser-meta   { font-size: 12px; color: var(--text-3); }
.em-purchaser-address { width: 100%; font-size: 11px; color: var(--text-3); }

/* Terms grid */
.em-terms-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 4px 12px;
}
.em-term-label { font-size: 12px; color: var(--text-3); }
.em-term-value { font-size: 13px; }

/* Conditions */
.em-conditions-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.em-condition-item {
  padding: 8px 12px;
  background: var(--surface-3);
  border-left: 3px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
}
.em-condition-custom {
  border-left-color: var(--gold);
}
.em-no-conditions { color: var(--text-3); font-style: italic; font-size: 13px; }

/* Contacts */
.em-contacts { display: flex; flex-direction: column; gap: 8px; }
.em-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}
.em-contact-role   { font-size: 11px; font-weight: 700; color: var(--text-3); min-width: 160px; flex-shrink: 0; padding-top: 2px; }
.em-contact-detail { display: flex; flex-direction: column; gap: 2px; }
.em-contact-name   { font-weight: 600; }
.em-contact-email  { color: var(--gold); font-size: 12px; }
.em-expiry-qld-note { margin-top: 6px; font-size: 11px; color: var(--text-3); }

/* Sign-off */
.em-signoff {
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  color: var(--text-2);
  font-size: 13px;
}
.em-regards  { margin-top: 12px; }
.em-signature  { margin-top: 8px; }
.em-sig-person { font-weight: 700; color: var(--text-1); font-size: 14px; }
.em-sig-name   { font-size: 13px; color: var(--text-2); }
.em-sig-email  { font-size: 12px; color: var(--text-3); }

/* Special conditions expiry */
.em-special-text { white-space: pre-wrap; }

/* ═══════════════════════════════════════════════════════════
   FORECAST PAGE  (Stage 6)
   ═══════════════════════════════════════════════════════════ */

.fc-page { padding: 20px; display: flex; flex-direction: column; gap: 20px; }

/* Milestone strip */
.fc-milestones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.fc-milestone {
  flex: 1 1 120px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-width: 110px;
}
.fc-milestone-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 5px;
}
.fc-milestone-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.1;
}

/* Body: two-column layout */
.fc-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: start;
}

/* ── Assumptions panel ── */
.fc-assumptions {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fc-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fc-panel-hint {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.5;
}
.fc-assumption-group { display: flex; flex-direction: column; gap: 6px; }
.fc-assumption-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}
.fc-phase-range { font-weight: 400; color: var(--text-3); }
.fc-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fc-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 7px;
  border-radius: 4px;
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  outline: none;
  cursor: pointer;
}
.fc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-gold);
  cursor: pointer;
  border: 3px solid #0A1628;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 0 2px var(--brand-gold);
  transition: box-shadow 0.15s, transform 0.15s;
}
.fc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.5), 0 0 0 4px rgba(232,200,37,0.35);
}
.fc-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-gold);
  border: 3px solid #0A1628;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 0 2px var(--brand-gold);
  cursor: pointer;
}
.fc-val-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  min-width: 44px;
  text-align: right;
}
.fc-fixed-info {
  background: var(--surface-3, var(--surface));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fc-fixed-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 2px;
}
.fc-fixed-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-2);
}
.fc-fixed-row span:last-child { font-weight: 600; color: var(--text-1); }
.fc-link { color: var(--gold); text-decoration: none; }
.fc-link:hover { text-decoration: underline; }

/* ── Right content ── */
.fc-content { display: flex; flex-direction: column; gap: 18px; }

/* Charts */
.fc-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.fc-chart-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.fc-chart-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.fc-chart-wrap { height: 175px; position: relative; }

/* Returns at Key Years card */
.fc-key-years-card { display: flex; flex-direction: column; }
.fc-key-years-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; flex: 1; }
.fc-key-years-table thead th {
  text-align: left; padding: 5px 6px; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.fc-key-years-table tbody tr { border-bottom: 1px solid var(--border); }
.fc-key-years-table tbody tr:last-child { border-bottom: none; }
.fc-key-years-table tbody td { padding: 9px 6px; color: var(--text-1); }
.fc-ky-year { font-weight: 700; color: var(--brand-gold) !important; }

/* Table */
.fc-table-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.fc-table-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.fc-table-wrap { overflow-x: auto; }
.fc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
.fc-table thead th {
  padding: 8px 10px;
  text-align: right;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.fc-table thead th:first-child { text-align: left; }
.fc-table tbody td {
  padding: 7px 10px;
  text-align: right;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-2);
}
.fc-table tbody td:first-child { text-align: left; }
.fc-table tbody tr:last-child td { border-bottom: none; }
.fc-table tbody tr:hover td { background: var(--surface-3, rgba(255,255,255,0.03)); }
.fc-row-highlight td {
  background: rgba(232, 200, 37, 0.05) !important;
  font-weight: 600;
}
.fc-col-year { font-weight: 700; color: var(--text-1) !important; }
.fc-muted { color: var(--text-3) !important; }
.fw-600 { font-weight: 600; }
.fc-pos { color: var(--positive) !important; }
.fc-neg { color: var(--negative) !important; }

/* No-data state */
.fc-no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-2);
}
.fc-no-data-icon { font-size: 48px; opacity: 0.5; }
.fc-no-data p { margin: 0; font-size: 14px; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1050px) {
  /* Hide last 2 list-metric columns to avoid crowding */
  .pf-list-metric:nth-child(5),
  .pf-list-metric:nth-child(6) { display: none; }
}
@media (max-width: 900px) {
  .pf-stat-row { grid-template-columns: repeat(2, 1fr); }
  .pf-metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-val-header, .pf-val-row { grid-template-columns: 110px 1fr 80px; }
  /* Feasibility */
  .fs-body { grid-template-columns: 1fr; }
  .fs-hero-stats { margin-left: 0; width: 100%; justify-content: space-between; }
  /* Forecast */
  .fc-body { grid-template-columns: 1fr; }
  .fc-assumptions { position: static; }
  .fc-charts-grid { grid-template-columns: 1fr; }
  .fc-chart-wrap { height: 160px; }
  .pf-val-note { display: none; }
  .pf-controls { flex-direction: column; align-items: stretch; }
  .pf-controls-right { flex-wrap: wrap; }
  /* Stack list cards on narrow screens */
  .pf-client-card { flex-wrap: wrap; }
  .pf-client-info { flex: 0 0 150px; }
  .pf-list-metrics { flex-basis: 100%; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; }
  .pf-list-metric:nth-child(5),
  .pf-list-metric:nth-child(6) { display: flex; }
}
@media (max-width: 600px) {
  .pf-stat-row { grid-template-columns: 1fr 1fr; }
  .pf-metrics-grid { grid-template-columns: 1fr 1fr; }
  .pf-val-header, .pf-val-row { grid-template-columns: 100px 1fr 70px; }
  .pf-list-metric:nth-child(4),
  .pf-list-metric:nth-child(5),
  .pf-list-metric:nth-child(6) { display: none; }
  /* Forecast */
  .fc-milestone { flex: 1 1 calc(50% - 10px); }
  .fc-chart-wrap { height: 180px; }
}

/* ═══════════════════════════════════════════════════════════
   MULTI-CLIENT STORAGE — Switcher strip, modal, manager page
   ═══════════════════════════════════════════════════════════ */

/* ─── Client switcher strip ──────────────────────────────── */
.client-switcher-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 7px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  flex-shrink: 0;
}
.cs-empty {
  font-size: 12px;
  color: var(--text-3);
}
.cs-link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--brand-gold); font-size: 12px; font-family: var(--font);
  padding: 0; text-decoration: underline;
}
.cs-link-btn:hover { color: var(--brand-gold-dark); }
.cs-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cs-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.cs-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}
.cs-name { font-weight: 600; color: var(--text-1); }
.cs-sep  { color: var(--text-3); }
.cs-analysis-label { color: var(--text-2); }
.cs-count {
  font-size: 10px;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 7px;
}
/* Status dot */
.cs-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cs-dot--active      { background: var(--brand-gold); }
.cs-dot--won         { background: var(--positive); }
.cs-dot--lost        { background: var(--text-3); }
.cs-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cs-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 11px;
  font-family: var(--font);
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.cs-btn:hover { border-color: var(--brand-gold); color: var(--brand-gold); }
.cs-btn--new {
  background: var(--gold-muted);
  border-color: var(--brand-gold-dark);
  color: var(--brand-gold);
}
.cs-btn--new:hover { background: var(--brand-gold); color: var(--navy); }

/* ─── Switcher modal content ─────────────────────────────── */
.sw-scroll {
  overflow-y: auto;
  max-height: calc(80vh - 120px);
  padding: 8px 0;
}
.sw-empty, .sw-no-analysis {
  padding: 16px 20px;
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
}
.sw-client-block {
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
}
.sw-client-block:last-child { border-bottom: none; }
.sw-client-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.sw-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.sw-client-name { font-size: 13px; font-weight: 600; color: var(--text-1); flex: 1; }
.sw-new-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-size: 11px;
  font-family: var(--font);
  padding: 3px 9px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  flex-shrink: 0;
}
.sw-new-btn:hover { border-color: var(--brand-gold); color: var(--brand-gold); }
.sw-analyses { display: flex; flex-direction: column; gap: 2px; }
.sw-analysis-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 12px;
}
.sw-analysis-row:hover { background: var(--surface-2); }
.sw-analysis-row--active {
  background: var(--gold-muted);
  cursor: default;
}
.sw-analysis-label { flex: 1; color: var(--text-2); }
.sw-analysis-date  { font-size: 10px; color: var(--text-3); flex-shrink: 0; }
.sw-active-badge {
  font-size: 10px; font-weight: 600;
  color: var(--brand-gold);
  background: rgba(232,200,37,0.12);
  border-radius: 10px;
  padding: 1px 7px;
  flex-shrink: 0;
}
.sw-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.nc-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-top: 16px;
  margin-bottom: 8px;
}
.nc-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--text-3);
}

/* ─── Client manager page ────────────────────────────────── */
.cm-page {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cm-toolbar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}
.cm-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  padding: 0 7px;
  margin-left: 6px;
  min-width: 22px;
  height: 18px;
}
.cm-empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}
.cm-client-list { display: flex; flex-direction: column; gap: 12px; }
.cm-client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cm-client-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.cm-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.cm-client-meta { flex: 1; min-width: 0; }
.cm-client-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.cm-client-sub  { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.cm-client-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cm-analyses { display: flex; flex-direction: column; }
.cm-no-analysis {
  padding: 14px 18px;
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
}
.cm-analysis-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
}
.cm-analysis-row:last-child { border-bottom: none; }
.cm-analysis-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.cm-analysis-label { font-size: 13px; color: var(--text-1); font-weight: 500; }
.cm-analysis-date  { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.cm-current-label  { font-size: 11px; color: var(--brand-gold); font-weight: 600; flex-shrink: 0; }
.cm-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.cm-badge--active       { background: rgba(232,200,37,0.12); color: var(--brand-gold); }
.cm-badge--won          { background: var(--positive-bg);    color: var(--positive); }
.cm-badge--unsuccessful { background: var(--negative-bg);    color: var(--negative); }

/* ═══════════════════════════════════════════════════════════
   MOBILE READABILITY IMPROVEMENTS
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* ── Tables: set a min-width so overflow-x: auto actually scrolls ── */
  .fc-table   { min-width: 700px; }
  .data-table { min-width: 480px; }

  /* ── Forecast page: less padding on mobile ── */
  .fc-page { padding: 12px; gap: 14px; }

  /* ── KPI cards: bump up tiny labels ── */
  .kpi-card-label { font-size: 11px; }
  .kpi-card-sub   { font-size: 12px; }

  /* ── Forecast milestones: more readable ── */
  .fc-milestone-label { font-size: 11px; }
  .fc-milestone-value { font-size: 16px; }

  /* ── Data table section rows: bump from 9px ── */
  .data-table .section-row td { font-size: 10px; }

  /* ── Client switcher strip: tighter on mobile ── */
  .client-switcher-strip { padding: 6px 12px; }
  .cs-analysis-label, .cs-sep { display: none; }
}

@media (max-width: 480px) {
  /* ── Tables: slightly smaller text but still readable ── */
  .fc-table   { font-size: 11px; }
  .data-table { font-size: 11px; }

  /* ── Forecast milestones: compact padding ── */
  .fc-milestone { padding: 10px 12px; }
  .fc-milestone-value { font-size: 15px; }

  /* ── KPI cards: tighter ── */
  .kpi-card-label { font-size: 11px; }
  .kpi-card-sub   { font-size: 11px; }

  /* ── Switcher strip: compress buttons ── */
  .cs-btn { padding: 4px 8px; font-size: 11px; }
}
.cm-badge--current      { background: rgba(30,61,100,0.25);  color: var(--text-2); margin-left: 4px; }

/* ═══════════════════════════════════════════════════════════
   STAGE 9 — PRINT / PDF EXPORT
   Screen: hide the print view. Print: show only print view.
   ═══════════════════════════════════════════════════════════ */

#print-view { display: none; }

@media print {
  /* Hide everything except the print view */
  body > *:not(#print-view) { display: none !important; }
  #print-view { display: block !important; }

  @page {
    size: A4 portrait;
    margin: 12mm 14mm;
  }

  body {
    background: #fff !important;
    color: #0F1E38 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ─── Print view styles (apply always so preview looks correct) ── */
.pv-page {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 10pt;
  color: #0F1E38;
  background: #fff;
  line-height: 1.4;
  max-width: 182mm;
  margin: 0 auto;
}

/* Header */
.pv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 3px solid #152B52;
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.pv-logo-text {
  font-size: 18pt;
  font-weight: 800;
  color: #152B52;
  letter-spacing: -0.5px;
  line-height: 1;
}
.pv-logo-text span { color: #C5A815; }
.pv-logo-tag {
  font-size: 8pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #526A85;
  margin-top: 3px;
}
.pv-header-right { text-align: right; }
.pv-date { font-size: 8.5pt; color: #526A85; margin-bottom: 4px; }
.pv-disclaimer-badge {
  font-size: 7.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #FFF3CD;
  color: #856404;
  border: 1px solid #FFDA6A;
  border-radius: 4px;
  padding: 2px 7px;
}

/* Identity row */
.pv-identity {
  background: #F4F7FC;
  border: 1px solid #D4DCE8;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.pv-identity-row {
  display: flex;
  gap: 20px;
}
.pv-identity-block { flex: 1; min-width: 0; }
.pv-identity-block--wide { flex: 2; }
.pv-field-label {
  font-size: 7.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #526A85;
  margin-bottom: 2px;
}
.pv-field-value {
  font-size: 10pt;
  font-weight: 600;
  color: #0F1E38;
}

/* Section title */
.pv-section-title {
  font-size: 8pt;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #152B52;
  border-bottom: 1.5px solid #E8C825;
  padding-bottom: 3px;
  margin-bottom: 8px;
}

/* Key metrics grid */
.pv-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.pv-metric-card {
  background: #F4F7FC;
  border: 1px solid #D4DCE8;
  border-radius: 5px;
  padding: 8px 10px;
}
.pv-metric-label {
  font-size: 7.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #526A85;
  margin-bottom: 3px;
}
.pv-metric-value {
  font-size: 15pt;
  font-weight: 800;
  color: #0F1E38;
  line-height: 1;
  margin-bottom: 3px;
}
.pv-metric-sub { font-size: 7pt; color: #8FA3BB; }

/* Two-column layout */
.pv-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.pv-col {}

/* Snapshot tables */
.pv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;
}
.pv-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #E2E8F0;
  color: #0F1E38;
}
.pv-table td:first-child { color: #4A5E78; }
.pv-td-r { text-align: right; font-weight: 600; }

/* Projection table */
.pv-proj-hint {
  font-size: 7.5pt;
  color: #8FA3BB;
  margin-bottom: 6px;
}
.pv-proj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
  margin-bottom: 12px;
}
.pv-proj-table thead th {
  background: #152B52;
  color: #fff;
  padding: 5px 8px;
  text-align: right;
  font-size: 8pt;
  font-weight: 700;
}
.pv-proj-table thead th:first-child { text-align: left; border-radius: 3px 0 0 0; }
.pv-proj-table thead th:last-child  { border-radius: 0 3px 0 0; }
.pv-proj-table td {
  padding: 4px 8px;
  text-align: right;
  border-bottom: 1px solid #E2E8F0;
  color: #0F1E38;
}
.pv-proj-table td:first-child { text-align: left; color: #4A5E78; }
.pv-section-row td {
  background: #EAF0F8;
  font-size: 7pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #526A85;
  padding: 4px 8px;
}
.pv-total-row td { font-weight: 700; border-top: 2px solid #D4DCE8; }

/* Pos/Neg colours */
.pv-pos { color: #15803D !important; }
.pv-neg { color: #DC2626 !important; }

/* Assumptions */
.pv-assumptions {
  background: #F4F7FC;
  border: 1px solid #D4DCE8;
  border-radius: 5px;
  padding: 10px 14px;
  margin-bottom: 12px;
  page-break-inside: avoid;
}
.pv-assumptions-title {
  font-size: 8pt;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #152B52;
  margin-bottom: 7px;
}
.pv-assumptions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 12px;
}
.pv-assumption-item {
  display: flex;
  justify-content: space-between;
  font-size: 8.5pt;
  padding: 3px 0;
  border-bottom: 1px solid #E2E8F0;
}
.pv-assumption-label { color: #4A5E78; }
.pv-assumption-value { font-weight: 700; color: #0F1E38; }

/* Disclaimer */
.pv-disclaimer {
  background: #FFF9E6;
  border: 1px solid #FFDA6A;
  border-left: 4px solid #E8C825;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 10px;
  page-break-inside: avoid;
}
.pv-disclaimer-title {
  font-size: 8pt;
  font-weight: 800;
  color: #856404;
  margin-bottom: 4px;
}
.pv-disclaimer p {
  font-size: 7.5pt;
  color: #5C4A00;
  line-height: 1.5;
  margin: 0;
}

/* Footer */
.pv-footer {
  display: flex;
  justify-content: space-between;
  font-size: 7.5pt;
  color: #8FA3BB;
  border-top: 1px solid #D4DCE8;
  padding-top: 6px;
}

/* ── RENOVATION ROI ──────────────────────────────────────────── */
.rn-page { display: flex; flex-direction: column; gap: 20px; padding-bottom: 40px; }

.rn-base-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 16px; font-size: 13px;
}
.rn-base-warn { background: rgba(232,200,37,0.07); border-color: var(--brand-gold); color: var(--text-2); }
.rn-base-addr { color: var(--text-2); }
.rn-base-price { color: var(--text-1); }
.rn-base-price strong { color: var(--brand-gold); }

.rn-intro { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.6; }

/* Scenarios grid */
.rn-scenarios { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.rn-card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.rn-card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.rn-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  background: var(--brand-gold); color: var(--brand-navy);
  padding: 2px 8px; border-radius: 4px;
}
.rn-card-title { font-weight: 600; font-size: 14px; }

.rn-type-select {
  background: var(--surface-1); border: 1px solid var(--border);
  color: var(--text-1); border-radius: var(--radius-sm);
  padding: 5px 10px; font-size: 13px; font-weight: 600;
  cursor: pointer; flex: 1;
}
.rn-type-select:focus { outline: 2px solid var(--brand-gold); outline-offset: 1px; }
.rn-type-select option { background: #1a2744; color: #e2e8f0; }

/* None state */
.rn-card--none { opacity: 0.55; }
.rn-card--none .rn-card-header { opacity: 1; } /* keep header readable */
.rn-none-body {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px; text-align: center; gap: 10px; min-height: 220px;
}
.rn-none-icon { font-size: 36px; }
.rn-none-title { font-weight: 700; font-size: 15px; color: var(--text-1); }
.rn-none-desc  { font-size: 13px; color: var(--text-2); line-height: 1.6; max-width: 280px; }
.rn-none-hint  { font-size: 11px; color: var(--text-3); }

/* Type select row */
.rn-type-select-wrap { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.rn-range-tag {
  font-size: 10px; color: var(--brand-gold); letter-spacing: 0.04em;
  padding-left: 2px; font-weight: 500;
}

/* Type note bars */
.rn-type-note {
  padding: 10px 18px; background: rgba(96,165,250,0.08);
  border-bottom: 1px solid rgba(96,165,250,0.2);
  font-size: 12px; color: var(--text-2); line-height: 1.5;
}
.rn-type-note--warn {
  background: rgba(251,191,36,0.07);
  border-bottom-color: rgba(251,191,36,0.2);
  color: #FBB824;
}

/* Inputs */
.rn-inputs { padding: 18px; border-bottom: 1px solid var(--border); }
.rn-inputs .form-group { margin-bottom: 14px; }
.rn-inputs .form-group:last-child { margin-bottom: 0; }

.rn-money-wrap { position: relative; }
.rn-money-pfx {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--text-3); pointer-events: none; z-index: 1;
}
.rn-money-input { padding-left: 22px !important; }

.rn-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.rn-num-wrap { display: flex; align-items: center; gap: 8px; }
.rn-num-pfx { font-size: 13px; color: var(--text-3); flex-shrink: 0; }
.rn-num-sfx { font-size: 12px; color: var(--text-3); flex-shrink: 0; white-space: nowrap; }
.rn-num-input { flex: 1; min-width: 0; }

.rn-hint { font-size: 11px; color: var(--text-3); margin: 4px 0 0; line-height: 1.4; }

/* Results */
.rn-results { padding: 18px; }
.rn-results-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 14px;
}
.rn-kpis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.rn-kpi { display: flex; flex-direction: column; gap: 3px; }
.rn-kpi--hero {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px 10px;
}
.rn-kpi-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.rn-kpi-val { font-size: 17px; font-weight: 700; color: var(--text-1); }
.rn-kpi-hero-val { font-size: 21px; }
.rn-kpi-sub { font-size: 10px; color: var(--text-3); }
.rn-kpi-val.rn-pos { color: #22C55E; }
.rn-kpi-val.rn-neg { color: #F87171; }
.rn-rule { height: 1px; background: var(--border); margin: 14px 0; }

/* Comparison */
.rn-compare-card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
}
.rn-compare-title { font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.rn-compare-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.rn-compare-row:last-child { border-bottom: none; padding-bottom: 0; }
.rn-compare-label { color: var(--text-2); }
.rn-a-win { font-weight: 700; color: var(--brand-gold); }
.rn-b-win { font-weight: 700; color: #60A5FA; }
.rn-tie   { color: var(--text-3); }

.rn-disclaimer {
  font-size: 11px; color: var(--text-3); line-height: 1.6; margin: 0;
  padding: 14px; background: var(--surface-2); border-radius: var(--radius-md);
}

/* CPV disclaimer modal (full-screen overlay) */
.rn-disclaimer-overlay {
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px 40px;
}
.rn-disclaimer-modal {
  background: var(--surface-1); border: 2px solid #F87171;
  border-radius: var(--radius-lg); max-width: 720px; width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.rn-disclaimer-header {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 24px; background: rgba(248,113,113,0.08);
  border-bottom: 1px solid rgba(248,113,113,0.3);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.rn-disclaimer-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }
.rn-disclaimer-title { font-size: 16px; font-weight: 700; color: #F87171; }
.rn-disclaimer-subtitle { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.rn-disclaimer-body { padding: 20px 24px; }
.rn-disclaimer-body > p { font-size: 13px; color: var(--text-2); margin: 0 0 16px; line-height: 1.6; }
.rn-disclaimer-list {
  margin: 0 0 20px; padding-left: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.rn-disclaimer-list li { font-size: 13px; color: var(--text-1); line-height: 1.6; }
.rn-disclaimer-check-wrap {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.3);
  border-radius: var(--radius-md); padding: 14px;
}
.rn-disclaimer-check-wrap input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px;
  accent-color: #F87171; cursor: pointer;
}
.rn-disclaimer-check-wrap label {
  font-size: 13px; font-weight: 600; color: var(--text-1); line-height: 1.5; cursor: pointer;
}
.rn-disclaimer-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; border-top: 1px solid var(--border);
  gap: 12px;
}

/* CPV disclaimer banner (bottom of reno page) */
.rn-cpv-disclaimer-banner {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.35);
  border-left: 4px solid #F87171;
  border-radius: var(--radius-md); padding: 16px;
}
.rn-cpv-disclaimer-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.rn-cpv-disclaimer-text { font-size: 12px; color: var(--text-2); line-height: 1.65; }
.rn-cpv-disclaimer-text strong { color: var(--text-1); }

.rn-compare-desc { font-size: 12px; color: var(--text-3); margin: -6px 0 14px; line-height: 1.5; }

@media (max-width: 768px) {
  .rn-scenarios { grid-template-columns: 1fr; }
  .rn-kpi-val { font-size: 15px; }
  .rn-kpi-hero-val { font-size: 18px; }
  .rn-base-bar { flex-direction: column; align-items: flex-start; gap: 4px; }
  .rn-disclaimer-footer { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════
   UX REDESIGN — March 2026
   Client Hub · Client Workspace · Analysis Workflow
   ═══════════════════════════════════════════════════════════ */

/* ─── STATUS BADGES (new labels) ────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  flex-shrink: 0;
}
.status-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.status-badge--exploring  { background: rgba(148,173,200,0.12); color: #94ADC8; }
.status-badge--offer      { background: rgba(232,200,37,0.15);  color: var(--brand-gold); }
.status-badge--accepted   { background: rgba(34,197,94,0.12);   color: var(--positive); }
.status-badge--settled    { background: rgba(34,197,94,0.20);   color: var(--positive); border: 1px solid rgba(34,197,94,0.3); }
.status-badge--rejected   { background: rgba(248,113,113,0.12); color: var(--negative); }

/* ─── SIDEBAR ANALYSIS CHIP ──────────────────────────────── */
.sidebar-analysis-chip {
  margin: 4px 10px 8px;
  background: var(--sidebar-active);
  border: 1px solid rgba(232,200,37,0.25);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  cursor: pointer;
  transition: background 0.15s;
}
.sidebar-analysis-chip:hover { background: rgba(232,200,37,0.20); }
.sidebar-analysis-chip-name {
  font-size: 12px; font-weight: 700; color: var(--brand-gold);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.sidebar-analysis-chip-sub {
  font-size: 10px; color: var(--sidebar-sub);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─── CLIENT HUB ─────────────────────────────────────────── */
.ch-page { }

.ch-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.ch-toolbar-title {
  font-size: 20px; font-weight: 800; color: var(--text-1); letter-spacing: -0.3px;
}
.ch-toolbar-sub {
  font-size: 13px; color: var(--text-3); margin-top: 2px;
}

.ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.ch-client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
.ch-client-card:hover {
  border-color: var(--brand-gold);
  box-shadow: 0 4px 20px rgba(232,200,37,0.10);
  transform: translateY(-1px);
}
.ch-client-card-top {
  display: flex; align-items: center; gap: 12px;
}
.ch-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: white; flex-shrink: 0;
}
.ch-client-info { flex: 1; min-width: 0; }
.ch-client-name {
  font-size: 14px; font-weight: 700; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ch-client-meta {
  font-size: 11px; color: var(--text-3); margin-top: 2px;
}
.ch-analyses-list {
  display: flex; flex-direction: column; gap: 6px;
}
.ch-analysis-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-2);
}
.ch-analysis-label {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
.ch-no-analyses {
  font-size: 12px; color: var(--text-3); font-style: italic;
  padding: 6px 0;
}
.ch-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 12px;
  margin-top: 2px;
}
.ch-card-count { font-size: 11px; color: var(--text-3); }
.ch-card-arrow {
  font-size: 12px; color: var(--text-3); transition: color 0.15s;
}
.ch-client-card:hover .ch-card-arrow { color: var(--brand-gold); }

/* Empty state for hub */
.ch-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 80px 24px;
}
.ch-empty-icon { font-size: 52px; opacity: 0.35; margin-bottom: 16px; }
.ch-empty-title { font-size: 18px; font-weight: 700; color: var(--text-1); margin-bottom: 8px; }
.ch-empty-sub { font-size: 13px; color: var(--text-3); margin-bottom: 28px; }

/* ─── CLIENT WORKSPACE ───────────────────────────────────── */
.ws-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; gap: 16px;
}
.ws-header-left { display: flex; align-items: center; gap: 14px; }
.ws-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: white; flex-shrink: 0;
}
.ws-client-name { font-size: 20px; font-weight: 800; color: var(--text-1); letter-spacing: -0.3px; }
.ws-client-sub  { font-size: 13px; color: var(--text-3); margin-top: 3px; }

.ws-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-3);
  background: none; border: none; cursor: pointer; padding: 0;
  transition: color 0.15s;
}
.ws-back-btn:hover { color: var(--brand-gold); }

/* Tab row */
.ws-tabs {
  display: flex; border-bottom: 2px solid var(--border);
  margin-bottom: 24px; gap: 0;
}
.ws-tab {
  padding: 10px 22px; font-size: 13px; font-weight: 600;
  color: var(--text-3); border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.ws-tab:hover { color: var(--text-1); }
.ws-tab.active { color: var(--brand-gold); border-bottom-color: var(--brand-gold); font-weight: 700; }

/* Analyses tab */
.ws-analyses-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.ws-analyses-count { font-size: 12px; color: var(--text-3); font-weight: 500; }

.ws-analysis-list { display: flex; flex-direction: column; gap: 10px; }

.ws-analysis-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ws-analysis-card:hover {
  border-color: var(--brand-gold);
  box-shadow: 0 2px 12px rgba(232,200,37,0.08);
}
.ws-analysis-info { flex: 1; min-width: 0; }
.ws-analysis-label {
  font-size: 14px; font-weight: 700; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.ws-analysis-meta { font-size: 11px; color: var(--text-3); }
.ws-analysis-arrow { font-size: 14px; color: var(--text-3); flex-shrink: 0; transition: color 0.15s; }
.ws-analysis-card:hover .ws-analysis-arrow { color: var(--brand-gold); }

.ws-copy-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.ws-copy-btn:hover {
  background: var(--surface-3);
  border-color: var(--brand-gold);
  color: var(--brand-gold);
}

/* Copy-to-client modal */
.copy-client-list { display: flex; flex-direction: column; gap: 6px; }
.copy-client-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.copy-client-item:hover { border-color: var(--brand-gold); background: var(--surface-3); }
.copy-client-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.copy-client-name { flex: 1; font-size: 14px; color: var(--text-1); font-weight: 500; }
.copy-client-arrow { color: var(--text-3); font-size: 13px; }

.ws-no-analyses {
  text-align: center; padding: 56px 24px;
}
.ws-no-analyses-icon { font-size: 40px; opacity: 0.35; margin-bottom: 12px; }
.ws-no-analyses-title { font-size: 15px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.ws-no-analyses-sub { font-size: 12px; color: var(--text-3); margin-bottom: 20px; }

/* Client Details tab */
.ws-details-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.ws-details-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ws-details-card-header {
  padding: 13px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; color: var(--text-1);
  display: flex; align-items: center; gap: 8px;
}
.ws-details-card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.ws-detail-row { display: flex; flex-direction: column; gap: 4px; }
.ws-detail-label { font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.ws-detail-val { font-size: 13px; color: var(--text-1); font-weight: 500; }
.ws-detail-val--empty { color: var(--text-3); font-style: italic; }

/* ─── ANALYSIS WORKFLOW ──────────────────────────────────── */
/* Step navigation bar */
.step-nav {
  display: flex; align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.step-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 13px 8px; gap: 5px;
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background 0.15s;
  text-align: center; position: relative;
}
.step-nav-item:last-child { border-right: none; }
.step-nav-item:hover { background: var(--surface-2); }
.step-nav-item.active { background: var(--surface-2); }
.step-nav-num {
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--text-3);
  border: 1.5px solid var(--border-light);
  transition: all 0.15s; flex-shrink: 0;
}
.step-nav-item.active .step-nav-num {
  background: var(--brand-gold); color: #0A1628; border-color: var(--brand-gold);
}
.step-nav-item.completed .step-nav-num {
  background: var(--positive); color: white; border-color: var(--positive);
}
.step-nav-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3);
}
.step-nav-item.active .step-nav-label { color: var(--text-1); }
.step-nav-item.completed .step-nav-label { color: var(--positive); }

/* Active step bottom accent */
.step-nav-item.active::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--brand-gold);
}
.step-nav-item.completed::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--positive);
}

/* Analysis workflow header (breadcrumb + back) */
.aw-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.aw-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-3);
}
.aw-breadcrumb-link {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: 12px; color: var(--text-3); font-family: inherit;
  transition: color 0.15s;
}
.aw-breadcrumb-link:hover { color: var(--brand-gold); }
.aw-breadcrumb-sep { color: var(--text-3); opacity: 0.5; }
.aw-breadcrumb-current { color: var(--text-2); font-weight: 600; }

/* Analysis status row (inside workflow header) */
.aw-status-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.aw-property-title {
  font-size: 18px; font-weight: 800; color: var(--text-1); letter-spacing: -0.3px; flex: 1;
}
.aw-status-select {
  padding: 5px 10px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--surface-2); color: var(--text-2);
  font-size: 11px; font-weight: 700; font-family: inherit;
  cursor: pointer; outline: none; transition: border-color 0.15s;
  appearance: none;
}
.aw-status-select:focus { border-color: var(--brand-gold); }

/* Collapsible reno section within Step 3 */
.step3-reno-collapse {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 24px;
}
.step3-reno-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; cursor: pointer;
  background: var(--surface-2);
  border: none; width: 100%; text-align: left;
  font-family: inherit;
  transition: background 0.15s;
}
.step3-reno-toggle:hover { background: var(--surface-3); }
.step3-reno-toggle-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; color: var(--text-1);
}
.step3-reno-toggle-arrow {
  font-size: 12px; color: var(--text-3);
  transition: transform 0.2s;
}
.step3-reno-toggle-arrow.open { transform: rotate(90deg); }
.step3-reno-body { display: none; }
.step3-reno-body.open { display: block; }

/* New Client modal */
.nc-modal-section { margin-bottom: 16px; }
.nc-modal-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.nc-optional { font-weight: 400; text-transform: none; letter-spacing: 0; font-style: italic; }

/* ─── TOOLTIP SYSTEM ──────────────────────────────────────── */
.tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
}
.tip-icon:hover {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: #152B52;
}
#tip-bubble {
  display: none;
  position: absolute;
  z-index: 9999;
  background: #1a2744;
  border: 1px solid var(--brand-gold);
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.55;
  padding: 10px 13px;
  border-radius: 8px;
  width: 280px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* Client Details step form */
.form-label-hint { font-size: 10px; color: var(--text-4); font-weight: 400; }
.cd-purchaser-row { transition: none; }


/* ─── FORM HELPERS (shared) ───────────────────────────────── */

/* Vendor Rejected status badge */
.status-badge--vendor-rejected {
  background: rgba(180, 100, 30, 0.15);
  color: #e07a30;
  border: 1px solid rgba(180, 100, 30, 0.3);
}

/* Property stats row (analyses tab) */
.ws-stats-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 0 16px;
}
.ws-stat-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; border: 1px solid transparent;
}
.ws-stat-pill--exploring   { background: rgba(100,130,180,0.12); color:#7a9ed4; border-color:rgba(100,130,180,0.2); }
.ws-stat-pill--offer       { background: rgba(200,160,20,0.12);  color:#c8a014; border-color:rgba(200,160,20,0.25); }
.ws-stat-pill--accepted    { background: rgba(30,170,100,0.12);  color:#1eaa64; border-color:rgba(30,170,100,0.25); }
.ws-stat-pill--settled     { background: rgba(60,140,220,0.12);  color:#3c8cdc; border-color:rgba(60,140,220,0.25); }
.ws-stat-pill--rejected    { background: rgba(200,60,60,0.10);   color:#c83c3c; border-color:rgba(200,60,60,0.2); }
.ws-stat-pill--vendor-rejected { background: rgba(180,100,30,0.10); color:#e07a30; border-color:rgba(180,100,30,0.2); }

/* ─── CLIENT JOURNEY TRACKER ──────────────────────────────── */
.jt-tracker {
  margin: 12px 0 4px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.jt-row {
  display: flex; align-items: flex-start;
}
.jt-stage-wrap { display: flex; align-items: flex-start; flex: 1; }
.jt-stage {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; cursor: pointer; user-select: none;
  transition: opacity 0.15s;
}
.jt-stage:hover { opacity: 0.8; }
.jt-circle {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--text-3); background: var(--surface-2);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.jt-stage.done .jt-circle {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: #152B52;
}
.jt-label {
  font-size: 10px; color: var(--text-3);
  margin-top: 6px; text-align: center;
  font-weight: 500;
}
.jt-stage.done .jt-label { color: var(--text-1); }
.jt-date {
  font-size: 9px; color: var(--text-4); margin-top: 2px;
  text-align: center; min-height: 12px;
}
.jt-connector {
  flex: 0 0 28px; height: 2px;
  background: var(--border);
  margin-top: 15px;
  align-self: flex-start;
}

/* ─── SETTLEMENT MILESTONES PANEL ─────────────────────────── */
.ms-panel {
  margin: 14px 0 2px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.ms-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; cursor: pointer;
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.ms-header:hover { background: var(--surface-2); }
.ms-header-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ms-title { font-size: 12px; font-weight: 700; color: var(--text-1); text-transform: uppercase; letter-spacing: 0.05em; }
.ms-progress { font-size: 11px; color: var(--text-3); }
.ms-progress-bar-wrap {
  flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;
}
.ms-progress-bar {
  height: 100%; background: var(--brand-gold); border-radius: 2px;
  transition: width 0.4s;
}
.ms-body { padding: 4px 0; }
.ms-body.collapsed { display: none; }
.ms-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.ms-row:last-child { border-bottom: none; }
.ms-row:hover { background: var(--surface-3); }
.ms-row.done { opacity: 0.85; }
.ms-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: transparent;
  flex-shrink: 0; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ms-check.checked {
  background: #1eaa64; border-color: #1eaa64; color: #fff;
}
.ms-info { flex: 1; display: flex; align-items: center; gap: 8px; }
.ms-label { font-size: 13px; color: var(--text-1); }
.ms-row.done .ms-label { text-decoration: line-through; color: var(--text-3); }
.ms-tag {
  font-size: 9px; padding: 1px 6px; border-radius: 10px;
  background: rgba(200,160,20,0.15); color: #c8a014;
  border: 1px solid rgba(200,160,20,0.3); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.ms-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ms-date { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.ms-notes { font-size: 11px; color: var(--text-4); max-width: 180px; text-align: right; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .ch-grid { grid-template-columns: 1fr 1fr; }
  .ws-details-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ch-grid { grid-template-columns: 1fr; }
  .step-nav-item { padding: 10px 4px; }
  .step-nav-label { font-size: 9px; }
  .ws-tab { padding: 8px 14px; font-size: 12px; }
  .jt-label { font-size: 9px; }
  .jt-connector { flex: 0 0 16px; }
}
