/* Teman Aki — konsol keuangan & pesanan.
   Mengikuti identitas merek Teman Aki: logo aki bergaris tepi coklat-hitam tebal, kepala merah dan badan kuning
   dengan sisi bayangan berupa blok warna datar; foto produk FitEccu berlatar krem dengan pita hitam dan judul oranye
   bertipe tebal membulat. Semuanya datar, tanpa gradasi. Kartu dan tombol memakai garis tepi gelap + bayangan blok
   seperti stiker logo. Warna punya arti tetap: Shopee = oranye Shopee, TikTok = hitam, cair = hijau, menunggu = kuning,
   gagal = merah. */

:root {
  /* warna merek (dari logo & foto produk) */
  --outline: #342c2a;     /* garis tepi logo */
  --black: #1d1a19;       /* pita hitam foto produk */
  --red: #f00d2b;         /* kepala aki */
  --red-shade: #c40e20;
  --yellow: #ffd403;      /* badan aki */
  --yellow-shade: #d89a02;
  --orange: #f6a04d;      /* judul "SELAMAT TINGGAL AKI SOAK!" */
  --cream: #e9e3da;       /* latar foto produk */

  --bg: #efeae3;
  --surface: #ffffff;
  --surface-2: #faf8f5;
  --surface-3: #f2ede6;
  --ink: #342c2a;
  --ink-2: #5a4f4b;
  --muted: #8a7f79;
  --line: #e2dbd1;
  --line-2: #eee8e0;

  --brand: #f00d2b;
  --brand-ink: #c40e20;
  --brand-soft: #fde7ea;

  --shopee: #ee4d2d;  --shopee-soft: #fdece7;
  --tiktok: #1d1a19;  --tiktok-soft: #ece8e4;
  --good: #1f8a4c;  --good-soft: #e5f4ea;
  --warn: #a26a00;  --warn-soft: #fff4c7;
  --bad: #c40e20;   --bad-soft: #fde7ea;
  --info: #2f5bb7;  --info-soft: #e8eefb;

  /* warna grafik & status (datar) */
  --emerald: #1f9d55; --amber: #ffd403; --sky: #3a6fd8; --rose: #f00d2b;
  --slate: #b3aaa4; --violet: #7b4fd1; --pink: #d6336c; --cyan: #1597a8; --indigo: #4a4fc4; --fuchsia: #a3238f;

  --side: #1d1a19;
  --side-2: #2b2624;
  --side-ink: #c9bfb8;
  --side-ink-strong: #ffffff;

  --shadow: 3px 3px 0 var(--outline);
  --shadow-sm: 2px 2px 0 var(--outline);
  --shadow-lg: 0 16px 40px rgba(29, 26, 25, .3);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --outline: #000000;
    --bg: #171412; --surface: #221e1c; --surface-2: #272220; --surface-3: #2e2826;
    --ink: #f4efe9; --ink-2: #d8cfc8; --muted: #a59a93; --line: #3a3330; --line-2: #2f2927;
    --brand: #ff3a52; --brand-ink: #ff6b7d; --brand-soft: #3a1419;
    --shopee: #ff6b4a; --shopee-soft: #3a1d14; --tiktok: #f4efe9; --tiktok-soft: #2e2826;
    --good: #4cc77f; --good-soft: #14281c; --warn: #ffd403; --warn-soft: #2f2706;
    --bad: #ff5a6c; --bad-soft: #3a1419; --info: #7aa0f0; --info-soft: #18223a;
    --side: #0f0d0c; --side-2: #221e1c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.num, table td, .kpi-value { font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--brand-ink); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -.01em; }

/* ---------------------------------------------------------------- kerangka */
.shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.side {
  background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 20px 12px 14px; gap: 4px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 20px; }
.brand-mark { width: 34px; height: 44px; flex: none; }
.brand-name { color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .22em; text-transform: uppercase; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--yellow); font-weight: 500; margin-top: 3px; letter-spacing: .02em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.side-upload { justify-content: center; margin: 0 4px 6px; box-shadow: 2px 2px 0 var(--yellow); }
.nav-label { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #7d726c; padding: 14px 10px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--side-ink);
  text-decoration: none; font-weight: 500;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a.active { background: var(--yellow); color: var(--outline); font-weight: 700; }
.nav a.active svg { color: var(--outline); }
.nav .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.side-foot { margin-top: auto; padding: 12px 10px 2px; border-top: 1px solid #332d2a; font-size: 12px; }
.side-foot .who { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  border-bottom: 2px solid var(--outline); padding: 14px 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.topbar h1 { font-size: 24px; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.topbar .crumb { color: var(--muted); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.content { padding: 24px 28px 64px; display: flex; flex-direction: column; gap: 20px; max-width: 1440px; width: 100%; }
.menu-btn { display: none; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
}

/* ---------------------------------------------------------------- kontrol */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: var(--radius-sm);
  border: 2px solid var(--outline); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .08s, box-shadow .08s, background .12s; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-shade); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }

.seg { display: inline-flex; background: var(--surface); border: 2px solid var(--outline); border-radius: var(--radius-sm); padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button:hover { background: var(--surface-3); }
.seg button.on { background: var(--yellow); color: var(--outline); font-weight: 700; }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
input[type=text], input[type=search], input[type=date], input[type=number], input[type=month], select {
  height: 38px; border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 0 11px; min-width: 0;
}
input:focus, select:focus { outline: none; border-color: var(--outline); box-shadow: 0 0 0 3px var(--yellow); }
.search { position: relative; }
.search input { padding-left: 34px; width: 290px; max-width: 100%; }
.search svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--muted); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

/* ---------------------------------------------------------------- kartu & kpi */
.card { background: var(--surface); border: 2px solid var(--outline); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: 1.25; }
.card-sub { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-32 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 1100px) { .grid-2, .grid-3, .grid-32 { grid-template-columns: 1fr; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.kpi {
  background: var(--surface); border: 2px solid var(--outline); border-radius: var(--radius); padding: 14px 16px 15px;
  box-shadow: var(--shadow); position: relative; overflow: hidden; container-type: inline-size;
}
/* sisi kanan berwarna seperti blok bayangan pada logo */
.kpi::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 8px; background: var(--kpi-side, var(--surface-3)); }
.kpi-label { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.kpi-value { font-size: clamp(18px, 11cqi, 30px); font-weight: 800; letter-spacing: -.02em; margin-top: 4px; line-height: 1.15; white-space: nowrap; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 6px; padding-right: 8px; }
.kpi-sub b { color: var(--ink); font-weight: 700; }
/* kartu utama: pita hitam dengan judul oranye, seperti foto produk */
.kpi-hero { background: var(--black); color: #fff; --kpi-side: var(--yellow); }
.kpi-hero .kpi-label { color: var(--orange); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.kpi-hero .kpi-value { color: #fff; }
.kpi-hero .kpi-sub { color: #c9bfb8; }
.kpi-hero .kpi-sub b { color: var(--yellow); }
.kpi-good { --kpi-side: var(--emerald); }
.kpi-bad { --kpi-side: var(--red); }
.kpi-warn { --kpi-side: var(--yellow); }
.kpi-good .kpi-value { color: var(--good); }
.kpi-bad .kpi-value { color: var(--bad); }
.kpi-warn .kpi-value { color: var(--warn); }

/* ---------------------------------------------------------------- chip & badge */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 23px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-good { background: var(--good-soft); color: var(--good); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-neutral, .chip-muted { background: var(--surface-3); color: var(--muted); }
.pf { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.pf-shopee { background: var(--shopee); color: #fff; }
.pf-tiktok { background: var(--black); color: #fff; }

.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { border: 2px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; color: var(--ink-2); }
.fchip:hover { border-color: var(--outline); }
.fchip .n { color: var(--muted); font-weight: 600; }
.fchip.on { border-color: var(--outline); background: var(--yellow); color: var(--outline); font-weight: 700; }
.fchip.on .n { color: var(--outline); }
.fchip .dot { width: 8px; height: 8px; border-radius: 50%; }

/* ---------------------------------------------------------------- tabel */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11px; font-weight: 700; color: var(--ink-2); letter-spacing: .06em; text-transform: uppercase; padding: 9px 12px; border-bottom: 2px solid var(--outline); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #fff8d6; }
td.r, th.r { text-align: right; }
td .sub { color: var(--muted); font-size: 12px; }
tr.total td { font-weight: 800; border-top: 2px solid var(--outline); border-bottom: 0; }
tr.group td { font-weight: 700; background: var(--surface-3); text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }
tr.ind td:first-child { padding-left: 28px; color: var(--ink-2); }
.neg { color: var(--bad); }
.pos { color: var(--good); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
.ellipsis { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding-top: 14px; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- grafik */
.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 340px; }
.chart-box.short { height: 220px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; font-weight: 500; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* bilah komposisi */
.stack { display: flex; height: 18px; border-radius: 99px; overflow: hidden; background: var(--surface-3); border: 2px solid var(--outline); }
.stack > span { display: block; height: 100%; min-width: 3px; border-right: 2px solid var(--outline); }
.stack > span:last-child { border-right: 0; }
.stack-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 14px; }
.stack-legend .it { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 2px solid var(--line); border-radius: var(--radius-sm); }
.stack-legend a.it:hover, .stack-legend button.it:hover { border-color: var(--outline); }
.stack-legend .sw { width: 11px; height: 11px; border-radius: 3px; margin-top: 4px; flex: none; }
.stack-legend .t { font-size: 12px; color: var(--muted); }
.stack-legend .v { font-weight: 700; font-variant-numeric: tabular-nums; }

/* daftar batang horizontal */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) auto; gap: 12px; align-items: center; font-size: 13px; }
.bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bar-row .track { height: 10px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 99px; background: var(--red); }
.bar-row .val { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; min-width: 90px; }

/* produk terlaris */
table.best td { vertical-align: top; }
table.best .rank { color: var(--muted); font-weight: 700; width: 32px; }
table.best .sku { font-weight: 800; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
table.best .pname { font-weight: 600; max-width: 360px; }
table.best .ellipsis { max-width: 360px; }
.qtycell { min-width: 200px; }
.qtyline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pfsplit { display: inline-flex; gap: 8px; font-size: 12px; color: var(--ink-2); }
.qtybar { display: flex; height: 8px; margin-top: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.qtybar span { display: block; height: 100%; }
.seg button[disabled] { opacity: .35; cursor: not-allowed; }

/* ---------------------------------------------------------------- unggah */
.drop {
  display: block; border: 2px dashed var(--outline); border-radius: var(--radius); background: var(--surface-2);
  padding: 30px 24px; text-align: center; cursor: pointer; transition: background .12s;
}
.drop:hover, .drop.hover { background: #fff8d6; }
.drop > div[aria-hidden] {
  width: 50px; height: 50px; margin: 0 auto; border-radius: 12px; display: grid; place-items: center; font-size: 22px !important;
  background: var(--yellow); color: var(--outline); border: 2px solid var(--outline); box-shadow: var(--shadow-sm);
}
.drop h3 { font-size: 16px; font-weight: 800; text-transform: uppercase; margin: 12px 0 4px; }
.drop p { margin: 0; color: var(--muted); font-size: 13px; }
.drop .types { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.drop .types span { background: var(--surface); border: 1.5px solid var(--line); padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.queue { display: flex; flex-direction: column; gap: 8px; }
.queue.hide-done .qitem[data-state=done] { display: none; }
.qhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; }
.qhead[hidden] { display: none; }
.qhead-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.qitem { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 11px 13px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.qicon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 11px; background: var(--surface-3); color: var(--muted); }
.qicon.shopee { background: var(--shopee); color: #fff; }
.qicon.tiktok { background: var(--black); color: #fff; }
.qicon.seabank { background: var(--info); color: #fff; }
.qtitle { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qmeta { color: var(--muted); font-size: 12.5px; }
.qmeta .warn { color: var(--warn); }
.qmeta .err { color: var(--bad); }
.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 7px; }
.progress span { display: block; height: 100%; background: var(--red); transition: width .2s; }

/* kalender kelengkapan */
.cov { display: grid; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.cov-row { display: grid; grid-template-columns: 200px 1fr; gap: 12px; align-items: center; }
.cov-name { font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.cov-cells { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(14px, 1fr); gap: 3px; }
.cov-cell { height: 22px; border-radius: 4px; background: var(--surface-3); position: relative; }
.cov-cell.on { background: var(--emerald); }
.cov-cell.miss { background: var(--bad-soft); outline: 1.5px solid var(--red); outline-offset: -1.5px; }
.cov-cell.future { background: transparent; border: 1px dashed var(--line); }
.cov-cell.wk::after { content: ""; position: absolute; left: -2px; top: -4px; bottom: -4px; border-left: 1px solid var(--line); }
.cov-axis { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(14px, 1fr); gap: 3px; font-size: 10.5px; color: var(--muted); }
.cov-axis span { text-align: center; }
.gaps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.gap-card { border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.gap-card h4 { margin: 0 0 6px; font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.gap-card p { margin: 0; font-size: 12.5px; color: var(--muted); }
.gap-card .missing { color: var(--bad); font-weight: 600; }
.gap-card .ok { color: var(--good); font-weight: 600; }

/* ---------------------------------------------------------------- laci & modal */
.drawer-wrap { position: fixed; inset: 0; z-index: 80; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(29, 26, 25, .5); animation: fade .15s; }
.drawer { position: absolute; right: 0; top: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); border-left: 2px solid var(--outline); display: flex; flex-direction: column; animation: slide .2s ease-out; }
.drawer.wide { width: min(880px, 100%); }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--black); color: #fff; }
.drawer-head h2 { font-size: 17px; font-weight: 800; text-transform: uppercase; flex: 1; color: var(--orange); }
.drawer-head .icon-btn { color: #fff; }
.drawer-head .icon-btn:hover { background: var(--side-2); color: var(--yellow); }
.drawer-body { padding: 20px 20px 40px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.drawer-wrap.out .drawer { transform: translateX(100%); transition: transform .2s; }
.drawer-wrap.out .drawer-scrim { opacity: 0; transition: opacity .2s; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.modal-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(29, 26, 25, .55); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border: 2px solid var(--outline); border-radius: var(--radius); padding: 22px; width: min(460px, 100%); box-shadow: 5px 5px 0 var(--outline); }
.modal h3 { font-size: 18px; font-weight: 800; text-transform: uppercase; margin-bottom: 8px; }
.modal p { margin: 0 0 18px; color: var(--ink-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

.dl { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; font-size: 13.5px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; padding: 0 0 14px; position: relative; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; border-left: 2px solid var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dotx { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); margin-top: 3px; }
.timeline .done .dotx { background: var(--emerald); border-color: var(--outline); }
.timeline .bad .dotx { background: var(--red); border-color: var(--outline); }
.timeline .when { color: var(--muted); font-size: 12.5px; }

/* ---------------------------------------------------------------- umpan balik */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--black); color: #fff; padding: 12px 16px; border-radius: var(--radius-sm); border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--yellow); max-width: 380px; font-weight: 500; animation: slide .2s; }
.toast-good { box-shadow: 3px 3px 0 var(--emerald); }
.toast-bad { box-shadow: 3px 3px 0 var(--red); }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .3s; }
.skeleton-stack { display: flex; flex-direction: column; gap: 12px; }
.skeleton { height: 16px; border-radius: 6px; background: var(--surface-3); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-mark { width: 56px; height: 56px; margin: 0 auto; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--yellow); color: var(--outline); border: 2px solid var(--outline); box-shadow: var(--shadow-sm); font-weight: 800; }
.empty h3 { color: var(--ink); font-size: 17px; font-weight: 800; text-transform: uppercase; margin: 16px 0 4px; }
.empty p { margin: 0 auto 16px; max-width: 420px; }
.note { background: var(--surface-2); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.note.warn { background: var(--warn-soft); border-color: var(--yellow-shade); color: var(--ink); }
.note b { color: var(--ink); }
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alert { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 11px 13px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--surface); }
.alert .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; border: 2px solid var(--outline); }
.alert.bad .ic { background: var(--red); color: #fff; }
.alert.warn .ic { background: var(--yellow); color: var(--outline); }
.alert.info .ic { background: var(--black); color: var(--yellow); }
.alert .t { font-weight: 600; }
.alert .d { color: var(--muted); font-size: 12.5px; }
.badge-soft { background: var(--yellow); color: var(--outline); border-radius: 4px; padding: 0 5px; font-size: 11px; font-weight: 800; }

/* ---------------------------------------------------------------- formulir & laporan */
.sub { color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-grid input, .form-grid select { width: 100%; color: var(--ink); font-weight: 500; }
.linklike { border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.stack-legend .linklike { padding: 8px 10px; }
.linklike:hover .t:first-child { color: var(--ink); text-decoration: underline; }
table.pnl td:first-child { white-space: nowrap; }
tr.grand td { background: var(--black); color: #fff; font-weight: 800; border: 0; }
tr.grand td:first-child { color: var(--orange); text-transform: uppercase; letter-spacing: .03em; }
tr.grand td.neg { color: #ff8a96; }
.acc { display: flex; flex-direction: column; border: 2px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.acc details { border-bottom: 1px solid var(--line-2); }
.acc details:last-child { border-bottom: 0; }
.acc summary { display: flex; gap: 12px; align-items: center; padding: 11px 14px; cursor: pointer; font-size: 13.5px; list-style: none; font-weight: 500; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::before { content: "›"; color: var(--red); font-weight: 800; transition: transform .15s; display: inline-block; }
.acc details[open] summary::before { transform: rotate(90deg); }
.acc summary:hover { background: #fff8d6; }
.acc table { margin: 0 0 6px; }
.acc td { padding: 7px 14px; }
@media (max-width: 600px) {
  .card { padding: 16px 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-row .track { grid-column: 1 / -1; grid-row: 2; }
  .search input { width: 100%; }
  .topbar h1 { font-size: 20px; }
}

/* ---------------------------------------------------------------- arsip */
.h3 { font-size: 14px; font-weight: 800; text-transform: uppercase; margin: 0 0 10px; }
.file-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.file-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); }
.file-main { min-width: 0; }
.file-main .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-actions { display: flex; gap: 4px; align-items: center; }
.file-title { font-weight: 600; color: var(--ink); text-decoration: none; }
.file-title:hover { text-decoration: underline; }
.file-ext { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; background: var(--surface-3); color: var(--ink-2); flex: none; letter-spacing: .02em; border: 2px solid var(--outline); }
.file-ext.ext-pdf { background: var(--red); color: #fff; }
.file-ext.ext-png, .file-ext.ext-jpg, .file-ext.ext-jpeg, .file-ext.ext-webp { background: var(--yellow); color: var(--outline); }
.file-ext.ext-xlsx, .file-ext.ext-xls, .file-ext.ext-csv { background: var(--emerald); color: #fff; }
.file-ext.ext-doc, .file-ext.ext-docx { background: var(--info); color: #fff; }
.file-cell { display: flex; gap: 12px; align-items: center; min-width: 240px; }
.drop.drop-sm { padding: 16px; display: flex; flex-direction: column; gap: 2px; align-items: center; }
.stage-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); }
.stage-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.checklist { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; font-size: 13.5px; }
.check .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--outline); display: grid; place-items: center; flex: none; font-size: 13px; }
.check.on .box { background: var(--yellow); color: var(--outline); font-weight: 800; }
.check a.sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
details.more { border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--cream); }
.login-card { width: min(400px, 100%); background: var(--surface); border: 2px solid var(--outline); border-radius: 18px; padding: 30px 28px; box-shadow: 6px 6px 0 var(--outline); display: flex; flex-direction: column; gap: 10px; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.login-brand .brand-mark { width: 40px; height: 52px; }
.login-name { font-weight: 800; font-size: 16px; letter-spacing: .22em; text-transform: uppercase; }
.login-card h1 { font-size: 26px; font-weight: 800; text-transform: uppercase; }
.login-btn { min-height: 44px; margin: 12px 0 4px; }
.login-msg { margin: 0; font-size: 13px; color: var(--muted); min-height: 18px; }
.login-msg.bad { color: var(--bad); font-weight: 600; }
.login-foot { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.side-foot .who-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-out { margin: 8px 0 6px; background: transparent; border: 1.5px solid #4a423e; color: #e6ddd6; border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.side-out:hover { border-color: var(--yellow); color: var(--yellow); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- cetak laporan */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .side, .topbar, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card, .kpi { box-shadow: none; border: 1px solid #cfc7bd; break-inside: avoid; }
  .print-only { display: block !important; }
  .chart-box { height: 230px; }
  .table-wrap { overflow: visible; margin: 0; padding: 0; }
  th { position: static; }
}
.print-only { display: none; }
