/* FINTATIF Kasir: design tokens dan komponen.
   Terang dan gelap memakai token yang sama; data-theme di <html> memaksa salah satunya. */

:root {
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --raised: #F8FAFC;
  --sunken: #EEF2F6;
  --line: #E2E8F0;
  --line-soft: #EDF1F5;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --faint: #94A3B8;
  --brand: #059669;
  --brand-ink: #047857;
  --brand-soft: #ECFDF5;
  --brand-line: #A7F3D0;
  --navy: #0B1323;
  --danger: #BE123C;
  --danger-soft: #FFF1F2;
  --warn: #B45309;
  --warn-soft: #FFFBEB;
  --info: #1D4ED8;
  --info-soft: #EFF6FF;
  --ring: rgba(5, 150, 105, .18);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 16px -8px rgba(15, 23, 42, .10);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, .28);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --sidebar: 248px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1120;
    --surface: #121A2A;
    --raised: #182538;
    --sunken: #0E1725;
    --line: #26364D;
    --line-soft: #1D2B40;
    --ink: #E8EFF7;
    --ink-2: #C9D5E3;
    --muted: #93A4B9;
    --faint: #64748B;
    --brand: #34D399;
    --brand-ink: #6EE7B7;
    --brand-soft: #0F2E26;
    --brand-line: #1F5C49;
    --danger: #FDA4AF;
    --danger-soft: #3A1C29;
    --warn: #FCD34D;
    --warn-soft: #33290F;
    --info: #93C5FD;
    --info-soft: #172A4A;
    --ring: rgba(52, 211, 153, .22);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 8px 20px -10px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1120;
  --surface: #121A2A;
  --raised: #182538;
  --sunken: #0E1725;
  --line: #26364D;
  --line-soft: #1D2B40;
  --ink: #E8EFF7;
  --ink-2: #C9D5E3;
  --muted: #93A4B9;
  --faint: #64748B;
  --brand: #34D399;
  --brand-ink: #6EE7B7;
  --brand-soft: #0F2E26;
  --brand-line: #1F5C49;
  --danger: #FDA4AF;
  --danger-soft: #3A1C29;
  --warn: #FCD34D;
  --warn-soft: #33290F;
  --info: #93C5FD;
  --info-soft: #172A4A;
  --ring: rgba(52, 211, 153, .22);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 8px 20px -10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: -.005em;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.ok { color: var(--brand-ink); }
.bad { color: var(--danger); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: var(--raised); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(5,150,105,.25); }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .btn-primary:hover { color: #052e22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #052e22; } }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn-dark:hover { opacity: .92; background: var(--ink); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--sunken); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger-soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.hint { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input-wrap { position: relative; }
.input-wrap > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-wrap > .input { padding-left: 38px; }
.input-wrap > .suffix { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.input-lg { height: 52px; font-size: 18px; font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: .2s var(--ease); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px var(--ring); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--sunken); border: 1px solid var(--line-soft); }
.seg button { height: 32px; padding: 0 12px; border: 0; background: transparent; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 12.5px; white-space: nowrap;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: var(--sunken); color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--brand-soft); color: var(--brand-ink); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- Kartu & tabel ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.card-head h3 { font-size: 15px; }
.card-body { padding: 18px; }
.divider { height: 1px; background: var(--line-soft); margin: 4px 0; }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 14px; background: var(--raised); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr.click:hover { background: var(--raised); cursor: pointer; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 40px 20px; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; color: var(--faint); stroke-width: 1.5; }
.empty h4 { color: var(--ink); font-size: 14.5px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .k-label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.kpi .k-val { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.kpi .k-sub { font-size: 11.5px; color: var(--muted); }
@media (max-width: 560px) { .kpi .k-val { font-size: 18px; } .kpi { padding: 14px; } }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.list-item:last-child { border-bottom: 0; }
.avatar { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--brand-soft); color: var(--brand-ink); flex: none; }

/* ---------- Toast, modal, sheet ---------- */
#toasts { position: fixed; z-index: 120; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; background: #0F172A; color: #F1F5F9; font-weight: 600; font-size: 13px; box-shadow: var(--shadow-lg); animation: toastIn .35s var(--ease); max-width: 100%; }
.toast.bad .ic { color: #FDA4AF; }
.toast .ic { color: #6EE7B7; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }

.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(2, 6, 23, .52); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: modalIn .3s var(--ease); overflow: hidden; }
.modal.wide { max-width: 760px; }
.modal.narrow { max-width: 400px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; }
.modal-head h3 { font-size: 17px; }
.modal-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-body { padding: 4px 20px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-soft); background: var(--raised); }
@media (max-width: 640px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal, .modal.wide, .modal.narrow { max-width: none; border-radius: 22px 22px 0 0; max-height: 92dvh; animation: sheetIn .35s var(--ease); }
  .modal-foot { padding-bottom: calc(14px + var(--safe-b)); }
  .modal-foot .btn { flex: 1; }
}
@keyframes sheetIn { from { transform: translateY(40px); opacity: .4; } }

/* ---------- Layar masuk / daftar ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { position: relative; overflow: hidden; background: var(--navy); color: #E2E8F0; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side::before { content: ""; position: absolute; width: 620px; height: 620px; right: -260px; top: -200px; background: radial-gradient(circle, rgba(16,185,129,.28), transparent 62%); }
.auth-side::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
.auth-side > * { position: relative; z-index: 1; }
.auth-side h2 { font-size: 34px; color: #fff; max-width: 15ch; letter-spacing: -.035em; }
.auth-side p { color: #A5B4C8; max-width: 44ch; margin-top: 14px; font-size: 15px; }
.auth-points { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.auth-points div { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: #CBD5E1; }
.auth-points .ic { color: #6EE7B7; margin-top: 2px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 24px; background: var(--surface); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 26px; letter-spacing: -.03em; }
.auth-box .lead { color: var(--muted); margin-top: 8px; font-size: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 16px; color: inherit; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: #6EE7B7; text-transform: uppercase; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14.5px; transition: .15s; box-shadow: var(--shadow-sm); }
.gbtn:hover { background: var(--raised); border-color: var(--faint); }
.gbtn svg { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink-2); }
.note .ic { color: var(--brand); margin-top: 1px; }
.note-warn { background: var(--warn-soft); border-color: transparent; }
.note-warn .ic { color: var(--warn); }
.steps { display: flex; gap: 6px; margin-bottom: 22px; }
.steps i { height: 4px; flex: 1; border-radius: 9px; background: var(--line); }
.steps i.on { background: var(--brand); }
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.type-opt { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; font-weight: 600; font-size: 13px; }
.type-opt.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); background: var(--brand-soft); }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { align-items: flex-start; padding-top: 40px; }
}

/* Kunci PIN */
.lock { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--navy); background-image: radial-gradient(circle at 80% 0%, rgba(16,185,129,.22), transparent 45%); }
.lock-box { width: 100%; max-width: 380px; color: #E2E8F0; text-align: center; }
.lock-box h1 { color: #fff; font-size: 22px; margin-top: 14px; }
.lock-box .sub { color: #94A3B8; font-size: 13px; margin-top: 4px; }
.staff-pick { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 26px 0 18px; }
.staff-pick button { width: 84px; padding: 10px 4px; border-radius: 14px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: #CBD5E1; font-size: 12px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.staff-pick button .avatar { background: rgba(110,231,183,.14); color: #6EE7B7; width: 42px; height: 42px; border-radius: 50%; }
.staff-pick button.on { border-color: #34D399; background: rgba(52,211,153,.12); color: #fff; }
.staff-pick small { display: block; font-size: 10px; color: #64748B; font-weight: 600; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 8px 0 22px; }
.pin-dots i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #475569; transition: .15s; }
.pin-dots i.on { background: #34D399; border-color: #34D399; }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 290px; margin: 0 auto; }
.keypad button { height: 60px; border-radius: 16px; border: 0; background: rgba(255,255,255,.06); color: #fff; font-size: 22px; font-weight: 600; transition: background .12s, transform .08s; display: grid; place-items: center; }
.keypad button:active { background: rgba(255,255,255,.14); transform: scale(.96); }
.keypad button.ghost { background: transparent; font-size: 13px; color: #94A3B8; }

/* ---------- Kerangka aplikasi ---------- */
.shell { display: flex; min-height: 100dvh; }
.side { width: var(--sidebar); flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; }
.side-top { padding: 18px 18px 10px; }
.store-card { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line-soft); }
.store-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--navy); display: grid; place-items: center; overflow: hidden; flex: none; color: #6EE7B7; font-weight: 800; }
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-card b { display: block; font-size: 13.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-card span { font-size: 11.5px; color: var(--muted); }
.nav { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 13.5px; text-decoration: none; transition: background .12s, color .12s; }
.nav a:hover { background: var(--sunken); }
.nav a.on { background: var(--brand-soft); color: var(--brand-ink); }
.nav a .ic { color: var(--muted); }
.nav a.on .ic { color: var(--brand); }
.nav a .badge { margin-left: auto; }
.side-foot { padding: 12px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; }
.me b { font-size: 13px; display: block; }
.me span { font-size: 11px; color: var(--muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 62px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.topbar h1 { font-size: 18px; }
.topbar .sub { font-size: 12px; color: var(--muted); }
.page { padding: 22px 24px 40px; display: flex; flex-direction: column; gap: 18px; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.sync-pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--muted); }
.sync-pill .dot { color: var(--faint); }
.sync-pill.ok .dot { color: var(--brand); }
.sync-pill.warn { color: var(--warn); border-color: transparent; background: var(--warn-soft); }
.sync-pill.warn .dot { color: var(--warn); }
.sync-pill.busy .dot { animation: pulse 1s infinite; color: var(--info); }
@keyframes pulse { 50% { opacity: .3; } }

.bottom-nav { display: none; }
@media (max-width: 960px) {
  .side { position: fixed; left: 0; top: 0; z-index: 80; transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .side-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(2,6,23,.45); }
  .topbar { padding: 0 14px; }
  .page { padding: 16px 14px calc(96px + var(--safe-b)); }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + var(--safe-b)); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 10.5px; font-weight: 700; color: var(--muted); text-decoration: none; border-radius: 10px; }
  .bottom-nav a.on { color: var(--brand-ink); }
  .bottom-nav a.on .ic { color: var(--brand); }
}
@media (min-width: 961px) { .only-mobile { display: none !important; } }
@media (max-width: 960px) { .only-desktop { display: none !important; } }

/* ---------- Kasir (POS) ---------- */
.pos { display: grid; grid-template-columns: 1fr 400px; height: calc(100dvh - 62px); }
.pos-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pos-tools { padding: 16px 20px 10px; display: flex; flex-direction: column; gap: 12px; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.grid-products { flex: 1; overflow-y: auto; padding: 4px 20px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
.prod {
  position: relative; display: flex; flex-direction: column; text-align: left; gap: 10px; padding: 12px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .1s, box-shadow .15s; min-height: 132px;
}
.prod:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
.prod:active { transform: scale(.98); }
.prod.out { opacity: .55; }
.prod-tile { height: 52px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.prod-name { font-weight: 700; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.prod-price { font-weight: 800; font-size: 13.5px; color: var(--brand-ink); }
.prod-stock { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.prod-stock.low { color: var(--warn); }
.prod-qty { position: absolute; top: 8px; right: 8px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--surface); }

.cart { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.cart-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 10px; }
.cart-items { flex: 1; overflow-y: auto; padding: 6px 0; }
.ci { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 16px; border-bottom: 1px dashed var(--line-soft); }
.ci-name { font-weight: 700; font-size: 13px; cursor: pointer; }
.ci-meta { font-size: 11.5px; color: var(--muted); }
.ci-price { font-weight: 800; font-size: 13px; text-align: right; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; height: 30px; }
.stepper button { width: 30px; height: 100%; border: 0; background: var(--raised); display: grid; place-items: center; color: var(--ink-2); }
.stepper button:hover { background: var(--sunken); }
.stepper input { width: 38px; height: 100%; border: 0; text-align: center; font-weight: 700; background: var(--surface); outline: none; }
.cart-sum { border-top: 1px solid var(--line); padding: 12px 16px calc(14px + var(--safe-b)); display: flex; flex-direction: column; gap: 6px; background: var(--raised); }
.sum-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.sum-row.total { font-size: 18px; font-weight: 800; color: var(--ink); margin-top: 4px; }
.cart-actions { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; margin-top: 8px; }
.cart-fab { display: none; }
@media (max-width: 1100px) { .pos { grid-template-columns: 1fr 340px; } }
@media (max-width: 960px) {
  .pos { grid-template-columns: 1fr; height: auto; }
  .pos-tools { padding: 12px 14px 8px; position: sticky; top: 62px; z-index: 20; background: var(--bg); }
  .grid-products { padding: 4px 14px calc(160px + var(--safe-b)); grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; overflow: visible; }
  .cart { position: fixed; inset: 0; z-index: 85; border: 0; transform: translateY(100%); transition: transform .35s var(--ease); }
  .cart.open { transform: none; }
  .cart-fab { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(72px + var(--safe-b)); z-index: 55; height: 56px; border-radius: 16px; background: var(--ink); color: var(--surface); border: 0; align-items: center; justify-content: space-between; padding: 0 18px; font-weight: 700; box-shadow: var(--shadow-lg); }
  .cart-fab .count { background: var(--brand); color: #fff; border-radius: 99px; padding: 2px 9px; font-size: 12px; margin-right: 8px; }
}

/* Pembayaran */
.pay-total { text-align: center; padding: 14px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line-soft); }
.pay-total small { font-size: 12px; color: var(--muted); font-weight: 600; }
.pay-total b { display: block; font-size: 30px; letter-spacing: -.03em; }
.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pay-methods button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.pay-methods button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); box-shadow: 0 0 0 3px var(--ring); }
.quick-cash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick-cash button { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 12.5px; }
.quick-cash button:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.change-box { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.change-box.neg { background: var(--danger-soft); color: var(--danger); }
.qris-img { max-width: 240px; margin: 0 auto; border-radius: 12px; border: 1px solid var(--line); }

.success-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 4px auto 12px; animation: pop .5s var(--ease); }
.success-mark .ic { width: 32px; height: 32px; stroke-width: 2.5; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }

/* Struk */
.receipt { font-family: var(--mono); font-size: 12px; line-height: 1.45; background: #fff; color: #111; padding: 18px 16px; border-radius: 6px; width: 100%; max-width: 320px; margin: 0 auto; box-shadow: 0 1px 0 #e5e7eb, 0 8px 24px -12px rgba(0,0,0,.25); }
.receipt .c { text-align: center; }
.receipt .r { text-align: right; }
.receipt .b { font-weight: 700; }
.receipt .big { font-size: 15px; }
.receipt hr { border: 0; border-top: 1px dashed #9CA3AF; margin: 8px 0; }
.receipt .ln { display: flex; justify-content: space-between; gap: 8px; }
.receipt .logo { width: 64px; height: 64px; object-fit: contain; margin: 0 auto 6px; filter: grayscale(1); }

/* Grafik batang sederhana */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 38px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 70%, transparent)); min-height: 3px; transition: height .5s var(--ease); position: relative; }
.bar i.zero { background: var(--line); }
.bar span { font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.bar:hover i::after { content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface); font-size: 11px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; font-style: normal; font-weight: 700; }
.meter { height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }

.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 80px; }
.settings-nav button { text-align: left; height: 38px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.settings-nav button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
@media (max-width: 960px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; overflow-x: auto; position: static; }
  .settings-nav button { white-space: nowrap; }
}
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.set-row:last-child { border-bottom: 0; }
.set-row b { display: block; font-size: 13.5px; }
.set-row span { font-size: 12px; color: var(--muted); }
.logo-up { width: 84px; height: 84px; border-radius: 16px; border: 1.5px dashed var(--line); display: grid; place-items: center; overflow: hidden; background: var(--raised); color: var(--faint); flex: none; }
.logo-up img { width: 100%; height: 100%; object-fit: contain; }

.printer-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--raised); }
.printer-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--muted); flex: none; }
.printer-ic.on { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-line); }

.install-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--navy); color: #E2E8F0; }
.install-bar b { color: #fff; font-size: 13.5px; display: block; }
.install-bar span { font-size: 12px; color: #94A3B8; }
.install-bar .ic { color: #6EE7B7; }

.skeleton { background: linear-gradient(90deg, var(--sunken), var(--raised), var(--sunken)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

#print-area { position: absolute; left: -10000px; top: 0; width: 320px; }
@media print {
  body * { visibility: hidden !important; }
  #print-area { left: 0 !important; }
  #print-area, #print-area * { visibility: visible !important; }
  #print-area { position: absolute; left: 0; top: 0; width: 100%; }
  #print-area .receipt { box-shadow: none; max-width: none; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ================= Gaya keluarga FINTATIF (akun, merek, sidebar) ================= */
.fk-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.fk-brand:hover { text-decoration: none; }
.fk-brand img { display: block; width: auto; height: 34px; flex: none; }
.fk-brand span { display: inline-flex; align-items: baseline; gap: .3em; white-space: nowrap; }
.fk-brand b { font-size: 18px; font-weight: 900; letter-spacing: .02em; line-height: 1; }
.fk-brand small { font-size: 18px; font-weight: 800; letter-spacing: .02em; line-height: 1; color: #0B8460; }
.fk-brand.dark b { color: #fff; }
.fk-brand.dark small { color: #3FD9A0; }

/* Layar akun: latar navy, cerita di kiri, form di kartu putih */
.auth { position: relative; display: block; min-height: 100dvh; background: #0B1323; overflow: hidden; isolation: isolate; }
.auth-glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 420px at 85% 10%, rgba(16,185,129,.22), transparent 65%), radial-gradient(560px 360px at 5% 95%, rgba(6,182,212,.14), transparent 65%); }
.auth-glow::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(148,163,184,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.07) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 40% 30%, #000 10%, transparent 72%); mask-image: radial-gradient(ellipse at 40% 30%, #000 10%, transparent 72%); }
.auth-shell { width: 100%; max-width: 1100px; min-height: 100dvh; margin: 0 auto; padding: 32px 24px; display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: 64px; align-items: center; }
.auth-story { color: #CBD5E1; }
.auth-brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; margin-bottom: 44px; }
.auth-brand:hover { text-decoration: none; }
.auth-brand img { height: 38px; width: auto; }
.auth-brand span { display: inline-flex; align-items: baseline; gap: .3em; }
.auth-brand b { font-size: 19px; font-weight: 900; letter-spacing: .02em; line-height: 1; }
.auth-brand small { font-size: 19px; font-weight: 800; letter-spacing: .02em; line-height: 1; color: #3FD9A0; }
.auth-story h2 { color: #fff; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -.035em; font-weight: 800; }
.auth-story h2 em { font-style: normal; color: #6EE7B7; }
.auth-story > p { margin-top: 16px; font-size: 16px; line-height: 1.7; color: #A5B4C8; max-width: 44ch; }
.auth-benefits { display: grid; gap: 12px; margin-top: 32px; max-width: 440px; }
.auth-benefits > div { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(148,163,184,.18); background: rgba(255,255,255,.04); }
.auth-benefits .ic { flex: none; width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: rgba(16,185,129,.15); color: #6EE7B7; }
.auth-benefits strong { display: block; color: #fff; font-size: 14px; }
.auth-benefits span { display: block; margin-top: 2px; font-size: 12.5px; color: #94A3B8; line-height: 1.55; }
.auth-panel { display: flex; justify-content: center; }
.auth-card { width: 100%; background: var(--surface); color: var(--ink); border-radius: 24px; padding: 30px 28px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.06); }
.auth-card h1 { font-size: 25px; letter-spacing: -.03em; }
.auth-card .lead { color: var(--muted); margin-top: 8px; font-size: 14px; line-height: 1.6; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 18px; }
.auth-back:hover { color: var(--ink); text-decoration: none; }
.auth-alt { text-align: center; margin-top: 20px; }
.auth-card .btn-primary { background: #10B981; border-color: #10B981; color: #04231A; box-shadow: 0 8px 22px -10px rgba(16,185,129,.8); border-radius: 13px; }
.auth-card .btn-primary:hover { background: #34D399; border-color: #34D399; }
.code-input { text-align: center; letter-spacing: .5em; font-size: 24px; }
.branch-list { display: grid; gap: 10px; margin-top: 22px; }
.branch-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: border-color .15s, box-shadow .15s; }
.branch-item:hover, .branch-item.on { border-color: #A7F3D0; box-shadow: 0 14px 30px -24px rgba(15,23,42,.4); }
.branch-item b { display: block; font-size: 14.5px; }
.branch-item small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.branch-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: #ECFDF5; color: #059669; flex: none; }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; gap: 24px; padding: 24px 16px 40px; align-items: start; }
  .auth-story h2, .auth-story > p, .auth-benefits { display: none; }
  .auth-brand { margin-bottom: 0; }
  .auth-card { padding: 24px 20px; border-radius: 22px; }
}

/* Sidebar gelap seperti aplikasi FINTATIF lain */
.side { background: #0B1323; border-right-color: #0B1323; color: #CBD5E1; }
.side-top { padding: 20px 18px 12px; }
.side .fk-brand { margin: 0 4px 16px; }
.side .store-card { background: rgba(255,255,255,.05); border-color: rgba(148,163,184,.16); }
.side .store-card b { color: #fff; }
.side .store-card span { color: #94A3B8; }
.side .nav-label { color: #64748B; }
.side .nav a { color: #CBD5E1; }
.side .nav a .ic { color: #64748B; }
.side .nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side .nav a.on { background: rgba(16,185,129,.16); color: #6EE7B7; }
.side .nav a.on .ic { color: #34D399; }
.side .nav a .badge { background: rgba(255,255,255,.08); color: #CBD5E1; }
.side .nav a .badge-ok { background: rgba(16,185,129,.2); color: #6EE7B7; }
.side .nav a .badge-warn { background: rgba(251,191,36,.16); color: #FCD34D; }
.side .side-foot { border-top-color: rgba(148,163,184,.14); }
.side .me b { color: #fff; }
.side .me span { color: #94A3B8; }
.side .me .avatar { background: rgba(16,185,129,.16); color: #6EE7B7; }
.side .me .btn-ghost { color: #94A3B8; }
.side .me .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Kartu angka berwarna seperti dashboard Smart Wealth */
.kpi { border-top: 3px solid var(--c, var(--line)); }
.kpi .k-label .ic { color: var(--c, var(--muted)); }
.kpi.is-dark { background: #1E293B; border-color: #1E293B; color: #fff; }
.kpi.is-dark .k-label, .kpi.is-dark .k-sub { color: #CBD5E1; }
.kpi.is-dark .k-label .ic { color: #6EE7B7; }
.btn-primary { border-radius: 12px; }

/* Foto produk */
.prod-photo { display: block; width: 100%; height: 96px; object-fit: cover; border-radius: 10px; background: var(--sunken); }
.prod-thumb { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; flex: none; background: var(--sunken); }
@media (max-width: 960px) { .prod-photo { height: 84px; } }

/* Nama pembeli di keranjang */
.cust-input { display: flex; gap: 8px; }
.cust-input .input { height: 38px; }
.cust-input .btn-icon { height: 38px; width: 38px; }
.cust-chip { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 12px; background: var(--brand-soft); border: 1px solid var(--brand-line); }
.cust-chip .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; background: var(--surface); }
.cust-chip b { display: block; font-size: 13px; }
.cust-chip small { display: block; font-size: 11px; color: var(--brand-ink); }

/* Ikon Font Awesome */
i.ic { display: inline-flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; font-style: normal; }
i.ic.ic-sm { font-size: 12.5px; }
i.ic.ic-lg { font-size: 19px; }
.empty i.ic { font-size: 28px; }
.success-mark i.ic { font-size: 26px; width: auto; height: auto; }
.nav a i.ic { font-size: 14.5px; width: 20px; }
.bottom-nav a i.ic { font-size: 17px; }
.printer-ic i.ic, .branch-ic i.ic { font-size: 18px; }

/* ================= Dashboard ================= */
.dash-hello { font-size: 22px; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 11.5px; padding: 2px 7px; border-radius: 99px; background: var(--sunken); color: var(--muted); }
.delta.up { background: #ECFDF5; color: #047857; }
.delta.down { background: #FFF1F2; color: #BE123C; }
.kpi.is-dark .delta { background: rgba(255,255,255,.1); color: #E2E8F0; }
.kpi.is-dark .delta.up { background: rgba(16,185,129,.2); color: #6EE7B7; }
.kpi.is-dark .delta.down { background: rgba(244,63,94,.2); color: #FDA4AF; }
.kpi-spark { position: relative; overflow: hidden; }
.kpi-spark canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100% !important; height: 46px !important; pointer-events: none; opacity: .9; }
.kpi-spark .k-sub { position: relative; z-index: 1; margin-bottom: 30px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mini-stats > div { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mini-stats > div > span { grid-row: span 2; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.mini-stats b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.mini-stats small { font-size: 11.5px; color: var(--muted); }
.dash-row { display: grid; gap: 16px; }
.dash-row.r-21 { grid-template-columns: 2fr 1fr; }
.dash-row.r-3 { grid-template-columns: repeat(3, 1fr); }
.chart-card { padding: 16px 18px 18px; display: flex; flex-direction: column; }
.chart-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.chart-card h3 { font-size: 15px; }
.chart-card header p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.chart-box { position: relative; width: 100%; }
.chart-box.h-280 { height: 280px; } .chart-box.h-220 { height: 220px; } .chart-box.h-200 { height: 190px; }
.chart-box .empty { height: 100%; padding: 10px; }
.legend-inline { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.legend-inline span { display: inline-flex; align-items: center; gap: 6px; }
.legend-inline i { width: 14px; height: 4px; border-radius: 9px; display: inline-block; }
.legend-inline i.dash { background: repeating-linear-gradient(90deg, #94A3B8 0 4px, transparent 4px 7px); }
.donut-wrap { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center small { font-size: 11px; color: var(--muted); font-weight: 600; }
.donut-center b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.legend li i { width: 10px; height: 10px; border-radius: 3px; }
.legend li b { font-variant-numeric: tabular-nums; }
.pay-dot { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); flex: none; }
@media (max-width: 1200px) { .dash-row.r-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1100px) { .dash-row.r-21 { grid-template-columns: 1fr; } .mini-stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .dash-row.r-3 { grid-template-columns: 1fr; } .dash .page-head .seg { width: 100%; overflow-x: auto; } .chart-box.h-280 { height: 230px; } }

/* Struk: antrean, indentasi, tiket dapur */
.receipt .ind { padding-left: 10px; }
.receipt .queue-box { margin: 8px 0; padding: 6px 0; border-top: 1px dashed #9CA3AF; border-bottom: 1px dashed #9CA3AF; text-align: center; font-weight: 700; letter-spacing: .1em; font-size: 11px; }
.receipt .queue-box b { display: block; font-size: 28px; letter-spacing: 0; line-height: 1.1; }
.receipt.kitchen .k-item { font-size: 14px; font-weight: 700; margin-top: 4px; }
.receipt .logo { width: 56px; height: 56px; border-radius: 12px; }
.queue-no { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 20px; border-radius: 14px; background: var(--ink); color: var(--surface); margin-bottom: 10px; }
.queue-no small { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.queue-no b { font-size: 34px; line-height: 1; font-weight: 800; }
.pay-parts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.pay-parts span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 700; }
.pay-parts button { border: 0; background: transparent; color: inherit; padding: 2px; display: grid; }
.input.need { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(244,63,94,.18); animation: shake .4s; }
.seg .seg-l { white-space: nowrap; }
@media (max-width: 1250px) { .pos-tools .seg .seg-l { display: none; } }
@media (max-width: 960px) { .cats .seg button { height: 30px; padding: 0 10px; } .cats .seg .seg-l { display: inline; } }

.day-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.day-pick label { position: relative; }
.day-pick input { position: absolute; opacity: 0; }
.day-pick span { display: inline-grid; place-items: center; min-width: 46px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.day-pick input:checked + span { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); }
.day-pick input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }

/* Laporan */
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs-line button { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; border: 0; background: none; font-weight: 700; font-size: 13.5px; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-line button.on { color: var(--ink); border-bottom-color: var(--brand); }
.tabs-line button.on .ic { color: var(--brand); }
.chart-box.h-320 { height: 320px; }
.tbl tfoot td { font-weight: 800; background: var(--raised); border-top: 1px solid var(--line); }
.contrib { display: inline-block; width: 60px; height: 6px; border-radius: 9px; background: var(--sunken); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.contrib i { display: block; height: 100%; background: var(--brand); border-radius: 9px; }
.pnl { padding: 6px 18px 14px; }
.pnl-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; color: var(--ink-2); }
.pnl-row.b { font-weight: 800; color: var(--ink); }
.pnl-row.sub { padding: 6px 0 6px 16px; font-size: 12.5px; color: var(--muted); border-bottom-style: dotted; }
.pnl-row.hl { background: var(--brand-soft); margin: 4px -10px; padding: 11px 10px; border-radius: 10px; border: 0; }
.pnl-row.hl2 { background: var(--ink); color: var(--surface); margin: 8px -10px 0; padding: 13px 10px; border-radius: 12px; border: 0; font-size: 15px; }
.pnl-row.hl2 b { color: inherit; }

/* ================= Layar akun v2 (pola FINTATIF Smart Wealth) ================= */
.auth { --surface: #0F1A2C; --raised: #13203A; --sunken: #0B1426; --line: rgba(148,163,184,.22); --line-soft: rgba(148,163,184,.14); --ink: #F1F5F9; --ink-2: #CBD5E1; --muted: #94A3B8; --faint: #64748B; --brand: #10B981; --brand-ink: #6EE7B7; --brand-soft: rgba(16,185,129,.14); --brand-line: rgba(110,231,183,.35); --ring: rgba(16,185,129,.22); --warn-soft: rgba(251,191,36,.12); --warn: #FCD34D;
  min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; background: #0B1323; background-image: radial-gradient(800px 480px at 50% -10%, rgba(16,185,129,.12), transparent 65%); color: var(--ink); }
.auth-frame { width: 100%; max-width: 980px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 26px; overflow: hidden; border: 1px solid rgba(148,163,184,.18); box-shadow: 0 40px 90px -40px rgba(0,0,0,.8); background: #0E1828; }
.auth-story { position: relative; padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; gap: 0; color: #CBD5E1; background: #0B1323; overflow: hidden; isolation: isolate; }
.auth-story::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px 300px at 55% 0%, rgba(16,185,129,.25), transparent 70%); }
.auth-story::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(148,163,184,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.07) 1px, transparent 1px); background-size: 44px 44px; }
.auth-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #6EE7B7; margin-bottom: 16px; }
.auth-story h2 { color: #fff; font-size: clamp(28px, 3vw, 36px); line-height: 1.12; letter-spacing: -.035em; font-weight: 800; }
.auth-story h2 em { font-style: normal; color: #6EE7B7; }
.auth-story > p { margin-top: 14px; font-size: 14px; line-height: 1.7; color: #A5B4C8; max-width: 40ch; }
.auth-story .auth-benefits { margin-top: 26px; gap: 14px; }
.auth-story .auth-benefits > div { padding: 0; border: 0; background: none; }
.auth-story .auth-benefits .ic { width: 34px; height: 34px; padding: 0; border-radius: 10px; background: rgba(16,185,129,.16); color: #6EE7B7; font-size: 16px; }
.auth-story .auth-benefits strong { font-size: 13.5px; }
.auth-story .auth-benefits span { font-size: 12px; }
.auth-badge { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 28px; padding: 9px 14px; border-radius: 12px; border: 1px solid rgba(110,231,183,.35); background: rgba(16,185,129,.1); color: #A7F3D0; font-size: 12.5px; font-weight: 700; }
.auth-panel { display: flex; flex-direction: column; padding: 30px 40px 22px; background: #0F1A2C; }
.auth-card { width: 100%; background: none; box-shadow: none; padding: 0; border-radius: 0; color: var(--ink); flex: 1; }
.auth-card h1 { font-size: 24px; letter-spacing: -.03em; color: #fff; }
.auth-card .lead { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.auth-card.center h1, .auth-card.center .lead { text-align: center; }
.auth-logo { display: flex; justify-content: center; align-items: center; gap: 9px; margin: 6px 0 22px; }
.auth-logo img { height: 40px; width: auto; }
.auth-logo span { display: inline-flex; align-items: baseline; gap: .3em; }
.auth-logo b { color: #fff; font-size: 21px; font-weight: 900; letter-spacing: .02em; line-height: 1; }
.auth-logo small { color: #3FD9A0; font-size: 21px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.auth-back { color: var(--muted); }
.auth-back:hover { color: #fff; }
.auth .field > span, .auth .label { color: var(--ink-2); }
.auth .label-row { display: flex; justify-content: space-between; align-items: center; }
.auth .pw-forgot { font-size: 12px; font-weight: 700; color: #6EE7B7; }
.auth .input { background: #0B1426; border-color: rgba(148,163,184,.24); color: #F1F5F9; height: 46px; border-radius: 12px; }
.auth .input:focus { border-color: #10B981; box-shadow: 0 0 0 4px rgba(16,185,129,.18); }
.auth .input::placeholder { color: #64748B; }
.auth .input-wrap > .ic { color: #64748B; }
.auth .btn { background: rgba(255,255,255,.04); border-color: rgba(148,163,184,.24); color: #E2E8F0; }
.auth .btn:hover { background: rgba(255,255,255,.08); }
.auth .btn-ghost { background: transparent; border-color: transparent; }
.auth .btn-primary, .auth-card .btn-primary { background: #10B981; border-color: #10B981; color: #04231A; box-shadow: 0 10px 26px -12px rgba(16,185,129,.9); border-radius: 13px; height: 50px; font-weight: 800; }
.auth .btn-primary:hover { background: #34D399; border-color: #34D399; }
.auth .gbtn { background: #fff; color: #0F172A; border-color: #fff; }
.auth .note { background: rgba(255,255,255,.04); border-color: rgba(148,163,184,.16); color: var(--ink-2); }
.auth .note .ic { color: #6EE7B7; }
.auth .note-warn { background: rgba(251,191,36,.1); border-color: transparent; }
.auth .note-warn .ic { color: #FCD34D; }
.auth .hint { color: #7C8DA4; }
.auth .or { color: #64748B; } .auth .or::before, .auth .or::after { background: rgba(148,163,184,.2); }
.auth a { color: #6EE7B7; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--ink-2); }
.auth-alt a { font-weight: 800; }
.auth-alt a.muted { color: var(--muted); font-weight: 600; }
.auth-legal { text-align: center; font-size: 11.5px; color: #64748B; margin-top: 22px; }
.auth-legal a { text-decoration: underline; }
.auth-copy { text-align: center; font-size: 11.5px; font-weight: 700; color: #64748B; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(148,163,184,.14); }
.auth-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 22px; }
.auth-steps span { padding-top: 8px; border-top: 2.5px solid rgba(148,163,184,.25); font-size: 11.5px; font-weight: 700; color: #64748B; }
.auth-steps span.on { border-top-color: #10B981; color: #6EE7B7; }
.auth .branch-item { background: #0B1426; border-color: rgba(148,163,184,.22); color: var(--ink); }
.auth .branch-item small { color: var(--muted); }
.auth .branch-ic { background: rgba(16,185,129,.14); color: #6EE7B7; }
.auth .switch i { background: rgba(148,163,184,.3); }
@media (max-width: 860px) {
  .auth { padding: 0; place-items: stretch; }
  .auth-frame { grid-template-columns: 1fr; border-radius: 0; border: 0; min-height: 100dvh; }
  .auth-story { display: none; }
  .auth-panel { padding: 22px 20px 18px; }
}

.sync-opt { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--raised); }
.sync-opt.on { border-color: var(--brand-line); background: var(--brand-soft); }
.sync-opt b { font-size: 14px; }
.sync-opt p { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.sync-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); flex: none; font-size: 20px; }

i.ic { display: inline-flex !important; }

.auth-frame { width: min(980px, 100%); justify-self: center; }

.auth { display: flex !important; align-items: center; justify-content: center; }
.auth-frame { width: 100%; max-width: 980px; flex: 0 1 980px; }
@media (max-width: 860px) { .auth { align-items: stretch; } .auth-frame { max-width: none; flex: 1; } }

/* ================= Mode jualan offline / online ================= */
.pos { --mode: #10B981; --mode-ink: #047857; --mode-soft: #ECFDF5; --mode-line: #A7F3D0; }
.pos[data-mode="online"] { --mode: #F97316; --mode-ink: #C2410C; --mode-soft: #FFF7ED; --mode-line: #FED7AA; }
.mode-switch { display: inline-flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--sunken); border: 1px solid var(--line-soft); flex: none; }
.mode-switch button { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 14px 0 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); text-align: left; transition: background .15s, color .15s, box-shadow .15s; }
.mode-switch button .ic { width: 28px; height: 28px; border-radius: 8px; font-size: 16px; background: var(--surface); }
.mode-switch b { display: block; font-size: 13px; line-height: 1.1; }
.mode-switch small { display: block; font-size: 10.5px; font-weight: 600; opacity: .8; }
.mode-switch .m-off.on { background: #10B981; color: #fff; box-shadow: 0 6px 16px -8px rgba(16,185,129,.8); }
.mode-switch .m-on.on { background: #F97316; color: #fff; box-shadow: 0 6px 16px -8px rgba(249,115,22,.8); }
.mode-switch .on .ic { background: rgba(255,255,255,.2); color: #fff; }
.cart { border-top: 4px solid var(--mode); transition: border-color .2s; }
.cart-head { background: linear-gradient(180deg, var(--mode-soft), transparent); }
.mode-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; background: var(--mode); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.mode-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.pos .prod-price { color: var(--mode-ink); }
.pos .prod:hover { border-color: var(--mode-line); }
.pos .prod-qty { background: var(--mode); }
.pos .cart-actions .btn-primary { background: var(--mode); border-color: var(--mode); color: #fff; }
.pos .cart-actions .btn-primary:hover { filter: brightness(.95); }
.pos[data-mode="online"] .grid-products { background: linear-gradient(180deg, rgba(249,115,22,.06), transparent 140px); }
.pos .cart-fab .count { background: var(--mode); }
.seg.seg-full { display: flex; width: 100%; }
.seg.seg-full button { flex: 1; justify-content: center; }
@media (max-width: 960px) {
  .pos-tools .row { flex-wrap: wrap; }
  .pos-tools .row .input-wrap { flex-basis: 100%; }
  #pos-mode, .mode-switch { width: 100%; }
  .mode-switch button { flex: 1; }
}
