/* POSware — tema & komponen. Terang default, gelap otomatis (prefers-color-scheme) atau lewat [data-theme]. */
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 200 800; font-style: normal; font-display: swap; src: url('/static/fonts/plus-jakarta-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #F5F4F1; --panel: #fff; --panel2: #FAF9F7; --ink: #1F2328; --muted: #6B7280; --line: #E6E3DD;
  --brand: #E8590C; --brand-d: #C94A06; --brand-ink: #fff; --brand-soft: #FFF0E6;
  --ok: #2B9348; --ok-soft: #E6F6EA; --warn: #E08700; --warn-soft: #FFF4DB; --bad: #D93232; --bad-soft: #FDECEC; --info: #1C7ED6; --info-soft: #E7F1FC;
  --shadow: 0 1px 2px rgba(20,20,20,.05), 0 4px 14px rgba(20,20,20,.05); --r: 12px; --side: 244px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111316; --panel: #1A1D22; --panel2: #20242A; --ink: #E9EBEE; --muted: #9AA3AF; --line: #2D333B;
  --brand: #FF7A2E; --brand-d: #FF9150; --brand-ink: #1A0E05; --brand-soft: #3A2314;
  --ok: #4CC36B; --ok-soft: #17301F; --warn: #F5B041; --warn-soft: #382B10; --bad: #FF6B6B; --bad-soft: #3A1B1B; --info: #5AA9F0; --info-soft: #14283D;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #111316; --panel: #1A1D22; --panel2: #20242A; --ink: #E9EBEE; --muted: #9AA3AF; --line: #2D333B;
  --brand: #FF7A2E; --brand-d: #FF9150; --brand-ink: #1A0E05; --brand-soft: #3A2314;
  --ok: #4CC36B; --ok-soft: #17301F; --warn: #F5B041; --warn-soft: #382B10; --bad: #FF6B6B; --bad-soft: #3A1B1B; --info: #5AA9F0; --info-soft: #14283D;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.5 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--ink); -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; } h1 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; } h2 { font-size: 16px; font-weight: 700; } h3 { font-size: 14px; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tr { text-align: right; } .tc { text-align: center; } .nowrap { white-space: nowrap; } .b { font-weight: 700; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; } .ic.sm { width: 15px; height: 15px; } .ic.lg { width: 24px; height: 24px; }
.hide { display: none !important; } [hidden] { display: none !important; }
.stack > * + * { margin-top: 14px; } .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.sb { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 560px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .g-keep2 { grid-template-columns: repeat(2, 1fr) !important; } }

/* ===== Shell ===== */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; padding: 4px 8px 14px; color: var(--ink); } .brand:hover { text-decoration: none; }
.brand .logo { width: 32px; height: 32px; flex: none; } .brand b { color: var(--brand); font-weight: 800; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.nav a:hover { background: var(--panel2); text-decoration: none; } .nav a.aktif { background: var(--brand-soft); color: var(--brand); }
.nav a.tebal { background: var(--brand); color: var(--brand-ink); margin-bottom: 8px; } .nav a.tebal:hover { background: var(--brand-d); }
.nav .grup { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 14px 11px 5px; }
.side .foot { margin-top: auto; padding-top: 12px; font-size: 12px; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 22px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; min-height: 56px; }
.topbar .burger { display: none; }
.content { padding: 22px; max-width: 1240px; width: 100%; margin: 0 auto; flex: 1; }
.pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; } .pagehead p { margin: 4px 0 0; color: var(--muted); }
.userbtn { display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px; border-radius: 99px; cursor: pointer; background: none; border: 0; color: var(--ink); font: inherit; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.menu-pop { position: absolute; right: 16px; top: 54px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,.18); min-width: 210px; padding: 6px; z-index: 40; }
.menu-pop a, .menu-pop button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; } .menu-pop a:hover, .menu-pop button:hover { background: var(--panel2); text-decoration: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .side { position: fixed; z-index: 60; left: 0; top: 0; width: 280px; transform: translateX(-102%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.nav-open .side { transform: none; } body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; }
  .topbar { padding: 8px 12px; } .topbar .burger { display: inline-flex; } .content { padding: 14px 12px 40px; }
}

/* ===== Komponen ===== */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.card.flush { padding: 0; overflow: hidden; } .card > h2 + * { margin-top: 10px; } .card .ch { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); } .stat .l { color: var(--muted); font-size: 12.5px; font-weight: 600; } .stat .v { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin-top: 2px; } .stat .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.hero { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); } .stat.hero .l, .stat.hero .s { color: inherit; opacity: .85; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 600 14px inherit; cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .12s, border-color .12s; white-space: nowrap; }
.btn:hover { background: var(--panel2); text-decoration: none; } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); } .btn.primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; } .btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); } .btn.danger:hover { background: var(--bad-soft); }
.btn.solid-danger { background: var(--bad); border-color: var(--bad); color: #fff; } .btn.ghost { border-color: transparent; background: none; } .btn.ghost:hover { background: var(--panel2); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; } .btn.lg { padding: 13px 20px; font-size: 16px; border-radius: 12px; } .btn.block { width: 100%; } .btn[disabled] { opacity: .5; pointer-events: none; }
.btn.icon { padding: 8px; }
label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 5px; }
input, select, textarea { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); min-height: 40px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); flex: none; }
textarea { min-height: 80px; resize: vertical; } input[type=file] { padding: 7px; }
.field { margin-bottom: 12px; } .field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.fgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; } @media (max-width: 560px) { .fgrid { grid-template-columns: 1fr; } }
.check { display: flex; gap: 9px; align-items: center; font-weight: 500; cursor: pointer; margin: 0; }
.input-group { display: flex; gap: 0; } .input-group > :first-child { border-radius: 10px 0 0 10px; } .input-group > :last-child { border-radius: 0 10px 10px 0; } .input-group .pre { display: grid; place-items: center; padding: 0 11px; background: var(--panel2); border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; color: var(--muted); font-size: 13px; }
.tbl-wrap { overflow-x: auto; } table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel2); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; } .tbl tr:last-child td { border-bottom: 0; } .tbl tbody tr:hover td { background: color-mix(in srgb, var(--panel2) 70%, transparent); } .tbl .tr { text-align: right; }
.tbl td.act { white-space: nowrap; text-align: right; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; } .badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; } .badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; } .badge.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 600; display: flex; gap: 9px; align-items: flex-start; } .flash.ok { background: var(--ok-soft); color: var(--ok); } .flash.error { background: var(--bad-soft); color: var(--bad); } .flash.info { background: var(--info-soft); color: var(--info); } .flash.warn { background: var(--warn-soft); color: var(--warn); }
.empty { text-align: center; padding: 38px 16px; color: var(--muted); } .empty .ic { width: 34px; height: 34px; opacity: .5; margin-bottom: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; } .tabs a { padding: 9px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; } .tabs a.aktif { color: var(--brand); border-color: var(--brand); } .tabs a:hover { text-decoration: none; color: var(--ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; } .chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; font-size: 13px; color: var(--ink); cursor: pointer; font-family: inherit; } .chip:hover { text-decoration: none; background: var(--panel2); } .chip.aktif { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.filter { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; } .filter .field { margin: 0; } .filter input, .filter select { width: auto; min-width: 130px; }
.bar { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; } .kv .tot { font-weight: 800; font-size: 16px; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 8px; } .chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; } .chart .col i { width: 100%; max-width: 38px; background: var(--brand); border-radius: 5px 5px 0 0; min-height: 0; opacity: .88; } .chart .col:hover i { opacity: 1; } .chart .col span { font-size: 10.5px; color: var(--muted); margin-top: 5px; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--muted); } .dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }
.prod-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--panel2); flex: none; display: grid; place-items: center; color: var(--muted); font-weight: 800; border: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.sw { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; } .sw input { opacity: 0; width: 0; height: 0; } .sw span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .15s; cursor: pointer; } .sw span::before { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; } .sw input:checked + span { background: var(--ok); } .sw input:checked + span::before { transform: translateX(18px); }

/* ===== Dialog ===== */
dialog.modal { border: 0; border-radius: 16px; padding: 0; background: var(--panel); color: var(--ink); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog.modal.lg { width: min(820px, calc(100vw - 24px)); } dialog.modal.sm { width: min(400px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(10,10,12,.5); backdrop-filter: blur(2px); }
.modal .mh { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); } .modal .mh h2 { font-size: 17px; }
.modal .mb { padding: 18px; overflow-y: auto; max-height: calc(100vh - 170px); } .modal .mf { padding: 12px 18px 16px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); }
.modal form { display: contents; }

/* ===== Login ===== */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 80% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent), var(--bg); }
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); } .login-card .brand { justify-content: center; font-size: 24px; padding-bottom: 6px; } .login-card .brand .logo { width: 40px; height: 40px; }
.login-card label { margin-top: 12px; } .login-card .btn { margin-top: 18px; }
.err-page { text-align: center; padding: 70px 20px; } .err-page .kode { font-size: 64px; font-weight: 800; color: var(--brand); line-height: 1; }

/* Banner langganan */
.banner { padding: 9px 22px; font-weight: 600; font-size: 13.5px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; } .banner.trial { background: var(--info-soft); color: var(--info); } .banner.segera { background: var(--warn-soft); color: var(--warn); } .banner.bantuan { background: #7048E8; color: #fff; } .banner a { color: inherit; text-decoration: underline; }
.paket { display: flex; flex-direction: column; gap: 10px; } .paket.pilih { border: 2px solid var(--brand); } .paket .harga { font-size: 28px; font-weight: 800; } .paket ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }

/* Cetak */
@media print { .side, .topbar, .noprint, .banner { display: none !important; } .shell { display: block; } .content { padding: 0; max-width: none; } body { background: #fff; } .card { box-shadow: none; border-color: #ccc; } }
