/* PropOS — Premium Real Estate Operating System Design System */

@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@500;600;700;800&family=Instrument+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --surface-2: #F6F2EC;
  --ink: #1C1A17;
  --ink-2: #4A4540;
  --muted: #6E675F;
  --border: #E6E1DA;
  --border-strong: #D9D2C8;
  --accent: #1F4E4A;
  --accent-hover: #173B38;
  --accent-soft: #E8F0EE;
  --gold: #B4492F;
  --gold-soft: #FBEAE5;
  --success: #166534;
  --success-soft: #E8F5EC;
  --warning: #7A5A12;
  --warning-soft: #F4E7C5;
  --danger: #A3341E;
  --danger-soft: #F9E3DD;
  --info: #1E3A5F;
  --info-soft: #EAF0F7;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-xs: 0 1px 2px rgba(26, 24, 20, 0.04);
  --shadow-sm: 0 2px 8px rgba(26, 24, 20, 0.05);
  --shadow-md: 0 8px 24px rgba(26, 24, 20, 0.07);

  --font: 'Instrument Sans', system-ui, sans-serif;
  --font-display: 'Schibsted Grotesk', system-ui, sans-serif;

  --sidebar-w: 248px;
  --topbar-h: 56px;
  --bottom-nav-h: 64px;
}

[data-theme="dark"] {
  --bg: #121110;
  --surface: #1A1816;
  --surface-2: #221F1C;
  --ink: #FAF7F2;
  --ink-2: #D6D3CD;
  --muted: #A8A29E;
  --border: #2C2926;
  --border-strong: #3F3A35;
  --accent: #5FA39B;
  --accent-hover: #74B5AD;
  --accent-soft: #16302D;
  --gold: #E9A48F;
  --gold-soft: #2E1C17;
  --success: #4ADE80;
  --success-soft: #14261C;
  --warning: #FBBF24;
  --warning-soft: #2A2210;
  --danger: #F87171;
  --danger-soft: #2A1515;
  --info: #93C5FD;
  --info-soft: #152030;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-size: 14.5px;
}

h1, h2, h3, .display { letter-spacing: -0.02em; }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font-family: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* ——— Shell ——— */
#app { min-height: 100vh; }

.shell {
  display: flex;
  min-height: 100vh;
  padding-top: var(--topbar-h);
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
}

[data-theme="dark"] .topbar { background: rgba(26,24,22,0.88); }

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.brand-mark svg { flex-shrink: 0; }

.brand-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  background: var(--gold-soft);
  padding: 3px 8px;
  border-radius: 99px;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.role-switch {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}

.role-switch button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.role-switch button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover { border-color: var(--border-strong); color: var(--ink); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

.user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.user-chip span { font-size: 12.5px; font-weight: 600; color: var(--ink); }

/* ——— Sidebar ——— */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-h));
  position: sticky;
  top: var(--topbar-h);
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  border-color: transparent;
}

.nav-item .nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 99px;
}

.nav-item .nav-badge.urgent { background: var(--danger); }
.nav-item .nav-badge.muted {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.content {
  flex: 1;
  padding: 28px 36px 80px;
  overflow-y: auto;
  min-width: 0;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.page-header .greeting {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.page-header p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-gold {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: rgba(154,123,79,0.25);
}

.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: var(--radius); }
.btn-block { width: 100%; }

/* ——— Cards & KPIs ——— */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease;
}

.card:hover { border-color: var(--border-strong); }

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.15;
}

.kpi-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.kpi-meta.up { color: var(--success); }
.kpi-meta.down { color: var(--danger); }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-props { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ——— Property Card ——— */
.property-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s ease;
}

.property-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.property-card .thumb {
  height: 148px;
  position: relative;
  overflow: hidden;
}

.property-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-card .body { padding: 16px 18px 18px; }
.property-card h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.property-card .addr { font-size: 12.5px; color: var(--muted); margin-top: 2px; margin-bottom: 12px; }

.property-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 12px;
}

.property-metrics span { color: var(--muted); display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.property-metrics strong { color: var(--ink); font-size: 13.5px; }
.property-metrics .net strong { color: var(--success); }

/* ——— Badges ——— */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-occupied { background: var(--success-soft); color: var(--success); }
.badge-vacant { background: var(--warning-soft); color: var(--warning); }
.badge-new, .badge-submitted { background: var(--info-soft); color: var(--info); }
.badge-review, .badge-awaiting { background: var(--warning-soft); color: var(--warning); }
.badge-scheduled { background: var(--accent-soft); color: var(--accent); }
.badge-completed { background: var(--success-soft); color: var(--success); }
.badge-emergency, .badge-high { background: var(--danger-soft); color: var(--danger); }
.badge-medium { background: var(--warning-soft); color: var(--warning); }
.badge-low { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge-demo { background: var(--gold-soft); color: var(--gold); }
.badge-source { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }

/* ——— Timeline ——— */
.timeline { position: relative; padding-left: 22px; display: flex; flex-direction: column; gap: 16px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1.5px;
  background: var(--border);
}

.timeline-item { position: relative; }
.timeline-dot {
  position: absolute;
  left: -22px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
}
.timeline-dot.done { background: var(--success); border-color: var(--success); }

.timeline-title { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 8px; }
.timeline-time { font-size: 11px; color: var(--muted); font-weight: 500; }
.timeline-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ——— Tables ——— */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

table.data th {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

table.data td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2);
  vertical-align: middle;
}

table.data tr:last-child td { border-bottom: none; }
table.data td.strong { color: var(--ink); font-weight: 600; }

/* ——— Chat ——— */
.chat {
  display: flex;
  flex-direction: column;
  height: 560px;
  padding: 0;
  overflow: hidden;
}

.chat-prompts {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  background: var(--surface-2);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg {
  display: flex;
  gap: 10px;
  max-width: 78%;
}

.msg.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.msg.user .msg-avatar { background: var(--ink); }

.msg-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
}

.msg.user .msg-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chat-input {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  background: var(--surface);
}

.chat-input input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
}

.chat-input input:focus { border-color: var(--accent); background: var(--surface); }

.choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ——— Provider cards ——— */
.provider-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: var(--surface);
}

.provider-card.recommended {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.provider-card h4 { font-size: 15px; font-weight: 700; color: var(--ink); }
.provider-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.provider-avail { font-size: 12px; color: var(--success); margin-top: 6px; font-weight: 600; }

.ai-rec {
  background: var(--gold-soft);
  border: 1px solid rgba(154,123,79,0.28);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
}

.ai-rec strong { color: var(--ink); }

/* ——— Auth ——— */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(30,58,47,0.06), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(154,123,79,0.08), transparent 45%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin: 14px 0 6px;
  letter-spacing: -0.02em;
}

.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.role-pick {
  display: grid;
  gap: 10px;
}

.role-pick button {
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s;
}

.role-pick button:hover, .role-pick button.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.role-pick strong { display: block; color: var(--ink); font-size: 14px; }
.role-pick span { font-size: 12.5px; color: var(--muted); }

/* ——— Landing ——— */
.landing { background: var(--bg); color: var(--ink); }

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

[data-theme="dark"] .landing-nav { background: rgba(18,17,16,0.85); }

.landing-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 40px 64px;
  text-align: center;
}

.landing-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 12px 0 18px;
}

.landing-hero p {
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.landing-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.landing-flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  align-items: center;
  margin: 48px auto 0;
  max-width: 900px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.landing-flow span {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 99px;
}

.landing-flow .arrow { border: none; background: transparent; color: var(--muted); padding: 0; }

.landing-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 40px;
}

.landing-section h2 {
  font-family: var(--font-display);
  font-size: 36px;
  margin-bottom: 12px;
}

.landing-section .lead { color: var(--muted); font-size: 16px; max-width: 520px; margin-bottom: 28px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.feature h3 { font-size: 16px; margin-bottom: 8px; }
.feature p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

.landing-footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12.5px;
}

/* ——— Landing: trust stats ——— */
.stat-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  margin: 40px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  max-width: 760px;
}

.stat-bar .stat { text-align: center; }
.stat-bar .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--accent);
  line-height: 1.1;
}
.stat-bar .stat span { font-size: 12px; color: var(--muted); }

/* ——— Landing: reflection questions ——— */
.landing-section.on-surface { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); max-width: none; padding-left: 0; padding-right: 0; }
.landing-section.on-surface > .inner { max-width: 1080px; margin: 0 auto; padding: 0 40px; }

.reflect-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.reflect-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.reflect-card .num {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
}

.reflect-card p { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.reflect-card p strong { color: var(--ink); }

.reflect-punch {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: 21px;
  text-align: center;
  color: var(--ink);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ——— Landing: workflow comparison ——— */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }

.compare-col {
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  border: 1px solid var(--border);
}

.compare-col.before { background: var(--surface); }
.compare-col.after { background: var(--accent-soft); border-color: rgba(30,58,47,0.25); }

.compare-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.compare-head h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.compare-col.after .compare-head h3 { color: var(--accent); }

.compare-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.compare-col.after .compare-badge { background: var(--accent); color: #fff; border-color: var(--accent); }

.compare-steps { display: flex; flex-direction: column; gap: 10px; }

.compare-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.compare-step i { flex-shrink: 0; margin-top: 2px; }
.compare-col.before .compare-step i { color: var(--danger); }
.compare-col.after .compare-step i { color: var(--accent); }
.compare-col.after .compare-step { color: var(--ink); font-weight: 500; }

.compare-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
  font-size: 12.5px;
  color: var(--muted);
}
.compare-col.after .compare-foot { color: var(--accent); font-weight: 600; border-top-color: rgba(30,58,47,0.25); }

.compare-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--muted);
}

/* ——— Landing: final CTA banner ——— */
.cta-banner {
  max-width: 1080px;
  margin: 0 auto 56px;
  background: var(--accent);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  text-align: center;
  color: #fff;
}

.cta-banner h2 { font-family: var(--font-display); font-size: 32px; margin-bottom: 10px; }
.cta-banner p { color: rgba(255,255,255,0.78); font-size: 14.5px; max-width: 480px; margin: 0 auto 22px; }
.cta-banner .btn-secondary { background: #fff; color: var(--accent); border-color: #fff; }
.cta-banner .btn-ghost { color: rgba(255,255,255,0.85); }
.cta-banner .btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ——— Modal ——— */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,24,20,0.45);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: var(--shadow-md);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-header p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ——— Upload ——— */
.upload-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.upload-zone:hover, .upload-zone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.upload-preview { margin-top: 10px; max-height: 140px; border-radius: 8px; border: 1px solid var(--border); }

/* ——— Alerts / Empty / Loading / Toast ——— */
.alert {
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.alert-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(185,28,28,0.2); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(161,98,7,0.2); }
.alert-info { background: var(--info-soft); color: var(--info); border: 1px solid rgba(30,58,95,0.15); }
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid rgba(22,101,52,0.2); }

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty h4 { color: var(--ink); font-size: 15px; margin: 8px 0 4px; }

.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  padding: 12px 0;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 200;
  align-items: center;
  gap: 8px;
}

.toast.show { display: flex; animation: slideUp 0.25s ease; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ——— Notification panel ——— */
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 60;
  overflow: hidden;
}

.notif-panel.open { display: block; }
.notif-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  cursor: pointer;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item strong { display: block; color: var(--ink); margin-bottom: 2px; }
.notif-item span { color: var(--muted); }

/* ——— Bottom nav (mobile) ——— */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 40;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}

.bottom-nav button {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px;
}

.bottom-nav button.active { color: var(--accent); }

/* ——— Utility bars ——— */
.util-bars { display: grid; gap: 12px; }
.util-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.util-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.util-bar > i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
}

/* ——— Responsive ——— */
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .reflect-grid { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-vs { padding: 4px 0; }
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .content { padding: 20px 16px calc(var(--bottom-nav-h) + 24px); }
  .bottom-nav { display: flex; }
  .role-switch { display: none; }
  .user-chip span { display: none; }
  .landing-nav, .landing-hero, .landing-section, .landing-footer, .landing-section.on-surface > .inner, .cta-banner { padding-left: 20px; padding-right: 20px; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .stat-bar { gap: 20px; }
}

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-2 { gap: 10px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Coastal: display headings are bold grotesk, not light serif */
h1, h2, h3, .page-title { letter-spacing: -.02em; }
.consent-row { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); margin: 4px 0 14px; }
.consent-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.consent-row a { color: var(--accent); }

.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
