/* Jahitku Dashboard — gaya tampilan, mengikuti Brand Guidelines Jahitku 2026.
   Warna & fungsinya: Royal Purple #6D37B8 (kreativitas → warna utama, capaian ≥ 100%),
   Tangerine #F46F35 (energi positif → penanda aksi & "jalur hari ini"), Lime Green #B5EA72
   (pertumbuhan) dan Lavender #9A86E8 (kebersamaan) → aksen lembut & elemen grafis, Charcoal
   #2F2F33 (kualitas) → teks, White → ruang. Font: Lato (headline tebal, isi Regular).
   Warna data sudah divalidasi (kontras & buta warna) untuk mode terang dan gelap:
   seri 1 #6D37B8 / #8E74E6, seri 2 #E8612A, garis pembanding #8E8A99 / #7E7A89. */

:root {
  color-scheme: light;
  --plane: #F7F5FC;
  --surface: #FFFFFF;
  --surface-2: #F3F0FA;
  --surface-3: #E9E4F6;
  --ink: #2F2F33;
  --ink-2: #4A4752;
  --muted: #6B6776;
  --rule: rgba(47, 47, 51, .12);
  --rule-strong: rgba(47, 47, 51, .22);
  --grid: #ECE9F1;
  --axis: #D5D1DC;
  --track: #ECE8F4;
  --brand: #6D37B8;
  --brand-hover: #5E2DA3;
  --brand-ink: #FFFFFF;
  --brand-text: #6D37B8;
  --brand-soft: #EFE9FA;
  --logo: #6D37B8;
  --accent: #F46F35;
  --accent-soft: #FDEADF;
  --lime: #B5EA72;
  --lime-soft: #EFF9E3;
  --lavender: #9A86E8;
  --lavender-2: #C7BCF3;
  --lavender-soft: #F1EEFC;
  --hero-bg: #F6F2FE;
  --hero-rule: rgba(109, 55, 184, .16);
  --maskot-garis: #2F2F33;
  --s1: #6D37B8;
  --s2: #E8612A;
  --s-muted: #8E8A99;
  --o1: #AE95E6; --o2: #9474DC; --o3: #7B55CC; --o4: #6D37B8; --o5: #4F2388;
  --good: #0ca30c; --warn: #fab219; --crit: #d03b3b;
  --good-soft: rgba(12, 163, 12, .12);
  --warn-soft: rgba(250, 178, 25, .20);
  --crit-soft: rgba(208, 59, 59, .12);
  --good-text: #0a7a0a;
  --shadow-sm: 0 1px 2px rgba(47, 31, 80, .06), 0 1px 1px rgba(47, 31, 80, .04);
  --shadow: 0 10px 30px rgba(47, 31, 80, .16);
  --radius: 14px;
  --font: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Gelap: permukaan berbasis Charcoal brand, logo putih (seperti logo di latar ungu/lavender pada guideline). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --plane: #19181C; --surface: #232227; --surface-2: #2C2B31; --surface-3: #37353D;
    --ink: #F4F2F8; --ink-2: #D8D4E0; --muted: #A9A4B4;
    --rule: rgba(255, 255, 255, .11); --rule-strong: rgba(255, 255, 255, .2);
    --grid: #302F36; --axis: #43414A; --track: #36343C;
    --brand-text: #B8A8F0; --brand-soft: #2F2842; --logo: #FFFFFF;
    --accent-soft: #3B261C; --lime-soft: #26311C; --lavender-soft: #2A2640; --lavender-2: #5C4E96;
    --hero-bg: #29263A; --hero-rule: rgba(154, 134, 232, .24); --maskot-garis: #D8D4E0;
    --s1: #8E74E6; --s2: #E8612A; --s-muted: #7E7A89;
    --o1: #6645AE; --o2: #7B5AC8; --o3: #9373DC; --o4: #AD92EA; --o5: #C8B6F4;
    --good-soft: rgba(12, 163, 12, .22); --warn-soft: rgba(250, 178, 25, .2); --crit-soft: rgba(208, 59, 59, .24);
    --good-text: #3fce3f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 12px 34px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --plane: #19181C; --surface: #232227; --surface-2: #2C2B31; --surface-3: #37353D;
  --ink: #F4F2F8; --ink-2: #D8D4E0; --muted: #A9A4B4;
  --rule: rgba(255, 255, 255, .11); --rule-strong: rgba(255, 255, 255, .2);
  --grid: #302F36; --axis: #43414A; --track: #36343C;
  --brand-text: #B8A8F0; --brand-soft: #2F2842; --logo: #FFFFFF;
  --accent-soft: #3B261C; --lime-soft: #26311C; --lavender-soft: #2A2640; --lavender-2: #5C4E96;
  --hero-bg: #29263A; --hero-rule: rgba(154, 134, 232, .24); --maskot-garis: #D8D4E0;
  --s1: #8E74E6; --s2: #E8612A; --s-muted: #7E7A89;
  --o1: #6645AE; --o2: #7B5AC8; --o3: #9373DC; --o4: #AD92EA; --o5: #C8B6F4;
  --good-soft: rgba(12, 163, 12, .22); --warn-soft: rgba(250, 178, 25, .2); --crit-soft: rgba(208, 59, 59, .24);
  --good-text: #3fce3f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 12px 34px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--plane);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-text); }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- merek: logo & maskot dari Brand Guidelines (SVG di brand.js) ---------- */
.brand-logo { display: block; height: 26px; color: var(--logo); flex: none; }
.brand-logo svg { display: block; height: 100%; width: auto; }
.brand-sub { font-size: 13px; font-weight: 700; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--rule-strong); line-height: 1.2; }
.maskot { display: block; }
.maskot svg { display: block; width: 100%; height: auto; }
.mk-garis { fill: var(--maskot-garis); }
@keyframes goyang { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }

/* ---------- memuat & masuk ---------- */
.boot {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px;
  background: var(--plane); color: var(--muted); z-index: 100;
}
.boot-maskot { width: 120px; animation: goyang 1.4s ease-in-out infinite; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--rule); border-radius: 22px;
  padding: 30px 28px 28px; text-align: center; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; overflow: hidden;
}
.login-maskot { width: 150px; }
.login-logo { display: block; height: 38px; color: var(--logo); margin-top: 4px; }
.login-logo svg { display: block; height: 100%; width: auto; }
.login-card h1 { font-size: 15px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.login-sub { margin: 0 0 14px; color: var(--muted); }
.gsi-slot { min-height: 44px; display: flex; justify-content: center; }
.login-msg { min-height: 20px; margin: 4px 0 0; color: var(--crit); font-size: 13px; }
.login-foot { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- kepala halaman ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar-in {
  max-width: 1360px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.nav { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 999px; overflow-x: auto; }
.nav a {
  text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 13.5px;
  padding: 7px 15px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
@media (max-width: 720px) { .nav-long { display: none; } }
/* Layar sedang: logo & tombol akun di baris atas, menu satu baris penuh di bawahnya (kepala tetap tipis). */
@media (max-width: 1180px) { .nav { order: 3; width: 100%; } }
@media (max-height: 560px) { .topbar { position: static; } }
.theme-btn .ico { width: 17px; height: 17px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.demo-bar {
  background: var(--accent-soft); color: var(--ink); font-size: 13px;
  padding: 7px 20px; display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; justify-content: center;
  border-bottom: 1px solid var(--rule);
}
.demo-bar select { padding: 3px 8px; border-radius: 8px; border: 1px solid var(--rule-strong); background: var(--surface); }

.user-chip {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--rule); background: var(--surface);
  border-radius: 999px; padding: 3px 12px 3px 3px; cursor: pointer; font-weight: 700; font-size: 13px;
}
.menu {
  position: fixed; right: 16px; top: 58px; background: var(--surface); border: 1px solid var(--rule);
  border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 220px; z-index: 40;
}
.menu button, .menu .menu-row {
  display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: none; text-align: left;
  padding: 9px 11px; border-radius: 8px; cursor: pointer; font-size: 13.5px;
}
.menu button:hover { background: var(--surface-2); }
.menu .menu-row { cursor: default; color: var(--muted); font-size: 12.5px; }
.menu hr { border: 0; border-top: 1px solid var(--rule); margin: 5px 0; }

.avatar {
  width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--brand-soft); color: var(--brand-text); font-size: 10.5px; font-weight: 900; letter-spacing: .02em;
}
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }

/* ---------- isi ---------- */
.main { max-width: 1360px; margin: 0 auto; padding: 18px 20px 60px; outline: none; }
.page-head { display: flex; align-items: flex-end; gap: 10px 16px; flex-wrap: wrap; margin: 4px 0 14px; }
.page-head h2 { font-size: 22px; font-weight: 900; letter-spacing: -.01em; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.spacer { flex: 1; }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.field-inline { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.search {
  display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: 10px; padding: 0 10px; min-width: 220px;
}
.search input[type="text"] { border: 0; background: transparent; padding: 8px 0; outline: none; width: 100%; border-radius: 0; }
.search:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
/* Isian uang: "Rp" di depan, titik ribuan otomatis. */
.rp-wrap { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 10px; min-width: 0; }
.rp-wrap:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.rp-pre { padding-left: 10px; font-weight: 700; color: var(--muted); flex: none; }
.rp-wrap input[type="text"] { border: 0; outline: none; background: transparent; flex: 1; min-width: 0; padding: 8px 10px 8px 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.table-wrap table .rp-wrap input[type="text"] { min-width: 0; padding: 6px 8px 6px 5px; }
select, input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="date"], input[type="time"], input[type="month"], input[type="url"], textarea {
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 10px; padding: 8px 10px; min-width: 0;
}
textarea { resize: vertical; min-height: 70px; }
input:disabled, select:disabled, textarea:disabled { opacity: .6; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2);
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
  border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--crit); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg, .ico { width: 16px; height: 16px; flex: none; }

/* ---------- papan pipeline ---------- */
.pipe-summary { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: -4px 0 12px; }
.pipe-summary b { color: var(--ink); }
.board {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start;
  scroll-snap-type: x proximity; min-height: 60vh;
}
.col {
  flex: 0 0 286px; background: var(--surface-2); border-radius: var(--radius); display: flex; flex-direction: column;
  max-height: calc(100vh - 210px); scroll-snap-align: start; border: 1px solid transparent;
}
.col.over { border-color: var(--brand); background: var(--brand-soft); }
.col-head { padding: 11px 12px 9px; border-bottom: 1px solid var(--rule); position: relative; }
.col-head::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--o2); }
.col.won .col-head::before, .col.aktif .col-head::before { background: var(--good); }
.col.lost .col-head::before { background: var(--crit); }
.col-title { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 13.5px; }
.count { background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.col-sum { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 90px; }
.col-empty { border: 1.5px dashed var(--rule-strong); border-radius: 10px; padding: 18px 10px; text-align: center; color: var(--muted); font-size: 12.5px; }
.col.lost .col-empty { border-color: rgba(208, 59, 59, .45); background: var(--crit-soft); color: var(--ink-2); padding: 26px 10px; }
.col-more { font-size: 11.5px; color: var(--muted); text-align: center; padding: 4px 6px 2px; line-height: 1.4; }

.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 11px;
  box-shadow: var(--shadow-sm); cursor: pointer; display: flex; flex-direction: column; gap: 5px; text-align: left;
  transition: transform .12s, box-shadow .12s;
}
.card:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(47, 31, 80, .12); }
.card.dragging { opacity: .45; }
.card[draggable="true"] { cursor: grab; }
.card-top { display: flex; align-items: flex-start; gap: 8px; }
.card-name { font-weight: 700; font-size: 13.5px; line-height: 1.3; flex: 1; overflow-wrap: anywhere; }
.card-prod { font-size: 12.5px; color: var(--muted); }
.card-row { display: flex; align-items: center; gap: 8px; }
.card-val { font-weight: 900; font-size: 14px; }
.card-meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 4px 10px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 700;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.hot { background: var(--accent-soft); } .chip.hot .dot { background: var(--accent); }
.chip.warm { background: var(--brand-soft); } .chip.warm .dot { background: var(--s1); }
.chip.cold { background: var(--surface-3); } .chip.cold .dot { background: var(--s-muted); }
.stale { color: var(--ink); display: inline-flex; align-items: center; gap: 3px; }
.stale::before {
  content: "!"; width: 13px; height: 13px; border-radius: 50%; background: var(--warn); color: #2F2F33;
  font-size: 9.5px; font-weight: 900; display: inline-grid; place-items: center;
}

/* ---------- status pencapaian (ikon + label, tidak hanya warna) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px 2px 5px;
  font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--ink);
}
.pill i {
  width: 15px; height: 15px; border-radius: 50%; display: inline-grid; place-items: center;
  font-style: normal; font-size: 10px; font-weight: 900; color: #fff;
}
.pill.good { background: var(--good-soft); } .pill.good i { background: var(--good); }
.pill.warn { background: var(--warn-soft); } .pill.warn i { background: var(--warn); color: #2F2F33; }
.pill.crit { background: var(--crit-soft); } .pill.crit i { background: var(--crit); }
.pill.none { background: var(--surface-2); color: var(--muted); padding-left: 9px; }
.pill.done { background: var(--brand-soft); } .pill.done i { background: var(--s1); }

/* ---------- tabel ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 12px; text-align: left; vertical-align: middle; }
th { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr { border-top: 1px solid var(--grid); }
tbody tr:first-child { border-top: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--surface-2); }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.cell-main { font-weight: 700; }
.cell-sub { font-size: 12px; color: var(--muted); }
.table-wrap table input, .table-wrap table select { width: 100%; padding: 6px 8px; border-radius: 8px; }
.table-wrap table select { min-width: 96px; }
.table-wrap table input[type="text"], .table-wrap table input[type="email"] { min-width: 130px; }

/* ---------- customer: filter, status, ringkasan beli ---------- */
.cust-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; margin: -6px 0 10px; }
.cust-filters select { width: 100%; }
.cust-filters select.on { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.cust-count { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; margin-bottom: 10px; min-height: 28px; }
.who { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.status-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.table-wrap.flat { border: 0; border-radius: 0; background: transparent; }
.table-wrap.flat th, .table-wrap.flat td { padding: 7px 8px; }
tr.total td { font-weight: 900; border-top: 1px solid var(--rule-strong); }

/* ---------- panel samping ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 14, 32, .42); z-index: 50; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface);
  z-index: 51; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slidein .16s ease-out;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
@keyframes slidein { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 16px 18px 10px; display: flex; gap: 10px; align-items: flex-start; border-bottom: 1px solid var(--rule); }
.drawer-head h3 { font-size: 18px; font-weight: 900; }
.drawer-head .sub { color: var(--muted); font-size: 13px; }
.drawer-body { overflow-y: auto; padding: 14px 18px 40px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.drawer-body > * { flex-shrink: 0; }
.icon-btn { border: 1px solid var(--rule); background: var(--surface); border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-2); }

.stages { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.stage-step {
  flex: 1 1 auto; min-width: 58px; border: 0; background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 700;
  padding: 8px 6px 8px 14px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%);
}
.stage-step:first-child { clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.stage-step.done { background: var(--brand-soft); color: var(--brand-text); }
.stage-step.current { background: var(--brand); color: var(--brand-ink); }
.stage-step.won.current, .stage-step.aktif.current { background: var(--good); color: #fff; }
.stage-step.lost.current { background: var(--s-muted); color: #fff; }
.stage-step:disabled { cursor: default; }

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.kv div { min-width: 0; }
.kv dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kv dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.box { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; }
.box h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); }
.tabs button { border: 0; background: none; padding: 8px 10px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.timeline .tl-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.timeline .tl-head { font-size: 12px; color: var(--muted); }
.timeline .tl-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- dialog ---------- */
.modal {
  border: 0; border-radius: 16px; padding: 0; width: min(620px, calc(100% - 24px)); max-height: calc(100vh - 32px);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(20, 14, 32, .45); }
.modal-head { padding: 18px 20px 4px; }
.modal-head h3 { font-size: 18px; font-weight: 900; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.form { padding: 12px 20px 4px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.form h5 { grid-column: 1 / -1; margin: 6px 0 -4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.fld small { color: var(--muted); font-size: 12px; }
.fld .req { color: var(--crit); }
.sub-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.sub-form:empty { display: none; }
.seg.seg-lg button { padding: 9px 16px; font-size: 13.5px; }
.picker input { width: 100%; }
.picker-list {
  list-style: none; margin: 6px 0 0; padding: 4px; max-height: 250px; overflow-y: auto;
  border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.picker-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.picker-list li[aria-selected="true"], .picker-list li:hover { background: var(--surface-2); }
.picker-list li.baru { color: var(--brand-text); font-weight: 700; }
.picker-list li.kosong { cursor: default; color: var(--muted); }
.picker-list li.kosong:hover { background: none; }
.picked { display: flex; align-items: center; gap: 10px; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.notice { grid-column: 1 / -1; border-radius: 10px; padding: 9px 12px; font-size: 13px; background: var(--surface-2); }
.notice .btn { margin-left: 4px; }
.notice.info { background: var(--brand-soft); }
.notice.warn { background: var(--warn-soft); }
.notice.err { background: var(--crit-soft); }
.modal-foot { padding: 14px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.modal-err { color: var(--crit); font-size: 13px; margin-right: auto; }

/* ---------- toast ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 80; width: min(460px, calc(100% - 24px)); }
.toast { background: var(--ink); color: var(--surface); border-radius: 12px; padding: 11px 14px; font-size: 13.5px; box-shadow: var(--shadow); animation: up .18s ease-out; }
.toast.err { background: var(--crit); color: #fff; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 15px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi.hero { grid-column: span 2; }
.kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.kpi .v { font-size: 26px; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.kpi.hero .v { font-size: 40px; }
.kpi .t { font-size: 12.5px; color: var(--ink-2); }
.kpi .pill { align-self: flex-start; margin-top: 2px; white-space: normal; max-width: 100%; }
@media (max-width: 560px) { .kpi.hero .v { font-size: 32px; } .kpi .v { font-size: 22px; } .kpi { padding: 12px; } }

/* ---------- capaian: batang lurus ----------
   Isi batang mengikuti persen capaian: < 35% merah, 35–74% kuning, 75–99% hijau, ≥ 100% ungu Jahitku.
   Persennya selalu tertulis di ujung batang, jadi warna hanya penguat. */
.bar-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar { position: relative; flex: 1; min-width: 60px; height: 8px; border-radius: 999px; background: var(--track); }
.bar.lg { height: 14px; }
.bar .isi { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.bar .aman { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink-2); opacity: .5; }
.bar .jalur {
  position: absolute; top: -9px; width: 0; height: 0; margin-left: -5px;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--accent);
}
.bar.lg .jalur { top: -11px; }
.b-crit .isi { background: var(--crit); }
.b-warn .isi { background: var(--warn); }
.b-good .isi { background: var(--good); }
.b-done .isi { background: var(--s1); }
.b-none .isi { background: var(--s-muted); }
.pct { flex: none; min-width: 44px; text-align: right; font-weight: 900; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }

.cap-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--muted); margin: -6px 0 12px; }
.cap-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cap-legend .sw { display: inline-block; width: 14px; height: 6px; border-radius: 3px; }
.cap-legend .sw.b-crit { background: var(--crit); } .cap-legend .sw.b-warn { background: var(--warn); }
.cap-legend .sw.b-good { background: var(--good); } .cap-legend .sw.b-done { background: var(--s1); }
.cap-legend .lg-aman { display: inline-block; width: 2px; height: 11px; border-radius: 1px; background: var(--ink-2); opacity: .5; }
.cap-legend .lg-jalur { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--accent); }

.info {
  display: inline-grid; place-items: center; width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 1px solid var(--rule-strong); color: var(--muted); font: italic 700 10px/1 Georgia, serif;
  cursor: help; text-transform: none; letter-spacing: 0; vertical-align: 1px;
}
.info:hover, .info:focus-visible { color: var(--brand-text); border-color: var(--brand-text); }

/* ---------- angka utama (hero) & pendukung ---------- */
.hero-card {
  position: relative; overflow: hidden; min-width: 0; display: flex; flex-direction: column; gap: 7px;
  background: var(--hero-bg); border: 1px solid var(--hero-rule); border-radius: 18px; padding: 16px 18px 14px;
}
/* Elemen grafis potongan pola kain (guideline): kecil di pojok kanan atas, tidak menutupi angka. */
.hero-pola { position: absolute; right: 10px; top: -16px; width: 44px; height: 58px; overflow: hidden; opacity: .55; pointer-events: none; transform: rotate(10deg); }
.hero-pola svg { display: block; width: 100%; height: auto; }
.hero-pola.c-lav { color: var(--lavender); } .hero-pola.c-lime { color: var(--lime); } .hero-pola.c-tang { color: var(--accent); }
.hero-k { position: relative; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding-right: 44px; }
.hero-v { position: relative; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hero-v b { font-size: 44px; font-weight: 900; letter-spacing: -.02em; line-height: 1.05; color: var(--ink); }
.hero-of { font-size: 15px; font-weight: 700; color: var(--muted); }
.hero-card .pct { font-size: 16px; min-width: 50px; }
.hero-foot { position: relative; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .hero-v b { font-size: 36px; } }

.svc { margin-bottom: 16px; }
.svc-h { font-size: 15px; font-weight: 900; margin: 0 0 8px 2px; }
.svc-body {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 10px 22px; align-items: center;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; padding: 10px 18px 10px 10px;
}
.svc-body.tanpa-hero { grid-template-columns: 1fr; padding: 14px 18px; }
.svc-body.tanpa-hero .sup-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 28px; }
.sup-list { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; }
.sup-k { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.sup-v { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.sup-v b { font-size: 14px; font-weight: 900; color: var(--ink); }
.sup .bar-row { grid-column: 1 / -1; }
@media (max-width: 860px) { .svc-body { grid-template-columns: 1fr; padding: 10px; } .sup-list { padding: 4px 6px 6px; } }

/* Atas: omzet bulan & kuartal bertumpuk di kiri, grafik omzet per bulan di kanan. */
.dash-top { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); gap: 14px; margin-bottom: 18px; align-items: stretch; }
.omzet-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.omzet-stack > .hero-card { flex: 1; justify-content: center; }
.dash-top > .panel { margin-bottom: 0; }
@media (max-width: 1000px) {
  .dash-top { grid-template-columns: 1fr; }
  .omzet-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

/* ---------- sapaan maskot ---------- */
.sapa { margin-left: auto; display: flex; align-items: center; gap: 8px; max-width: 460px; }
.sapa-maskot { width: 62px; flex: none; animation: goyang 2.6s ease-in-out 3; }
.sapa-teks {
  position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px;
  padding: 8px 12px; font-size: 12.5px; color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.sapa-teks b { color: var(--ink); }
@media (max-width: 720px) { .sapa { margin-left: 0; max-width: none; } .sapa-maskot { width: 50px; } }

/* ---------- ringkasan: per orang, perkiraan, daftar aksi ---------- */
.org-list { display: flex; flex-direction: column; gap: 6px; }
.org {
  display: flex; flex-direction: column; gap: 6px; width: calc(100% + 16px); margin: 0 -8px; padding: 7px 8px 9px;
  border: 0; border-radius: 10px; background: none; color: inherit; text-align: left; cursor: pointer;
}
.org:hover, .org:focus-visible { background: var(--surface-2); }
.org-top { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.org-top b { font-weight: 700; }
.org-rp { color: var(--muted); font-size: 12.5px; }
.org-track { position: relative; display: block; width: calc(100% - 70px); height: 12px; border-radius: 999px; background: var(--track); }
.org-track .isi { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.org-track .tgt { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.org-pct { position: absolute; top: 50%; transform: translateY(-50%); font-weight: 900; font-size: 13px; color: var(--ink); white-space: nowrap; }

.fc-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 24px; }
.fc-top > div { display: flex; flex-direction: column; }
.fc-k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fc-top b { font-size: 16px; font-weight: 900; }
.fc-top b.fc-v { font-size: 32px; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.fc-bar { position: relative; height: 16px; border-radius: 999px; background: var(--track); margin: 16px 0 4px; }
.fc-real { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px 0 0 999px; background: var(--s1); }
.fc-pipe {
  position: absolute; top: 0; bottom: 0; border-radius: 0 999px 999px 0; border-left: 2px solid var(--surface);
  background: repeating-linear-gradient(135deg, var(--lavender) 0 5px, var(--lavender-2) 5px 10px);
}
.fc-bar .tgt, .fc-bar .aman { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 2px; }
.fc-bar .tgt { background: var(--ink); }
.fc-bar .aman { background: var(--ink-2); opacity: .5; }
.mini-k { display: flex; align-items: center; gap: 6px; margin: 14px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.aksi-list { display: flex; flex-direction: column; }
.aksi-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--grid); }
.aksi-row:first-child { border-top: 0; }
.aksi-main {
  display: flex; flex-direction: column; gap: 1px; min-width: 0; border: 0; background: none; color: inherit;
  text-align: left; padding: 4px 8px; margin-left: -8px; border-radius: 8px; cursor: pointer;
}
.aksi-main:hover, .aksi-main:focus-visible { background: var(--surface-2); }
.aksi-main .cell-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aksi-q { font-size: 12.5px; color: var(--ink-2); font-style: italic; }
.aksi-side { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--ink); }
.tag.belum { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.tag.proses { background: var(--lavender-soft); }
.tag.sudah { background: var(--good-soft); }
@media (max-width: 560px) { .aksi-row { grid-template-columns: 1fr; } .aksi-side { justify-content: flex-start; } }

.empty .maskot.kecil { width: 96px; margin: 0 auto 8px; }

/* ---------- pilihan chip (pengajar, hari) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink-2); border-radius: 999px;
  padding: 6px 12px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.chip-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* ---------- jadwal ---------- */
.week-label { font-weight: 700; font-size: 13.5px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: start; }
@media (max-width: 1100px) { .week { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.day { background: var(--surface-2); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.day.today { outline: 2px solid var(--brand); outline-offset: -2px; }
.day-head { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); padding: 2px 4px; }
.day-head b { color: var(--ink); font-size: 13px; }
.day-empty { font-size: 12px; color: var(--muted); padding: 4px; }
.sesi-list { display: flex; flex-direction: column; gap: 6px; }
.sesi {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 13px;
}
.sesi.click { cursor: pointer; }
.sesi.click:hover { box-shadow: var(--shadow-sm); }
.sesi-jam { font-weight: 900; grid-column: 1; }
.sesi-status { grid-column: 2; grid-row: 1; justify-self: end; }
.sesi-isi { grid-column: 1 / -1; min-width: 0; }
.sesi-isi .cell-sub { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sesi-aksi { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.sesi.batal { opacity: .6; }
.sesi.telat { border-color: var(--warn); }

/* ---------- komisi ---------- */
.komisi-kpis { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.komisi-kpis .kpi .v { font-size: 24px; }
.panel-head .ctl { flex: none; }
.panel-head .ctl select { padding: 5px 8px; font-size: 12.5px; border-radius: 8px; max-width: 190px; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; min-width: 0; margin-bottom: 16px; }
.grid2 .panel { margin-bottom: 0; }
.panel-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.panel-head h3 { font-size: 15px; font-weight: 900; display: flex; align-items: center; gap: 6px; }
.panel-head .read { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.cerita { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.cerita-k { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cerita-item { display: flex; flex-direction: column; gap: 1px; text-align: left; border: 0; background: none; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; }
.cerita-item:hover { background: var(--surface-2); }
.cerita-q { color: var(--ink); font-size: 13px; }
.cerita-m { color: var(--muted); font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 11px; height: 11px; border-radius: 3px; }
.legend .ln { width: 16px; height: 2px; border-radius: 2px; }
.legend .ln.tgt, .legend .ln.aman { width: 2px; height: 12px; }
.legend .ln.tgt { background: var(--ink); }
.legend .ln.aman { background: var(--ink-2); opacity: .5; }
.legend .sw.pipe { background: repeating-linear-gradient(135deg, var(--lavender) 0 3px, var(--lavender-2) 3px 6px); }
.note { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.tip {
  position: fixed; z-index: 90; pointer-events: none; background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px;
  min-width: 150px; max-width: 260px;
}
.tip .th { font-weight: 700; margin-bottom: 4px; }
.tip .tp { color: var(--ink-2); line-height: 1.45; font-size: 12.5px; }
.tip .tr { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .tr span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.tip .tr b { font-variant-numeric: tabular-nums; }
.tip .key { width: 12px; height: 2px; border-radius: 2px; display: inline-block; }

/* ---------- admin ---------- */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.subnav button { border: 1px solid var(--rule); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.subnav button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.admin-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.sum-ok { color: var(--good-text); font-weight: 700; }
.sum-bad { color: var(--crit); font-weight: 700; }
.list-edit { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.list-edit .row { display: flex; gap: 6px; }
.list-edit input { flex: 1; }
.kpi-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }

/* ---------- keuangan ---------- */
.tag.netral { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule); }
.tag.lewat { background: var(--crit-soft); box-shadow: inset 3px 0 0 var(--crit); }
.link-cell {
  display: flex; flex-direction: column; gap: 1px; min-width: 0; border: 0; background: none; color: inherit; font: inherit;
  text-align: left; padding: 4px 8px; margin-left: -8px; border-radius: 8px; cursor: pointer;
}
.link-cell:hover, .link-cell:focus-visible { background: var(--surface-2); }
.link-cell .cell-main, .link-cell .cell-sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-kpis .kpi.lewat { box-shadow: inset 3px 0 0 var(--crit); }
.fin-list { display: flex; flex-direction: column; }
.fin-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 150px auto; gap: 6px 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--grid); }
.fin-row:first-child { border-top: 0; }
.fin-row.batal { opacity: .55; }
.fin-tempo, .fin-angka { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fin-angka { text-align: right; }
.fin-aksi { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fin-list.kecil .fin-row { grid-template-columns: minmax(0, 1fr) auto; }
.aging { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.aging-b { border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aging-b .k { font-size: 12px; color: var(--muted); font-weight: 700; }
.aging-b b { font-size: 20px; letter-spacing: -.01em; }
.aging-b.u0, .aging-b.u1 { box-shadow: inset 3px 0 0 var(--warn); }
.aging-b.u2, .aging-b.u3 { box-shadow: inset 3px 0 0 var(--crit); }
tr.batal td { color: var(--muted); }
tr.batal .cell-main, .coret { text-decoration: line-through; color: var(--muted); }
.timeline li .btn { margin-top: 4px; }

@media (max-width: 720px) {
  .fin-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fin-tempo { grid-column: 1 / -1; order: 3; flex-direction: row; gap: 8px; align-items: baseline; }
  .fin-tempo .cell-main { font-weight: 600; font-size: 13px; }
  .fin-aksi { grid-column: 1 / -1; order: 4; justify-content: flex-start; }
  .aging { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .topbar-in { padding: 8px 12px; }
  .main { padding: 14px 12px 60px; }
  .nav { order: 3; width: 100%; }
  .col { flex-basis: 84vw; max-height: none; }
  .form, .sub-form { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr 1fr; }
  .search { min-width: 0; flex: 1 1 100%; }
  .drawer { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
