/* Aktain — design tokens & shell
   Palet diambil dari mock awal: indigo/violet, kanvas abu sangat terang,
   kartu putih dengan garis tipis. Satu mode (terang) supaya fidelitas terjaga. */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #fbfbfd;
  --line: #e7e9ee;
  --line-soft: #f0f2f5;

  --ink: #101828;
  --ink-2: #4b5563;
  --ink-3: #8a93a3;

  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-ink: #3730a3;
  --brand-soft: #eef0ff;

  --ok: #15803d;
  --ok-mid: #22c55e;
  --ok-soft: #e8f8ee;
  --warn: #b45309;
  --warn-soft: #fef4e6;
  --info: #1d4ed8;
  --info-soft: #eaf1fe;
  --bad: #b91c1c;
  --bad-soft: #fdeceb;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;

  --sh-1: 0 1px 2px rgba(16, 24, 40, .04);
  --sh-2: 0 4px 14px rgba(16, 24, 40, .06);
  --sh-3: 0 18px 44px rgba(16, 24, 40, .16);

  --sidebar-w: 236px;
  --topbar-h: 60px;
  --bottom-h: 62px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
svg { display: block; flex: none; }
table { border-collapse: collapse; width: 100%; }

.app-loading { min-height: 100vh; background: var(--bg); }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 60;
}
.sb-brand { height: var(--topbar-h); display: flex; align-items: center; gap: 9px; padding: 0 18px; flex: none; }
.sb-mark { width: 26px; height: 26px; }
.sb-word { font-weight: 700; font-size: 17px; letter-spacing: -.35px; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.sb-group { margin-top: 18px; padding: 0 10px 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .8px; color: var(--ink-3); text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; border-radius: 9px; color: var(--ink-2);
  font-weight: 500; font-size: 13.5px; margin-bottom: 2px;
  transition: background .14s, color .14s;
}
.nav-item svg { width: 17px; height: 17px; color: var(--ink-3); transition: color .14s; }
.nav-item:hover { background: var(--line-soft); color: var(--ink); }
.nav-item:hover svg { color: var(--ink-2); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav-item.active svg { color: var(--brand); }
.nav-label { flex: 1; text-align: left; }
.nav-count {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 600;
  display: grid; place-items: center;
}
.nav-item.active .nav-count { background: var(--brand); }

.sb-foot { flex: none; padding: 12px; display: grid; gap: 10px; }
.promo {
  border: 1px solid var(--line); border-radius: var(--r); padding: 13px;
  background: linear-gradient(160deg, #f7f6ff, #ffffff 70%);
}
.promo-title { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 13px; }
.promo-title svg { width: 15px; height: 15px; color: var(--brand); }
.promo p { color: var(--ink-3); font-size: 12px; margin: 5px 0 11px; }

/* ---------- topbar ---------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h); flex: none;
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
}
.wsw { display: flex; align-items: center; gap: 10px; padding: 5px 9px 5px 7px; border-radius: 10px; transition: background .14s; }
.wsw:hover { background: var(--line-soft); }
.wsw-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.wsw-ic svg { width: 16px; height: 16px; }
.wsw-tx { text-align: left; min-width: 0; }
.wsw-name { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 14.5px; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wsw-sub { display: block; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wsw > svg.caret { width: 15px; height: 15px; color: var(--ink-3); }

.search {
  margin-left: auto; display: flex; align-items: center; gap: 9px;
  width: min(320px, 30vw); padding: 8px 11px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel-2); color: var(--ink-3);
  transition: border-color .14s, background .14s;
}
.search:hover { border-color: #d8dce4; background: #fff; }
.search svg { width: 15px; height: 15px; }
.search span { flex: 1; text-align: left; font-size: 13px; }
.search kbd {
  font: 600 11px var(--font); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 5px; color: var(--ink-3); background: #fff;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  color: var(--ink-2); position: relative; transition: background .14s;
}
.icon-btn:hover { background: var(--line-soft); }
.icon-btn svg { width: 18px; height: 18px; }
.dot {
  position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; padding: 0 4px;
  background: var(--brand); color: #fff; border: 2px solid #fff; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; display: grid; place-items: center;
}
.me { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 10px; border-radius: 10px; transition: background .14s; }
.me:hover { background: var(--line-soft); }
.me-tx { text-align: right; }
.me-name { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; }
.me-role { display: block; font-size: 11px; color: var(--ink-3); line-height: 1.25; }
.avatar {
  width: 32px; height: 32px; border-radius: 999px; flex: none;
  background: linear-gradient(140deg, var(--brand), var(--brand-2)); color: #fff;
  font-size: 11.5px; font-weight: 650; display: grid; place-items: center; letter-spacing: .3px;
}
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 14px; }

.burger { display: none; }

/* ---------- content ---------- */
.content { padding: 22px 24px 40px; max-width: 1560px; width: 100%; }
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .grow { flex: 1; min-width: 240px; }
.page-title { font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.page-sub { color: var(--ink-2); margin-top: 3px; font-size: 13.5px; }

.grid { display: grid; gap: 16px; }
.cols-main { grid-template-columns: minmax(0, 1fr) 348px; align-items: start; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; align-content: start; }

/* ---------- card ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-h { display: flex; align-items: center; gap: 12px; padding: 15px 18px; }
.card-h .t { font-size: 15px; font-weight: 650; letter-spacing: -.2px; }
.card-h .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.card-h .grow { flex: 1; min-width: 0; }
.card-b { padding: 0 18px 18px; }
.card-b.pad { padding: 18px; }
.card-f { padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.divider { height: 1px; background: var(--line-soft); }

.link {
  display: inline-flex; align-items: center; gap: 5px; color: var(--brand);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.link svg { width: 14px; height: 14px; }
.link:hover { color: var(--brand-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 600; color: var(--ink);
  box-shadow: var(--sh-1); transition: background .14s, border-color .14s, transform .06s;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: #d8dce4; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; color: var(--ink-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #4338ca; border-color: #4338ca; }
.btn.primary svg { color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--line-soft); }
.btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }

/* ---------- badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 19px;
  background: var(--line-soft); color: var(--ink-2); white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge.demo { background: #fff8e6; color: #92620a; border: 1px solid #f6e3b4; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 12.5px; font-weight: 550; color: var(--ink-2); transition: .14s;
}
.chip:hover { border-color: #d3d8e2; color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- meta rows ---------- */
.meta { display: grid; gap: 9px; }
.meta-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; }
.meta-row > svg { width: 15px; height: 15px; color: var(--ink-3); margin-top: 2px; }
.meta-k { color: var(--ink-3); width: 128px; flex: none; }
.meta-v { color: var(--ink); font-weight: 550; min-width: 0; }

/* ---------- pillars (status kepatuhan inti) ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pillar { text-align: center; }
.pillar-ic {
  width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 13px; position: relative;
  display: grid; place-items: center; border: 1px solid var(--line);
}
.pillar-ic svg { width: 20px; height: 20px; }
.pillar-ic .tick {
  position: absolute; right: -4px; bottom: -4px; width: 17px; height: 17px; border-radius: 999px;
  background: var(--ok-mid); border: 2px solid #fff; display: grid; place-items: center; color: #fff;
}
.pillar-ic .tick svg { width: 9px; height: 9px; }
.pillar-ic .tick.warn { background: #f59e0b; }
.pillar-n { display: block; font-size: 12.5px; font-weight: 600; }
.pillar-s { display: block; font-size: 11px; color: var(--ink-3); line-height: 1.3; }
.pillar-st { display: block; font-size: 11.5px; font-weight: 600; color: var(--ok); margin-top: 1px; }
.pillar-st.warn { color: var(--warn); }

/* ---------- score ---------- */
.score-num { font-size: 46px; font-weight: 700; letter-spacing: -2px; color: var(--ok); line-height: 1; }
.score-den { font-size: 15px; color: var(--ink-3); font-weight: 500; }
.spark { width: 100%; height: 62px; display: block; }

.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: var(--r); padding: 13px; background: var(--panel-2); }
.stat-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 9px; }
.stat-ic svg { width: 15px; height: 15px; }
.stat-n { font-size: 24px; font-weight: 700; letter-spacing: -.8px; line-height: 1.1; }
.stat-l { font-size: 12px; font-weight: 600; margin-top: 1px; }
.stat-d { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.35; }

.bar { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ok-mid), #16a34a); }
.bar.brand > i { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.bar.warn > i { background: linear-gradient(90deg, #fbbf24, #f59e0b); }

/* ---------- list rows ---------- */
.rows { display: grid; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}
.rows > .row:first-child { border-top: 0; }
.row-ic {
  width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--line-soft); color: var(--ink-2);
}
.row-ic svg { width: 15px; height: 15px; }
.row-ic.ok { background: var(--ok-soft); color: var(--ok); }
.row-ic.warn { background: var(--warn-soft); color: var(--warn); }
.row-ic.info { background: var(--info-soft); color: var(--info); }
.row-ic.bad { background: var(--bad-soft); color: var(--bad); }
.row-ic.brand { background: var(--brand-soft); color: var(--brand); }
.row-tx { display: block; flex: 1; min-width: 0; }
.row-t { display: block; font-size: 13px; font-weight: 600; letter-spacing: -.1px; }
.row-s { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.row-r { text-align: right; flex: none; }
.row-r .d1 { display: block; font-size: 12px; font-weight: 650; }
.row-r .d2 { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.tone-warn { color: var(--warn); }
.tone-bad { color: var(--bad); }
.tone-ok { color: var(--ok); }
.tone-info { color: var(--info); }
button.row { width: 100%; text-align: left; }
button.row:hover .row-t { color: var(--brand-ink); }

/* ---------- table ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { font-size: 13px; min-width: 640px; }
.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  padding: 0 12px 9px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.cell-main { display: flex; align-items: center; gap: 9px; }
.cell-main svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.cell-t { font-weight: 600; }
.cell-s { font-size: 11.5px; color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }

/* ---------- timeline ---------- */
.tl { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-node {
  width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; flex: none;
  background: var(--brand-soft); color: var(--brand); border: 1px solid #dfe1ff;
}
.tl-node svg { width: 13px; height: 13px; }
.tl-node.ok { background: var(--ok-soft); color: var(--ok); border-color: #cdecd8; }
.tl-node.warn { background: var(--warn-soft); color: var(--warn); border-color: #f6e3c4; }
.tl-node.idle { background: var(--line-soft); color: var(--ink-3); border-color: var(--line); }
.tl-line { flex: 1; width: 2px; background: var(--line); margin: 4px 0; border-radius: 2px; min-height: 12px; }
.tl-item:last-child .tl-line { display: none; }
.tl-body { padding-bottom: 18px; min-width: 0; }
.tl-item:last-child .tl-body { padding-bottom: 0; }
.tl-t { font-size: 13.5px; font-weight: 650; }
.tl-d { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.tl-x { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.5; }

/* ---------- steps (progress aksi korporasi) ---------- */
.steps { display: flex; gap: 6px; }
.step { flex: 1; min-width: 0; }
.step-bar { height: 5px; border-radius: 999px; background: var(--line); }
.step.done .step-bar { background: var(--ok-mid); }
.step.now .step-bar { background: var(--brand); }
.step-l { font-size: 10.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.3; overflow-wrap: anywhere; }
.step.done .step-l, .step.now .step-l { color: var(--ink-2); font-weight: 600; }

/* ---------- shortcuts ---------- */
.shortcuts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.sc {
  display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 10px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2);
  font-size: 13px; font-weight: 600; transition: .14s;
}
.sc:hover { background: #fff; border-color: #d6dae3; box-shadow: var(--sh-2); transform: translateY(-1px); }
.sc svg { width: 16px; height: 16px; color: var(--brand); }

/* ---------- logo tile ---------- */
.logo-tile {
  aspect-ratio: 1; border-radius: var(--r); border: 1px solid var(--line);
  background: linear-gradient(150deg, #f3f1ec, #e8e5dd);
  display: grid; place-items: center; text-align: center; padding: 12px;
}
.logo-tile b { font-size: 17px; font-weight: 700; letter-spacing: 1.5px; line-height: 1.25; color: #4a4237; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.kcol { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 11px; }
.kcol-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 0 2px; }
.kcol-h .t { font-size: 12.5px; font-weight: 650; }
.kcol-h .c { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.kdot { width: 7px; height: 7px; border-radius: 999px; flex: none; }
.kcard {
  display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 11px; margin-bottom: 8px; box-shadow: var(--sh-1); transition: .14s;
}
.kcard:last-child { margin-bottom: 0; }
.kcard:hover { border-color: #d3d8e2; box-shadow: var(--sh-2); transform: translateY(-1px); }
.kcard-t { font-size: 12.5px; font-weight: 650; line-height: 1.35; }
.kcard-c { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.kcard-f { display: flex; align-items: center; gap: 6px; margin-top: 9px; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: 11px; font-weight: 600; color: var(--ink-3); text-align: center; padding-bottom: 6px; }
.cal-cell {
  min-height: 78px; min-width: 0; border: 1px solid var(--line-soft); border-radius: 9px; padding: 6px;
  background: var(--panel-2); display: flex; flex-direction: column; gap: 3px;
}
.cal-cell.out { opacity: .4; }
.cal-cell.today { border-color: var(--brand); background: var(--brand-soft); }
.cal-d { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.cal-cell.today .cal-d { color: var(--brand-ink); }
.cal-ev {
  font-size: 10.5px; font-weight: 600; padding: 2px 5px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--brand-soft); color: var(--brand-ink);
}
.cal-ev.warn { background: var(--warn-soft); color: var(--warn); }
.cal-ev.ok { background: var(--ok-soft); color: var(--ok); }
.cal-ev.info { background: var(--info-soft); color: var(--info); }
.cal-ev.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- empty / misc ---------- */
.empty { text-align: center; padding: 34px 18px; color: var(--ink-3); }
.empty svg { width: 30px; height: 30px; margin: 0 auto 10px; color: #c6ccd8; }
.empty .t { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.empty .s { font-size: 12.5px; margin-top: 3px; }
.stack-team { display: flex; }
.stack-team .avatar { border: 2px solid #fff; margin-left: -8px; }
.stack-team .avatar:first-child { margin-left: 0; }

.note {
  display: flex; gap: 10px; padding: 12px 13px; border-radius: var(--r);
  background: var(--brand-soft); border: 1px solid #e0e2ff; font-size: 12.5px; color: var(--brand-ink);
  line-height: 1.5;
}
.note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.note.warn { background: var(--warn-soft); border-color: #f6e3c4; color: var(--warn); }

.seg { display: inline-flex; background: var(--line-soft); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { padding: 6px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }

/* ---------- drawer / modal ---------- */
.scrim {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .42); z-index: 90;
  opacity: 0; animation: fade .18s forwards; -webkit-tap-highlight-color: transparent;
}
@keyframes fade { to { opacity: 1; } }
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--panel);
  z-index: 91; display: flex; flex-direction: column; box-shadow: var(--sh-3);
  transform: translateX(24px); opacity: .6; animation: slidein .22s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes slidein { to { transform: none; opacity: 1; } }
.sheet-h { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-h .t { font-size: 16px; font-weight: 650; letter-spacing: -.2px; }
.sheet-h .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.sheet-b { flex: 1; overflow-y: auto; padding: 18px; display: grid; gap: 16px; align-content: start; }
.sheet-f { flex: none; padding: 13px 18px; border-top: 1px solid var(--line); display: flex; gap: 9px; }
.sheet-f .btn { flex: 1; }

.menu {
  position: fixed; z-index: 91; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-3); padding: 6px; min-width: 250px;
  transform: translateY(-6px); opacity: 0; animation: pop .16s forwards;
}
@keyframes pop { to { transform: none; opacity: 1; } }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; text-align: left; }
.menu-item:hover { background: var(--line-soft); }
.menu-item > span:not([class]) { display: block; flex: 1; min-width: 0; }
.menu-item .t { display: block; font-size: 13px; font-weight: 600; }
.menu-item .s { display: block; font-size: 11.5px; color: var(--ink-3); }
.menu-sep { height: 1px; background: var(--line-soft); margin: 5px 0; }
.menu-lbl { padding: 7px 10px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; color: var(--ink-3); }
.menu-item .tick { margin-left: auto; color: var(--brand); }
.menu-item .tick svg { width: 15px; height: 15px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px); z-index: 95;
  background: #101828; color: #fff; padding: 11px 16px; border-radius: 11px; font-size: 13px;
  font-weight: 550; box-shadow: var(--sh-3); display: flex; align-items: center; gap: 9px;
  opacity: 0; animation: toastin .22s forwards; max-width: calc(100vw - 32px);
}
.toast svg { width: 16px; height: 16px; color: #4ade80; }
@keyframes toastin { to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------- bottom nav (mobile) ---------- */
.bottomnav { display: none; }

/* ================= responsive ================= */
@media (max-width: 1240px) {
  .cols-main { grid-template-columns: minmax(0, 1fr); }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%); transition: transform .24s cubic-bezier(.2, .7, .3, 1);
    box-shadow: var(--sh-3); width: 268px;
  }
  body.drawer .sidebar { transform: none; }
  .main { margin-left: 0; }
  .burger { display: grid; }
  .search { width: auto; padding: 8px; }
  .search span, .search kbd { display: none; }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shortcuts { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
  :root { --topbar-h: 56px; }
  .content { padding: 16px 14px calc(var(--bottom-h) + 26px); }
  .grid { gap: 12px; }
  .stack { gap: 12px; }
  .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statgrid { grid-template-columns: repeat(2, 1fr); }
  .kanban { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding: 0 12px; gap: 8px; }
  .me-tx { display: none; }
  .page-title { font-size: 20px; }
  .page-sub { font-size: 13px; }
  .card-h { padding: 14px 14px; }
  .card-b { padding: 0 14px 14px; }
  .card-b.pad { padding: 14px; }
  .card-f { padding: 11px 14px; }
  .shortcuts { grid-template-columns: repeat(2, 1fr); }
  .pillars { gap: 6px; }
  .pillar-ic { width: 42px; height: 42px; }
  .meta-k { width: 104px; }
  .wsw-sub { display: none; }
  .wsw-name { max-width: 40vw; }
  .sheet { width: 100%; top: auto; height: 92vh; border-radius: 18px 18px 0 0; transform: translateY(20px); }
  @keyframes slidein { to { transform: none; opacity: 1; } }
  .menu { left: 10px !important; right: 10px; width: auto; min-width: 0; max-width: none; }

  /* tabel -> kartu */
  .tbl-wrap { overflow: visible; }
  .tbl { min-width: 0; display: block; }
  .tbl thead { display: none; }
  .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl tr {
    border: 1px solid var(--line); border-radius: var(--r); padding: 12px;
    margin-bottom: 10px; background: var(--panel-2);
  }
  .tbl tr:last-child { margin-bottom: 0; }
  .tbl tbody tr:hover { background: var(--panel-2); }
  .tbl td { border: 0; padding: 4px 0; display: flex; align-items: center; gap: 12px; }
  .tbl td:first-child, .tbl td:last-child { padding: 4px 0; }
  .tbl td::before {
    content: attr(data-l); flex: none; width: 104px; font-size: 11.5px;
    color: var(--ink-3); font-weight: 600;
  }
  .tbl td.head { display: block; padding: 0 0 8px; }
  .tbl td.head::before { display: none; }
  .tbl td.right { text-align: left; }
  .tbl td .cell-main { flex: 1; min-width: 0; }

  .cal { gap: 2px; }
  .cal-cell { min-height: 54px; padding: 4px; border-radius: 7px; }
  .cal-d { font-size: 10.5px; }
  .cal-ev { font-size: 0; padding: 0; height: 5px; border-radius: 3px; }

  .bottomnav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 55;
    left: 0; right: 0; bottom: 0; height: calc(var(--bottom-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(10px);
    border-top: 1px solid var(--line);
  }
  .bn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--ink-3); font-size: 10px; font-weight: 600; position: relative;
  }
  .bn svg { width: 19px; height: 19px; }
  .bn.active { color: var(--brand); }
  .bn .nub {
    position: absolute; top: 5px; right: calc(50% - 18px); min-width: 15px; height: 15px; padding: 0 4px;
    border-radius: 999px; background: var(--brand); color: #fff; font-size: 9px; font-weight: 700;
    display: grid; place-items: center; border: 2px solid #fff;
  }
  .toast { bottom: calc(var(--bottom-h) + 18px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .statgrid { grid-template-columns: 1fr; }
  .shortcuts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- tata letak khusus halaman ---------- */
.ovw-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.ovw-right { border-left: 1px solid var(--line-soft); padding-left: 20px; }
.co-head { display: flex; gap: 16px; align-items: flex-start; }
.co-logo { width: 118px; flex: none; }
.cols-score { grid-template-columns: 262px minmax(0, 1fr); }
.score-split { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; }

button.card { width: 100%; display: block; font: inherit; color: inherit; }
button.card:hover { border-color: #d6dae3; box-shadow: var(--sh-2); }

.hint { background: linear-gradient(140deg, #f6f5ff, #ffffff 62%); border-color: #e3e3fb; margin-bottom: 16px; }
.hint-row { display: flex; gap: 14px; align-items: flex-start; }
.hint-act { display: flex; gap: 8px; flex: none; align-items: center; }
@media (max-width: 900px) {
  .hint-row { flex-wrap: wrap; }
  .hint-act { width: 100%; }
  .hint-act .btn { flex: 1; justify-content: center; }
}

.drawer-scrim { display: none; }

@media (max-width: 1240px) {
  .ovw-split { grid-template-columns: minmax(0, 1fr); }
  .ovw-right { border-left: 0; border-top: 1px solid var(--line-soft); padding-left: 0; padding-top: 18px; }
  .cols-score { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1023px) {
  .drawer-scrim { display: none; }
  body.drawer .drawer-scrim {
    display: block; position: fixed; inset: 0; z-index: 59;
    background: rgba(16, 24, 40, .42);
  }
  .score-split { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

@media (max-width: 767px) {
  .co-head { flex-direction: column; }
  .co-logo { width: 96px; }
  .ovw-split { gap: 16px; }

  /* topbar dirapatkan supaya muat di layar 360px */
  .topbar { padding: 0 10px; gap: 6px; }
  .topbar .icon-btn[data-act="gift"] { display: none; }
  .wsw { flex: 1 1 auto; min-width: 0; gap: 8px; padding: 5px 4px 5px 4px; }
  .wsw-tx { flex: 1; min-width: 0; }
  .wsw-name { display: block; max-width: none; font-size: 13.5px; }
  .wsw-name .badge { display: none; }
  .wsw > svg.caret { display: none; }
  .wsw-ic { width: 28px; height: 28px; }
  .badge.demo { flex: none; }
  .search { margin-left: 0; flex: none; width: 34px; height: 34px; justify-content: center; padding: 0; }
  .icon-btn { width: 32px; height: 32px; }
  .me { padding: 2px; gap: 0; }

  /* tahapan jadi daftar vertikal supaya label tetap terbaca */
  .steps { flex-direction: column; gap: 8px; }
  .step { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .step-bar { width: 20px; height: 5px; flex: none; }
  .step-l { margin-top: 0; font-size: 12px; }
}
