@font-face { font-family: Readex; font-weight: 400; src: url(../fonts/readex-400.ttf); }
@font-face { font-family: Readex; font-weight: 500; src: url(../fonts/readex-500.ttf); }
@font-face { font-family: Readex; font-weight: 600; src: url(../fonts/readex-600.ttf); }
@font-face { font-family: Readex; font-weight: 700; src: url(../fonts/readex-700.ttf); }
@font-face { font-family: Inter; font-weight: 400; src: url(../fonts/inter-400.ttf); }
@font-face { font-family: Inter; font-weight: 500; src: url(../fonts/inter-500.ttf); }
@font-face { font-family: Inter; font-weight: 600; src: url(../fonts/inter-600.ttf); }
@font-face { font-family: Inter; font-weight: 700; src: url(../fonts/inter-700.ttf); }

:root {
  --bg: #f5efe6;
  --blob-1: rgba(216, 170, 88, .42);
  --blob-2: rgba(236, 208, 168, .7);
  --blob-3: rgba(160, 104, 66, .16);
  --glass: rgba(255, 252, 247, .68);
  --glass-2: rgba(255, 255, 255, .82);
  --solid: #fffcf7;
  --glass-line: rgba(255, 255, 255, .8);
  --glass-foot: rgba(110, 76, 34, .05);
  --blur: blur(20px) saturate(160%);
  --ink: #211b15;
  --ink-2: #5d5244;
  --muted: #8b7f70;
  --line: rgba(86, 58, 26, .1);
  --line-2: rgba(86, 58, 26, .17);
  --track: rgba(86, 58, 26, .08);
  --accent: #c2933c;
  --accent-2: #e2bd6c;
  --accent-ink: #84601a;
  --accent-soft: rgba(194, 147, 60, .16);
  --on-accent: #241a0c;
  --brown: #7a4a32;
  --brown-soft: rgba(122, 74, 50, .13);
  --green: #18875a;
  --green-soft: rgba(24, 135, 90, .13);
  --red: #c63f2e;
  --red-soft: rgba(198, 63, 46, .12);
  --amber: #b77f06;
  --amber-soft: rgba(212, 160, 23, .17);
  --side: #1a1511;
  --side-2: #262019;
  --side-ink: #a4988a;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 12px 32px -14px rgba(112, 72, 24, .24), 0 2px 6px rgba(112, 72, 24, .05);
  --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, .85), 0 4px 14px -6px rgba(112, 72, 24, .18);
  --shadow-lg: 0 30px 70px -20px rgba(60, 38, 12, .42), 0 6px 18px rgba(60, 38, 12, .12);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --r: 18px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #13100c;
  --blob-1: rgba(194, 147, 60, .17);
  --blob-2: rgba(122, 74, 50, .18);
  --blob-3: rgba(194, 147, 60, .07);
  --glass: rgba(38, 32, 26, .62);
  --glass-2: rgba(48, 41, 33, .82);
  --solid: #221c16;
  --glass-line: rgba(255, 255, 255, .07);
  --glass-foot: rgba(255, 255, 255, .03);
  --ink: #f5efe7;
  --ink-2: #cec3b5;
  --muted: #8f8476;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --track: rgba(255, 255, 255, .08);
  --accent-ink: #e7c47a;
  --side: #0d0b08;
  --side-2: #1a1610;
  --brown: #c79273;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 14px 34px -14px rgba(0, 0, 0, .7);
  --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, .05), 0 4px 14px -6px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -18px rgba(0, 0, 0, .82);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.55 Readex, Inter, Tahoma, sans-serif; color: var(--ink); overflow: hidden; user-select: none; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
  background:
    radial-gradient(1100px 650px at 12% -12%, var(--blob-1), transparent 62%),
    radial-gradient(900px 620px at 82% -6%, var(--blob-2), transparent 60%),
    radial-gradient(1000px 800px at 45% 115%, var(--blob-3), transparent 60%),
    var(--bg);
}
h1, h2, h3 { margin: 0; font-weight: 700; }
h1 { font-size: 26px; } h2 { font-size: 15.5px; font-weight: 600; } h3 { font-size: 14px; font-weight: 600; }
#app { height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea { user-select: text; }
.ic { flex: none; display: block; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.bad { color: var(--red); } .ok { color: var(--green); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn {
  height: 38px; padding: 0 15px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500; font-size: 13.5px; white-space: nowrap; cursor: pointer;
  background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--shadow-sm); transition: transform .18s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn.primary { color: var(--on-accent); font-weight: 600; border-color: transparent; background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: 0 10px 22px -8px rgba(194, 147, 60, .8), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn.danger { color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.lg { height: 54px; padding: 0 26px; font-size: 18px; font-weight: 700; border-radius: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.ibtn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: var(--side-ink); background: var(--side-2); border: 1px solid rgba(255, 255, 255, .06); transition: color .2s, transform .18s var(--ease); flex: none; }
.ibtn:hover { color: #fff; transform: translateY(-1px); }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent-ink); font-weight: 500; font-size: 12.5px; }
.link:hover { text-decoration: underline; }
.x { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; width: 28px; height: 28px; border-radius: 8px; transition: background .15s, color .15s; }
.x:hover { background: var(--red-soft); color: var(--red); }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
input, select, textarea { background: var(--glass-2); border: 1px solid var(--line-2); border-radius: 11px; height: 40px; padding: 0 12px; width: 100%; font-size: 14px; color: var(--ink); outline: 0; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--accent); }
input::placeholder { color: var(--muted); }
label.check { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink); }
input.num { direction: ltr; text-align: center; }

/* frame */
.shell { display: flex; height: 100%; }
.side { width: 68px; flex: none; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 14px 12px 12px; gap: 2px; transition: width .36s var(--ease-out); overflow: hidden; box-shadow: -8px 0 30px -12px rgba(0, 0, 0, .35); z-index: 30; }
.side.open { width: 232px; }
.brand { display: flex; align-items: center; gap: 12px; height: 46px; margin-bottom: 8px; flex: none; }
.brand img { width: 44px; height: 44px; border-radius: 13px; flex: none; box-shadow: 0 8px 20px -8px rgba(226, 189, 108, .7); }
.brand-name { font-weight: 700; color: #f5efe7; font-size: 17px; white-space: nowrap; line-height: 1.25; }
.brand-name small { display: block; font-weight: 400; color: var(--side-ink); font-size: 10.5px; font-family: Inter, sans-serif; }
.side .lbl, .side .grp, .brand-name, .me-name { opacity: 0; transition: opacity .2s; white-space: nowrap; pointer-events: none; }
.side.open .lbl, .side.open .grp, .side.open .brand-name, .side.open .me-name { opacity: 1; transition-delay: .08s; }
.side .grp { font-size: 11px; color: #766c60; padding: 0 12px; height: 0; line-height: 24px; overflow: hidden; flex: none; transition: height .3s var(--ease-out); }
.side.open .grp { height: 26px; }
.nav { height: 40px; width: 100%; border: 0; background: none; border-radius: 12px; display: flex; align-items: center; gap: 13px; padding: 0 12px; color: var(--side-ink); cursor: pointer; position: relative; transition: background .2s, color .2s; flex: none; }
.nav:hover { background: rgba(255, 255, 255, .05); color: #efe8df; }
.nav.on { background: rgba(255, 255, 255, .09); color: var(--accent-2); }
.nav.on .lbl { color: #f8f2ea; }
.nav.on::before { content: ''; position: absolute; inset-inline-start: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
.nav .lbl { font-size: 13.5px; color: inherit; }
.nav .count { position: absolute; top: 5px; inset-inline-start: 26px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--side); box-sizing: content-box; }
.side.open .nav .count { position: static; margin-inline-start: auto; border: 0; }
.side .grow { flex: 1; min-height: 8px; }
.side-tools { display: flex; gap: 6px; padding: 8px 0; flex-wrap: wrap; flex: none; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 2px 2px; border-top: 1px solid rgba(255, 255, 255, .07); flex: none; }
.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; flex: none; color: var(--on-accent); background: linear-gradient(150deg, var(--accent-2), var(--accent)); }
.me-name { font-size: 13px; color: #f1ebe3; font-weight: 600; }
.me-name small { display: block; color: var(--side-ink); font-weight: 400; font-size: 11.5px; }
.me .link { color: var(--side-ink); pointer-events: auto; }
.main { flex: 1; min-width: 0; overflow: auto; position: relative; }
.main.flush { overflow: hidden; }
.view { padding: 26px 30px 40px; max-width: 1680px; margin: 0 auto; animation: viewIn .4s var(--ease-out) both; }
.main.flush .view { padding: 0; max-width: none; height: 100%; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head input[type=search] { width: 280px; }

.card, .glass { background: var(--glass); backdrop-filter: var(--blur); border: 1px solid var(--glass-line); border-radius: var(--r); box-shadow: var(--shadow); }
.card { padding: 18px; }
.reveal { animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } }

.tabs { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 16px; border-radius: 13px; background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--shadow-sm); }
.tab { height: 32px; padding: 0 16px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s; }
.tab.on { background: var(--ink); color: var(--bg); }

.table-wrap { border: 1px solid var(--glass-line); border-radius: var(--r); overflow: auto; background: var(--glass); box-shadow: var(--shadow); }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: start; font-size: 12.5px; color: var(--muted); font-weight: 500; padding: 11px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--solid); z-index: 1; }
table.t td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background .15s; }
table.t tbody tr:hover { background: var(--glass-2); }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 8px; font-size: 12px; font-weight: 500; background: var(--track); color: var(--ink-2); }
.badge.bad { background: var(--red-soft); color: var(--red); } .badge.ok { background: var(--green-soft); color: var(--green); } .badge.gold { background: var(--accent-soft); color: var(--accent-ink); }

/* dashboard */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-wide { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.mb { margin-bottom: 16px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.hero .sub { color: var(--ink-2); margin-top: 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease); background: var(--glass); backdrop-filter: var(--blur); border: 1px solid var(--glass-line); border-radius: var(--r); box-shadow: var(--shadow); }
.kpi:hover { transform: translateY(-2px); }
.k-body { padding: 16px 18px 14px; position: relative; flex: 1; }
.k-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; min-height: 36px; }
.tile-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.tile-ic.g { background: var(--green-soft); color: var(--green); } .tile-ic.b { background: var(--brown-soft); color: var(--brown); } .tile-ic.r { background: var(--red-soft); color: var(--red); } .tile-ic.a { background: var(--amber-soft); color: var(--amber); }
.k-lbl { color: var(--ink-2); font-size: 13px; margin-bottom: 2px; }
.k-val { font-size: 25px; font-weight: 700; white-space: nowrap; font-family: Inter, Readex, sans-serif; letter-spacing: -.01em; }
.k-val small { font-size: 12.5px; color: var(--muted); font-weight: 500; font-family: Readex, sans-serif; letter-spacing: 0; }
.k-foot { padding: 9px 18px; background: var(--glass-foot); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 40px; }
.k-foot b { color: var(--ink); font-weight: 600; }
.kpi.hero-k { background: linear-gradient(150deg, #2c241b, #1a1511); border-color: transparent; color: #f7f1e8; }
.kpi.hero-k .k-lbl { color: #cdbfad; } .kpi.hero-k .tile-ic { background: rgba(226, 189, 108, .18); color: var(--accent-2); }
.kpi.hero-k .k-foot { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .08); color: #cdbfad; } .kpi.hero-k .k-foot b { color: #fff; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--green-soft); color: var(--green); direction: ltr; }
.delta.bad { background: var(--red-soft); color: var(--red); } .delta.flat { background: var(--track); color: var(--muted); }
.panel { display: flex; flex-direction: column; overflow: hidden; }
.p-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; gap: 10px; }
.p-title { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14.5px; }
.p-title .ic { color: var(--ink-2); }
.p-body { padding: 4px 10px 12px; flex: 1; }
.p-pad { padding: 4px 18px 18px; flex: 1; }
.li { display: flex; align-items: center; gap: 11px; padding: 9px 8px; border-radius: 12px; min-width: 0; transition: background .15s; }
.li:hover { background: var(--glass-2); }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .amt { font-weight: 600; white-space: nowrap; font-family: Inter, sans-serif; }
.rank { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 600; font-size: 12.5px; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.bar { height: 5px; border-radius: 5px; background: var(--track); overflow: hidden; margin-top: 5px; }
.bar > i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.legend { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend b { margin-inline-start: auto; font-family: Inter, sans-serif; font-weight: 600; }
.dot-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.dot-lbl i { width: 8px; height: 8px; border-radius: 2px; }
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dash 1.2s var(--ease-out) forwards; }
@keyframes dash { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

/* overlays */
.overlay { position: fixed; inset: 0; background: rgba(26, 21, 17, .42); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; animation: fadeOver .18s ease both; }
@keyframes fadeOver { from { opacity: 0; } }
.modal { background: var(--solid); border-radius: 20px; width: 460px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .28s var(--ease-out) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.modal.wide { width: 880px; }
.modal header { padding: 15px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal .body { padding: 18px 20px; overflow: auto; }
.modal footer { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
#toasts { position: fixed; top: 14px; left: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.toast { background: var(--side); color: #fff; padding: 11px 16px; border-radius: 12px; max-width: 420px; font-weight: 500; box-shadow: var(--shadow-lg); animation: pop .28s var(--ease-out) both; }
.toast.bad { background: var(--red); } .toast.ok { background: var(--green); }

.auth { height: 100%; display: grid; place-items: center; }
.auth .card { width: 410px; padding: 28px; animation: rise .55s var(--ease-out) both; }
.auth img { display: block; width: 170px; margin: 0 auto 8px; }
.code { font-size: 22px; letter-spacing: 2px; text-align: center; background: var(--accent-soft); padding: 12px; border-radius: 12px; font-weight: 700; direction: ltr; user-select: text; }

/* cashier */
.pos { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; height: 100%; padding: 14px; }
.pos-cart, .pos-side { display: flex; flex-direction: column; min-height: 0; background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.pos-top { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.scan-wrap { position: relative; }
.scan-wrap .ic { position: absolute; inset-inline-start: 14px; top: 15px; color: var(--accent-ink); pointer-events: none; }
.scan { font-size: 17px; height: 52px; padding-inline-start: 46px; border: 1.5px solid var(--accent); border-radius: 14px; }
.lines { flex: 1; overflow-y: auto; min-height: 0; padding: 6px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 116px 92px 92px 30px; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; animation: rise .28s var(--ease-out) both; }
.line:hover { background: var(--glass-2); }
.line .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line b { font-family: Inter, sans-serif; font-size: 15px; }
.stepper { display: grid; grid-template-columns: 32px 1fr 32px; background: var(--track); border-radius: 10px; padding: 2px; }
.stepper button { border: 0; background: var(--glass-2); cursor: pointer; font-weight: 700; height: 30px; border-radius: 8px; }
.stepper input { border: 0; background: none; padding: 0; height: 30px; text-align: center; box-shadow: none; }
.pos-foot { border-top: 1px solid var(--line); padding: 12px 16px; background: var(--glass-foot); }
.total { font-size: 34px; font-weight: 700; line-height: 1.1; font-family: Inter, Readex, sans-serif; }
.exchange-bar { background: var(--accent-soft); padding: 9px 16px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.tiles { flex: 1; overflow-y: auto; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 9px; align-content: start; }
.tile { text-align: start; border: 1px solid var(--glass-line); background: var(--glass-2); border-radius: 14px; padding: 11px 13px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-sm); transition: transform .18s var(--ease), box-shadow .2s, border-color .2s; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile:active { transform: scale(.97); }
.tile.out { opacity: .5; }
.tile b { font-weight: 500; }
.tile .price { font-weight: 700; font-family: Inter, sans-serif; }
.keys { padding: 9px 12px; border-top: 1px solid var(--line); display: flex; gap: 6px; flex-wrap: wrap; background: var(--glass-foot); }
kbd { font: inherit; font-size: 11.5px; background: var(--track); padding: 0 6px; border-radius: 5px; direction: ltr; display: inline-block; }
.paytabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; background: var(--track); border-radius: 13px; }
.paytabs button { height: 38px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-weight: 500; transition: background .2s, color .2s; }
.paytabs button.on { background: var(--ink); color: var(--bg); }
.due { text-align: center; padding: 6px; }
.due b { font-size: 38px; display: block; line-height: 1.25; font-family: Inter, Readex, sans-serif; }
.change { text-align: center; font-size: 19px; font-weight: 700; color: var(--green); }

@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-wide, .g3 { grid-template-columns: minmax(0, 1fr); }
  .view { padding: 20px; }
}

/* v2 surfaces */
.side-overlay { justify-content: flex-start; padding: 0; }
.modal.drawer { height: 100%; max-height: 100%; width: 720px; border-radius: 0; animation: drawerIn .32s var(--ease-out) both; }
[dir="rtl"] .side-overlay { justify-content: flex-start; }
@keyframes drawerIn { from { opacity: 0; transform: translateX(-36px); } }
table.t th.sortable { cursor: pointer; }
table.t th.sortable:hover { color: var(--ink); }
.pager { display: flex; align-items: center; gap: 10px; padding: 10px 2px 0; }
.btn.sm { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 140px; height: 36px; }
.filters input[type=search] { min-width: 240px; }
.thumb { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: var(--track); display: grid; place-items: center; color: var(--muted); flex: none; }
.thumb.lg { width: 104px; height: 104px; border-radius: 16px; }
.name-cell { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600; background: var(--red-soft); color: var(--red); }
.tile .thumb { width: 100%; height: 86px; border-radius: 10px; margin-bottom: 6px; }
.tile .old { text-decoration: line-through; color: var(--muted); font-size: 12px; font-weight: 400; margin: 0 7px; display: inline-block; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.sum-line { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.mini-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.mini { background: var(--glass-2); border: 1px solid var(--line); border-radius: 13px; padding: 10px 13px; }
.mini span { display: block; font-size: 12px; color: var(--muted); }
.mini b { font-family: Inter, Readex, sans-serif; font-size: 18px; }
.section-title { margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.acct { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: transform .25s var(--ease), border-color .2s; }
.acct:hover { transform: translateY(-2px); }
.acct.on { border-color: var(--accent); }
.acct b { font-family: Inter, Readex, sans-serif; font-size: 24px; }
.palette { width: 100%; }
.palette input { height: 50px; font-size: 16px; border-radius: 13px; }
.pal-group { font-size: 11.5px; color: var(--muted); margin: 10px 4px 4px; }
.pal-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: start; }
.pal-row:hover, .pal-row.on { background: var(--accent-soft); }
.pal-row .ic { color: var(--muted); }
.ibtn { position: relative; }
.ibtn .dot { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.pl-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.pl-row.total { font-weight: 700; font-size: 16px; border-bottom: 0; }
.pl-row b { font-family: Inter, Readex, sans-serif; }
.shift-open { max-width: 440px; margin: 60px auto; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.img-pick { display: flex; align-items: center; gap: 12px; }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin-inline: -12px; padding-inline: 12px; }
.side-scroll::-webkit-scrollbar { width: 4px; }
.side-scroll .nav { height: 36px; }

/* Sudace-level depth: floating glass sidebar, 3D icon tiles, deeper cards */
:root {
  --bg: #f6efe4;
  --blob-1: rgba(214, 158, 62, .5);
  --blob-2: rgba(240, 205, 150, .75);
  --blob-3: rgba(150, 92, 52, .22);
  --glass: rgba(255, 253, 249, .66);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(120, 80, 30, .06), 0 20px 42px -20px rgba(112, 72, 24, .38), 0 4px 10px rgba(112, 72, 24, .06);
  --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, .95), 0 8px 18px -10px rgba(112, 72, 24, .3);
  --bar: linear-gradient(180deg, #ecca85, #bd8d36);
  --hot: linear-gradient(180deg, #8b5a3c, #4a2b1a);
}
[data-theme="dark"] {
  --bg: #13100c;
  --blob-1: rgba(194, 147, 60, .22);
  --blob-2: rgba(122, 74, 50, .2);
  --blob-3: rgba(194, 147, 60, .08);
  --glass: rgba(38, 32, 26, .62);
  --bar: linear-gradient(180deg, #ecca85, #a97c2b);
  --hot: linear-gradient(180deg, #e9d3a3, #c79a4a);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 38px -16px rgba(0, 0, 0, .75);
  --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 16px -8px rgba(0, 0, 0, .6);
}
.shell { padding: 10px; padding-inline-end: 0; gap: 0; }
.side {
  width: 84px; height: 100%; border-radius: 26px; padding: 14px 12px 12px; color: rgba(250, 243, 232, .86);
  background:
    radial-gradient(260px 220px at 85% -5%, rgba(232, 193, 112, .62), transparent 70%),
    radial-gradient(240px 260px at 0% 55%, rgba(205, 140, 60, .2), transparent 70%),
    radial-gradient(300px 260px at 60% 110%, rgba(160, 96, 58, .5), transparent 70%),
    linear-gradient(170deg, rgba(128, 88, 34, .96) 0%, rgba(66, 40, 18, .97) 56%, rgba(26, 20, 14, .98) 100%);
  backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: 0 30px 60px -22px rgba(60, 34, 8, .7), 0 8px 20px -10px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.side.open { width: 262px; }
.brand { height: 50px; margin-bottom: 10px; }
.brand img { width: 50px; height: 50px; border-radius: 16px; box-shadow: 0 12px 26px -8px rgba(232, 193, 112, .9), 0 0 0 3px rgba(255, 255, 255, .16); }
.brand-name { color: #fff; font-size: 18px; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.brand-name small { color: rgba(250, 236, 212, .74); }
.s-toggle { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; align-self: flex-start; margin: 0 14px 10px; flex: none; color: rgba(250, 243, 232, .85); background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .15); transition: transform .36s var(--ease-out), color .2s; }
.s-toggle:hover { color: #fff; }
.side.open .s-toggle { align-self: flex-end; transform: rotate(180deg); }
.side .grp { color: rgba(250, 234, 208, .6); font-weight: 600; font-size: 11px; }
.nav, .side-scroll .nav { height: 46px; border-radius: 15px; gap: 12px; padding: 0 8px; color: rgba(250, 243, 232, .86); font-weight: 500; border: 1px solid transparent; transition: background .2s, color .2s, transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.side:not(.open) .nav { padding: 0 7px; }
.nav .lbl { font-size: 14px; }
.nav:hover { background: rgba(255, 255, 255, .09); color: #fff; transform: translateX(2px); }
.nav.on { color: #fff; background: linear-gradient(135deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .07)); border-color: rgba(255, 255, 255, .24); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .36), inset 0 -1px 0 rgba(0, 0, 0, .2), 0 12px 26px -12px rgba(0, 0, 0, .7); }
.nav.on::before { display: none; }
.nav.on .lbl { color: #fff; font-weight: 600; }
.s-ic { --c: #e2bd6c; width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; flex: none; position: relative; color: color-mix(in srgb, var(--c) 45%, #fff); background: linear-gradient(155deg, color-mix(in srgb, var(--c) 50%, transparent), color-mix(in srgb, var(--c) 18%, transparent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -2px 0 rgba(0, 0, 0, .22), 0 5px 12px -6px var(--c); transition: transform .25s var(--ease), box-shadow .25s, background .25s; }
.nav:hover .s-ic { transform: translateY(-1px) scale(1.06); }
.nav.on .s-ic { color: #fff; background: linear-gradient(155deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 8px 18px -6px var(--c), 0 0 0 1px rgba(255, 255, 255, .14); }
.search-nav { background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .15); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); margin-bottom: 6px; }
.search-nav kbd { background: rgba(255, 255, 255, .1); color: rgba(250, 243, 232, .85); }
.nav .count { background: linear-gradient(150deg, #ff9d7c, #d9472c); border-color: transparent; top: 3px; inset-inline-start: 28px; box-shadow: 0 4px 10px -3px rgba(217, 71, 44, .9); }
.side-scroll::-webkit-scrollbar { width: 5px; }
.side-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border: 0; }
.me { background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 7px; margin-top: 8px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
.me .av { border: 2px solid #f1d48f; box-shadow: 0 0 0 3px rgba(241, 212, 143, .25); }
.me-name { color: #fff; }
.me-name small { color: rgba(250, 236, 212, .74); }

.main { display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 30px 8px 22px; flex: none; }
.crumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.crumb b { color: var(--ink); font-weight: 600; font-size: 14px; }
.state-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--green); background: var(--green-soft); padding: 3px 11px; border-radius: 99px; }
.state-tag i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(24, 135, 90, .18); }
.state-tag.off { color: var(--amber); background: var(--amber-soft); }
.state-tag.off i { box-shadow: 0 0 0 3px rgba(183, 127, 6, .18); }
.tools { display: flex; align-items: center; gap: 8px; }
.ibtn { width: 38px; height: 38px; border-radius: 12px; color: var(--ink-2); background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--shadow-sm); }
.ibtn:hover { color: var(--ink); }
.ibtn.txt { width: auto; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; }
.scroll { flex: 1; min-height: 0; overflow: auto; }
.main.flush .scroll { overflow: hidden; }
.view { padding-top: 8px; }
.pos { padding: 4px 14px 14px; }

.btn.primary { background: linear-gradient(150deg, #edc77b, #c2933c 62%, #a57a28); box-shadow: 0 12px 24px -10px rgba(170, 122, 40, .95), inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 0 rgba(90, 60, 10, .18); }
.tab.on { color: var(--on-accent); background: linear-gradient(150deg, #edc77b, #c2933c); box-shadow: 0 8px 18px -8px rgba(170, 122, 40, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.paytabs button.on { color: var(--on-accent); background: linear-gradient(150deg, #edc77b, #c2933c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }

.tile-ic { color: #fff; border: 0; background: linear-gradient(155deg, #efcf8c, #c2933c 60%, #94691c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 0 rgba(0, 0, 0, .18), 0 8px 16px -8px rgba(170, 122, 40, .95); }
.tile-ic.g { color: #fff; background: linear-gradient(155deg, #57d3a7, #18a074 60%, #0c7354); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .18), 0 8px 16px -8px rgba(24, 160, 116, .9); }
.tile-ic.a { color: #fff; background: linear-gradient(155deg, #ffbe6b, #ec8a26 60%, #c0640c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .18), 0 8px 16px -8px rgba(236, 138, 38, .9); }
.tile-ic.b { color: #fff; background: linear-gradient(155deg, #b98563, #7a4a32 60%, #4f2c1b); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 0 rgba(0, 0, 0, .2), 0 8px 16px -8px rgba(122, 74, 50, .95); }
.tile-ic.r { color: #fff; background: linear-gradient(155deg, #f58f7c, #d4503a 60%, #a53220); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .18), 0 8px 16px -8px rgba(212, 80, 58, .9); }
.kpi, .glass, .card, .table-wrap, .pos-cart, .pos-side { border-top-color: rgba(255, 255, 255, .95); }
.kpi { position: relative; }
.kpi:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 28px 48px -22px rgba(112, 72, 24, .5), 0 6px 14px rgba(112, 72, 24, .08); }
.kpi.hero-k { background: var(--glass); color: inherit; border-color: var(--glass-line); }
.kpi.hero-k .k-lbl, .kpi.hero-k .k-foot { color: var(--ink-2); }
.kpi.hero-k .tile-ic { color: #fff; background: linear-gradient(155deg, #efcf8c, #c2933c 60%, #94691c); }
.kpi.hero-k .k-foot { background: var(--glass-foot); border-color: var(--line); }
.kpi.hero-k .k-foot b { color: var(--ink); }
.k-go { color: var(--muted); transition: color .2s, transform .2s var(--ease); align-self: flex-start; transform: scaleX(-1); }
.kpi:hover .k-go { color: var(--ink); transform: scaleX(-1) translate(2px, -2px); }
.k-top { align-items: flex-start; gap: 10px; }
.k-top .k-spark { margin-inline-start: auto; margin-inline-end: 10px; }
.tile:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 18px 30px -16px rgba(112, 72, 24, .5); }
.acct:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 26px 44px -22px rgba(112, 72, 24, .5); }
.toast { background: linear-gradient(150deg, #5c3a1c, #2a1d12); }
.toast.ok { background: linear-gradient(150deg, #27a074, #127352); }
.toast.bad { background: linear-gradient(150deg, #dd5a44, #ad3522); }
.gauge-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
@keyframes growY { from { transform: scaleY(0); } }
.powered { display: block; font-size: 11px; color: var(--muted); padding: 6px 0 0; text-align: center; direction: ltr; font-family: Inter, sans-serif; text-decoration: none; flex: none; }
.powered b { font-weight: 700; color: var(--accent-ink); }
.side .powered { color: rgba(250, 236, 212, .66); }
.side .powered b { color: #fff; }
.side:not(.open) .powered { display: none; }
@media (max-height: 760px) {
  .nav, .side-scroll .nav { height: 40px; }
  .brand { height: 44px; margin-bottom: 6px; }
  .brand img { width: 44px; height: 44px; }
}
