/* ==========================================================================
   Cyber-HC Internal — CISO command centre
   Plain CSS. No framework.

   1. Tokens        2. Base        3. Shell
   4. Components    5. Utilities   6. Responsive

   To re-skin: edit section 1 only. Every colour, space and radius below is
   a variable; nothing further down hard-codes a hex value.
   ========================================================================== */

/* 1. TOKENS ============================================================== */

/*
 * Palette extracted from Trevor's CISO dashboard prototype (see /reference).
 * Maroon accent on a navy shell — executive, not audit-form.
 * Everything below section 1 reads these; no hex values appear further down.
 */

:root {
  /* Brand — maroon */
  --c-accent:          #71112f;
  --c-accent-strong:   #7b1730;
  --c-accent-soft:     #fbeef1;
  --c-gold:            #d9b34c;

  /* Neutrals */
  --c-ink:             #082b58;
  --c-ink-2:           #33506f;
  --c-ink-3:           #5f7691;
  --c-ink-4:           #8fa2b6;
  --c-line:            #d5e0e8;
  --c-line-soft:       #e7eef3;
  --c-surface:         #ffffff;
  --c-canvas:          #eef4f8;
  --c-surface-2:       #f5f8fa;
  --c-row-hover:       #fafbfc;
  --c-nav-section:     #5d6675;
  --c-nav-chip-line:   #2c3647;
  --c-ok-line:         #bfe3d2;
  --c-info-line:       #c9dbff;
  --c-warn-line:       #efd9b0;
  --c-risk-line:       #f3c9c6;

  /* Navy shell */
  --c-nav-bg:          #06192a;
  --c-nav-bg-2:        #0b2941;
  --c-nav-ink:         #b7c8d6;
  --c-nav-ink-active:  #ffffff;
  --c-nav-active:      var(--c-accent);
  --c-topbar:          #f8fbfd;

  /* Hero + KPI band */
  --c-hero-1:          #071c30;
  --c-hero-2:          #12344f;
  --c-kpi-band:        #09233a;
  --c-kpi-card:        #0e2a43;
  --c-kpi-line:        #36536a;
  --c-btn-dark:        #0c2b44;
  --c-btn-dark-line:   #57738a;

  /* Footer */
  --c-footer-1:        #4b0d25;
  --c-footer-2:        #081b2d;

  /* Status */
  --c-ok:              #12ad61;   --c-ok-bg:      #e4f6ed;
  --c-warn:            #c66b00;   --c-warn-bg:    #ffefda;
  --c-risk:            #ef3947;   --c-risk-bg:    #ffe1e3;
  --c-risk-ink:        #c51e2c;
  --c-idle:            #5a6472;   --c-idle-bg:    #eef0f3;
  --c-info:            #0872d8;   --c-info-bg:    #e6f0fb;

  /* 5-colour heat scale (low -> extreme) */
  --c-heat-1:          #37b96b;
  --c-heat-2:          #a9d34a;
  --c-heat-3:          #ffd13d;
  --c-heat-4:          #ff9139;
  --c-heat-5:          #e62d37;

  /* Donut segment colours */
  --c-seg-ok:          #10aa5c;
  --c-seg-warn:        #f0bf2d;
  --c-seg-risk:        #e33c3c;
  --c-seg-idle:        #8997a5;
  --c-seg-info:        #1677e8;
  --c-seg-orange:      #ef8422;

  /* Space scale */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 64px;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --t-xs: 11px;  --t-sm: 12.5px;  --t-base: 14px;
  --t-lg: 16px;  --t-xl: 20px;    --t-2xl: 26px;  --t-3xl: 32px;

  /* Form */
  --radius:     6px;
  --radius-sm:  5px;
  --radius-pill: 999px;
  --shadow-1:  0 1px 2px rgba(8, 43, 88, .05);
  --shadow-2:  0 1px 3px rgba(8, 43, 88, .08), 0 4px 12px rgba(8, 43, 88, .04);
  --shadow-3:  0 8px 28px rgba(8, 43, 88, .12);

  --sidebar-w: 232px;
  --topbar-h:  62px;
  --content-max: 1280px;
}

/* 2. BASE ================================================================ */

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-canvas);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.011em; color: var(--c-ink); }
h1 { font-size: var(--t-2xl); letter-spacing: -.02em; }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-base); }
p  { margin: 0 0 var(--s-3); }
p:last-child { margin-bottom: 0; }

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

code, .mono { font-family: var(--font-mono); font-size: .92em; }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.muted    { color: var(--c-ink-3); }
.muted-xs { color: var(--c-ink-3); font-size: var(--t-sm); }

/* 3. SHELL =============================================================== */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas: "nav top" "nav main";
  min-height: 100vh;
}

/* -- sidebar -- */
.sidebar {
  grid-area: nav;
  background: linear-gradient(var(--c-nav-bg), var(--c-nav-bg-2));
  display: flex;
  flex-direction: column;
  padding: var(--s-4) 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-5) var(--s-5);
  color: #fff;
}

.sidebar__mark {
  width: 30px; height: 30px;
  flex: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--c-accent-strong) 50%, #111 50%);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: var(--t-sm);
  color: #fff;
}

.sidebar__name  { font-weight: 600; font-size: var(--t-base); line-height: 1.2; }
.sidebar__sub   { font-size: var(--t-xs); color: var(--c-nav-ink); letter-spacing: .04em; text-transform: uppercase; }

.nav__section {
  padding: var(--s-5) var(--s-5) var(--s-2);
  font-size: var(--t-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-nav-section);
  font-weight: 600;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-5);
  color: var(--c-nav-ink);
  font-size: var(--t-base);
  border-left: 3px solid transparent;
}
.nav__link:hover { background: rgba(255,255,255,.04); color: #fff; text-decoration: none; }
.nav__link--active {
  background: var(--c-nav-active);
  color: var(--c-nav-ink-active);
  border-left-color: var(--c-gold);
  font-weight: 500;
}
.nav__link--disabled { opacity: .38; pointer-events: none; }
.nav__icon { width: 17px; flex: none; opacity: .85; }
.nav__soon {
  margin-left: auto;
  font-size: 9.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-nav-section);
  border: 1px solid var(--c-nav-chip-line);
  border-radius: var(--radius-pill);
  padding: 1px 6px;
}

/* -- topbar -- */
.topbar {
  grid-area: top;
  background: var(--c-topbar);
  border-bottom: 1px solid var(--c-line);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: 0 var(--s-6);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__org { display: flex; flex-direction: column; line-height: 1.25; }
.topbar__org-label { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .07em; color: var(--c-ink-4); }
.topbar__org-name  { font-weight: 600; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: var(--s-4); }

.topbar__user { display: flex; align-items: center; gap: var(--s-3); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-accent-soft);
  color: var(--c-accent-strong);
  display: grid; place-items: center;
  font-weight: 600; font-size: var(--t-sm);
  flex: none;
}
.topbar__user-name { font-weight: 500; line-height: 1.2; }
.topbar__user-role { font-size: var(--t-xs); color: var(--c-ink-3); }

/* -- main -- */
.main { grid-area: main; padding: var(--s-6); min-width: 0; }
.main--flush { padding: 0; display: flex; flex-direction: column; }
.main__inner { max-width: var(--content-max); margin: 0 auto; }

.page-head {
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}
.page-head__text { min-width: 0; }
.page-head h1 { margin-bottom: var(--s-1); }
.page-head__sub { color: var(--c-ink-3); font-size: var(--t-base); }
.page-head__actions { margin-left: auto; display: flex; gap: var(--s-2); flex: none; }

.crumb { font-size: var(--t-sm); color: var(--c-ink-3); margin-bottom: var(--s-3); }
.crumb a { color: var(--c-ink-3); }
.crumb a:hover { color: var(--c-accent); }

/* 4. COMPONENTS ========================================================== */

/* -- card -- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  margin-bottom: var(--s-5);
}
.card__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--c-line-soft);
}
.card__title { font-weight: 600; font-size: var(--t-base); }
.card__count {
  font-size: var(--t-xs);
  color: var(--c-ink-3);
  background: var(--c-line-soft);
  border-radius: var(--radius-pill);
  padding: 1px 8px;
}
.card__actions { margin-left: auto; display: flex; gap: var(--s-2); }
.card__body { padding: var(--s-5); }
.card__body--flush { padding: 0; }

/* -- stat tiles -- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s-4); margin-bottom: var(--s-5); }
.stat {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
  box-shadow: var(--shadow-1);
}
.stat__label { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .07em; color: var(--c-ink-4); margin-bottom: var(--s-2); }
.stat__value { font-size: var(--t-3xl); font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.stat__note  { font-size: var(--t-sm); color: var(--c-ink-3); margin-top: var(--s-2); }

/* -- table -- */
.table { width: 100%; border-collapse: collapse; font-size: var(--t-base); }
.table th {
  text-align: left;
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-ink-4);
  font-weight: 600;
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--c-line);
  white-space: nowrap;
}
.table td { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--c-line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--c-row-hover); }
.table__code { font-family: var(--font-mono); font-size: var(--t-sm); color: var(--c-ink-2); white-space: nowrap; }
.table__primary { font-weight: 500; }
.table__right { text-align: right; }
.table-wrap { overflow-x: auto; }

/* -- pill -- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--t-xs);
  font-weight: 500;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  background: var(--c-idle-bg);
  color: var(--c-idle);
}
.pill--ok   { background: var(--c-ok-bg);   color: var(--c-ok); }
.pill--warn { background: var(--c-warn-bg); color: var(--c-warn); }
.pill--risk { background: var(--c-risk-bg); color: var(--c-risk); }
.pill--info { background: var(--c-info-bg); color: var(--c-info); }
.pill--idle { background: var(--c-idle-bg); color: var(--c-idle); }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill--plain::before { display: none; }

/* -- buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font: inherit;
  font-size: var(--t-base);
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  color: var(--c-ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--c-line-soft); text-decoration: none; color: var(--c-ink); }
.btn--primary { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.btn--primary:hover { background: var(--c-accent-strong); border-color: var(--c-accent-strong); color: #fff; }
.btn--danger { color: var(--c-risk); border-color: var(--c-risk-line); background: var(--c-surface); }
.btn--danger:hover { background: var(--c-risk-bg); color: var(--c-risk); }
.btn--sm { font-size: var(--t-sm); padding: 4px 10px; }
.btn--link { border-color: transparent; background: none; color: var(--c-accent); padding: 4px 6px; }
.btn--link:hover { background: var(--c-accent-soft); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* -- forms -- */
.form-grid { display: grid; gap: var(--s-5); }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.field { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.field__label { font-weight: 500; font-size: var(--t-sm); color: var(--c-ink-2); }
.field__req { color: var(--c-risk); margin-left: 2px; }
.field__hint { font-size: var(--t-sm); color: var(--c-ink-3); }
.field__error { font-size: var(--t-sm); color: var(--c-risk); }

.input, .select, .textarea {
  font: inherit;
  font-size: var(--t-base);
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.input--error, .select--error, .textarea--error { border-color: var(--c-risk); }
.form-actions { display: flex; gap: var(--s-3); align-items: center; margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--c-line-soft); }

/* -- alerts -- */
.alert {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-sm);
  border: 1px solid;
  margin-bottom: var(--s-5);
  font-size: var(--t-base);
}
.alert--ok   { background: var(--c-ok-bg);   border-color: var(--c-ok-line); color: var(--c-ok); }
.alert--risk { background: var(--c-risk-bg); border-color: var(--c-risk-line); color: var(--c-risk); }
.alert--info { background: var(--c-info-bg); border-color: var(--c-info-line); color: var(--c-info); }
.alert--warn { background: var(--c-warn-bg); border-color: var(--c-warn-line); color: var(--c-warn); }
.alert ul { margin: var(--s-1) 0 0; padding-left: var(--s-4); }

/* -- empty state -- */
.empty { text-align: center; padding: var(--s-7) var(--s-5); color: var(--c-ink-3); }
.empty__mark { font-size: 26px; opacity: .3; margin-bottom: var(--s-3); }
.empty__title { font-weight: 600; color: var(--c-ink-2); margin-bottom: var(--s-2); }
.empty__body { font-size: var(--t-base); max-width: 44ch; margin: 0 auto var(--s-4); }

/* -- definition list -- */
.dl { display: grid; grid-template-columns: 172px 1fr; gap: var(--s-3) var(--s-4); margin: 0; }
.dl dt { font-size: var(--t-sm); color: var(--c-ink-3); }
.dl dd { margin: 0; }

/* -- login -- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--s-5); background: var(--c-canvas); }
.auth__card { width: 100%; max-width: 396px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-3); padding: var(--s-6); }
.auth__brand { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-5); }
.auth__title { font-size: var(--t-xl); margin-bottom: var(--s-1); }
.auth__sub { color: var(--c-ink-3); font-size: var(--t-sm); margin-bottom: var(--s-5); }
.auth__foot { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--c-line-soft); font-size: var(--t-sm); color: var(--c-ink-4); text-align: center; }

/* -- misc -- */
.inline-form { display: inline; }
.divider { height: 1px; background: var(--c-line-soft); margin: var(--s-5) 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* 4b. EXECUTIVE DASHBOARD ================================================
   Layout mirrors the reference prototype in /reference: hero band, a 7-wide
   KPI strip on navy, two rows of three numbered question-panels, then a
   three-column bottom row. All colours come from section 1.
   ====================================================================== */

/* -- hero -- */
.exec-hero {
  background: linear-gradient(90deg, var(--c-hero-1), var(--c-hero-2));
  color: #fff;
  padding: var(--s-5) var(--s-6);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.exec-hero h1 { color: #fff; font-size: var(--t-3xl); margin: 0; letter-spacing: -.02em; }
.exec-hero p { margin: var(--s-1) 0 0; font-size: var(--t-lg); color: #cfe0ee; }
.exec-hero__actions { margin-left: auto; display: flex; gap: var(--s-2); }
.btn--hero {
  background: var(--c-btn-dark);
  border-color: var(--c-btn-dark-line);
  color: #fff;
}
.btn--hero:hover { background: var(--c-hero-2); color: #fff; }
.btn--hero-primary { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.btn--hero-primary:hover { background: var(--c-accent-strong); border-color: var(--c-accent-strong); color: #fff; }

/* -- KPI strip -- */
.kpis {
  background: var(--c-kpi-band);
  padding: var(--s-3);
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--s-2);
}
.kpi {
  background: var(--c-kpi-card);
  border: 1px solid var(--c-kpi-line);
  border-radius: var(--radius);
  padding: var(--s-3);
  color: #fff;
  min-height: 116px;
  display: flex;
  flex-direction: column;
}
.kpi__label { font-size: var(--t-xs); color: #b9cbdb; line-height: 1.35; }
.kpi__value { font-size: var(--t-2xl); font-weight: 600; margin: var(--s-2) 0 0; letter-spacing: -.02em; }
.kpi__delta { font-size: var(--t-xs); font-weight: 500; }
.kpi__note { font-size: 10px; color: #8ba4bb; margin-top: auto; }
.kpi__spark { border-bottom: 2px solid currentColor; margin-top: var(--s-2); opacity: .65; }
.kpi--pending .kpi__value { color: #8ba4bb; font-size: var(--t-lg); font-weight: 500; }
.text-risk { color: var(--c-risk); }
.text-ok { color: var(--c-ok); }
.text-idle { color: #8ba4bb; }

/* -- panel grids -- */
.exec-grid { display: grid; gap: var(--s-3); padding: var(--s-3) var(--s-3) 0; }
.exec-grid--three { grid-template-columns: 1fr 1fr 1.1fr; }
.exec-grid--bottom { grid-template-columns: 1.2fr .85fr .9fr; padding-bottom: var(--s-3); }

.panel {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.panel__head { display: flex; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-3); }
.panel__title { font-size: 15px; font-weight: 600; margin: 0; }
.panel__num { color: var(--c-accent); font-weight: 700; }
.panel__link { margin-left: auto; font-size: var(--t-xs); color: var(--c-info); white-space: nowrap; }
.panel__link--off { color: var(--c-ink-4); cursor: not-allowed; }
.panel__split { display: flex; gap: var(--s-4); align-items: center; flex-wrap: wrap; }
.panel__col { min-width: 0; flex: 1; }

/* -- donut -- */
.donut {
  width: 116px; height: 116px;
  border-radius: 50%;
  display: grid; place-content: center;
  text-align: center;
  position: relative;
  flex: none;
}
.donut::after {
  content: "";
  position: absolute;
  inset: 26px;
  background: var(--c-surface);
  border-radius: 50%;
}
.donut__value, .donut__label { position: relative; z-index: 2; }
.donut__value { font-size: 22px; font-weight: 600; }
.donut__label { font-size: 10px; color: var(--c-ink-3); }
.donut--empty { background: var(--c-line-soft); }

/* -- legend -- */
.legend { list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); }
.legend li { display: flex; align-items: center; gap: var(--s-2); padding: 2px 0; }
.legend__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.legend__count { margin-left: auto; font-weight: 600; }

/* -- inset boxes -- */
.inset { background: var(--c-surface-2); padding: var(--s-3); border-radius: var(--radius-sm); font-size: var(--t-sm); flex: 1; min-width: 150px; }
.inset--alert { background: #fff0f0; color: var(--c-risk-ink); }
.inset__title { font-weight: 600; display: block; margin-bottom: var(--s-2); }
.inset__row { display: flex; justify-content: space-between; gap: var(--s-3); padding: 1px 0; }

/* -- heat map -- */
.heat { display: grid; grid-template-columns: auto repeat(5, minmax(30px, 1fr)); gap: 2px; font-size: 10px; }
.heat__cell {
  aspect-ratio: 3 / 2;
  display: grid; place-content: center;
  color: #fff; font-weight: 600;
  border-radius: 2px;
  min-height: 26px;
}
.heat__cell--0 { color: rgba(255,255,255,.55); }
.heat__axis { color: var(--c-ink-3); display: grid; place-content: center; padding: 0 var(--s-1); }
.heat__axis--y { justify-content: end; text-align: right; }
.heat-1 { background: var(--c-heat-1); }
.heat-2 { background: var(--c-heat-2); }
.heat-3 { background: var(--c-heat-3); }
.heat-4 { background: var(--c-heat-4); }
.heat-5 { background: var(--c-heat-5); }
.heat__caption { font-size: 10px; color: var(--c-ink-3); margin-top: var(--s-2); }

/* -- compact table -- */
.table--compact { font-size: var(--t-sm); }
.table--compact th { background: var(--c-line-soft); padding: var(--s-2) var(--s-3); }
.table--compact td { padding: var(--s-2) var(--s-3); }

/* -- progress bar -- */
.bar { display: inline-block; width: 66px; height: 9px; background: var(--c-line); border-radius: 2px; overflow: hidden; vertical-align: middle; }
.bar__fill { display: block; height: 100%; background: var(--c-info); }
.bar__fill--ok { background: var(--c-ok); }
.bar__fill--warn { background: var(--c-seg-warn); }
.bar__fill--risk { background: var(--c-risk); }

/* -- resilience tiles -- */
.resilience { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.resilience div { padding: var(--s-3) var(--s-2); text-align: center; border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
.resilience b { font-size: var(--t-lg); display: block; color: var(--c-ink-4); }
.resilience span { font-size: 10px; color: var(--c-ink-3); }

/* -- pending / placeholder -- */
.pending {
  border: 1px dashed var(--c-line);
  background: var(--c-surface-2);
  border-radius: var(--radius-sm);
  padding: var(--s-5) var(--s-4);
  text-align: center;
  color: var(--c-ink-3);
  font-size: var(--t-sm);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-2);
}
.pending__badge {
  align-self: center;
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--c-ink-4);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  padding: 1px 9px;
  background: var(--c-surface);
}

/* -- footer -- */
.exec-footer {
  background: linear-gradient(90deg, var(--c-footer-1), var(--c-footer-2));
  color: #fff;
  padding: var(--s-4) var(--s-6);
  display: flex;
  gap: var(--s-4);
  font-size: var(--t-sm);
  margin-top: var(--s-3);
}
.exec-footer span { margin-left: auto; letter-spacing: .05em; opacity: .85; }

/* -- topbar search -- */
.topbar__search { flex: 1; max-width: 520px; }
.topbar__search input { width: 100%; }
.topbar__bell { position: relative; color: var(--c-ink-3); font-size: var(--t-lg); }
.topbar__badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--c-accent); color: #fff;
  font-size: 9px; font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 1px 5px;
}

/* 5. UTILITIES =========================================================== */

.stack    { display: flex; flex-direction: column; gap: var(--s-3); }
.row      { display: flex; align-items: center; gap: var(--s-3); }
.row--between { justify-content: space-between; }
.grow     { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0; }  .mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.text-sm { font-size: var(--t-sm); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 6. RESPONSIVE ========================================================== */

@media (max-width: 1400px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .exec-grid--three, .exec-grid--bottom { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1080px) {
  .form-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas: "top" "nav" "main";
  }
  .sidebar { height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; padding: var(--s-2) var(--s-3); }
  .sidebar__brand, .nav__section { display: none; }
  .nav__link { border-left: none; border-bottom: 3px solid transparent; padding: var(--s-2) var(--s-3); }
  .nav__link--active { border-left: none; border-bottom-color: var(--c-accent); }
  .nav__soon { display: none; }
  .main { padding: var(--s-4); }
  .form-grid--2, .form-grid--3 { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: var(--s-1) 0; }
  .dl dd { margin-bottom: var(--s-3); }
  .page-head { flex-direction: column; }
  .page-head__actions { margin-left: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exec-grid--three, .exec-grid--bottom { grid-template-columns: 1fr; }
  .exec-hero h1 { font-size: var(--t-2xl); }
  .exec-hero__actions { margin-left: 0; }
  .resilience { grid-template-columns: repeat(2, 1fr); }
  .topbar__search { display: none; }
}

@media print {
  .sidebar, .topbar, .page-head__actions, .btn { display: none !important; }
  .app { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
}
