:root {
  --brand: #00A39D; --brand-d: #00736E; --brand-dd: #0C3B39; --brand-soft: #E6F6F5;
  --ink: #102A29; --muted: #5B6B6A; --line: #DDE6E5; --line2: #EEF3F2; --bg: #F4F7F7; --card: #fff;
  --ok: #16683F; --ok-bg: #E3F5EC; --warn: #8A4E00; --warn-bg: #FDF0DC; --bad: #A3361F; --bad-bg: #FBE9E5;
  --r: 14px; --r-lg: 18px;
  --sh: 0 1px 2px rgba(16,42,41,.06), 0 4px 16px rgba(16,42,41,.05);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
body { font-size: 15px; line-height: 1.45; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--brand-d); }
h1 { font-size: 26px; margin: 0; letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: 17px; margin: 0 0 12px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
h3, .h3 { font-size: 15px; margin: 0 0 8px; font-weight: 800; }
code { background: var(--line2); padding: 2px 6px; border-radius: 6px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); } .small { font-size: 13px; } .xs { font-size: 12px; }
.center { text-align: center; } .block { display: block; width: 100%; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.row { display: flex; align-items: center; } .gap { gap: 10px; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; } .stack { display: flex; flex-direction: column; gap: 16px; }
.r { text-align: right; } .nowrap { white-space: nowrap; } .pad { padding: 16px 20px 0; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); }
.hide-sm { } .mobile-only { display: none; }

/* Tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 700; font-size: 14px; text-decoration: none; background: var(--card); color: var(--ink); white-space: nowrap; transition: background .15s, border-color .15s; }
.btn.primary { background: var(--brand-d); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-dd); }
.btn.ghost { border-color: var(--line); background: var(--card); }
.btn.ghost:hover:not(:disabled) { border-color: var(--brand); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger.ghost { background: #fff; color: var(--bad); border-color: #EBC8C0; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.lg { height: 50px; font-size: 15px; }
.btn.xl { height: 58px; font-size: 17px; font-weight: 800; border-radius: 14px; }
.btn.block { display: flex; width: 100%; }
.btn.loading { opacity: .7; pointer-events: none; }
.btn.pdf { border: 1px solid #EBC8C0; color: var(--bad); background: #fff; }
.btn.xls { border: 1px solid #BFE0CC; color: var(--ok); background: #fff; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.icon-btn:hover { background: var(--line2); color: var(--ink); }
.icon-btn.light { color: #fff; background: rgba(255,255,255,.1); }
.icon-btn.light:hover { background: rgba(255,255,255,.2); color: #fff; }
.link { background: none; border: 0; padding: 0; color: var(--brand-d); font-weight: 700; text-decoration: none; }

/* Form */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea { height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 500; width: 100%; }
input:focus, select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand-d); }
input[type=date] { width: auto; }
.color-in { width: 56px; padding: 4px; }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.grid-form .span2 { grid-column: 1 / -1; }
.field { margin-top: 12px; }
.big-input { height: 60px; font-size: 26px; font-weight: 800; }
.switch-row { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line2); color: var(--ink); font-size: 14px; }
.switch { appearance: none; width: 52px !important; height: 30px !important; border-radius: 15px; background: #B8C7C5; border: 0; padding: 0; position: relative; flex-shrink: 0; transition: background .15s; cursor: pointer; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--brand-d); }
.switch:checked::after { transform: translateX(22px); }

/* Seg & chips */
.seg { display: inline-flex; background: var(--line2); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(16,42,41,.12); }
.seg.sm button { height: 34px; padding: 0 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { height: 40px; padding: 0 18px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; }
.chip.on { background: var(--brand-d); color: #fff; border-color: var(--brand-d); }

/* Kartu & elemen umum */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px; background: var(--line2); color: #4F5F5E; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.teal { background: var(--brand-soft); color: var(--brand-dd); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 20px; text-decoration: none; margin-top: 10px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.teal { background: var(--brand-soft); color: var(--brand-dd); }
.note { padding: 12px 14px; border-radius: 12px; font-size: 13px; margin-top: 12px; }
.note.warn { background: #FDF6EA; color: #6B3D00; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; color: var(--muted); text-align: center; }
.empty.sm { padding: 28px 10px; }
.empty svg { color: #9FB3B1; }
.line { padding: 10px 0; border-bottom: 1px solid var(--line2); }
.line:last-child { border-bottom: 0; }
.avatar { width: 36px; height: 36px; border-radius: 18px; background: var(--brand-soft); color: var(--brand-dd); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.avatar.lg { width: 46px; height: 46px; border-radius: 23px; background: var(--brand); color: #fff; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; border-radius: 28%; background: var(--brand); color: #fff; flex-shrink: 0; }
.logo-img { border-radius: 22%; object-fit: contain; background: #fff; flex-shrink: 0; }
.stat { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FBFCFC; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.dim { opacity: .55; }
th.r, td.r { text-align: right; }
.thumb { width: 30px; height: 30px; border-radius: 15px; border: 0; padding: 0; overflow: hidden; vertical-align: middle; margin-right: 8px; background: var(--line2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Layar tengah (login, loading) */
.center-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 32px 20px; text-align: center; max-width: 960px; margin: 0 auto; }
.center-screen.narrow { max-width: 480px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand-d); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: var(--brand-dd); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.auth-brand { display: flex; align-items: center; gap: 14px; text-align: left; }
.auth-name { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.auth-tag { font-size: 14px; opacity: .8; }
.auth-hero { font-size: 34px; line-height: 1.2; letter-spacing: -.02em; display: block; max-width: 520px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.auth-points li { display: flex; gap: 10px; align-items: center; opacity: .92; }
.auth-card { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 48px; max-width: 480px; width: 100%; margin: 0 auto; }
.auth-card .seg { width: 100%; } .auth-card .seg button { flex: 1; height: 42px; font-size: 14px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.onboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; width: 100%; text-align: left; }

/* POS */
.pos { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.tb-title { font-weight: 800; font-size: 16px; }
.tb-sub { font-size: 12px; color: var(--muted); }
.pos-body { flex: 1; display: flex; min-height: 0; }
.pos-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px; overflow-y: auto; }
.pos-search { display: flex; gap: 10px; }
.search { flex-direction: row; align-items: center; gap: 10px; flex: 1; height: 50px; padding: 0 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; color: var(--muted); }
.search:focus-within { border-color: var(--brand); }
.search input { border: 0; height: auto; padding: 0; box-shadow: none !important; }
.search.sm { height: 44px; min-width: 260px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pcard { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; min-height: 92px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); text-align: left; transition: border-color .12s, transform .06s; }
.pcard:active { transform: scale(.98); }
.pcard.in { border-color: var(--brand); }
.pcard.out { opacity: .6; }
.pthumb { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-dd); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex-shrink: 0; }
.pinfo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pname { font-weight: 700; font-size: 14px; line-height: 1.3; }
.pmeta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pprice { font-weight: 800; color: var(--brand-d); }
.pbadge { position: absolute; top: 8px; right: 8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--brand-d); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.pos-cart { width: 400px; flex-shrink: 0; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.cart-head h2 { margin: 0; }
.cart-opts { padding: 0 20px 12px; border-bottom: 1px solid var(--line); }
.table-in { width: 90px; height: 42px; }
.cart-lines { flex: 1; overflow-y: auto; padding: 4px 20px; }
.cline { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cl-info { flex: 1; min-width: 0; } .cl-name { font-weight: 700; font-size: 14px; } .cl-unit { font-size: 12px; color: var(--muted); }
.cl-total { width: 96px; text-align: right; font-weight: 700; font-size: 14px; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 17px; font-weight: 700; }
.qty button:last-child { background: var(--brand-soft); border-color: transparent; color: var(--brand-dd); }
.qty span { min-width: 22px; text-align: center; font-weight: 800; }
.cart-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line); background: #FBFCFC; display: flex; flex-direction: column; gap: 8px; }
.trow { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.trow span:last-child { color: var(--ink); font-weight: 600; }
.trow.big { font-size: 16px; color: var(--ink); font-weight: 700; padding: 4px 0; }
.trow.big span:last-child { font-size: 24px; font-weight: 800; }

/* Pembayaran */
.pay { display: flex; gap: 20px; }
.pay-methods { width: 200px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.pm { height: 50px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; text-align: left; padding: 0 14px; }
.pm.on { border-color: var(--brand-d); background: var(--brand-soft); color: var(--brand-dd); }
.pay-body { flex: 1; min-width: 0; }
.pay-body .field:first-child { margin-top: 0; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; }
.change { display: flex; justify-content: space-between; align-items: baseline; background: var(--bg); border-radius: 12px; padding: 14px 16px; margin-top: 14px; font-weight: 700; }
.change strong { font-size: 24px; color: var(--brand-d); }
.change.big { margin: 0 0 14px; background: var(--brand-soft); }
.qris { display: flex; gap: 18px; align-items: center; }
.qris img { width: 220px; max-width: 50%; border-radius: 12px; border: 1px solid var(--line); }
.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 6px; }
.opt { min-height: 48px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; }
.opt span { font-weight: 500; font-size: 12px; color: var(--muted); }
.opt.on { border-color: var(--brand-d); background: var(--brand-soft); }

/* Struk */
.receipt { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 16px; max-width: 340px; margin: 0 auto; color: #000; }
.r-center { text-align: center; } .r-name { font-size: 15px; }
.r-sep { border-top: 1px dashed #999; margin: 8px 0; }
.r-row { display: flex; justify-content: space-between; gap: 10px; }
.r-total { font-weight: 800; font-size: 14px; margin: 4px 0; }
#print-area { display: none; }
@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; }
  body.printing .receipt { border: 0; max-width: none; width: 100%; padding: 0; font-size: 11px; }
  @page { margin: 4mm; }
}

/* Modal */
#modal-root:empty { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(12,30,29,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; animation: fade .12s; }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 480px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 10px; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 8px 22px 16px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 18px; border-top: 1px solid var(--line2); flex-wrap: wrap; }
.modal form { display: contents; }
.list { display: flex; flex-direction: column; margin-top: 10px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line2); background: none; text-align: left; }
.list-row:hover { background: var(--bg); }
.scanner-box { width: 100%; min-height: 260px; border-radius: 14px; overflow: hidden; background: #0C1E1D; color: #fff; display: flex; align-items: center; justify-content: center; }
.scanner-box video { width: 100% !important; }
.selfie-box { position: relative; width: 100%; aspect-ratio: 3/4; max-height: 52vh; border-radius: 16px; overflow: hidden; background: #0C1E1D; }
.selfie-box video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.selfie-ring { position: absolute; inset: 12% 18%; border: 3px dashed var(--brand); border-radius: 50%; pointer-events: none; }
@keyframes fade { from { opacity: 0; } }

/* Toast & jaringan */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .2s; z-index: 80; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: var(--ok); } .toast.error { background: var(--bad); } .toast.warn { background: #8A4E00; }
.net { position: fixed; top: 0; left: 0; right: 0; z-index: 90; background: #8A4E00; color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 6px 12px; }

/* Karyawan (HP) */
.emp { max-width: 520px; margin: 0 auto; min-height: 100vh; }
.emp-head { background: var(--brand-dd); color: #fff; padding: 24px 18px 60px; padding-top: max(24px, env(safe-area-inset-top)); }
.emp-hi { font-size: 18px; font-weight: 800; } .emp-sub { font-size: 12px; opacity: .8; }
.emp-body { margin-top: -44px; padding: 0 14px 28px; display: flex; flex-direction: column; gap: 14px; }
.clock-card { display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: 0 8px 24px rgba(12,59,57,.12); border: 0; }
.clock-card > .row { width: 100%; }
.clock { font-size: 48px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.clock-btn { width: 172px; height: 172px; border-radius: 50%; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: transform .08s; }
.clock-btn:active:not(:disabled) { transform: scale(.96); }
.clock-btn.go { background: var(--brand-d); box-shadow: 0 0 0 10px var(--brand-soft); }
.clock-btn.stop { background: var(--bad); box-shadow: 0 0 0 10px var(--bad-bg); }
.clock-btn.done { background: #8FA8A6; box-shadow: 0 0 0 10px var(--line2); opacity: 1; }
.cb-label { font-size: 19px; font-weight: 800; } .cb-sub { font-size: 11px; opacity: .85; }
.mini { background: var(--bg); border-radius: 12px; padding: 12px; }
.mini strong { font-size: 18px; }
.clock-card .grid2 { width: 100%; }
.adj { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line2); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.hist { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line2); }
.h-date { width: 40px; text-align: center; flex-shrink: 0; }
.h-date strong { font-size: 18px; }

/* Owner */
.owner { display: flex; min-height: 100vh; }
.side { width: 248px; flex-shrink: 0; background: var(--brand-dd); color: #CFE3E1; padding: 20px 14px; display: flex; flex-direction: column; gap: 3px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; }
.side-name { font-size: 17px; font-weight: 800; color: #fff; line-height: 1.2; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #CFE3E1; text-decoration: none; font-size: 14px; font-weight: 600; }
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-link.on { background: color-mix(in srgb, var(--brand) 30%, transparent); color: #fff; font-weight: 700; }
.side-link .count { margin-left: auto; background: #E8A317; color: #3B2600; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 10px; }
.side-sep { height: 1px; background: rgba(255,255,255,.12); margin: 10px 4px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.12); }
.su-name { color: #fff; font-weight: 700; font-size: 14px; } .su-role { font-size: 12px; }
.owner-main { flex: 1; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.page-head p { margin: 4px 0 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.k-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.k-val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.d { font-size: 12px; font-weight: 700; color: var(--muted); }
.d.up { color: var(--ok); } .d.down { color: var(--bad); }
.cols { display: flex; flex-wrap: wrap; gap: 16px; }
.grow2 { flex: 2 1 480px; min-width: 0; } .grow1 { flex: 1 1 300px; min-width: 0; }
.bars { display: flex; align-items: stretch; gap: 6px; height: 260px; padding-top: 8px; }
.bar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar-col { width: 100%; max-width: 48px; background: var(--brand); opacity: .85; border-radius: 6px 6px 0 0; }
.bar:hover .bar-col { opacity: 1; }
.bar-v { font-size: 10px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.bar-l { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; max-width: 100%; }
.hbar { margin-bottom: 12px; }
.track { height: 9px; border-radius: 5px; background: var(--line2); margin-top: 6px; overflow: hidden; }
.track div { height: 100%; background: var(--brand); border-radius: 5px; }
.invite { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.invite h2 { margin-bottom: 4px; }
.code-box { font-family: ui-monospace, Menlo, monospace; font-size: 26px; font-weight: 800; letter-spacing: .2em; padding: 10px 18px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dd); }
.reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.report { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.r-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dd); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.shift-list { display: flex; flex-direction: column; gap: 10px; }
.shift-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 10px; align-items: end; margin-top: 8px; }
.sub { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line2); }
.qris-prev { width: 120px; border-radius: 10px; border: 1px solid var(--line); }

/* Responsif */
@media (max-width: 1100px) { .pos-cart { width: 340px; } }
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .mobile-only { display: block; }
  .auth-card { padding: 32px 20px; }
  .owner { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 10px; gap: 4px; align-items: center; }
  .side-brand { padding: 0 8px 0 4px; } .side-name { display: none; }
  .side-link { flex-shrink: 0; padding: 10px; } .side-link span { display: none; }
  .side-link .count { display: inline; }
  .side-sep, .side .grow { display: none; }
  .side-user { border: 0; padding: 0 0 0 6px; margin-left: auto; }
  .side-user .grow { display: none; }
  .owner-main { padding: 20px 16px 40px; }
  .pos { height: auto; min-height: 100dvh; }
  .pos-body { flex-direction: column; }
  .pos-main { overflow: visible; }
  .pos-cart { width: 100%; border-left: 0; border-top: 1px solid var(--line); position: sticky; bottom: 0; max-height: 70vh; box-shadow: 0 -8px 24px rgba(16,42,41,.08); }
  .cart-lines { max-height: 30vh; }
  .hide-sm { display: none; }
  .pay { flex-direction: column; }
  .pay-methods { width: 100%; flex-direction: row; overflow-x: auto; }
  .pm { flex-shrink: 0; }
  .qris { flex-direction: column; } .qris img { max-width: 100%; }
  .shift-row { grid-template-columns: 1fr 1fr; }
  .search.sm { min-width: 0; width: 100%; }
  .reports { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  h1 { font-size: 22px; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pcard { flex-direction: column; align-items: flex-start; min-height: 0; padding: 12px; }
  .pthumb { width: 40px; height: 40px; font-size: 14px; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { border-radius: 20px 20px 0 0; max-height: 92dvh; }
  .k-val { font-size: 22px; }
}

/* ================= v2: multi-outlet, ceklis, absensi, dashboard ================= */
.block { display: block; }
.mt { margin-top: 14px; }
.center-row { justify-content: center; }
.center-items { align-items: center; text-align: center; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.icon-btn.sm { width: 30px; height: 30px; }
.chip.sm { height: 34px; padding: 0 12px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.card.soft { background: var(--bg); border: 0; padding: 12px 14px; }
.note.teal { background: var(--brand-soft); color: var(--brand-dd); margin-top: 0; }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.count-pill { background: #E8A317; color: #3B2600; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 10px; }
.o-dot { display: inline-block; width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; vertical-align: middle; }

/* Beranda / pilih outlet */
.picker { max-width: 760px; margin: 0 auto; padding: 18px 18px 40px; display: flex; flex-direction: column; gap: 18px; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brandrow { display: flex; align-items: center; gap: 14px; }
.brandrow p { margin: 2px 0 0; }
.outlet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.outlet-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--oc); border-radius: 16px; text-decoration: none; color: var(--ink); transition: transform .08s, box-shadow .12s; }
.outlet-card:hover { box-shadow: var(--sh); }
.outlet-card:active { transform: scale(.99); }
.oc-ic { width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--oc) 14%, #fff); color: var(--oc); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.menu-row { display: flex; flex-direction: column; gap: 10px; }
.menu-row .btn { justify-content: flex-start; }

/* Halaman modul */
.app-page { min-height: 100vh; display: flex; flex-direction: column; }
.app-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--brand-dd); color: #fff; }
.ah-back { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(255,255,255,.1); text-decoration: none; flex-shrink: 0; }
.ah-back:hover { background: rgba(255,255,255,.2); }
.ah-pad { width: 4px; }
.ah-title { font-weight: 800; font-size: 17px; line-height: 1.2; }
.ah-sub { font-size: 12px; opacity: .8; }
.app-head .o-dot { width: 12px; height: 12px; border-radius: 6px; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.app-main { width: 100%; max-width: 980px; margin: 0 auto; padding: 16px 14px 48px; display: flex; flex-direction: column; gap: 14px; }
.app-main.narrow { max-width: 560px; }
.modmenu { display: flex; flex-direction: column; gap: 10px; }
.mod { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); }
.mod:hover { border-color: var(--brand); }
.mod-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--brand-soft); color: var(--brand-dd); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Ceklis barang */
.ck-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--brand-dd); color: #fff; padding: 0 14px 14px; gap: 8px; }
.ck-stats div { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px; text-align: center; display: flex; flex-direction: column; }
.ck-stats strong { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-stats span { font-size: 11px; opacity: .85; }
.ck-form h2 { margin-bottom: 4px; }
.ck-photo-row { display: flex; gap: 12px; }
.ck-shot { width: 120px; min-height: 150px; border: 2px dashed var(--line); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; text-align: center; cursor: pointer; flex-shrink: 0; overflow: hidden; padding: 6px; background: var(--bg); }
.ck-shot.has { border-style: solid; border-color: var(--brand); padding: 0; }
.ck-shot img { width: 100%; height: 100%; object-fit: cover; }
.ck-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ck-fields select { width: 120px; flex-shrink: 0; }
.rp-in { flex-direction: row; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding-left: 12px; color: var(--muted); }
.rp-in input { border: 0; box-shadow: none !important; }
.ck-sub { font-size: 13px; font-weight: 700; color: var(--brand-d); min-height: 18px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.seg.tabs4 { display: flex; width: 100%; }
.seg.tabs4 button { flex: 1; }
.ck-list { display: flex; flex-direction: column; gap: 8px; }
.ck-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.ck-item.done { background: #F6FBF8; }
.ck-item.done strong { color: var(--muted); }
.ck-item.asked { border-color: #E8A317; box-shadow: 0 0 0 2px #FDF0DC; }
.ck-item.flat { border: 0; padding: 0; margin: 4px 0 10px; }
.ck-thumb { width: 56px; height: 56px; border-radius: 12px; border: 0; padding: 0; background: var(--bg); color: var(--muted); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.ck-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ck-chk { width: 40px; height: 40px; border-radius: 20px; border: 2px solid var(--line); background: #fff; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ck-chk.on { background: var(--ok); border-color: var(--ok); }
.req { margin-top: 6px; font-size: 12.5px; background: var(--warn-bg); color: var(--warn); padding: 6px 10px; border-radius: 8px; }
.req.no { background: var(--bad-bg); color: var(--bad); }
.req.ok { background: var(--ok-bg); color: var(--ok); }
.photo-full { max-width: 100%; max-height: 70vh; border-radius: 12px; }

/* Absensi */
.stbox { width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--bg); text-align: left; font-size: 14px; }
.stbox strong { font-size: 16px; }
.stbox.ok { background: var(--ok-bg); color: var(--ok); }
.stbox.warn { background: var(--warn-bg); color: var(--warn); }
.stbox.off { background: #F1ECFD; color: #5B21B6; }
.clock-card { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hist { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.hist:last-child { border-bottom: 0; }
.photo-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.photo-row figure { margin: 0; flex: 1 1 160px; }
.photo-row img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; background: var(--bg); }
.photo-row figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }
.locline { padding: 12px; background: var(--bg); border-radius: 12px; font-size: 14px; }

/* Rekap */
.dnav { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.dnav input { flex: 1; width: auto; }
.grp h3 { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 5px; display: inline-block; }
.hrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line2); background: none; text-align: left; }
.hrow:last-child { border-bottom: 0; }
.hrow:hover { background: var(--bg); }
.hero { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; flex-shrink: 0; }
.legend { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
.legend.inline { flex-direction: row; flex-wrap: wrap; gap: 14px; margin-bottom: 6px; }
.lg { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.lg i { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.lg span { flex: 1; }
.bars.sm { height: 140px; gap: 3px; }
.bars.dual { height: 240px; }
.bar-pair { display: flex; align-items: flex-end; gap: 2px; width: 100%; height: 100%; justify-content: center; }
.bar-pair .bar-col { max-width: 18px; flex: 1; }
.bar-col.alt { background: #D9822B; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg); }
tr.tot td { font-weight: 700; background: #FBFCFC; }

/* Dashboard */
.side-sub { display: block; font-size: 11px; font-weight: 600; opacity: .7; }
.dlayout { display: flex; gap: 18px; align-items: flex-start; }
.secnav { width: 210px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; position: sticky; top: 12px; }
.secnav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font-weight: 600; font-size: 14px; color: var(--muted); text-align: left; }
.secnav button:hover { background: var(--bg); color: var(--ink); }
.secnav button.on { background: var(--brand-soft); color: var(--brand-dd); font-weight: 700; }
.dbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.stmt { width: 100%; }
.stmt td { padding: 9px 4px; }
.stmt tr.h td { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .04em; padding-top: 16px; background: none; }
.stmt tr.tot td { border-top: 1.5px solid var(--line); }
.stmt tr.big td { font-size: 17px; }
.appr { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.appr:last-child { border-bottom: 0; }
.card-head.wrap { flex-wrap: wrap; }
.flabel { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { flex-direction: row; align-items: center; gap: 0; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 19px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; }
.pick input:checked + span { background: var(--brand-d); border-color: var(--brand-d); color: #fff; }
.pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.swatch { flex-direction: row; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch span { width: 30px; height: 30px; border-radius: 15px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.field[hidden] { display: none; }

@media (max-width: 900px) {
  .dlayout { flex-direction: column; }
  .secnav { width: 100%; position: static; flex-direction: row; overflow-x: auto; padding: 6px; }
  .secnav button { flex-shrink: 0; padding: 8px 12px; }
  .secnav button span { white-space: nowrap; }
}
@media (max-width: 520px) {
  .ck-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ck-photo-row { flex-direction: column; }
  .ck-shot { width: 100%; min-height: 120px; }
  .donut { width: 120px; height: 120px; }
  .hero { gap: 14px; }
}
.r-item { font-weight: 600; margin-top: 4px; }
