/* Nest POS. Neutral workspace, brand colour for actions. */
:root {
  --bg: #F4F5F8; --card: #FFFFFF; --ink: #171A2E; --ink-2: #4B5068; --ink-3: #80859C; --line: #E3E5EC; --line-2: #EEF0F4;
  --brand: #4F46E5; --brand-2: #7C3AED; --brand-ink: #3730A3; --brand-bg: #EEF0FF;
  --ok: #0F8A4F; --ok-bg: #E3F6EC; --warn: #A15C00; --warn-bg: #FFF2DB; --bad: #C0262D; --bad-bg: #FDE8E8; --idle-bg: #EEF0F4;
  --chat-bg: #EFEAE2; --bubble-in: #FFFFFF; --bubble-out: #D9FDD3; --bubble-bot: #E7ECFF; --note: #FFF6CC;
  --hover: var(--hover); --sel: #F1F0FF; --composer: #F0F2F5; --avatar: #E0E3F5; --input: #FFFFFF; --link: #0B6BCB; --meta: #667085; --tag-bg: #F0EEFF; --tag-ink: #4C3FB8;
  --radius: 10px; --shadow: 0 1px 2px rgba(20, 22, 40, .06), 0 2px 8px rgba(20, 22, 40, .04);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Tamil", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-ink); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--ink-3); } .small { font-size: 12.5px; } .err { color: var(--bad); } .ok-t { color: var(--ok); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 76px minmax(0, 1fr); height: 100vh; }
.rail { background: #12142A; color: #C9CCE4; display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px; overflow-y: auto; }
.logo { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; color: #fff; font-weight: 800; margin-bottom: 10px; }
.rail a { width: 64px; padding: 8px 0 6px; border-radius: 10px; color: inherit; text-decoration: none; display: grid; justify-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; position: relative; }
.rail a svg { width: 21px; height: 21px; }
.rail a:hover { background: rgba(255,255,255,.07); color: #fff; }
.rail a[aria-current="page"] { background: rgba(124, 58, 237, .28); color: #fff; }
.rail .badge { position: absolute; top: 3px; right: 8px; background: #22C55E; color: #062; min-width: 17px; height: 17px; border-radius: 9px; font-size: 10px; display: grid; place-items: center; padding: 0 4px; color: #fff; }
.rail .grow { flex: 1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--avatar); color: var(--brand-ink); display: inline-grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; text-transform: uppercase; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.main { min-width: 0; overflow: auto; }
.page { padding: 24px 28px 60px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.banner { padding: 10px 16px; font-weight: 500; display: flex; gap: 10px; align-items: center; }
.banner.bad { background: var(--bad); color: #fff; } .banner.warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 13px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--ink); min-height: 34px; }
.btn:hover { border-color: var(--ink-3); background: var(--hover); }
.btn.p { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; }
.btn.p:hover { filter: brightness(1.06); }
.btn.d { color: var(--bad); } .btn.d:hover { background: var(--bad-bg); border-color: #F3C2C4; }
.btn.q { border-color: transparent; background: transparent; } .btn.q:hover { background: var(--line-2); }
.btn.sm { padding: 4px 9px; min-height: 28px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.iconbtn { border: 0; background: transparent; width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--line-2); color: var(--ink); } .iconbtn svg { width: 19px; height: 19px; }
label.f { display: grid; gap: 5px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
label.f .hint { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--input); font-weight: 400; color: var(--ink); }
textarea.input { resize: vertical; min-height: 84px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .14); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.stack { display: grid; gap: 14px; } .stack.s { gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; font-weight: 600; cursor: pointer; color: var(--ink-2); font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.seg .n { color: var(--ink-3); font-weight: 600; margin-left: 3px; }

/* ---------- surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-body { padding: 18px; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--idle-bg); color: var(--ink-2); }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.act { background: var(--brand-bg); color: var(--brand-ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--tag-bg); color: var(--tag-ink); border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; }
.tag button { border: 0; background: none; cursor: pointer; padding: 0; color: inherit; font-size: 14px; line-height: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--hover); }
.t td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: var(--hover); }
.scroll { overflow-x: auto; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 14px 16px; }
.kpi .v { font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.kpi .s { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.callout { border-radius: 8px; padding: 10px 12px; background: var(--brand-bg); color: var(--brand-ink); font-size: 13px; }
.callout.warn { background: var(--warn-bg); color: var(--warn); } .callout.bad { background: var(--bad-bg); color: var(--bad); }
.copy { display: flex; gap: 6px; align-items: center; background: var(--hover); border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 10px; }
.copy code { flex: 1; overflow-x: auto; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; }

/* ---------- drawer / modal / toast */
.scrim { position: fixed; inset: 0; background: rgba(15, 17, 35, .38); z-index: 50; display: flex; justify-content: flex-end; animation: fade .12s; }
.scrim.center { justify-content: center; align-items: flex-start; padding: 6vh 16px; overflow-y: auto; }
.drawer { width: min(560px, 100vw); height: 100%; background: var(--card); overflow-y: auto; padding: 22px; display: grid; gap: 16px; align-content: start; box-shadow: -8px 0 30px rgba(0,0,0,.12); }
.drawer.wide { width: min(860px, 100vw); }
.drawer.xwide { width: min(1180px, 100vw); }
.modal { width: min(520px, 100%); background: var(--card); border-radius: 14px; padding: 22px; display: grid; gap: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.dhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 90; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 9px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 90vw; }
.toast.err { background: var(--bad); }

/* ---------- dark mode and chat backgrounds (set by Settings → Appearance) */
:root[data-mode="dark"] {
  color-scheme: dark;
  --bg: #0F1220; --card: #171A2B; --ink: #E7E9F3; --ink-2: #B6BBD2; --ink-3: #8A90AA; --line: #2B2F47; --line-2: #22263A;
  --ok: #4ADE80; --ok-bg: #12362A; --warn: #FBBF24; --warn-bg: #3A2C12; --bad: #F87171; --bad-bg: #3D1B20; --idle-bg: #262A40;
  --chat-bg: #0B141A; --bubble-in: #202C33; --bubble-out: #005C4B; --bubble-bot: #2A2F5A; --note: #3A3416;
  --hover: #1D2133; --sel: #262A50; --composer: #1B1F30; --avatar: #2A2E50; --input: #12152A; --link: #53BDEB; --meta: #9AA4B2; --tag-bg: #2A2650; --tag-ink: #C4B5FD;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
}
:root[data-mode="dark"] .auth { background: var(--bg); }
:root[data-mode="dark"] .auth-split { background: var(--card); } :root[data-mode="dark"] .auth-side { background: #0A0C18; }
:root[data-mode="dark"] .day { background: rgba(32,44,51,.92); color: var(--ink-2); }
:root[data-mode="dark"] .windowbar { background: #3A2C12; color: #FCD34D; }
:root[data-mode="dark"] .toast { background: #2B2F47; }
:root[data-chat="plain"] { --chat-bg: var(--bg); }
:root[data-chat="mint"] { --chat-bg: #E4F3EC; } :root[data-chat="lavender"] { --chat-bg: #ECE9FA; } :root[data-chat="sand"] { --chat-bg: #F3EDE3; }
:root[data-mode="dark"][data-chat="mint"] { --chat-bg: #0D1F1A; } :root[data-mode="dark"][data-chat="lavender"] { --chat-bg: #15142A; } :root[data-mode="dark"][data-chat="sand"] { --chat-bg: #1C1914; }
:root[data-density="compact"] body { font-size: 13px; } :root[data-density="compact"] .citem { padding: 7px 12px; } :root[data-density="compact"] .t td { padding: 7px 12px; } :root[data-density="compact"] .page { padding: 16px 20px 40px; }
.rail .logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 92px; border: 2px solid var(--line); border-radius: 12px; padding: 6px; background: var(--card); cursor: pointer; display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center; }
.swatch i { display: block; height: 34px; border-radius: 8px; }
.swatch[aria-pressed="true"] { border-color: var(--brand); color: var(--ink); }

@media (max-width: 1180px) { .side-close { display: inline-grid; } }
.nochat { display: grid; place-items: center; height: 100%; color: var(--ink-3); text-align: center; background: var(--chat-bg); }

/* ---------- calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-h { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--line-2); }
.cal-d { min-height: 96px; padding: 6px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-d:nth-child(7n+7) { border-right: 0; } .cal-d.other { background: var(--hover); } .cal-d.other .cal-n { color: var(--ink-3); }
.cal-n { font-size: 12px; font-weight: 600; } .cal-d.today .cal-n { background: var(--brand); color: #fff; border-radius: 99px; width: 22px; height: 22px; display: grid; place-items: center; }
.cal-e { border: 0; border-radius: 5px; padding: 2px 6px; font-size: 11.5px; font-weight: 600; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-e.f.festival, .lg.f.festival { background: #FFE8CC; color: #9A4A00; } .cal-e.f.sale, .lg.f.sale { background: #FFE0E6; color: #A1123C; } .cal-e.f.day, .lg.f.day { background: #E0F2FE; color: #075985; }
.cal-e.b, .lg.b { background: var(--brand-bg); color: var(--brand-ink); } .cal-e.b.done, .lg.b.done { background: var(--ok-bg); color: var(--ok); } .cal-e.b.cancelled { text-decoration: line-through; opacity: .6; }
:root[data-mode="dark"] .cal-e.f.festival, :root[data-mode="dark"] .lg.f.festival { background: #3B2A12; color: #FDBA74; } :root[data-mode="dark"] .cal-e.f.sale, :root[data-mode="dark"] .lg.f.sale { background: #3B1622; color: #FDA4AF; } :root[data-mode="dark"] .cal-e.f.day, :root[data-mode="dark"] .lg.f.day { background: #0C2A3B; color: #7DD3FC; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
@media (max-width: 760px) { .cal-d { min-height: 64px; padding: 3px; } .cal-e { font-size: 0; padding: 0; height: 6px; } }

/* ---------- chart */
.chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 170px; padding-top: 10px; }
.chart .col { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.chart .bars { flex: 1; display: flex; gap: 2px; align-items: flex-end; }
.chart .col i { display: block; border-radius: 3px 3px 0 0; min-height: 2px; }
.chart .lab { font-size: 11px; color: var(--ink-3); text-align: center; margin-top: 4px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 10% -10%, #E6E3FF, transparent), var(--bg); }
.auth .card { width: min(400px, 100%); padding: 28px; display: grid; gap: 16px; }
.auth .qr svg { width: 180px; height: 180px; display: block; margin: 0 auto; }
/* sign-in: product on the left, plain form on the right */
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); place-items: stretch; padding: 0; background: var(--card); }
.auth-side { background: #12142A; color: #C9CCE4; padding: 40px 48px; display: flex; flex-direction: column; gap: 28px; }
.auth-mark { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; font-size: 16px; }
.auth-line { margin: 0; max-width: 400px; font-size: 22px; line-height: 1.35; color: #fff; font-weight: 600; }
.auth-foot { margin: 0; font-size: 12.5px; color: #80859C; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: min(360px, 100%); display: grid; gap: 18px; }
.auth-form h1 { font-size: 26px; margin-bottom: 6px; }
.auth-form p { margin: 0; }
.auth-form .input { padding: 10px 12px; }
.auth-form .pw { position: relative; display: block; }
.auth-form .pw .input { padding-right: 44px; }
.auth-form .pw .iconbtn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }
.btn.big { min-height: 44px; font-size: 15px; width: 100%; }
.auth-split .btn.p { background: var(--brand); }
.mob-mark { display: none; color: var(--ink); }
@media (max-width: 860px) { .auth-split { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-main { place-items: start center; padding-top: 32px; gap: 40px; align-content: start; } .mob-mark { display: flex; width: min(360px, 100%); } }
.code-input { font-size: 22px; letter-spacing: .35em; text-align: center; font-family: var(--mono); }

/* ---------- settings */
.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; }
.subnav { display: grid; gap: 2px; align-content: start; position: sticky; top: 0; }
.subnav button { text-align: left; border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.subnav button[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.chan { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.chan .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.chan .ic.owa { background: var(--warn-bg); color: var(--warn); }
.qrbox { display: grid; justify-items: center; gap: 10px; padding: 10px; } .qrbox img { width: 240px; height: 240px; image-rendering: pixelated; }

@media (max-width: 1180px) { .inbox { grid-template-columns: 300px minmax(0, 1fr); } .inbox .side { display: none; } .inbox.showside .side { display: grid; position: fixed; right: 0; top: 0; bottom: 0; width: 320px; z-index: 40; box-shadow: -8px 0 30px rgba(0,0,0,.12); } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 62px; }
  .rail { order: 2; flex-direction: row; padding: 4px 6px; justify-content: space-around; overflow-x: auto; }
  .rail .logo, .rail .grow { display: none; } .rail a { width: 58px; flex: none; }
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 62px); }
  .inbox.chatopen .clist { display: none; } .inbox:not(.chatopen) .thread { display: none; }
  .page { padding: 18px 16px 40px; } .grid2, .grid3, .settings { grid-template-columns: 1fr; } .subnav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .opt { grid-template-columns: 1fr; } .msgs { padding: 14px 10px; } .mob { display: inline-grid !important; }
  .thead { flex-wrap: wrap; } .thead .who { flex: 1 1 60%; } .hide-m { display: none; } .inbox .side { top: 0; bottom: 62px; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ================================================================ Nest POS */
.page > .card, .page .stack > .card, .page form.card, .page > form.card { padding: 18px; }
.page > .card, .page > form.card { margin-bottom: 16px; }
.page .card h3 { margin-bottom: 8px; }
.card.flush { padding: 0 !important; overflow: hidden; }
.card.flush .t th:first-child, .card.flush .t td:first-child { padding-left: 18px; }
.right { text-align: right; } .nowrap { white-space: nowrap; } .t td.right .btn + .btn, .t td.right .btn + button { margin-left: 4px; }
.t tr.off td { opacity: .55; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 4px; }
.kpi span { color: var(--ink-3); font-size: 12.5px; font-weight: 600; } .kpi b { font-size: 24px; font-variant-numeric: tabular-nums; }
.hero { display: flex; gap: 16px; align-items: center; background: var(--brand-bg); border-color: transparent; }
.hero > svg { width: 36px; height: 36px; color: var(--brand-ink); flex: none; }
ul.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
ul.check li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
ul.check li:last-child { border: 0; } ul.check li.done .grow { color: var(--ink-3); text-decoration: line-through; } ul.check .grow { flex: 1; }
.tick-c { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
li.done .tick-c { background: var(--ok); border-color: var(--ok); color: #fff; } .tick-c svg { width: 13px; height: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--brand); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.sw { width: 40px; height: 40px; border-radius: 10px; border: 3px solid var(--card); outline: 2px solid var(--line); cursor: pointer; }
.sw.on { outline-color: var(--ink); }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .15s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); } .switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
label.chk { display: flex; gap: 8px; align-items: center; font-weight: 500; }
fieldset.roles { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
fieldset.roles legend { font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
label.role { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
label.role input { grid-row: span 2; accent-color: var(--brand); } label.role small { color: var(--ink-3); } label.role.sel { border-color: var(--brand); background: var(--brand-bg); }

/* sign-in side: a sample bill */
.auth-bill { margin-top: auto; max-width: 400px; background: #FFFDF7; color: #1F2233; border-radius: 6px 6px 0 0; padding: 18px 18px 22px; font: 12.5px/1.5 var(--mono);
  -webkit-mask: radial-gradient(6px at 50% 100%, transparent 98%, #000) 50% / 12px 100% repeat-x; mask: radial-gradient(6px at 50% 100%, transparent 98%, #000) 50% / 12px 100% repeat-x; }
.ab-h { text-align: center; border-bottom: 1px dashed #B9B4A6; padding-bottom: 8px; margin-bottom: 8px; display: grid; } .ab-h b { font-size: 14px; } .ab-h span { font-size: 11px; color: #6B6A63; }
.ab-r { display: grid; grid-template-columns: 1fr auto 70px; gap: 8px; } .ab-r span:nth-child(2) { color: #6B6A63; } .ab-r b { text-align: right; font-weight: 600; }
.ab-t { display: flex; justify-content: space-between; border-top: 1px dashed #B9B4A6; margin-top: 8px; padding-top: 8px; } .ab-t b { font-size: 15px; } .ab-t span { color: #6B6A63; }
.ab-f { text-align: center; color: #6B6A63; margin-top: 8px; font-size: 11.5px; }
.auth-top { width: min(360px, 100%); display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.auth-top .mob-mark { margin-right: auto; }
@media (max-width: 860px) { .auth-top { width: min(360px, 100%); } .mob-mark { width: auto; } }

/* counter PIN screen */
.pin-page { min-height: 100vh; background: #12142A; color: #E7E9F6; display: flex; flex-direction: column; }
.pin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; flex-wrap: wrap; }
.pin-top .auth-mark span { display: grid; } .pin-top .auth-mark small { font-weight: 500; color: #9EA3C0; font-size: 12.5px; }
.btn.on-dark { color: #C9CCE4; } .btn.on-dark:hover { background: rgba(255,255,255,.08); color: #fff; }
.pin-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; }
.pin-main h1 { font-size: 26px; color: #fff; text-align: center; }
.pin-sub { margin: -8px 0 0; color: #9EA3C0; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; width: min(820px, 100%); }
.staff { display: grid; justify-items: center; gap: 6px; padding: 20px 10px; border-radius: 14px; border: 1px solid #2A2E4D; background: #1A1D38; color: #fff; cursor: pointer; font-size: 15px; }
.staff:hover, .staff:focus-visible { border-color: var(--brand-2); background: #222649; } .staff small { color: #9EA3C0; }
.avatar.big { width: 56px; height: 56px; font-size: 19px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.pin-dots { display: flex; gap: 14px; } .pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #4A4F78; }
.pin-dots i.opt { border-style: dashed; opacity: .5; } .pin-dots i.on { background: #fff; border-color: #fff; opacity: 1; }
.pin-err { min-height: 20px; margin: 0; color: #FF8A8A; }
.keypad { display: grid; grid-template-columns: repeat(3, 84px); gap: 14px; }
.key { height: 72px; border-radius: 16px; border: 1px solid #2A2E4D; background: #1A1D38; color: #fff; font-size: 26px; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.key:hover:not(:disabled) { background: #262A50; } .key:active:not(:disabled) { transform: scale(.96); } .key:disabled { opacity: .35; cursor: default; }
.key.ok { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: 0; }

/* setup wizard */
.setup { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.setup-top { display: flex; align-items: center; gap: 24px; padding: 14px 28px; background: #12142A; flex-wrap: wrap; }
.steps { display: flex; gap: 6px; list-style: none; margin: 0 auto; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; color: #80859C; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 12px; }
.steps li.cur { color: #fff; } .steps li.done { color: #9AE6B4; }
.setup-main { width: min(1060px, 100%); margin: 0 auto; padding: 32px 24px 48px; display: grid; gap: 16px; align-content: start; }
.setup-main.narrow { width: min(720px, 100%); }
.setup-main .card { padding: 18px; }
.prof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.prof { text-align: left; display: grid; gap: 4px; padding: 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; color: var(--ink); }
.prof:hover { border-color: var(--ink-3); } .prof.sel { border-color: var(--brand); background: var(--brand-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.prof b { font-size: 14.5px; } .prof small { color: var(--ink-3); }
.prof-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-bg); color: var(--brand-ink); margin-bottom: 6px; }
.prof.sel .prof-ic { background: var(--brand); color: #fff; } .prof-ic svg { width: 21px; height: 21px; }
.prof-detail { display: grid; gap: 10px; }
.setup-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; } .setup-foot .btn.big { width: auto; padding: 0 28px; }
:root[data-mode="dark"] .setup-top { background: #0A0C18; }
@media (max-width: 640px) { .steps li { font-size: 0; gap: 0; } .keypad { grid-template-columns: repeat(3, 72px); } .key { height: 62px; } .page { padding: 18px 14px 50px; } }
.auth-split .auth-main { align-content: center; gap: 28px; }
@media (max-width: 860px) { .auth-split .auth-main { align-content: start; } }
.pill svg { width: 12px; height: 12px; } .ic-sm { width: 13px; height: 13px; vertical-align: -2px; }

/* ================================================================ POS 1.0 */
.branchbar { display: flex; align-items: center; gap: 8px; padding: 6px 28px; border-bottom: 1px solid var(--line); background: var(--card); }
.branchbar svg { width: 16px; height: 16px; color: var(--ink-3); } .branchbar .input { max-width: 240px; padding: 4px 8px; min-height: 30px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.w70 { width: 70px; } .w80 { width: 80px; } .w90 { width: 90px; } .w120 { width: 120px; } .row.wrap { flex-wrap: wrap; } .seg.wrap { flex-wrap: wrap; }
.warn-t { color: var(--warn); } .small-b { font-size: 15px !important; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.qa { display: grid; justify-items: start; gap: 8px; padding: 16px !important; cursor: pointer; text-align: left; border: 1px solid var(--line); color: var(--ink); }
.qa svg { width: 24px; height: 24px; color: var(--brand); } .qa:hover { border-color: var(--brand); }
.sumbox { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; } .sumbox div { display: grid; padding: 8px 10px; background: var(--line-2); border-radius: 8px; }
.sumbox span { font-size: 12px; color: var(--ink-3); } .sumbox .g { background: var(--brand-bg); } .sumbox .g b { font-size: 18px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.chips button { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 13px; font-weight: 600; white-space: nowrap; cursor: pointer; color: var(--ink-2); }
.chips button.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
.staff-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; } .staff-pick .btn { min-height: 54px; }
svg.bars .vbar { fill: var(--brand); opacity: .85 } svg.bars .vbar:hover { opacity: 1 } svg.bars .bar-l { font-size: 10.5px; fill: var(--ink-3); }

/* billing screen */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: 100%; min-height: 0; }
.pos-left { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; min-height: 0; overflow: hidden; }
.pos-bar { display: flex; gap: 8px; align-items: center; }
.pos-search { flex: 1; position: relative; } .pos-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.pos-search .input { padding: 11px 12px 11px 38px; font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; overflow-y: auto; align-content: start; flex: 1; min-height: 0; padding: 2px; }
.tiles.big { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; } .tiles.big .tile { min-height: 104px; font-size: 16px; }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; text-align: left; min-height: 80px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; color: var(--ink); box-shadow: var(--shadow); touch-action: manipulation; }
.tile b { font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile:hover { border-color: var(--brand); } .tile:active { transform: scale(.97); background: var(--brand-bg); }
.tile-f { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; font-weight: 700; color: var(--brand-ink); } .tile-f small { font-weight: 500; }
.pos-cart { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--card); min-height: 0; }
.cust { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; } .cust .row { flex-wrap: nowrap; } .cust-info { color: var(--ink-2); }
.cart-lines { flex: 1; overflow-y: auto; min-height: 0; }
.cl { display: grid; grid-template-columns: minmax(0, 1fr) auto 84px; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line-2); }
.cl-main { display: grid; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink); min-width: 0; }
.cl-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-qty { display: flex; align-items: center; gap: 2px; } .cl-qty b { min-width: 30px; text-align: center; } .cl-qty .iconbtn { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; }
.cl-amt { text-align: right; font-variant-numeric: tabular-nums; }
.totals { border-top: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 6px; }
.sm-in { padding: 6px 9px !important; min-height: 32px; font-size: 13px; }
.grand { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; } .grand b { font-size: 26px; font-variant-numeric: tabular-nums; }
.acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .acts .pay-btn { grid-column: 1 / -1; min-height: 52px; font-size: 17px; } .acts .pay-btn small { opacity: .7; font-weight: 500; }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; background: var(--brand-bg); border-radius: 10px; } .pay-total b { font-size: 30px; font-variant-numeric: tabular-nums; }
.big-in { font-size: 22px !important; padding: 10px 12px !important; }
.change { font-size: 18px; padding: 10px 14px; background: var(--ok-bg); color: var(--ok); border-radius: 10px; } .change b { font-size: 22px; }
.upi { display: flex; align-items: center; gap: 14px; } .upi .qr svg { width: 150px; height: 150px; display: block; background: #fff; border-radius: 8px; }
.done-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin: 0 auto; } .done-ic svg { width: 30px; height: 30px; }
.np-show { display: flex; align-items: center; gap: 8px; } .np-in { font-size: 28px !important; text-align: right; padding: 10px 14px !important; } .np-show span { font-weight: 700; color: var(--ink-3); }
.np { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .key-l { height: 56px; font-size: 22px; font-weight: 600; border: 1px solid var(--line); background: var(--card); border-radius: 10px; cursor: pointer; color: var(--ink); }
.key-l:active { background: var(--brand-bg); }
@media (max-width: 1000px) { .pos { grid-template-columns: 1fr; height: auto; } .pos-left { overflow: visible; } .tiles { max-height: 55vh; } .pos-cart { border-left: 0; border-top: 1px solid var(--line); } }

/* tables & kitchen */
.tablemap { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tbl { display: grid; gap: 2px; justify-items: center; padding: 16px 8px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; color: var(--ink); min-height: 92px; }
.tbl b { font-size: 18px; } .tbl small { color: var(--ink-3); } .tbl.busy { background: var(--brand-bg); border-color: var(--brand); } .tbl.busy span { font-weight: 700; color: var(--brand-ink); }
.tbl.warn { border-color: var(--warn); background: var(--warn-bg); }
.order-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; min-height: 0; } .order-grid .tiles { max-height: 60vh; }
@media (max-width: 900px) { .order-grid { grid-template-columns: 1fr; } }
.kots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; align-items: start; }
.kot { background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--brand); border-radius: 10px; padding: 12px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.kot.ready { border-top-color: var(--ok); opacity: .75; } .kot.late { border-top-color: var(--bad); }
.kot-h { display: grid; } .kot-h b { font-size: 17px; } .kot-h span, .kot-h small { color: var(--ink-3); font-size: 12.5px; }
.kot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } .kot li { font-size: 15px; } .kot li b { display: inline-block; min-width: 28px; } .kot li em { display: block; font-size: 12.5px; color: var(--warn); margin-left: 28px; } .kot li.off { text-decoration: line-through; opacity: .5; }
.page-head .row .input { width: auto; }
.rail { gap: 1px; padding: 10px 0; } .rail a { padding: 6px 0 4px; font-size: 10px; gap: 2px; } .rail a svg { width: 19px; height: 19px; } .rail .logo { margin-bottom: 6px; width: 36px; height: 36px; }
@media (max-height: 760px) { .rail a { padding: 4px 0 3px; } .rail a svg { width: 17px; height: 17px; } }
