/* LabaJelas — konsol keuangan & pesanan untuk seller marketplace (turunan konsol Teman Aki).
   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;
}
:root[data-theme="dark"] {
  --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;
}
/* mode gelap: sorotan kuning muda diganti versi gelap agar teks tetap terbaca */
:root[data-theme="dark"] tr.clickable:hover td, :root[data-theme="dark"] .acc summary:hover, :root[data-theme="dark"] .drop:hover, :root[data-theme="dark"] .drop.hover { background: #2f2706; }
:root[data-theme="dark"] .seg button.on, :root[data-theme="dark"] .fchip.on, :root[data-theme="dark"] .nav a.active { color: #1d1a19; }

* { 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: 38px; height: 38px; 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=time], 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; }

/* indikator unggah di semua halaman */
.upload-pill {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 70; display: grid; grid-template-columns: auto minmax(0, 260px);
  gap: 2px 12px; align-items: center; padding: 10px 16px; background: var(--black); color: #fff; border: 2px solid var(--outline);
  border-radius: 12px; box-shadow: 3px 3px 0 var(--yellow); text-decoration: none; font-size: 12.5px; max-width: calc(100vw - 32px);
}
.upload-pill[hidden] { display: none; }
.upload-pill b { color: var(--yellow); white-space: nowrap; }
.upload-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e6ddd6; }
.upload-pill i { grid-column: 1 / -1; display: block; height: 4px; background: #3a3330; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.upload-pill i span { display: block; height: 100%; background: var(--yellow); }

/* 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: 210px 1fr; gap: 12px; align-items: center; }
.cov-name { overflow: hidden; text-overflow: ellipsis; }
.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(var(--cw, 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(var(--cw, 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; } }
@keyframes drop { from { transform: translateY(-100%); } }
.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.good .ic { background: var(--emerald); color: #fff; }
.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: 46px; height: 46px; }
.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, .upload-pill { 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; }

/* ---------------------------------------------------------------- laporan cetak (format RUPS) */
.report { background: #fff; color: #1d1a19; border: 2px solid var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 48px; max-width: 980px; width: 100%; margin: 0 auto; font-size: 13px; }
.report .sub { color: #7a706a; }
.rp-cover { border-bottom: 3px solid #1d1a19; padding-bottom: 18px; margin-bottom: 18px; }
.rp-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.rp-brand .brand-mark { width: 34px; height: 34px; color: #1d1a19; }
.rp-company { font-weight: 800; font-size: 15px; }
.rp-cover h1 { font-size: 30px; font-weight: 800; text-transform: uppercase; line-height: 1.05; }
.rp-period { font-size: 17px; font-weight: 600; margin: 4px 0 16px; color: #c40e20; }
.rp-meta { display: grid; grid-template-columns: 170px 1fr; gap: 4px 16px; margin: 0; font-size: 12.5px; }
.rp-meta dt { color: #7a706a; }
.rp-meta dd { margin: 0; font-weight: 600; }
.rp-hero { display: grid; grid-template-columns: 1.2fr 2fr; gap: 20px; background: #1d1a19; color: #fff; border-radius: 10px; padding: 20px 22px; margin: 18px 0 12px; }
.rp-hero .rp-k { color: #f6a04d; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.rp-hero .rp-big { font-size: 28px; font-weight: 800; margin: 4px 0; }
.rp-hero .rp-k2 { color: #d9cfc8; font-size: 12px; }
.rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; border-left: 1px solid #3a3330; padding-left: 18px; }
.rp-kpis .rp-v { font-size: 20px; font-weight: 800; color: #ffd403; }
.rp-kpis .sub { color: #b8ada6; font-size: 11px; }
.rp-sec { margin-top: 26px; break-inside: auto; }
.rp-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; text-transform: uppercase; border-bottom: 2px solid #1d1a19; padding-bottom: 6px; margin-bottom: 10px; }
.rp-no { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; background: #ffd403; border: 2px solid #1d1a19; border-radius: 5px; font-size: 13px; }
.rp-sec h3 { font-size: 13px; font-weight: 700; margin: 14px 0 6px; }
.rp-lead, .rp-foot { color: #5a4f4b; font-size: 12.5px; margin: 0 0 10px; }
.rp-foot { margin-top: 8px; font-size: 11.5px; }
.rp-note { font-size: 12.5px; line-height: 1.6; margin: 8px 0; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 6px; }
.rp-table th { position: static; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #5a4f4b; border-bottom: 1.5px solid #1d1a19; padding: 6px 8px; background: none; }
.rp-table td { padding: 5px 8px; border-bottom: 1px solid #ece6df; }
.rp-table tr.rp-sub td { font-weight: 700; background: #faf7f2; }
.rp-table tr.rp-total td { font-weight: 800; border-top: 1.5px solid #1d1a19; border-bottom: 0; }
.rp-table tr.rp-grand td { font-weight: 800; background: #1d1a19; color: #fff; }
.rp-table tr.rp-grand td:first-child { color: #ffd403; }
.rp-table.rp-narrow { max-width: 520px; margin-top: 12px; }
.rp-ind { padding-left: 16px; display: inline-block; color: #3a3330; }
.rp-chart { height: 200px; margin-top: 12px; }
.rp-flowcap { font-size: 11.5px; color: #7a706a; margin: 14px 0 6px; }
.rp-flow { display: flex; height: 26px; border: 2px solid #1d1a19; border-radius: 6px; overflow: hidden; }
.rp-flow span { display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; border-right: 2px solid #1d1a19; }
.rp-flow span:last-child { border-right: 0; }
.rp-flowleg { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; margin-top: 6px; }
.rp-flowleg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.rp-block { break-inside: avoid; }
.rp-docs { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.8; }
.rp-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 34px 0 16px; text-align: center; }
.rp-line { border-bottom: 1px solid #1d1a19; height: 56px; margin: 6px 0; }
@media (max-width: 760px) { .report { padding: 22px 16px; } .rp-hero { grid-template-columns: 1fr; } .rp-kpis { grid-template-columns: repeat(2, 1fr); border-left: 0; padding-left: 0; } .rp-meta { grid-template-columns: 1fr; } }
@media print {
  .report { border: 0; box-shadow: none; padding: 0; max-width: none; font-size: 10pt; }
  .rp-hero, .rp-table tr.rp-grand td, .rp-no, .rp-flow span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp-sec h2 { break-after: avoid; }
  .rp-table tr { break-inside: avoid; }
}

/* isian HPP yang belum diisi */
input.need { border-color: var(--yellow-shade); background: var(--warn-soft); }

/* kalender kelengkapan untuk periode panjang */
.cov-long .cov-cells, .cov-long .cov-axis { gap: 1px; }
.cov-long .cov-cell { border-radius: 1px; }
.cov-long .cov-axis span { text-align: left; white-space: nowrap; overflow: visible; }
.gap-more summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.gap-more p { margin-top: 6px !important; }
.cov-long .cov-axis { overflow: hidden; }

/* tombol ganti tema di sidebar */
.theme-btn { margin: 0 0 8px; display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1.5px solid #4a423e; color: #e6ddd6; border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.theme-btn:hover { border-color: var(--yellow); color: var(--yellow); }
.side-foot .foot-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.side-foot .foot-btns .side-out { margin: 0; }

/* pilihan periode di topbar: tahun & tanggal bebas yang aktif ditandai kuning */
.topbar select.on, .toolbar select.on, .range-in input.on { border-color: var(--outline); background: var(--yellow); color: var(--outline); font-weight: 700; }
.range-in { gap: 6px; }
.range-in input { width: 140px; }

/* panduan ambil data */
.routine { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.routine-item { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.routine-item p { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; }
.guide .card-head h2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.guide-use { margin: 0 0 10px; font-size: 13.5px; }
.guide-steps { margin: 0 0 10px; padding-left: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 8px; }
.guide-steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 13.5px; }
.guide-steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--yellow); color: var(--outline); border: 2px solid var(--outline); font-weight: 800; font-size: 12px; }
.guide-file { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; overflow-wrap: anywhere; }
.guide-tips { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }

/* peta panas jam & hari ramai */
.heat { display: flex; flex-direction: column; gap: 3px; overflow-x: auto; }
.heat-row { display: grid; grid-template-columns: 38px repeat(24, minmax(12px, 1fr)); gap: 3px; align-items: center; }
.heat-head span { font-size: 10px; color: var(--muted); }
.heat-day { font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.heat-cell { height: 20px; border-radius: 3px; background: var(--red); }
.nowrap { white-space: nowrap; }
.warn-text { color: var(--warn); font-weight: 500; }
.qactions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pending-pf { border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.pending-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.steps { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps li.ok { color: var(--muted); }
.steps li.ok::marker { content: '✓  '; color: var(--good); font-weight: 700; }
.hint { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.balance-hero { border-color: var(--outline); }
.balance-value { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.form-grid .span-2 { grid-column: 1 / -1; }
/* pencarian besar arsip */
.bigsearch { display: flex; align-items: center; gap: 10px; border: 2px solid var(--outline); border-radius: var(--radius); background: var(--surface); padding: 0 14px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.bigsearch:focus-within { outline: 3px solid var(--yellow); outline-offset: 2px; }
.bigsearch-ic { font-size: 22px; color: var(--muted); line-height: 1; }
.bigsearch .bigsearch-input { flex: 1; height: 52px; border: 0; background: transparent; font-size: 16px; padding: 0; outline: none; }
.bigsearch-count { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 640px) { .bigsearch-count { display: none; } }
/* pajak: ringkasan aturan yang berlaku & tab */
.regime-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.regime-who { font-weight: 700; font-size: 15px; margin-top: 2px; }
.regime-notes { margin: 12px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.regime-notes:empty { display: none; }
.tabs-seg { align-self: flex-start; }
tr.muted-row td { color: var(--muted); }

/* ---------------------------------------------------------------- tampilan HP */
.minibar { display: none; }
@media (max-width: 960px) {
  /* menu samping terbuka: latar digelapkan, ketuk di luar untuk menutup */
  .side.open ~ .main::before { content: ""; position: fixed; inset: 0; z-index: 45; background: rgba(29, 26, 25, .5); animation: fade .15s; }
}
@media (max-width: 600px) {
  .content { padding: 14px 12px 72px; gap: 14px; }
  /* header tidak ikut melekat agar layar tidak habis; kontrol periode dalam satu baris yang bisa digeser */
  .topbar { position: static; padding: 10px 12px; gap: 6px 10px; }
  .minibar:not([hidden]) {
    display: flex; align-items: center; gap: 6px; position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 48px; padding: 0 6px;
    background: var(--bg); border-bottom: 2px solid var(--outline); animation: drop .15s ease-out;
  }
  .minibar .icon-btn { color: var(--ink); width: 40px; height: 40px; }
  .minibar .icon-btn svg { width: 20px; height: 20px; }
  .minibar-title { flex: 1; min-width: 0; font-weight: 800; font-size: 15px; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar > div:nth-child(2) { flex: 1; min-width: 0; }
  .topbar h1 { font-size: 19px; }
  .topbar .crumb { font-size: 11.5px; line-height: 1.35; }
  .topbar .spacer { display: none; }
  .topbar .toolbar { width: 100%; gap: 8px; }
  .toolbar > * { max-width: 100%; }
  .toolbar > .search { flex: 1 1 100%; }
  .toolbar > select { flex: 1 1 140px; }
  td .toolbar { flex-wrap: nowrap; }
  td .toolbar > select { flex: none; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { white-space: nowrap; flex: none; padding: 5px 10px; }
  .range-in { display: flex; flex-wrap: nowrap; width: 100%; }
  .range-in input { width: auto; flex: 1; min-width: 0; }
  .btn { height: 36px; padding: 0 12px; }

  /* kartu & KPI lebih rapat, dua kolom; kartu utama selebar layar */
  .card { padding: 14px 12px; box-shadow: var(--shadow-sm); }
  .table-wrap { margin: 0 -12px; padding: 0 12px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 11px 14px 12px 11px; box-shadow: var(--shadow-sm); }
  .kpi::after { width: 6px; }
  /* kartu terakhir yang tersisa sendirian ikut selebar layar (hitungan bergeser bila ada kartu utama di depan) */
  .kpi-hero, .kpis > .kpi:last-child:nth-child(odd):not(.kpi-hero ~ .kpi), .kpis > .kpi-hero:first-child ~ .kpi:last-child:nth-child(even) { grid-column: 1 / -1; }
  .kpi-label { font-size: 11px; line-height: 1.3; }
  .kpi-value { font-size: clamp(14px, 11.5cqi, 26px); }
  .kpi-sub { font-size: 11px; margin-top: 4px; padding-right: 4px; line-height: 1.4; }
  .grid { gap: 14px; }

  /* judul kartu tidak lagi terjepit tombol: tombol turun ke baris berikutnya */
  .card-head { flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
  .card-head > :first-child { flex: 1 1 100%; min-width: 0; }
  .card-head h2 { font-size: 14.5px; }
  .card-head .actions { margin-left: 0; flex-wrap: wrap; max-width: 100%; }

  /* peringatan: tombol pindah ke bawah teks */
  .alert { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 10px 11px; align-items: start; }
  .alert .ic { width: 30px; height: 30px; }
  .alert > :nth-child(n+3) { grid-column: 2; justify-self: start; }

  /* tabel lebih rapat */
  table { font-size: 12.5px; }
  th { padding: 8px 9px; font-size: 10.5px; }
  td { padding: 9px 9px; }
  .table-wrap td:first-child { min-width: 104px; }
  td > input[type=month], td > input[type=number] { width: 100%; min-width: 100px; }
  .ellipsis, table.best .pname, table.best .ellipsis { max-width: 200px; }
  .file-cell { min-width: 200px; }
  .qtycell { min-width: 160px; }

  /* kalender kelengkapan: nama dokumen lebih sempit */
  .cov-row { grid-template-columns: 118px minmax(0, 1fr); gap: 8px; }
  .cov-name { font-size: 12px; gap: 5px; }

  /* daftar file & antrean unggah: tombol turun ke bawah */
  .qitem, .file-item, .stage-item { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .qicon, .file-ext { width: 36px; height: 36px; }
  .qitem > :nth-child(n+3), .file-item > :nth-child(n+3), .stage-item > :nth-child(n+3) { grid-column: 2; justify-self: start; }
  .qactions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .file-actions { flex-wrap: wrap; }

  .drop { padding: 20px 14px; }
  .chart-box { height: 230px; }
  .chart-box.tall { height: 270px; }
  .drawer-head { padding: 12px 14px; }
  .drawer-body { padding: 16px 12px 40px; }
  .modal { padding: 18px 16px; }
  .modal-actions { flex-wrap: wrap; }
  .toasts { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
  .bigsearch .bigsearch-input { height: 46px; }
  .balance-value { font-size: 30px; }
  .regime-row { grid-template-columns: 1fr; gap: 10px; }
  .gaps, .routine { grid-template-columns: 1fr; }
  .stack-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .stack-legend .it, .stack-legend .linklike { padding: 7px 8px; gap: 7px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  input[type=file] { max-width: 100%; font-size: 12.5px; }
}
@media screen and (max-width: 900px) {
  /* tabel laporan RUPS digeser ke samping di HP, tidak memotong halaman */
  .report .rp-table { display: block; overflow-x: auto; }
  .report .rp-table td, .report .rp-table th { white-space: nowrap; }
  .report .rp-sign { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------------------------------------------------------------- LabaJelas: masuk & pemilih toko */
.brand-mark { color: #fff; }
.login .brand-mark { color: var(--black); }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form input { width: 100%; }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 4px 0; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.store-switch { margin-top: 4px; height: 30px; padding: 0 8px; background: var(--side-2); color: #fff; border: 1px solid #4a423e; border-radius: 8px; font-size: 12px; max-width: 170px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- LabaJelas: pengumuman, tim, langganan */
.notices { display: grid; gap: 8px; padding: 18px 28px 0; max-width: 1440px; width: 100%; }
input[type=email] { height: 38px; border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 0 11px; min-width: 0; }
.notices:empty { display: none; }
.notice { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 2px solid var(--outline); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); background: var(--surface); font-size: 13px; font-weight: 500; animation: notice-in .35s cubic-bezier(.2, .8, .2, 1) both; }
.notice > span { flex: 1; min-width: 0; }
.notice-info { background: var(--info-soft); }
.notice-warn { background: var(--warn-soft); }
.notice-bad { background: var(--bad-soft); }
.notice-x { border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
@keyframes notice-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .notice { animation: none; } }

.invite { margin-top: 14px; display: grid; gap: 10px; }
.invite-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 14px; }
.invite-form .field { flex: 1 1 200px; margin: 0; }
.invite-form > .btn { flex: 0 0 auto; }
.invite-link p { margin: 0 0 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 7px 10px; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); }

.mini-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 4px 0 10px; }
.usage-bars { display: grid; gap: 8px; }
.usage-row { display: grid; grid-template-columns: 120px 1fr 80px; align-items: center; gap: 10px; font-size: 13px; }
.usage-month { color: var(--ink-2); }
.usage-num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.usage-track { position: relative; height: 14px; background: var(--surface-3); border-radius: 7px; overflow: visible; }
.usage-fill { position: absolute; inset: 0 auto 0 0; background: var(--yellow); border: 1.5px solid var(--outline); border-radius: 7px; transform-origin: left; animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; }
.usage-fill.over { background: var(--red); }
.usage-quota { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--outline); border-radius: 1px; }
@keyframes grow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .usage-fill { animation: none; } }

.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 6px; }
.plan { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.plan:hover { transform: translate(-2px, -2px); border-color: var(--outline); box-shadow: var(--shadow); }
.plan-pick { border-color: var(--outline); box-shadow: var(--shadow); background: var(--warn-soft); }
.plan-current { border-color: var(--good); }
.plan-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-weight: 800; font-size: 16px; }
.plan-price { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.plan-price span { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.plan-feat { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); flex: 1; }
.plan-feat li::before { content: "✓ "; color: var(--good); font-weight: 800; }
.plan-grid + .promo-row, .card-head .seg button { white-space: nowrap; }
.promo-row { margin-top: 14px; max-width: 260px; }
.promo-row input { width: 100%; padding: 8px 10px; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); }
.pay-card { border-color: var(--outline); background: var(--warn-soft); }
.pay-amount { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 10px; }
@media (max-width: 960px) { .notices { padding: 12px 16px 0; } }
@media (max-width: 1100px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .plan-grid { grid-template-columns: 1fr; }
  .usage-row { grid-template-columns: 92px 1fr 64px; }
}

/* ---------------------------------------------------------------- pendaftaran seller */
.login-card.onboard { width: min(560px, 100%); }
.onboard-group { display: grid; gap: 12px; padding: 14px 0 4px; border-top: 2px solid var(--line-2); }
.onboard-group h2 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.onboard-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { font-size: 12px; font-weight: 500; color: var(--muted); }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check-line input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--black); flex: 0 0 auto; }
input[type=tel] { height: 38px; border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 0 11px; min-width: 0; }
.login-card.onboard input, .login-card.onboard select { width: 100%; }
@media (max-width: 520px) { .onboard-2 { grid-template-columns: 1fr; } }
.seg.seg-wrap { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; margin: 4px 0 14px; }
