/* ============================================================
   PMO DRB Dashboard — Modern Light Theme
   Dependency-free. Works via file:// and on Netlify.
   ============================================================ */

:root {
  /* Brand */
  --navy: #003670;
  --blue: #003670;
  --blue-600: #002a58;
  --gold: #ffb81c;

  /* Neutrals */
  --bg: #eef2f9;
  --bg-grad-1: #eaf0fb;
  --bg-grad-2: #f5f7fc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e6eaf2;
  --border-strong: #d7dded;

  --text: #0f172a;
  --text-2: #475569;
  --text-3: #8893a7;

  /* Status palette */
  --ok: #16a34a;        --ok-bg: #e7f7ed;        --ok-ring: #b9ead0;
  --risk: #d97706;      --risk-bg: #fef4e2;      --risk-ring: #f6dca6;
  --late: #dc2626;      --late-bg: #fdecec;      --late-ring: #f6c5c5;
  --done: #0284c7;      --done-bg: #e3f3fc;      --done-ring: #b6e0f3;
  --hold: #64748b;      --hold-bg: #eef1f6;      --hold-ring: #d3dae6;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(16, 33, 71, .06);
  --shadow: 0 6px 22px -8px rgba(16, 33, 71, .18), 0 2px 6px -2px rgba(16, 33, 71, .08);
  --shadow-lg: 0 24px 60px -20px rgba(16, 33, 71, .32);
  --radius: 16px;
  --radius-sm: 11px;
  --radius-xs: 8px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter",
          Helvetica, Arial, sans-serif, "Apple Color Emoji";
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 100% -5%, #dde8fb 0%, rgba(221,232,251,0) 55%),
    radial-gradient(900px 500px at -10% 0%, #e8eefb 0%, rgba(232,238,251,0) 50%),
    linear-gradient(180deg, var(--bg-grad-1), var(--bg-grad-2));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.5;
}

::selection { background: rgba(37, 99, 235, .18); }

/* ---------- Layout ---------- */
.app {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(150%) blur(10px);
  background: rgba(255, 255, 255, .72);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--blue) 75%);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; letter-spacing: .5px;
  font-size: 13px;
  box-shadow: 0 8px 18px -6px rgba(37, 99, 235, .55);
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}
.logo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(245, 165, 36, .9) 130%);
  mix-blend-mode: screen;
}
.brand-text { min-width: 0; }
.brand-text h1 {
  font-size: 16px; margin: 0; font-weight: 750; letter-spacing: -.2px;
  white-space: nowrap; color: var(--navy);
}
.brand-text p {
  margin: 1px 0 0; font-size: 12px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-spacer { flex: 1; }
.meta-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 12px; border-radius: 999px; box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-bg); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.45} }

.iconbtn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer; box-shadow: var(--shadow-sm);
  transition: .16s ease;
}
.iconbtn:hover { color: var(--blue); border-color: var(--border-strong); transform: translateY(-1px); }
.iconbtn svg { width: 18px; height: 18px; }

/* ---------- Section heading ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin: 26px 0 16px; flex-wrap: wrap;
}
.page-head h2 { margin: 0; font-size: 21px; letter-spacing: -.4px; color: var(--navy); }
.page-head .sub { margin: 4px 0 0; color: var(--text-3); font-size: 13px; }

/* ---------- KPI cards ---------- */
.kpi-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(6, 1fr);
}
.kpi {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 15px;
  box-shadow: var(--shadow);
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent, var(--blue));
  border-radius: var(--radius) 0 0 var(--radius);
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.kpi.active { border-color: var(--accent, var(--blue)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, var(--blue)) 16%, transparent), var(--shadow); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 12px; color: var(--text-2); font-weight: 600; letter-spacing: .1px; }
.kpi-ic {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-bg, var(--done-bg)); color: var(--accent, var(--blue));
}
.kpi-ic svg { width: 17px; height: 17px; }
.kpi-value { font-size: 30px; font-weight: 760; letter-spacing: -1px; margin-top: 8px; line-height: 1; }
.kpi-foot { margin-top: 9px; font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.kpi-bar { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 11px; }
.kpi-bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent, var(--blue)); transition: width .9s cubic-bezier(.2,.7,.2,1); }

/* ---------- Charts ---------- */
.charts-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1.05fr 1.35fr 1.35fr;
  margin-top: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  padding: 15px 18px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--navy); }
.card-head .hint { font-size: 11.5px; color: var(--text-3); }
.card-body { padding: 14px 18px 18px; }

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { position: relative; flex: 0 0 auto; }
.donut .center {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.donut .center b { font-size: 26px; font-weight: 770; letter-spacing: -1px; color: var(--navy); display: block; line-height: 1; }
.donut .center span { font-size: 11px; color: var(--text-3); }
.legend { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.legend .li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; cursor: pointer; padding: 3px 6px; border-radius: 8px; transition: background .14s; }
.legend .li:hover { background: var(--surface-2); }
.legend .sw { width: 11px; height: 11px; border-radius: 4px; flex: 0 0 auto; }
.legend .nm { color: var(--text-2); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend .vl { font-weight: 700; color: var(--text); }
.legend .pc { color: var(--text-3); font-size: 11px; min-width: 34px; text-align: right; }

/* Bars (svg) */
.bars svg { width: 100%; height: auto; display: block; overflow: visible; }
.bar-rect { transition: opacity .15s; cursor: default; }
.bar-rect:hover { opacity: .82; }
.bar-lbl { font-size: 11px; fill: var(--text-3); }
.bar-val { font-size: 11px; fill: var(--text-2); font-weight: 700; }
.grid-line { stroke: var(--border); stroke-width: 1; }
.axis-lbl { font-size: 10.5px; fill: var(--text-3); }

/* ---------- Toolbar ---------- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
  margin-top: 16px;
}
.search {
  position: relative; flex: 1 1 240px; min-width: 200px;
}
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.search input {
  width: 100%; padding: 10px 12px 10px 36px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  font-size: 13px; font-family: inherit; color: var(--text);
  background: var(--surface-2); transition: .15s;
}
.search input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.search input::placeholder { color: var(--text-3); }

.selectwrap { position: relative; }
.selectwrap::after {
  content: ""; position: absolute; right: 11px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}
select.filter {
  appearance: none; -webkit-appearance: none;
  padding: 10px 30px 10px 12px; border: 1px solid var(--border-strong);
  border-radius: 10px; font-size: 13px; font-family: inherit; color: var(--text);
  background: var(--surface-2); cursor: pointer; transition: .15s; min-width: 132px;
}
select.filter:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
select.filter:hover { border-color: var(--blue); }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text-2); transition: .15s;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-600)); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(37,99,235,.7); }
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border); }
.toolbar-spacer { flex: 1; }
.result-count { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.result-count b { color: var(--text); }

/* ---------- Table ---------- */
.table-card { margin-top: 16px; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.grid { border-collapse: collapse; font-size: 13px; table-layout: fixed; width: max-content; }
table.grid thead th {
  position: sticky; top: 0; z-index: 5;
  background: var(--surface-2);
  text-align: left; font-weight: 650; color: var(--text-2);
  padding: 12px 14px; border-bottom: 1px solid var(--border-strong);
  white-space: nowrap; user-select: none; font-size: 11.5px; letter-spacing: .3px; text-transform: uppercase;
}
table.grid thead th.sortable { cursor: pointer; }
table.grid thead th.sortable:hover { color: var(--blue); }
.th-in { display: inline-flex; align-items: center; gap: 5px; }
.sort-ind { width: 12px; height: 12px; opacity: .35; transition: .15s; }
th.sorted .sort-ind { opacity: 1; color: var(--blue); }
th.num { text-align: right; }
th.num .th-in { flex-direction: row-reverse; }

/* Resizable + reorderable columns */
.col-th { position: relative; overflow: hidden; }
.col-th .grip { display: inline-block; width: 11px; margin-right: 2px; color: var(--text-3); opacity: 0; font-size: 11px; letter-spacing: -3px; vertical-align: middle; cursor: grab; user-select: none; transition: opacity .15s; }
.col-th:hover .grip { opacity: .55; }
th.num .grip { float: none; }
.col-th.dragging { opacity: .4; }
.col-th.drop-target { box-shadow: inset 3px 0 0 var(--blue); background: #eef3fe; }
.col-resize { position: absolute; top: 0; right: 0; width: 9px; height: 100%; cursor: col-resize; z-index: 6; }
.col-resize::after { content: ""; position: absolute; top: 26%; right: 3px; height: 48%; width: 2px; border-radius: 2px; background: var(--border-strong); opacity: 0; transition: opacity .15s; }
.col-th:hover .col-resize::after { opacity: 1; }
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none !important; }

/* Cell sizing under fixed table layout */
table.grid td.cell-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.grid td.cell-clip .who { overflow: hidden; }
table.grid td.cell-wrap { white-space: normal; word-break: break-word; }

table.grid tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
table.grid tbody tr { cursor: pointer; transition: background .12s; }
table.grid tbody tr:hover { background: #f4f8ff; }
table.grid tbody tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

.id-cell { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.item-cell { font-weight: 600; }
.muted { color: var(--text-3); }
.who { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #fff;
}

.dept-tag {
  display: inline-flex; align-items: center; font-weight: 700; font-size: 11px;
  padding: 3px 8px; border-radius: 7px; letter-spacing: .3px;
  background: #eef2fb; color: var(--navy); border: 1px solid #dde6fa;
}

/* Status badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 650;
  border: 1px solid transparent; white-space: nowrap;
}
.badge .bd { width: 7px; height: 7px; border-radius: 50%; }
.s-ontrack { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-ring); }
.s-ontrack .bd { background: var(--ok); }
.s-atrisk { color: var(--risk); background: var(--risk-bg); border-color: var(--risk-ring); }
.s-atrisk .bd { background: var(--risk); }
.s-delayed { color: var(--late); background: var(--late-bg); border-color: var(--late-ring); }
.s-delayed .bd { background: var(--late); }
.s-completed { color: var(--done); background: var(--done-bg); border-color: var(--done-ring); }
.s-completed .bd { background: var(--done); }
.s-onhold { color: var(--hold); background: var(--hold-bg); border-color: var(--hold-ring); }
.s-onhold .bd { background: var(--hold); }
.s-notstarted { color: #5b6b88; background: #eef1f7; border-color: #d6deea; }
.s-notstarted .bd { background: #7c8aa6; }

/* Aging chip */
.aging { display: inline-flex; align-items: baseline; gap: 3px; font-weight: 700; font-variant-numeric: tabular-nums; }
.aging small { font-weight: 500; color: var(--text-3); font-size: 10.5px; }
.aging.a-low { color: var(--ok); }
.aging.a-mid { color: var(--risk); }
.aging.a-high { color: var(--late); }

/* Eskalasi pill */
.esc { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 7px; }
.esc-yes { color: var(--late); background: var(--late-bg); border: 1px solid var(--late-ring); }
.jenis-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.esc-no { color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border); }

.notes-cell { min-width: 360px; max-width: 460px; color: var(--text-2); font-size: 12.5px; white-space: normal; vertical-align: top; }
.note-full { color: var(--text); font-size: 13px; line-height: 1.5; white-space: normal; word-break: break-word; }
.clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nowrap { white-space: nowrap; }
/* Tracking perubahan target */
.tgt-changed { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--risk); background: var(--risk-bg); border: 1px solid var(--risk-ring); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tgt-stable { font-size: 12px; color: var(--text-3); }
.tbc { display: inline-block; font-size: 11px; font-weight: 700; color: var(--risk); background: var(--risk-bg); border: 1px solid var(--risk-ring); padding: 2px 8px; border-radius: 6px; }
.hist-pill {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px;
  font-size: 10.5px; font-weight: 650; color: var(--blue);
  background: #eef3fe; border: 1px solid #d8e4fc; padding: 2px 8px; border-radius: 999px;
}

.empty {
  padding: 60px 20px; text-align: center; color: var(--text-3);
}
.empty svg { width: 42px; height: 42px; opacity: .5; margin-bottom: 10px; }

/* ---------- Drawer ---------- */
.scrim {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(2px); opacity: 0; pointer-events: none;
  transition: opacity .25s ease; z-index: 80;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 94vw);
  background: var(--surface); z-index: 90; box-shadow: var(--shadow-lg);
  transform: translateX(102%); transition: transform .32s cubic-bezier(.22,.8,.2,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 20px 22px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.drawer-head .eyebrow { font-size: 11.5px; font-weight: 700; color: var(--blue); letter-spacing: .5px; text-transform: uppercase; }
.drawer-head h3 { margin: 5px 0 0; font-size: 19px; letter-spacing: -.3px; color: var(--navy); }
.drawer-body { padding: 18px 22px 26px; overflow-y: auto; }
.kv { display: grid; grid-template-columns: 116px 1fr; gap: 10px 12px; margin-top: 6px; }
.kv dt { color: var(--text-3); font-size: 12.5px; padding-top: 1px; }
.kv dd { margin: 0; font-size: 13px; font-weight: 550; color: var(--text); }

.timeline { margin-top: 22px; }
.timeline h4, .progress-box h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-3); margin: 0 0 12px; }
.tl-row { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.tl-row:last-child { padding-bottom: 0; }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto; margin-top: 2px; border: 3px solid var(--surface); box-shadow: 0 0 0 2px currentColor; }
.tl-line { position: absolute; left: 6px; top: 16px; bottom: -2px; width: 2px; background: var(--border-strong); }
.tl-row:last-child .tl-line { display: none; }
.tl-row .t { font-size: 13px; font-weight: 650; }
.tl-row .d { font-size: 12px; color: var(--text-3); }

.progress-box { margin-top: 24px; }
.prog { height: 9px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.prog > i { display: block; height: 100%; border-radius: 99px; transition: width .8s cubic-bezier(.2,.7,.2,1); }
.prog-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-top: 7px; }

.note-block { margin-top: 22px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 15px; }
.note-block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-3); margin: 0 0 7px; }
.note-block p { margin: 0; font-size: 13px; color: var(--text); line-height: 1.6; }

.tbc-note { font-size: 12.5px; color: var(--text-2); background: var(--risk-bg); border: 1px solid var(--risk-ring); border-radius: 10px; padding: 11px 13px; }

/* Riwayat catatan PMO */
.hist { display: flex; flex-direction: column; gap: 11px; }
.hist-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; transition: .15s; }
.hist-item.latest { background: #fff; border-color: #bcd4fb; box-shadow: 0 0 0 2px rgba(37,99,235,.12), var(--shadow-sm); }
.hist-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.hist-ts { font-size: 12.5px; font-weight: 700; color: var(--navy); display: inline-flex; align-items: center; gap: 6px; }
.tag-new { font-size: 9.5px; font-weight: 800; letter-spacing: .5px; color: #fff; background: var(--blue); padding: 2px 7px; border-radius: 6px; text-transform: uppercase; }
.hist-note { font-size: 13px; color: var(--text); line-height: 1.6; }
.hist-by { margin-top: 8px; font-size: 11.5px; color: var(--text-3); font-style: italic; }
.esc-detail { margin-top: 10px; background: var(--late-bg); border: 1px solid var(--late-ring); border-radius: 9px; padding: 9px 11px; font-size: 12px; color: #7f1d1d; line-height: 1.5; }
.esc-detail b { color: var(--late); }

/* Riwayat perubahan target */
.cnt { display: inline-block; font-size: 11px; font-weight: 800; color: var(--blue); background: #eef3fe; border: 1px solid #d8e4fc; padding: 1px 7px; border-radius: 999px; vertical-align: middle; margin-left: 4px; letter-spacing: 0; text-transform: none; }
.tgt-stable-note { font-size: 12.5px; color: var(--text-2); background: var(--ok-bg); border: 1px solid var(--ok-ring); border-radius: 10px; padding: 11px 13px; }
.tgt-stable-note b { color: var(--ok); }
.tgt-hist { display: flex; flex-direction: column; gap: 10px; }
.tgt-mile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 11px 13px; border-left: 3px solid var(--risk); }
.tgt-mile.initial { border-left-color: var(--hold); }
.tgt-mile .th { font-size: 13px; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tgt-mile .th s { color: var(--text-3); font-weight: 600; }
.tgt-mile .th b { color: var(--risk); }
.tgt-mile.initial .th b { color: var(--navy); }
.tgt-mile .dotm { width: 8px; height: 8px; border-radius: 50%; background: var(--risk); flex: 0 0 auto; }
.tgt-mile.initial .dotm { background: var(--hold); }
.tgt-mile .when { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.tgt-mile .why { font-size: 12.5px; color: var(--text-2); margin-top: 7px; line-height: 1.5; }

/* ---------- Footer ---------- */
.foot { margin-top: 30px; text-align: center; color: var(--text-3); font-size: 12px; }
.foot b { color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .charts-grid { grid-template-columns: 1fr 1fr; }
  .charts-grid .span-donut { grid-column: span 2; }
}
@media (max-width: 760px) {
  .app { padding: 0 14px 40px; }
  .topbar-inner { padding: 11px 14px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .charts-grid .span-donut { grid-column: auto; }
  .brand-text p { display: none; }
  .meta-pill .meta-text { display: none; }
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; }
  .topbar, .toolbar, .iconbtn, .kpi-bar, .charts-grid { display: none !important; }
  .card, .kpi { box-shadow: none; border-color: #ccc; }
  .table-scroll { overflow: visible; }
  table.grid { min-width: 0; font-size: 10px; }
  .app { padding: 0; max-width: none; }
}

/* Reveal animation */
.reveal { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
