/* ============================================================
   MAAS PROFESSIONAL DASHBOARD — ACQIUS
   Design System: Copper & Slate + Bricolage Grotesque
   ============================================================ */

:root {
  /* Copper & Slate Palette */
  --copper:       #B87333;
  --copper-light: #D4A574;
  --copper-pale:  #F0E0CC;
  --slate-dark:   #2F3640;
  --slate:        #3D4A56;
  --slate-mid:    #5A6A78;
  --slate-light:  #8A9BAA;
  --cream:        #F5F0EB;
  --cream-dark:   #EDE5DA;
  --white:        #FFFFFF;

  /* Semantic */
  --red:          #C0392B;
  --red-light:    #FADBD8;
  --amber:        #D4860A;
  --amber-light:  #FDEBD0;
  --green:        #1E8449;
  --green-light:  #D5F5E3;

  /* Typography */
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;

  /* Spacing */
  --sidebar-w:    260px;
  --topbar-h:     64px;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 2px 12px rgba(47,54,64,0.10);
  --shadow-lg:    0 8px 32px rgba(47,54,64,0.14);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--slate-dark);
  display: flex;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--slate-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-mark {
  width: 38px; height: 38px;
  background: var(--copper);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  letter-spacing: -0.3px;
}
.logo-sub {
  font-size: 10px;
  color: var(--copper-light);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--slate-light);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.18s ease;
  cursor: pointer;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: var(--white); }
.nav-item.active {
  background: rgba(184,115,51,0.18);
  color: var(--copper-light);
  font-weight: 600;
}
.nav-item.active svg { stroke: var(--copper-light); }

.sidebar-footer {
  padding: 16px 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quarter-badge {
  background: rgba(184,115,51,0.15);
  color: var(--copper-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
}

.edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--slate-light);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  width: 100%;
}
.edit-btn svg { width: 14px; height: 14px; }
.edit-btn:hover { border-color: var(--copper-light); color: var(--copper-light); }
.edit-btn.active { background: var(--copper); border-color: var(--copper); color: var(--white); }

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

/* ── TOPBAR ── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(47,54,64,0.06);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--slate-dark);
  border-radius: 2px;
}

.breadcrumb {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--slate-dark);
}

.topbar-right { display: flex; align-items: center; gap: 20px; }

.client-info { display: flex; align-items: center; gap: 8px; }
.client-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--slate-light);
}
.client-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--slate-dark);
}

.last-updated {
  font-size: 12px;
  color: var(--slate-light);
}

/* ── SECTIONS ── */
.section {
  display: none;
  padding: 32px 28px 48px;
  animation: fadeIn 0.25s ease;
}
.section.active { display: block; }

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

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

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--slate-dark);
  letter-spacing: -0.8px;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 13px;
  color: var(--slate-mid);
  margin-top: 4px;
  font-weight: 400;
}

/* ── OVERALL RAG ── */
.overall-rag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-dark);
  white-space: nowrap;
}
.rag-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rag-dot.red    { background: var(--red); }
.rag-dot.amber  { background: var(--amber); }
.rag-dot.green  { background: var(--green); }

/* ── METRIC CARDS ── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.metric-card:hover { box-shadow: var(--shadow-lg); }

.metric-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--slate-light);
  margin-bottom: 8px;
}

.metric-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  color: var(--slate-dark);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 8px;
}
.metric-unit {
  font-size: 16px;
  font-weight: 500;
  color: var(--slate-light);
  letter-spacing: 0;
}

.metric-sub {
  font-size: 12px;
  color: var(--slate-mid);
  margin-bottom: 8px;
}

.metric-bar {
  height: 4px;
  background: var(--cream-dark);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.metric-bar-fill {
  height: 100%;
  background: var(--copper);
  border-radius: 2px;
  transition: width 0.6s ease;
}
.metric-bar-fill.amber { background: var(--amber); }
.metric-bar-fill.green { background: var(--green); }

.metric-trend {
  font-size: 11px;
  font-weight: 600;
}
.metric-trend.up   { color: var(--green); }
.metric-trend.down { color: var(--red); }

.red-text { color: var(--red) !important; }

/* ── CHARTS ROW ── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.chart-card.wide { grid-column: span 1; }
.chart-card.full-width { grid-column: 1 / -1; }

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.chart-header h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--slate-dark);
  letter-spacing: -0.3px;
}
.chart-period {
  font-size: 11px;
  color: var(--slate-light);
  font-weight: 500;
}

.radar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 260px;
}
.radar-wrap canvas { max-height: 260px; }

/* ── ADVISER NOTE ── */
.adviser-note {
  background: linear-gradient(135deg, var(--slate-dark) 0%, var(--slate) 100%);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  color: var(--white);
}
.adviser-note-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--copper-light);
  margin-bottom: 12px;
}
.adviser-note-header svg { width: 16px; height: 16px; stroke: var(--copper-light); }
.adviser-note p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
}

/* ── SCORECARD ── */
.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.scorecard-pillar {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.pillar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pillar-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--slate-dark);
}
.pillar-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--copper);
}
.pillar-score .denom {
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-light);
}

.pillar-bar {
  height: 6px;
  background: var(--cream-dark);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
}
.pillar-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.pillar-criteria { display: flex; flex-direction: column; gap: 6px; }
.criterion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.criterion-name { color: var(--slate-mid); }
.criterion-score {
  font-weight: 700;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 4px;
}
.score-1, .score-2 { background: var(--red-light); color: var(--red); }
.score-3           { background: var(--amber-light); color: var(--amber); }
.score-4, .score-5 { background: var(--green-light); color: var(--green); }

/* ── VALUATION ── */
.valuation-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.val-scenario {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}
.val-scenario.featured {
  border-color: var(--copper);
  border-width: 2px;
  box-shadow: 0 4px 20px rgba(184,115,51,0.15);
}

.val-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--copper);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 12px;
}

.val-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--slate-light);
  margin-bottom: 10px;
}
.val-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  color: var(--slate-dark);
  letter-spacing: -1.5px;
  margin-bottom: 6px;
}
.val-multiple {
  font-size: 12px;
  color: var(--slate-mid);
  margin-bottom: 10px;
}
.val-desc {
  font-size: 12px;
  color: var(--slate-light);
  font-style: italic;
}

.val-inputs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.val-input-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.val-input-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--slate-light);
  margin-bottom: 6px;
}
.val-input-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--slate-dark);
  letter-spacing: -0.5px;
}

/* ── ROADMAP ── */
.roadmap-tabs, .buyer-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  color: var(--slate-mid);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.tab-btn:hover { border-color: var(--copper-light); color: var(--copper); }
.tab-btn.active { background: var(--copper); border-color: var(--copper); color: var(--white); }

.add-btn {
  background: var(--copper);
  color: var(--white);
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.add-btn:hover { background: var(--slate-dark); }

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

.roadmap-item {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.roadmap-item:hover { box-shadow: var(--shadow-lg); }
.roadmap-item.complete { opacity: 0.55; }

.roadmap-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--cream-dark);
  flex-shrink: 0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s ease;
  margin-top: 1px;
}
.roadmap-check.checked {
  background: var(--green);
  border-color: var(--green);
}
.roadmap-check.checked::after {
  content: '';
  width: 6px; height: 4px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
}

.roadmap-content { flex: 1; }
.roadmap-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--slate-dark);
  margin-bottom: 4px;
}
.roadmap-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.roadmap-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}
.tag-quick      { background: #E8F4FD; color: #1A6FA8; }
.tag-structural { background: var(--amber-light); color: var(--amber); }
.tag-pillar     { background: var(--cream-dark); color: var(--slate-mid); }

.roadmap-owner {
  font-size: 11px;
  color: var(--slate-light);
  margin-left: auto;
  white-space: nowrap;
}

/* ── BUYERS ── */
.buyer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.buyer-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.buyer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.buyer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--slate-dark);
}
.buyer-type-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
}
.type-strategic   { background: #E8F4FD; color: #1A6FA8; }
.type-pe          { background: var(--amber-light); color: var(--amber); }
.type-international { background: var(--green-light); color: var(--green); }

.buyer-rationale {
  font-size: 12px;
  color: var(--slate-mid);
  line-height: 1.5;
  margin-bottom: 10px;
}
.buyer-interest {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--slate-light);
}
.interest-bar {
  flex: 1;
  height: 4px;
  background: var(--cream-dark);
  border-radius: 2px;
  overflow: hidden;
}
.interest-fill {
  height: 100%;
  background: var(--copper);
  border-radius: 2px;
}

.market-conditions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.market-item {
  text-align: center;
  padding: 16px;
  background: var(--cream);
  border-radius: var(--radius);
}
.market-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--slate-light);
  margin-bottom: 8px;
}
.market-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--slate-dark);
  margin-bottom: 4px;
}
.market-signal {
  font-size: 11px;
  font-weight: 600;
}
.signal-positive { color: var(--green); }
.signal-neutral  { color: var(--amber); }
.signal-negative { color: var(--red); }

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

.kpi-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.kpi-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--copper);
  margin-bottom: 4px;
}
.kpi-name {
  font-size: 12px;
  color: var(--slate-mid);
  margin-bottom: 8px;
}
.kpi-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--slate-dark);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.kpi-change {
  font-size: 11px;
  font-weight: 600;
}
.kpi-change.up   { color: var(--green); }
.kpi-change.down { color: var(--red); }
.kpi-change.flat { color: var(--slate-light); }

/* ── DATA ROOM ── */
.dataroom-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.dr-section {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.dr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dr-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--slate-dark);
}
.dr-pct {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--copper);
}

.dr-progress {
  height: 6px;
  background: var(--cream-dark);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
}
.dr-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.dr-items { display: flex; flex-direction: column; gap: 6px; }
.dr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.dr-item-name { color: var(--slate-mid); }
.dr-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 8px;
  border-radius: 4px;
}
.status-uploaded  { background: var(--green-light); color: var(--green); }
.status-in-prep   { background: var(--amber-light); color: var(--amber); }
.status-to-locate { background: var(--red-light); color: var(--red); }
.status-na        { background: var(--cream-dark); color: var(--slate-light); }

.overall-pct {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--copper);
  background: var(--white);
  border: 1px solid var(--cream-dark);
  padding: 8px 18px;
  border-radius: 24px;
}

/* ── HEALTH CHECK ── */
.hc-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.hc-summary-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.hc-count {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.hc-count.red   { color: var(--red); }
.hc-count.amber { color: var(--amber); }
.hc-count.green { color: var(--green); }
.hc-label {
  font-size: 12px;
  color: var(--slate-mid);
  font-weight: 500;
}

.hc-categories { display: flex; flex-direction: column; gap: 14px; }

.hc-category {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hc-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.hc-cat-header:hover { background: var(--cream); }

.hc-cat-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--slate-dark);
}
.hc-cat-badges { display: flex; gap: 6px; }
.hc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.hc-badge.red   { background: var(--red-light); color: var(--red); }
.hc-badge.amber { background: var(--amber-light); color: var(--amber); }
.hc-badge.green { background: var(--green-light); color: var(--green); }

.hc-chevron {
  width: 16px; height: 16px;
  stroke: var(--slate-light);
  transition: transform 0.2s;
}
.hc-category.open .hc-chevron { transform: rotate(180deg); }

.hc-items {
  display: none;
  padding: 0 20px 16px;
  flex-direction: column;
  gap: 6px;
}
.hc-category.open .hc-items { display: flex; }

.hc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.hc-item:last-child { border-bottom: none; }

.hc-rag {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hc-rag.red   { background: var(--red); }
.hc-rag.amber { background: var(--amber); }
.hc-rag.green { background: var(--green); }

.hc-item-text { flex: 1; color: var(--slate-dark); }
.hc-item-note { font-size: 11px; color: var(--slate-light); font-style: italic; }

/* ── EDITABLE FIELDS ── */
.edit-mode .editable-field {
  cursor: pointer;
  border-bottom: 1.5px dashed var(--copper-light);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}
.edit-mode .editable-field:hover {
  border-color: var(--copper);
  color: var(--copper);
}

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(47,54,64,0.5);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: block; }

.modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 440px;
  max-width: 90vw;
  z-index: 201;
  box-shadow: var(--shadow-lg);
}
.modal.open { display: block; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--cream-dark);
}
.modal-header h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--slate-dark);
}
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--slate-light);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--slate-dark); }

.modal-body { padding: 20px 24px; }
.modal-body textarea {
  width: 100%;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--slate-dark);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  background: var(--cream);
}
.modal-body textarea:focus { border-color: var(--copper); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 20px;
}

.btn-primary {
  background: var(--copper);
  color: var(--white);
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s;
}
.btn-primary:hover { background: var(--slate-dark); }

.btn-secondary {
  background: var(--white);
  color: var(--slate-mid);
  border: 1px solid var(--cream-dark);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s;
}
.btn-secondary:hover { border-color: var(--slate-mid); color: var(--slate-dark); }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .market-conditions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .charts-row { grid-template-columns: 1fr; }
  .valuation-grid { grid-template-columns: 1fr; }
  .val-inputs-grid { grid-template-columns: repeat(2, 1fr); }
  .scorecard-grid { grid-template-columns: repeat(2, 1fr); }
  .buyer-grid { grid-template-columns: repeat(2, 1fr); }
  .dataroom-grid { grid-template-columns: 1fr; }
  .hc-summary { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .hamburger { display: flex; }
  .topbar { padding: 0 16px; }
  .section { padding: 20px 16px 40px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .scorecard-grid { grid-template-columns: 1fr; }
  .buyer-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .hc-summary { grid-template-columns: 1fr; }
  .val-inputs-grid { grid-template-columns: 1fr 1fr; }
  .market-conditions { grid-template-columns: repeat(2, 1fr); }
}