/* CBL Sales – styles. Four colour themes, switched by Admin → Settings. */
:root, [data-theme="classic"] {
  --bg:#EEF2F8; --card:#FFFFFF; --ink:#0F1B33; --muted:#556070; --line:#E1E6EE; --soft:#F6F8FC; --track:#E6EBF3;
  --primary:#1A4EA2; --primary-2:#143E82; --on-primary:#FFFFFF; --accent:#F99639; --on-accent:#1C1000;
  --ok:#106D40; --ok-bg:#E2F3E7; --ok-ink:#0B5530; --warn-bg:#FFEBD3; --warn-ink:#5A3200;
  --bad:#B8321A; --bad-bg:#FDE6E0; --bad-ink:#8F2A15; --info-bg:#E6EEFB; --info-ink:#173F86;
  --side:linear-gradient(180deg,#14336E,#0A1F45); --side-ink:#E8EEF9; --shadow:0 1px 2px rgba(15,27,51,.06), 0 10px 28px rgba(15,27,51,.08);
  --btn-top:#2F6BD0; --btn-edge:#0F3577; --ok-top:#6CC27B; --ok-edge:#2A7039; --acc-top:#FFB061; --acc-edge:#C46F1D; --bad-top:#F0605A; --bad-edge:#A42621;
}
[data-theme="leaf"] { --bg:#F1F6F2; --ink:#0E1F14; --muted:#4F5F55; --line:#DDE8E0; --primary:#106D40; --primary-2:#0B5530; --info-bg:#E3F1E8; --info-ink:#0B5530; --side:#0B3D24; --side-ink:#E6F3EA; }
[data-theme="mono"] { --bg:#F4F5F2; --ink:#0D0D0D; --muted:#5B6168; --line:#E2E4DF; --primary:#0D0D0D; --primary-2:#2B2B2B; --info-bg:#E8EEF9; --info-ink:#1A4EA2; --side:#0D0D0D; --side-ink:#EDEDED; }
[data-theme="midnight"] {
  --bg:#0B1630; --card:#15254D; --ink:#FFFFFF; --muted:#B4C0DA; --line:#25386A; --primary:#2F6BD0; --primary-2:#2459B3; --on-primary:#FFFFFF;
  --ok:#59B069; --ok-bg:#16402B; --ok-ink:#B8EBC5; --warn-bg:#4A2E10; --warn-ink:#FFD9AE; --bad:#FF8A70; --bad-bg:#4A1D14; --bad-ink:#FFC4B6;
  --info-bg:#1C3266; --info-ink:#C9D9FF; --side:linear-gradient(180deg,#0C1A3A,#060E22); --side-ink:#DCE5F7; --soft:#1B2E5C; --track:#22366A;
  --shadow:inset 0 1px 0 rgba(255,255,255,.06), 0 10px 28px rgba(0,0,0,.35); color-scheme: dark; --btn-edge:#123B85;
}
* { box-sizing: border-box; }
html, body { margin:0; background:var(--bg); color:var(--ink); font-family:'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size:15px; line-height:1.45; -webkit-text-size-adjust:100%; }
body { min-height:100dvh; -webkit-tap-highlight-color: transparent; }
a { color:var(--primary); }
[data-theme="midnight"] a { color:#9CC0FF; }
h1 { font-size:22px; margin:0; letter-spacing:-.01em; } h2 { font-size:17px; margin:0; } h3 { font-size:15px; margin:0; }
.muted { color:var(--muted); } .small { font-size:12.5px; } .tiny { font-size:11.5px; } .b { font-weight:700; } .xb { font-weight:800; }
.num { font-variant-numeric: tabular-nums; }
.row { display:flex; gap:10px; align-items:center; } .row.wrap { flex-wrap:wrap; } .between { justify-content:space-between; } .grow { flex:1; min-width:0; }
.col { display:flex; flex-direction:column; gap:12px; } .gap6 { gap:6px; } .gap16 { gap:16px; }
.grid2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.grid4 { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; }
.card { background:var(--card); border-radius:18px; padding:16px; box-shadow:var(--shadow); }
.lift { transition:transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s; } .lift:hover { transform:translateY(-3px); }
.card.pad0 { padding:0; overflow:hidden; }
.kpi .l { font-size:12px; color:var(--muted); } .kpi .v { font-size:22px; font-weight:800; margin-top:2px; } .kpi .s { font-size:11.5px; color:var(--muted); }
.kpi.hero { background:radial-gradient(120% 140% at 100% 0%,#3F7BE0 0%,#1A4EA2 45%,#123A7C 100%); color:#fff; box-shadow:0 10px 30px rgba(26,78,162,.35), inset 0 1px 0 rgba(255,255,255,.25); }
.kpi .v { font-variant-numeric:tabular-nums; letter-spacing:-.01em; } .kpi.hero .l, .kpi.hero .s { color:var(--on-primary); opacity:.9; }
.ellipsis { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hide { display:none !important; }

/* buttons & forms */
/* 3D buttons: lighter top, solid bottom edge, press down on tap */
button, .btn { font:inherit; font-weight:800; border:0; border-radius:13px; min-height:44px; padding:0 16px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none;
  color:#fff; background:linear-gradient(180deg,var(--btn-top),var(--primary)); box-shadow:0 4px 0 var(--btn-edge), 0 8px 18px rgba(26,78,162,.22), inset 0 1px 0 rgba(255,255,255,.3);
  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease; margin-bottom:4px; }
button:hover, .btn:hover { filter:brightness(1.06); }
button:active, .btn:active { transform:translateY(3px); box-shadow:0 1px 0 var(--btn-edge), inset 0 1px 0 rgba(255,255,255,.25); }
button:disabled { opacity:.5; cursor:not-allowed; transform:none; }
button.ghost, .btn.ghost { background:linear-gradient(180deg,var(--card),var(--soft)); color:var(--ink); border:1px solid var(--line); box-shadow:0 3px 0 var(--line), inset 0 1px 0 rgba(255,255,255,.5); }
button.ghost:active, .btn.ghost:active { box-shadow:0 0 0 var(--line); }
button.soft { background:var(--info-bg); color:var(--info-ink); box-shadow:0 3px 0 rgba(23,63,134,.18); }
button.accent, .btn.accent { background:linear-gradient(180deg,var(--acc-top),var(--accent)); color:var(--on-accent); box-shadow:0 4px 0 var(--acc-edge), 0 8px 18px rgba(249,150,57,.25), inset 0 1px 0 rgba(255,255,255,.45); }
button.accent:active, .btn.accent:active { box-shadow:0 1px 0 var(--acc-edge); }
button.danger { background:linear-gradient(180deg,var(--bad-top),#D93A33); color:#fff; box-shadow:0 4px 0 var(--bad-edge), inset 0 1px 0 rgba(255,255,255,.3); }
button.danger:active { box-shadow:0 1px 0 var(--bad-edge); }
button.okb, .btn.okb { background:linear-gradient(180deg,var(--ok-top),#3E9A52); color:#fff; box-shadow:0 4px 0 var(--ok-edge), 0 8px 18px rgba(62,154,82,.22), inset 0 1px 0 rgba(255,255,255,.35); }
button.okb:active, .btn.okb:active { box-shadow:0 1px 0 var(--ok-edge); }
button.sm, .btn.sm { min-height:36px; padding:0 12px; font-size:13px; border-radius:11px; box-shadow:0 3px 0 var(--btn-edge), inset 0 1px 0 rgba(255,255,255,.3); }
button.sm.ghost, .btn.sm.ghost { box-shadow:0 2px 0 var(--line); } button.sm.okb { box-shadow:0 3px 0 var(--ok-edge); } button.sm.danger { box-shadow:0 3px 0 var(--bad-edge); } button.sm.accent, .btn.sm.accent { box-shadow:0 3px 0 var(--acc-edge); }
button.icon, .btn.icon { width:44px; padding:0; background:linear-gradient(180deg,var(--card),var(--soft)); color:var(--ink); border:1px solid var(--line); box-shadow:0 3px 0 var(--line); }
button.block { width:100%; }
label.f { display:flex; flex-direction:column; gap:5px; font-size:12.5px; font-weight:600; color:var(--muted); }
input, select, textarea { font:inherit; font-size:16px; color:var(--ink); background:var(--card); border:1px solid var(--line); border-radius:12px; min-height:46px; padding:10px 12px; width:100%; }
textarea { min-height:80px; resize:vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.check { display:flex; gap:10px; align-items:center; font-weight:600; font-size:14px; } .check input { width:22px; min-height:22px; height:22px; }
.chips { display:flex; gap:6px; overflow-x:auto; padding:5px; scrollbar-width:none; position:relative; background:var(--track); border-radius:15px; box-shadow:inset 0 2px 4px rgba(0,0,0,.08); width:max-content; max-width:100%; } .chips::-webkit-scrollbar { display:none; }
.chips .pill { position:absolute; top:5px; left:0; height:calc(100% - 10px); border-radius:11px; background:linear-gradient(180deg,var(--btn-top),var(--primary)); box-shadow:0 3px 8px rgba(26,78,162,.3), inset 0 1px 0 rgba(255,255,255,.3); transition:transform .32s cubic-bezier(.34,1.56,.64,1), width .32s cubic-bezier(.34,1.56,.64,1); z-index:0; pointer-events:none; }
.chip { flex:none; min-height:36px; padding:0 14px; border-radius:11px; border:0; background:transparent; color:var(--ink); font-size:13px; font-weight:700; box-shadow:none; margin:0; position:relative; z-index:1; transition:color .2s; }
.chip:active { transform:scale(.96); box-shadow:none; } .chip:hover { filter:none; background:rgba(127,127,127,.1); }
.chip.on { color:#fff; background:transparent; } .chips:not(.has-pill) .chip.on { background:var(--primary); }
.tag { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:700; padding:3px 9px; border-radius:20px; white-space:nowrap; background:var(--info-bg); color:var(--info-ink); }
.tag.ok { background:var(--ok-bg); color:var(--ok-ink); } .tag.warn { background:var(--warn-bg); color:var(--warn-ink); } .tag.bad { background:var(--bad-bg); color:var(--bad-ink); } .tag.grey { background:rgba(127,127,127,.15); color:var(--muted); }
.note { border-radius:12px; padding:10px 12px; font-size:13px; background:var(--info-bg); color:var(--info-ink); }
.note.warn { background:var(--warn-bg); color:var(--warn-ink); } .note.bad { background:var(--bad-bg); color:var(--bad-ink); } .note.ok { background:var(--ok-bg); color:var(--ok-ink); }

/* app shell */
#app { min-height:100dvh; }
.shell { display:flex; min-height:100dvh; }
.side { width:248px; flex:none; background:var(--side); color:var(--side-ink); padding:16px 12px; display:flex; flex-direction:column; gap:2px; position:sticky; top:0; height:100dvh; overflow-y:auto; }
.side .brand { display:flex; align-items:center; gap:10px; padding:4px 6px 14px; }
.side .brand img { width:58px; height:40px; object-fit:contain; background:#fff; border-radius:10px; padding:2px; box-shadow:0 4px 12px rgba(0,0,0,.25); }
.side a { color:var(--side-ink); text-decoration:none; padding:10px 12px; border-radius:10px; font-size:14px; display:flex; gap:10px; align-items:center; opacity:.88; }
.side a:hover { background:rgba(255,255,255,.08); opacity:1; }
.side a.on { background:linear-gradient(180deg,rgba(255,255,255,.2),rgba(255,255,255,.08)); box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 4px 12px rgba(0,0,0,.2); opacity:1; font-weight:700; }
.side .sec { font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; opacity:.6; padding:12px 12px 4px; }
.side .badge { margin-left:auto; background:var(--accent); color:var(--on-accent); border-radius:10px; font-size:11px; font-weight:800; padding:1px 7px; }
.main { flex:1; min-width:0; padding:18px 22px 40px; max-width:1280px; }
.topbar { display:none; }
.bottomnav { display:none; }
svg.i { width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.page-h { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:14px; } .page-h .grow { min-width:200px; }

/* field (phone) layout */
.field .shell { display:block; }
.field .side { display:none; }
.field .main { padding:12px 14px 104px; max-width:640px; margin:0 auto; }
.field .topbar, .phone-office .topbar { display:flex; align-items:center; gap:10px; padding:10px 14px; background:var(--card); position:sticky; top:0; z-index:20; box-shadow:var(--shadow); }
.topbar img { width:48px; height:34px; object-fit:contain; background:#fff; border-radius:8px; }
.field .bottomnav { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:30; background:var(--card); border-top:1px solid var(--line); justify-content:space-around; align-items:center; height:66px; padding-bottom:env(safe-area-inset-bottom); }
.bottomnav a { flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; font-size:11px; color:var(--muted); text-decoration:none; padding:6px 0; }
.bottomnav a.on { color:var(--primary); font-weight:800; }
[data-theme="midnight"] .bottomnav a.on { color:#7FC98C; }
.bottomnav a.fab { flex:none; width:54px; height:54px; border-radius:16px; background:var(--accent); color:var(--on-accent); margin-top:-24px; box-shadow:0 6px 16px rgba(249,150,57,.4); justify-content:center; }
.bottomnav a.fab svg { width:26px; height:26px; stroke-width:2.4; }
@media (max-width: 860px) {
  .phone-office .side { position:fixed; left:0; top:0; z-index:50; transform:translateX(-105%); transition:transform .22s ease; box-shadow:0 0 40px rgba(0,0,0,.3); }
  .phone-office.menu-open .side { transform:none; }
  .phone-office .main { padding:12px 14px 40px; }
  .phone-office .scrim { position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:40; }
}
@media (min-width: 861px) { .phone-office .topbar { display:none; } .scrim { display:none; } }

/* lists & tables */
.list { display:flex; flex-direction:column; }
.li { display:flex; gap:10px; align-items:center; padding:12px 14px; border-bottom:1px solid var(--line); text-decoration:none; color:inherit; background:var(--card); }
.li:last-child { border-bottom:0; }
a.li:active { background:var(--bg); }
.dot { width:9px; height:9px; border-radius:50%; flex:none; background:var(--muted); } .dot.ok { background:var(--ok); } .dot.warn { background:var(--accent); } .dot.bad { background:var(--bad); }
.tablebox { overflow-x:auto; background:var(--card); border-radius:18px; box-shadow:var(--shadow); }
table.t { width:100%; border-collapse:collapse; font-size:13.5px; }
table.t th { text-align:left; font-size:12px; color:var(--muted); font-weight:700; padding:11px 12px; border-bottom:1px solid var(--line); white-space:nowrap; position:sticky; top:0; background:var(--card); }
table.t td { padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
table.t tr:last-child td { border-bottom:0; }
table.t td.r, table.t th.r { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
table.t tr.click { cursor:pointer; } table.t tr.click:hover td { background:rgba(127,127,127,.06); }

/* special */
.ring { width:108px; height:108px; border-radius:50%; display:grid; place-items:center; flex:none; }
.ring > div { width:84px; height:84px; border-radius:50%; background:var(--card); display:flex; flex-direction:column; align-items:center; justify-content:center; }
.bar { height:10px; border-radius:8px; background:rgba(127,127,127,.18); overflow:hidden; } .bar > i { display:block; height:100%; background:linear-gradient(90deg,var(--accent),#FFCB05); border-radius:8px; transform-origin:left; animation:grow .9s cubic-bezier(.2,.8,.2,1) both; }
.aging { display:flex; align-items:flex-end; gap:6px; height:84px; }
.aging > div { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; font-size:10px; color:var(--muted); }
.aging i { display:block; width:100%; border-radius:6px; background:var(--ok); min-height:3px; }
.spark { display:flex; align-items:flex-end; gap:4px; height:110px; }
.spark > div { flex:1; background:linear-gradient(180deg,var(--btn-top),var(--primary)); border-radius:6px 6px 2px 2px; min-height:3px; position:relative; transform-origin:bottom; animation:rise .7s cubic-bezier(.2,.8,.2,1) both; }
.spark > div:nth-child(n) { animation-delay:calc(var(--i,0) * 35ms); }
.stepper { display:flex; align-items:center; gap:6px; }
.stepper button { width:42px; min-height:42px; padding:0; font-size:20px; }
.stepper input { width:62px; text-align:center; font-weight:800; min-height:42px; padding:6px; }
.cartbar { position:fixed; left:12px; right:12px; bottom:76px; z-index:25; background:var(--ink); color:var(--bg); border-radius:18px; padding:12px 14px; display:flex; align-items:center; gap:12px; max-width:616px; margin:0 auto; box-shadow:0 10px 30px rgba(0,0,0,.25); }
[data-theme="midnight"] .cartbar { background:#FFFFFF; color:#0B1630; }
.office-body .cartbar { bottom:16px; }
.timeline { display:flex; flex-direction:column; gap:0; }
.timeline .st { display:flex; gap:10px; padding:6px 0; } .timeline .st .dot { margin-top:6px; }
.toast { position:fixed; left:50%; bottom:90px; transform:translateX(-50%); background:var(--ink); color:var(--bg); padding:12px 18px; border-radius:14px; z-index:100; font-weight:600; max-width:92vw; box-shadow:0 8px 24px rgba(0,0,0,.25); animation:tin .2s ease; }
.toast.bad { background:var(--bad); color:#fff; }
@keyframes tin { from { opacity:0; transform:translate(-50%,8px); } }
.modal-bg { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:80; display:flex; align-items:flex-end; justify-content:center; }
.modal { background:var(--card); color:var(--ink); width:100%; max-width:560px; max-height:92dvh; overflow-y:auto; border-radius:20px 20px 0 0; padding:18px; animation:up .22s cubic-bezier(.2,.9,.3,1.1); }
@media (min-width: 700px) { .modal-bg { align-items:center; } .modal { border-radius:20px; } }
@keyframes up { from { transform:translateY(30px); opacity:.4; } }
.outbox { position:fixed; top:10px; right:10px; z-index:90; }
.selfie-prev { width:100%; border-radius:14px; display:block; }
.video-box { position:relative; border-radius:14px; overflow:hidden; background:#000; } .video-box video { width:100%; display:block; }
.video-box .frame { position:absolute; inset:18%; border:3px solid var(--accent); border-radius:16px; }
.login-wrap { min-height:100dvh; display:grid; place-items:center; padding:20px; background:radial-gradient(1200px 600px at 10% -10%, var(--info-bg), transparent), var(--bg); }
.login-card { width:100%; max-width:400px; }
.login-card .logo { width:180px; display:block; margin:0 auto 8px; border-radius:14px; background:#fff; padding:6px; }
.empty { text-align:center; padding:28px 16px; color:var(--muted); }
.skeleton { height:76px; border-radius:16px; background:linear-gradient(90deg, rgba(127,127,127,.12), rgba(127,127,127,.2), rgba(127,127,127,.12)); background-size:200% 100%; animation:sk 1.2s infinite linear; }
@keyframes sk { to { background-position:-200% 0; } }
.qr-sheet { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:14px; }
.qr-card { background:#fff; color:#000; border:1px solid #ccc; border-radius:12px; padding:12px; text-align:center; break-inside:avoid; }
.qr-card svg { width:100%; height:auto; max-width:200px; }
.help h3 { margin-top:14px; } .help p, .help li { font-size:14px; }
/* ---- motion (approved motion-kit recipes) ---- */
@property --p { syntax:'<number>'; inherits:false; initial-value:0; }
@keyframes grow { from { transform:scaleX(0); } } @keyframes rise { from { transform:scaleY(0); } }
@keyframes fadeup { from { opacity:0; transform:translateY(10px); } }
@keyframes slidein { from { opacity:0; transform:translateX(22px); } }
@keyframes ringfill { from { --p:0; } }
@keyframes bell { 0%,100% { transform:rotate(0); } 15% { transform:rotate(14deg); } 30% { transform:rotate(-12deg); } 45% { transform:rotate(9deg); } 60% { transform:rotate(-6deg); } 75% { transform:rotate(3deg); } }
@keyframes pop { 0% { transform:scale(.6); opacity:0; } 100% { transform:scale(1); opacity:1; } }
@keyframes draw { from { stroke-dashoffset:var(--len,60); } to { stroke-dashoffset:0; } }
.anim > * { animation:fadeup .42s cubic-bezier(.2,.8,.2,1) both; }
.anim > *:nth-child(2) { animation-delay:.05s; } .anim > *:nth-child(3) { animation-delay:.1s; } .anim > *:nth-child(4) { animation-delay:.15s; } .anim > *:nth-child(5) { animation-delay:.2s; } .anim > *:nth-child(n+6) { animation-delay:.24s; }
.grid4 > .card, .grid2 > .card { animation:fadeup .45s cubic-bezier(.2,.8,.2,1) both; }
.grid4 > .card:nth-child(2), .grid2 > .card:nth-child(2) { animation-delay:.07s; } .grid4 > .card:nth-child(3), .grid2 > .card:nth-child(3) { animation-delay:.14s; } .grid4 > .card:nth-child(4), .grid2 > .card:nth-child(4) { animation-delay:.21s; } .grid4 > .card:nth-child(n+5) { animation-delay:.26s; }
.alerts .li { animation:slidein .45s cubic-bezier(.34,1.56,.64,1) both; } .alerts .li:nth-child(2) { animation-delay:.11s; } .alerts .li:nth-child(3) { animation-delay:.22s; } .alerts .li:nth-child(4) { animation-delay:.33s; } .alerts .li:nth-child(n+5) { animation-delay:.44s; }
.ring { --p:0; background:conic-gradient(var(--accent) calc(var(--p) * 1%), var(--track) 0) !important; animation:ringfill 1.4s cubic-bezier(.2,.8,.2,1) .15s both; box-shadow:0 8px 24px rgba(249,150,57,.2); }
.bell-anim { animation:bell .7s ease .6s 2; transform-origin:50% 10%; }
.tick svg { animation:pop .45s cubic-bezier(.34,1.56,.64,1) both; } .tick circle, .tick path { stroke-dasharray:var(--len,60); animation:draw .5s ease .1s both; } .tick path { --len:30; animation-delay:.35s; }
.bellbtn { position:relative; } .bellbtn .badge2 { position:absolute; top:4px; right:4px; min-width:18px; height:18px; border-radius:9px; background:#E5484D; color:#fff; font-size:10px; font-weight:800; display:flex; align-items:center; justify-content:center; padding:0 4px; animation:pop .4s cubic-bezier(.34,1.56,.64,1) 1s both; }
.acc-card { border-radius:16px; padding:14px; border:1px solid var(--line); background:var(--soft); transition:transform .2s cubic-bezier(.2,.8,.2,1); } .acc-card:hover { transform:translateY(-3px); }
.acc-card.airtel { background:linear-gradient(160deg,#FF2A2A,#E40000); color:#fff; border:0; box-shadow:0 8px 18px rgba(228,0,0,.25); } .acc-card.mtn { background:linear-gradient(160deg,#FFD84A,#FFCB05); color:#1C1600; border:0; box-shadow:0 8px 18px rgba(255,203,5,.3); }
.acc-card.bank { background:linear-gradient(160deg,#2F6BD0,#1A4EA2); color:#fff; border:0; box-shadow:0 8px 18px rgba(26,78,162,.25); }
.acc-card .muted { color:inherit; opacity:.8; }
.mode-toggle { display:flex; gap:4px; padding:4px; border-radius:13px; background:rgba(255,255,255,.08); position:relative; margin:10px 0 0; }
.mode-toggle button { flex:1; min-height:34px; background:transparent; box-shadow:none; color:var(--side-ink); font-size:12px; margin:0; border-radius:10px; position:relative; z-index:1; }
.mode-toggle button.on { color:#0F1B33; } .mode-toggle i { position:absolute; top:4px; bottom:4px; left:4px; width:calc(50% - 6px); border-radius:10px; background:#fff; transition:transform .3s cubic-bezier(.34,1.56,.64,1); }
.mode-toggle.dark i { transform:translateX(calc(100% + 4px)); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation:none !important; transition:none !important; } }
@media print {
  .side, .topbar, .bottomnav, .no-print, .cartbar, .toast, .outbox { display:none !important; }
  body, .main { background:#fff !important; color:#000 !important; padding:0 !important; }
  .card, .tablebox { box-shadow:none !important; border:1px solid #ccc; }
}

/* ---------- v1.2.0 print documents: A4 and thermal 80 / 58 mm ---------- */
body.printdoc { background:#E9ECF1; }
.print-bar { position:sticky; top:0; z-index:20; display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:10px 14px; background:var(--card); box-shadow:var(--shadow); }
.print-help { padding:8px 16px; }
.docs { display:flex; flex-direction:column; align-items:center; gap:18px; padding:16px; }
.doc { background:#fff; color:#111; font-family:'Plus Jakarta Sans', Arial, sans-serif; box-shadow:0 6px 24px rgba(0,0,0,.12); }
.doc.a4 { width:186mm; min-height:260mm; padding:10mm; box-sizing:border-box; font-size:11pt; line-height:1.4; display:flex; flex-direction:column; gap:6mm; }
.d-head { display:flex; justify-content:space-between; gap:8mm; border-bottom:3px solid #1A4EA2; padding-bottom:5mm; }
.d-co { display:flex; gap:4mm; font-size:9.5pt; color:#333; } .d-co img { width:34mm; height:22mm; object-fit:contain; } .d-name { font-size:14pt; font-weight:800; color:#0F1B33; }
.d-meta { text-align:right; } .d-title { font-size:22pt; font-weight:800; color:#1A4EA2; letter-spacing:.04em; }
.d-meta table { margin-left:auto; font-size:9.5pt; border-collapse:collapse; } .d-meta td { padding:1px 0 1px 6mm; white-space:nowrap; } .d-meta td:first-child { color:#555; }
.d-parties { display:grid; grid-template-columns:1fr 1fr; gap:6mm; font-size:10pt; } .d-parties > div { border:1px solid #D5DBE5; border-radius:3mm; padding:3mm 4mm; }
.d-lbl { font-size:8pt; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:#1A4EA2; margin-bottom:1mm; } .d-b { font-weight:800; font-size:11pt; }
.d-items { width:100%; border-collapse:collapse; font-size:10pt; } .d-items th { background:#1A4EA2; color:#fff; text-align:left; padding:2.2mm 2mm; font-size:9pt; } .d-items td { padding:2mm; border-bottom:1px solid #E1E6EE; vertical-align:top; }
.d-items .r, .d-tot .r { text-align:right; white-space:nowrap; } .d-items tbody tr:nth-child(even) td { background:#F6F8FC; } .d-small { color:#666; font-size:8.5pt; }
.d-tot { display:flex; justify-content:space-between; gap:8mm; align-items:flex-start; } .d-tot table { border-collapse:collapse; min-width:70mm; font-size:10.5pt; } .d-tot td { padding:1.5mm 2mm; }
.d-grand td { font-weight:800; font-size:13pt; border-top:2px solid #0F1B33; color:#0F1B33; } .d-words { font-size:9.5pt; font-style:italic; color:#333; max-width:95mm; }
.d-foot { font-size:9pt; border:1px dashed #B5BFCE; border-radius:3mm; padding:3mm 4mm; color:#333; }
.d-sign { display:grid; grid-template-columns:1fr 1fr .6fr; gap:6mm; font-size:9.5pt; margin-top:auto; } .d-note { font-size:8pt; color:#777; text-align:center; }
.doc.thermal { font-family:'Courier New', ui-monospace, monospace; font-size:11px; line-height:1.35; padding:3mm; box-sizing:border-box; }
.doc.t80 { width:72mm; } .doc.t58 { width:48mm; font-size:9.5px; }
.t-c { text-align:center; } .t-b { font-weight:800; } .t-logo { width:60%; max-height:18mm; object-fit:contain; display:block; margin:0 auto 1mm; filter:grayscale(1) contrast(1.3); }
.t-line { border-top:1px dashed #000; margin:1.5mm 0; } .t-row { display:flex; justify-content:space-between; gap:2mm; } .t-row span:last-child { text-align:right; white-space:nowrap; }
.t-item { margin-bottom:1mm; } .t-big { font-size:1.3em; font-weight:800; } .t-small { font-size:.85em; }
@media print {
  body.printdoc { background:#fff !important; }
  .docs { padding:0; gap:0; display:block; } .doc { box-shadow:none !important; margin:0 auto; } .doc.a4 { width:auto; min-height:auto; padding:0; page-break-after:always; break-after:page; }
  .doc.a4:last-child { page-break-after:auto; break-after:auto; } .doc.thermal { margin:0; page-break-after:always; break-after:page; } .doc.thermal:last-child { page-break-after:auto; }
  .d-items th { -webkit-print-color-adjust:exact; print-color-adjust:exact; } .d-items tbody tr:nth-child(even) td { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
