:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #0b5cff;
  --brand-strong: #0742c4;
  --brand-tint: #e8f0ff;
  --good: #16a34a;
  --good-tint: #dcfce7;
  --warn: #d97706;
  --warn-tint: #fef3c7;
  --bad: #dc2626;
  --bad-tint: #fee2e2;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  background: #0b1220;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #4f8bff);
  color: #fff; display: grid; place-items: center; font-weight: 700; letter-spacing: 0.5px;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong { color: #fff; font-size: 15px; }
.brand__text span { color: #7c8aa5; font-size: 12px; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.nav__link {
  color: #cbd5e1; padding: 10px 12px; border-radius: var(--radius-sm);
  font-weight: 500; display: flex; align-items: center; gap: 10px;
}
.nav__link:hover { background: rgba(255, 255, 255, 0.06); text-decoration: none; color: #fff; }
.nav__link.is-active { background: var(--brand); color: #fff; }

/* ---- Content ---- */
.content { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.topbar__spacer { min-height: 36px; }
.topbar__right { display: flex; align-items: center; gap: 12px; }
.topbar__field { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

.main { padding: 24px; max-width: none; width: 100%; }
.main:focus { outline: none; }

/* ---- Section header ---- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 16px; flex-wrap: wrap; }
.section-head h1 { font-size: 22px; margin: 0; }
.section-head__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lede { color: var(--muted); margin: -8px 0 18px; max-width: 70ch; }

/* ---- Dashboard readability ---- */
.readiness-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 18px;
  box-shadow: var(--shadow);
}
.readiness-strip--good { border-left-color: var(--good); }
.readiness-strip--warn { border-left-color: var(--warn); }
.readiness-strip--bad { border-left-color: var(--bad); }
.readiness-strip__score {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 800;
  background: var(--brand-tint);
  color: var(--brand-strong);
}
.readiness-strip__body h2 {
  margin: 0;
  font-size: 16px;
}
.readiness-strip__body p {
  margin: 4px 0 0;
  color: var(--muted);
}

.risk-item--action {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  background: var(--surface-2);
}

.dash-hints {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}
.dash-hints li {
  margin-bottom: 6px;
}

.back-link { display: inline-block; margin-bottom: 10px; font-size: 13px; color: var(--muted); }

/* ---- Cards ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card__title { font-size: 15px; margin: 0; }
.card__subtitle { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.card__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card__body { padding: 16px 18px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.dashboard-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.dashboard-span-2 { grid-column: 1 / -1; }

.dashboard-top-card { display: flex; }
.dashboard-top-card .card { height: 100%; width: 100%; }
.dashboard-hint { margin: 12px 0 0; font-size: 12px; }
.dashboard-panel { display: flex; flex-direction: column; gap: 10px; min-height: 560px; }
.dashboard-panel__content { flex: 1 1 auto; }

.future-controls {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.future-signals {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.dash-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.dash-pager__label { font-size: 12px; color: var(--muted); font-weight: 600; }

.dev-opportunity {
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface-2);
  margin-bottom: 10px;
}
.dev-opportunity__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---- Dashboard widgets ---- */
.project-card-grid {
  display: grid;
  gap: 10px;
}

.project-mini-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 10px;
  cursor: pointer;
}
.project-mini-card:hover {
  border-color: var(--brand);
}
.project-mini-card.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(11, 92, 255, 0.15);
}
.project-mini-card--ready { border-left-color: var(--good); }
.project-mini-card--at-risk { border-left-color: var(--warn); }
.project-mini-card--not-ready { border-left-color: var(--bad); }

.project-mini-card__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.project-mini-card__top h3 {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.3;
}
.project-mini-card__score {
  font-weight: 800;
  font-size: 17px;
}
.project-mini-card__status {
  margin: 5px 0 3px;
  font-size: 12px;
  color: var(--text);
}
.project-mini-card__meta {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
}

.skill-readiness-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skill-readiness-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--surface-2);
}
.skill-readiness-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.skill-readiness-item__name {
  font-weight: 700;
}
.skill-readiness-item__bar {
  margin-top: 8px;
}
.skill-readiness-item__status {
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 600;
}
.skill-readiness-item__status--good { color: #166534; }
.skill-readiness-item__status--warn { color: #92400e; }
.skill-readiness-item__status--bad { color: #991b1b; }
.skill-readiness-item__meta {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}

.dash-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

/* ---- L&D dashboard additions ---- */
.project-mini-card { text-decoration: none; color: inherit; display: block; }

.skill-readiness-item--link { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.skill-readiness-item--link:hover { border-color: var(--brand); }

.hero-stats { display: flex; gap: 16px; }
.hero-stat { text-align: center; }
.hero-stat__value { display: block; font-size: 20px; font-weight: 800; }
.hero-stat__label { font-size: 11px; color: var(--muted); }

.widget-scroll { max-height: 460px; overflow-y: auto; margin-top: 10px; padding-right: 4px; }

.quad-chart { width: 100%; overflow: hidden; border-radius: var(--radius-sm); }
.quad-chart__label { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.quad-chart__axis { font-size: 12px; fill: var(--muted); font-weight: 600; }

.quad-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ---- Simple dashboard: upcoming work ---- */
.upcoming-list { display: flex; flex-direction: column; gap: 10px; }
.upcoming-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.upcoming-item--good { border-left-color: var(--good); }
.upcoming-item--warn { border-left-color: var(--warn); }
.upcoming-item--bad { border-left-color: var(--bad); }
.upcoming-item__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
}
.upcoming-item__summary::-webkit-details-marker { display: none; }
.upcoming-item__summary::before {
  content: '▸';
  color: var(--muted);
  font-size: 11px;
  transition: transform 0.15s ease;
}
.upcoming-item[open] .upcoming-item__summary::before { transform: rotate(90deg); }
.upcoming-item__info { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.upcoming-item__name { font-weight: 700; font-size: 13.5px; }
.upcoming-item__date { font-size: 11.5px; color: var(--muted); }
.upcoming-item__cover { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; width: 150px; flex: none; }
.upcoming-item__bar { width: 100%; }
.upcoming-item__msg { font-size: 11.5px; font-weight: 700; }
.upcoming-item__msg--good { color: #166534; }
.upcoming-item__msg--warn { color: #92400e; }
.upcoming-item__msg--bad { color: #991b1b; }
.upcoming-item__body { padding: 0 12px 12px 30px; }
.upcoming-item__label { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.upcoming-item__skills { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 3px; }
.upcoming-item__skills a { font-size: 13px; }

/* ---- Simple dashboard: future skills to develop ---- */
.future-skill-list { display: flex; flex-direction: column; gap: 4px; }
.future-skill {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
}
.future-skill:last-child { border-bottom: 0; }
.future-skill__rank {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.future-skill__body { flex: 1 1 auto; min-width: 0; }
.future-skill__head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.future-skill__name { font-weight: 700; font-size: 14px; text-decoration: none; }
.future-skill__name:hover { text-decoration: underline; }
.future-skill__when { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.future-skill__why { margin: 3px 0 5px; font-size: 12.5px; color: var(--text); }
.future-skill__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }

/* ---- Simple dashboard: organisation skills gap graph ---- */
.gbar-chart { display: flex; flex-direction: column; gap: 14px; }
.gbar-legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); }
.gbar-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.gbar-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.gbar-swatch--current { background: var(--brand); }
.gbar-swatch--future { background: var(--warn); }
.gbar-rows { display: flex; flex-direction: column; gap: 14px; }
.gbar-row { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center; }
.gbar-row__label { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbar-row__bars { display: flex; flex-direction: column; gap: 5px; }
.gbar {
  height: 16px;
  border-radius: 0 999px 999px 0;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 7px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.gbar--current { background: var(--brand); }
.gbar--future { background: var(--warn); }
.gbar-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding-left: 234px; }

.simulator { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: 12px; margin-bottom: 12px; }
.simulator__title { margin: 0 0 8px; font-size: 13.5px; }
.simulator__controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.simulator__result { margin-top: 10px; }
.simulator__scores { display: flex; align-items: center; gap: 12px; }
.sim-score { font-size: 22px; font-weight: 800; color: var(--muted); }
.sim-score--after { color: var(--brand-strong); }
.simulator__arrow { color: var(--muted); font-size: 18px; }
.simulator__delta { margin: 6px 0; font-weight: 700; font-size: 13px; }
.simulator__delta.up { color: #166534; }
.simulator__delta.down { color: #991b1b; }

.health-summary__score { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.health-summary__score .cbar { flex: 1; width: auto; height: 22px; }
.health-summary__pct { font-weight: 800; font-size: 18px; }

.action-list { margin: 0; padding-left: 18px; }
.action-list li { margin-bottom: 6px; }

/* ---- KPIs ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-grid--compact { grid-template-columns: repeat(2, 1fr); margin-bottom: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); border-left: 4px solid var(--border-strong); }
.kpi--brand { border-left-color: var(--brand); }
.kpi--good { border-left-color: var(--good); }
.kpi--warn { border-left-color: var(--warn); }
.kpi--bad { border-left-color: var(--bad); }
.kpi__value { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.kpi__label { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.kpi__sub { color: var(--muted); font-size: 11.5px; margin-top: 4px; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; background: var(--surface-2); position: sticky; top: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .align-right, .data-table th.align-right { text-align: right; }
.data-table td a { font-weight: 600; }

/* ---- Badges & pills ---- */
.badge, .pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; line-height: 1.6; }
.badge--neutral, .pill--neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge--brand { background: var(--brand-tint); color: var(--brand-strong); }
.badge--good, .pill--good { background: var(--good-tint); color: #166534; }
.badge--warn, .pill--warn { background: var(--warn-tint); color: #92400e; }
.badge--bad, .pill--bad { background: var(--bad-tint); color: #991b1b; }

/* ---- Meter ---- */
.meter { display: inline-flex; gap: 3px; }
.meter__cell { width: 14px; height: 8px; border-radius: 2px; background: var(--border); }
.meter__cell.is-on { background: var(--brand); }

/* ---- Coverage bar ---- */
.cbar { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; height: 18px; width: 120px; overflow: hidden; }
.cbar__fill { position: absolute; inset: 0 auto 0 0; height: 100%; }
.cbar__fill--good { background: var(--good); }
.cbar__fill--warn { background: var(--warn); }
.cbar__fill--bad { background: var(--bad); }
.cbar__label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text); }

/* ---- Charts ---- */
.hbar-chart { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 160px 1fr 48px; align-items: center; gap: 10px; }
.hbar__label { font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__track { background: var(--surface-2); border-radius: 999px; height: 12px; overflow: hidden; border: 1px solid var(--border); }
.hbar__fill { height: 100%; border-radius: 999px; }
.hbar__fill--brand { background: var(--brand); }
.hbar__fill--good { background: var(--good); }
.hbar__fill--warn { background: var(--warn); }
.hbar__fill--bad { background: var(--bad); }
.hbar__value { text-align: right; font-size: 12.5px; font-weight: 700; }

.donut { display: grid; place-items: center; }
.donut__track { fill: none; stroke: var(--border); stroke-width: 14; }
.donut__value { fill: none; stroke-width: 14; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 70px 70px; transition: stroke-dashoffset 0.4s ease; }
.donut__pct { font-size: 26px; font-weight: 700; text-anchor: middle; fill: var(--text); }
.donut__label { font-size: 12px; text-anchor: middle; fill: var(--muted); }

/* ---- Heatmap ---- */
.heatmap td, .heatmap th { text-align: center; }
.heatmap .heat-skill { text-align: left; position: sticky; left: 0; background: var(--surface); }
.heat-col a { font-size: 12px; }
.heat { display: inline-block; width: 22px; height: 22px; border-radius: 5px; }
.heat--good { background: var(--good); }
.heat--warn { background: var(--warn); }
.heat--bad { background: var(--bad); }
.heat--muted { background: var(--border); }
.legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend .heat { width: 16px; height: 16px; }

/* ---- Risk / recommendations ---- */
.risk-list, .link-list, .reason-list, .near-list, .scenario-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.link-list { gap: 6px; }
.link-list li, .reason-list li { font-size: 13px; }
.reason-list { list-style: disc; padding-left: 18px; color: var(--muted); }
.risk-item { display: flex; gap: 10px; align-items: flex-start; }
.risk-item__title { font-weight: 600; display: block; }
.risk-item__detail { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

.rec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rec-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface-2); }
.rec-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.rec-card__title { font-size: 14.5px; margin: 4px 0; }
.rec-card__actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.evi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 8px; }
.evi { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; border-bottom: 1px dashed var(--border); padding-bottom: 3px; }
.evi__label { color: var(--muted); }
.evi__value { font-weight: 600; }

/* ---- Stats ---- */
.stat-row { display: flex; gap: 22px; flex-wrap: wrap; margin: 4px 0 14px; }
.stat { display: flex; flex-direction: column; }
.stat__value { font-size: 20px; font-weight: 700; }
.stat__label { font-size: 12px; color: var(--muted); }

/* ---- Chips ---- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chip { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-strong); font-size: 12px; font-weight: 500; }
.chip--static { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }

/* ---- Profile ---- */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.profile-head h1 { margin: 0; font-size: 22px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #4f8bff); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }

/* ---- Scenario / impact ---- */
.impact { display: flex; align-items: center; justify-content: center; gap: 18px; }
.impact__arrow { font-size: 28px; color: var(--muted); }
.impact__delta { text-align: center; font-weight: 600; margin: 10px 0 0; }
.impact__delta.up { color: var(--good); }
.impact__delta.down { color: var(--bad); }
.scenario-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }

.gap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gap-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.gap-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.near-list { margin: 8px 0; }
.near { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed var(--border); }

/* ---- Forms ---- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.field--grow { flex: 1 1 180px; }
.field--check { flex-direction: row; align-items: center; gap: 6px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-actions { display: flex; align-items: flex-end; }

input[type="text"], input[type="number"], .select, select {
  font: inherit; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); min-width: 120px;
}
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }

/* ---- Buttons ---- */
.btn { font: inherit; font-weight: 600; cursor: pointer; border-radius: var(--radius-sm); padding: 8px 14px; border: 1px solid transparent; background: var(--surface-2); color: var(--text); }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); }
.btn--ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--bad); color: #fff; }
.btn--sm { padding: 5px 10px; font-size: 12px; }

/* ---- Sub nav ---- */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; }
.subnav__link { padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); }
.subnav__link.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---- Misc ---- */
.muted { color: var(--muted); font-size: 12.5px; }
.empty { padding: 22px; text-align: center; color: var(--muted); font-size: 13px; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px dashed var(--border); }

/* ---- Responsive ---- */
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .dashboard-grid-2, .rec-grid, .gap-grid { grid-template-columns: 1fr; }
  .dashboard-span-2 { grid-column: auto; }
  .dashboard-panel { min-height: 480px; }
  .future-controls { grid-template-columns: 1fr; }
  .readiness-strip {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .nav { flex-direction: row; flex-wrap: wrap; margin-top: 0; }
  .sidebar__foot { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .topbar { flex-direction: column; align-items: stretch; }
  .field-grid { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 110px 1fr 40px; }
  .gbar-row { grid-template-columns: 1fr; gap: 4px; }
  .gbar-scale { padding-left: 0; }
}
