/* VALTIRE — sistem tampilan back office
   Palet: tinta hijau-hitam, kertas abu sejuk, jade (aksi utama), crema (perhatian), bata (bahaya). */
:root {
  --ink: #1e2723;
  --ink-2: #3a4741;
  --muted: #5e6b65;
  --faint: #8a958f;
  --paper: #f3f5f2;
  --surface: #ffffff;
  --sunk: #f7f8f6;
  --line: #dfe4e0;
  --line-2: #e9ede9;
  --jade: #0f6e56;
  --jade-ink: #0a5341;
  --jade-soft: #e3f0ea;
  --crema: #a96f14;
  --crema-soft: #f8eedb;
  --brick: #b3412f;
  --brick-soft: #f8e7e3;
  --sky: #2f6690;
  --sky-soft: #e5eef5;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(30, 39, 35, .06), 0 8px 24px -12px rgba(30, 39, 35, .18);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --side: 248px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--jade); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
code { font-size: 12.5px; background: var(--sunk); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .grow { flex: 1; }
.num, .r { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--jade); } .neg { color: var(--brick); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--jade); outline-offset: 2px; border-radius: 4px; }
.ic { width: 18px; height: 18px; flex: none; }
.boot { display: grid; place-items: center; height: 100vh; }

/* ---------- spinner & status ---------- */
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--jade); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 48px 0; justify-content: center; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty p { max-width: 420px; margin: 0 auto 14px; }
.empty.big { padding: 96px 16px; }
.error-box { background: var(--brick-soft); border: 1px solid #efc9c1; color: #6f2a1e; padding: 16px; border-radius: var(--radius); }
.error-box b { display: block; margin-bottom: 4px; } .error-box .btn { margin-top: 10px; }

/* ---------- tombol ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s; }
.btn:hover { border-color: #c5ccc7; background: var(--sunk); }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--jade); border-color: var(--jade); color: #fff; }
.btn.primary:hover { background: var(--jade-ink); }
.btn.danger { background: var(--brick); border-color: var(--brick); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn:not(.primary):not(.danger).busy::after { border-color: var(--line); border-top-color: var(--jade); }
.danger-text { color: var(--brick) !important; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.link-btn { border: 0; background: none; padding: 0; color: var(--jade); font-weight: 600; cursor: pointer; }

/* ---------- kerangka ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #fbfcfa; border-right: 1px solid var(--line); }
.biz { display: flex; align-items: center; gap: 10px; margin: 12px; padding: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); cursor: pointer; text-align: left; }
.biz:hover { border-color: #c5ccc7; }
.biz-mark { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--jade); color: #fff; font-weight: 800; flex: none; }
.biz-mark img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.biz-text { min-width: 0; flex: 1; }
.biz-text b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-text small { color: var(--muted); font-size: 12px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-group { margin-bottom: 10px; }
.nav-label { font-size: 11.5px; font-weight: 700; color: var(--faint); padding: 8px 10px 4px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.nav-link:hover { background: var(--line-2); text-decoration: none; }
.nav-link.on { background: var(--jade-soft); color: var(--jade-ink); font-weight: 650; }
.nav-link.on .ic { color: var(--jade); }
.side-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.me { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; color: var(--ink); padding: 4px; border-radius: 8px; }
.me:hover { background: var(--line-2); text-decoration: none; }
.me.on { background: var(--jade-soft); }
.me b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-size: 12px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--crema-soft); color: var(--crema); display: grid; place-items: center; font-weight: 800; flex: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; background: rgba(243,245,242,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.topbar-title { font-weight: 700; }
.plan-chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--jade-soft); color: var(--jade-ink); }
.plan-chip.trial { background: var(--crema-soft); color: var(--crema); }
.only-mobile { display: none; }
.banner { display: flex; align-items: center; gap: 10px; margin: 16px 24px 0; padding: 10px 14px; border-radius: var(--radius); font-size: 13.5px; }
.banner span { flex: 1; }
.banner.danger { background: var(--brick-soft); color: #6f2a1e; }
.banner.warn, .banner.trial { background: var(--crema-soft); color: #6b4609; }
.view { padding: 22px 24px 64px; max-width: 1320px; width: 100%; outline: none; }
.side-scrim { display: none; }

/* ---------- kepala halaman, tab, toolbar ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 750; }
.page-head p { color: var(--muted); margin-top: 3px; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -4px 0 18px; overflow-x: auto; }
.tabs a { padding: 9px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--jade-ink); border-bottom-color: var(--jade); }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar select, .toolbar input:not([type=checkbox]) { height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 0 10px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.search .ic { position: absolute; left: 10px; top: 9px; color: var(--faint); width: 17px; height: 17px; }
.search input { width: 100%; padding-left: 34px !important; }
.range { display: flex; align-items: center; gap: 6px; }
.range span { color: var(--faint); }
.count { color: var(--muted); font-size: 13px; margin-left: auto; }

/* ---------- panel & angka ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel + .panel, .panel + .grid, .grid + .panel, .table-wrap + .panel { margin-top: 16px; }
.grid > .panel, .grid > div > .panel:first-child { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
.panel-head h3 { font-size: 15px; font-weight: 700; }
.panel-head p { color: var(--muted); font-size: 12.5px; }
.panel-body { padding: 14px 16px 16px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.side-r { grid-template-columns: minmax(0, 1fr) 340px; }
/* strip angka: satu panel dengan sekat, bukan kartu-kartu terpisah */
.ledger { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.ledger > div { padding: 14px 16px; border-left: 1px solid var(--line-2); min-width: 0; }
.ledger > div:first-child { border-left: 0; }
.ledger small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ledger b { display: block; font-size: 21px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger em { font-style: normal; font-size: 12px; color: var(--muted); }
.ledger em.up { color: var(--jade); } .ledger em.down { color: var(--brick); }
.hero-figure { font-size: 40px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.list li:first-child { border-top: 0; }
.list .grow { min-width: 0; }
.list small { display: block; color: var(--muted); font-size: 12px; }
.bars { width: 100%; height: 72px; display: block; }
.bars rect { fill: #cfe3d9; } .bars rect.last { fill: var(--jade); }
.bar-axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; margin-top: 4px; }
.meter { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--jade); border-radius: 99px; }
.meter.warn i { background: var(--crema); } .meter.over i { background: var(--brick); }

/* ---------- tabel ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel .table-wrap { border: 0; border-radius: 0; border-top: 1px solid var(--line-2); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 12px; background: var(--sunk); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.tbl th.r { text-align: right; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #f8faf8; }
.tbl td b { font-weight: 650; }
.tbl td small, .sub { display: block; color: var(--muted); font-size: 12px; }
.tbl tfoot td { font-weight: 750; background: var(--sunk); border-top: 1px solid var(--line); }
.tbl input, .tbl select { height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: #fff; width: 100%; min-width: 70px; }
.tbl .tight { width: 1%; white-space: nowrap; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--jade-soft); color: var(--jade-ink); }
.badge.warn { background: var(--crema-soft); color: #7c520e; }
.badge.bad { background: var(--brick-soft); color: #8a3021; }
.badge.info { background: var(--sky-soft); color: var(--sky); }
.thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: var(--sunk); display: inline-grid; place-items: center; color: var(--faint); vertical-align: middle; }

/* ---------- formulir ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field .req { color: var(--brick); font-style: normal; margin-left: 2px; }
.field small { color: var(--muted); font-size: 12px; }
.field input, .field select, .field textarea, .input { width: 100%; height: 38px; border: 1px solid #cfd6d1; border-radius: var(--radius-sm); background: #fff; padding: 0 11px; transition: border-color .12s, box-shadow .12s; }
.field textarea { height: auto; padding: 9px 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(15,110,86,.14); }
.field input[readonly] { background: var(--sunk); }
.affix { display: flex; align-items: stretch; border: 1px solid #cfd6d1; border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.affix:focus-within { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(15,110,86,.14); }
.affix span { display: grid; place-items: center; padding: 0 10px; background: var(--sunk); color: var(--muted); font-size: 13px; font-weight: 600; }
.affix input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: #fff; }
.check input { margin-top: 3px; accent-color: var(--jade); width: 16px; height: 16px; flex: none; }
.check b { display: block; font-weight: 600; } .check small { color: var(--muted); font-size: 12px; }
.check.inline { border: 0; padding: 6px 0 0; font-size: 13px; }
.form-section { padding-top: 6px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.form-grid > .form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section b { font-size: 13.5px; } .form-section p { color: var(--muted); font-size: 12.5px; }
.image-field { display: flex; gap: 14px; align-items: center; }
.image-field img, .image-field .ph { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: var(--sunk); display: grid; place-items: center; color: var(--faint); flex: none; }
.image-field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.lines { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.lines .tbl th { position: static; }
.lines-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: var(--sunk); border-top: 1px solid var(--line); }
.total-box { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 14px; background: var(--sunk); border-radius: var(--radius-sm); }
.total-box .big { font-size: 18px; font-weight: 800; }

/* ---------- overlay ---------- */
body.has-overlay { overflow: hidden; }
.overlay { position: fixed; inset: 0; z-index: 100; }
.overlay-bg { position: absolute; inset: 0; background: rgba(24, 33, 29, .38); opacity: 0; transition: opacity .18s; }
.overlay.in .overlay-bg { opacity: 1; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); display: flex; flex-direction: column; box-shadow: -16px 0 40px -20px rgba(0,0,0,.35); transform: translateX(24px); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
.drawer.wide { width: min(860px, 100%); }
.overlay.in .drawer { transform: none; opacity: 1; }
.modal { position: absolute; left: 50%; top: 12vh; transform: translate(-50%, 8px); width: min(480px, calc(100% - 32px)); max-height: 80vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); opacity: 0; transition: transform .18s, opacity .18s; }
.modal.wide { width: min(720px, calc(100% - 32px)); }
.overlay.in .modal { opacity: 1; transform: translate(-50%, 0); }
.ov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line-2); }
.ov-head h2 { font-size: 17px; font-weight: 750; }
.ov-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ov-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.ov-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--sunk); }
.modal .ov-foot { border-radius: 0 0 14px 14px; }
.lead { color: var(--ink-2); margin-bottom: 12px; }
.ov-body .tbl th { position: static; }
.ov-section { margin-top: 18px; }
.ov-section > h4 { margin: 0 0 8px; font-size: 13.5px; }

/* ---------- toast ---------- */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; max-width: min(560px, 92vw); animation: tin .18s ease; }
.toast-err { background: var(--brick); } .toast-warn { background: var(--crema); }
.toast.out { opacity: 0; transform: translateY(6px); transition: .25s; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- halaman masuk ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.auth-art { position: relative; background: var(--jade); color: #eaf5f0; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-art .brand { font-weight: 800; font-size: 20px; letter-spacing: .02em; color: #fff; }
.auth-art h2 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.12; font-weight: 800; color: #fff; max-width: 15ch; letter-spacing: -.02em; }
.auth-art p { max-width: 44ch; color: #cfe6dc; margin-top: 14px; font-size: 15px; }
.ticket { position: absolute; right: 48px; bottom: 72px; width: 290px; background: #fffdf8; color: var(--ink); padding: 18px 18px 22px; transform: rotate(-6deg); box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); font-variant-numeric: tabular-nums; font-size: 13px;
  -webkit-mask: radial-gradient(circle 6px at 50% 100%, transparent 98%, #000) 0 0 / 16px 100% repeat-x; mask: radial-gradient(circle 6px at 50% 100%, transparent 98%, #000) 0 0 / 16px 100% repeat-x; }
.ticket b { display: block; text-align: center; font-size: 14px; margin-bottom: 8px; }
.ticket div { display: flex; justify-content: space-between; padding: 3px 0; }
.ticket hr { border: 0; border-top: 1px dashed #c9c2b4; margin: 8px 0; }
.ticket .t { font-weight: 800; font-size: 15px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: min(400px, 100%); }
.auth-card h1 { font-size: 26px; font-weight: 800; }
.auth-card > p { color: var(--muted); margin: 6px 0 22px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .btn.primary { height: 44px; justify-content: center; font-size: 15px; }
.auth-switch { margin-top: 18px; color: var(--muted); text-align: center; }
.auth-msg { background: var(--crema-soft); color: #6b4609; padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13.5px; }
.pw { position: relative; } .pw input { padding-right: 42px; }
.pw button { position: absolute; right: 4px; top: 2px; }

/* ---------- komponen khusus ---------- */
.biz-list { display: grid; gap: 6px; margin-bottom: 12px; }
.biz-row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: left; cursor: pointer; width: 100%; }
.biz-row div { flex: 1; } .biz-row small { display: block; color: var(--muted); font-size: 12px; }
.biz-row.current { background: var(--jade-soft); border-color: #bcdccd; cursor: default; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.steps li a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; color: var(--ink); }
.steps li a:hover { background: var(--sunk); text-decoration: none; }
.steps .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.steps .done .dot { background: var(--jade); border-color: var(--jade); color: #fff; }
.steps .done .dot .ic { width: 12px; height: 12px; }
.steps .done span { color: var(--muted); text-decoration: line-through; }
.chat { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.bubble { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; max-width: 88%; }
.bubble.me { align-self: flex-end; background: var(--jade); color: #fff; border-color: var(--jade); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 13px; }
.chip:hover { border-color: var(--jade); color: var(--jade); }
.perm-table td:first-child { min-width: 240px; }
.perm-table input { width: 16px !important; height: 16px !important; min-width: 0 !important; accent-color: var(--jade); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.plan.current { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.plan h3 { font-size: 16px; } .plan .price { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.plan ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.plan .btn { justify-content: center; margin-top: auto; }
.callout { background: var(--sunk); border: 1px dashed #cfd6d1; border-radius: var(--radius); padding: 12px 14px; }
.receipt-preview { background: #fff; border: 1px solid var(--line); padding: 14px; font: 12px/1.45 "Courier New", monospace; margin: 0 auto; }
.receipt-preview .c { text-align: center; } .receipt-preview .row { display: flex; justify-content: space-between; gap: 6px; } .receipt-preview hr { border: 0; border-top: 1px dashed #999; }

/* ---------- responsif ---------- */
@media (max-width: 1100px) {
  .grid.three { grid-template-columns: 1fr 1fr; }
  .grid.side-r { grid-template-columns: 1fr; }
  .ledger { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger > div:nth-child(odd) { border-left: 0; } .ledger > div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow); }
  .side-scrim.open { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(24,33,29,.35); }
  .only-mobile { display: inline-grid; }
  .topbar { padding: 0 12px; }
  .view { padding: 16px 16px 64px; }
  .banner { margin: 12px 16px 0; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 20px; }
  .hero-figure { font-size: 32px; }
  .search { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .side, .topbar, .banner, .page-actions, .toolbar, .tabs { display: none !important; }
  .shell { display: block; } .view { padding: 0; max-width: none; }
  body { background: #fff; }
}

/* ---------- 2.1: notifikasi, kode pemulihan, tagihan unik ---------- */
.notif { position: relative; }
.notif .icon-btn { position: relative; }
.notif .dot { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--sky); color: #fff; font: 800 10.5px/17px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--paper); }
.notif .dot.hot { background: var(--brick); }
.notif-pop { position: absolute; right: -8px; top: calc(100% + 8px); width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 40; }
.notif-pop header { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px 14px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--surface); }
.notif-pop ul { list-style: none; margin: 0; padding: 6px; }
.n-item { display: flex; gap: 10px; padding: 10px 8px; border-radius: 8px; color: var(--ink); }
.n-item:hover { background: var(--sunk); text-decoration: none; }
.n-item b { display: block; font-size: 13.5px; }
.n-item small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 1px; }
.n-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--sky-soft); color: var(--sky); }
.n-item.warn .n-ic { background: var(--crema-soft); color: var(--crema); }
.n-item.bad .n-ic { background: var(--brick-soft); color: var(--brick); }
.n-ic .ic { width: 17px; height: 17px; }
.n-empty { text-align: center; padding: 26px 18px 30px; color: var(--muted); }
.n-empty .ic { width: 28px; height: 28px; color: var(--jade); }
.n-empty b { display: block; color: var(--ink); margin: 6px 0 2px; }

.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.field-row a { font-weight: 600; }
.mono, input.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; }
.rcode { font: 700 clamp(20px, 5vw, 26px)/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; text-align: center; padding: 18px 12px; border: 2px dashed var(--jade); border-radius: var(--radius); background: var(--jade-soft); color: var(--jade-ink); user-select: all; word-break: break-all; }
.rc-tips { margin: 14px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; display: grid; gap: 4px; }
.panel-head h3 .ic { width: 17px; height: 17px; vertical-align: -3px; margin-right: 4px; color: var(--jade); }

.pay-due { border-color: var(--crema); background: linear-gradient(0deg, var(--surface), var(--surface)), var(--crema-soft); }
.pay-due-main { display: flex; gap: 18px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.pay-due-main > div:first-child { min-width: 0; flex: 1 1 320px; }
.pay-amount { font-size: 15px; margin: 4px 0 6px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pay-amount b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); margin-left: 4px; }
.pay-due-act { display: flex; gap: 8px; flex-wrap: wrap; }
.num-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.auth-shell.solo { grid-template-columns: 1fr; background: var(--paper); }
@media (max-width: 560px) {
  .range { flex-wrap: wrap; width: 100%; }
  .range input[type=date] { flex: 1 1 0; min-width: 0; }
  .range select { flex: 1 1 100%; }
}
.biz.static { cursor: default; } .biz.static:hover { border-color: var(--line); }

/* ---------- 2.2: menu digital ---------- */
.dm-top { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.dm-qr { width: 200px; flex: none; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: #fff; box-shadow: inset 0 -6px 0 var(--a); }
.dm-qr svg { display: block; width: 100%; height: auto; }
.dm-info { flex: 1 1 260px; min-width: 0; display: grid; gap: 10px; align-content: start; }
.dm-url { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; border-radius: var(--radius-sm); background: var(--sunk); border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; }
.dm-url span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dm-stats { display: flex; gap: 22px; }
.dm-stats b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dm-stats small { color: var(--muted); font-size: 12px; }
.warn-text { color: var(--crema); }
.dm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label { cursor: pointer; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches i { display: block; width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.swatches input:checked + i { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatches input:focus-visible + i { outline: 3px solid var(--jade); outline-offset: 2px; }
@media (max-width: 560px) { .dm-qr { width: 100%; max-width: 260px; margin: 0 auto; } }
