/* ============================================================
   Market & Pharmacy POS — modern UI theme
   Palette: White · Dark Blue · Soft Gray · Green status
   ============================================================ */
:root {
    --brand:        #1e3a8a;   /* dark blue */
    --brand-2:      #2563eb;
    --accent:       #10b981;   /* green */
    --bg:           #f1f5f9;   /* soft gray */
    --sidebar-bg:   #0f172a;
    --sidebar-hover:#1e293b;
    --card-radius:  16px;
    --sidebar-w:    256px;
}
[data-bs-theme="dark"] {
    --bg: #0b1220;
    --sidebar-bg: #060c18;
}

* { -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
/* Global font — Latin uses Segoe UI; Arabic/Kurdish characters fall through to the
   loaded web fonts (Vazirmatn / Noto Naskh Arabic) which shape Kurdish correctly
   even when no Kurdish font is installed locally. */
body {
    background: var(--bg);
    font-family: 'Segoe UI', system-ui, -apple-system, 'Vazirmatn', 'Noto Naskh Arabic', 'Tahoma', sans-serif;
    overflow-x: hidden;
}
/* In RTL (Arabic / Kurdish) lead with the Kurdish-capable web font */
body.rtl, body.rtl input, body.rtl select, body.rtl textarea, body.rtl button {
    font-family: 'Vazirmatn', 'Noto Naskh Arabic', 'Segoe UI', 'Tahoma', sans-serif;
}

/* ===== RTL layout (Arabic / Kurdish) — flip the custom sidebar shell ===== */
body.rtl .sidebar { inset: 0 0 0 auto; }
body.rtl .main { margin-left: 0; margin-right: var(--sidebar-w); }
body.rtl .nav-link-item.active { background: linear-gradient(270deg, var(--brand-2), var(--brand)); }
@media (max-width: 991.98px) {
    body.rtl .sidebar { transform: translateX(100%); }
    body.rtl .sidebar.show { transform: translateX(0); }
    body.rtl .main { margin-right: 0; }
}
body.rtl.pos-fs .main { margin-right: 0 !important; }
body.rtl .toast-container { left: 0; right: auto; }
.btn-primary { --bs-btn-bg: var(--brand-2); --bs-btn-border-color: var(--brand-2); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }
.text-brand { color: var(--brand-2) !important; }
.bg-brand { background: var(--brand) !important; }

/* ---------- Login ---------- */
.login-wrap {
    min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; position: relative; overflow: hidden;
    background: radial-gradient(1200px 600px at 15% 10%, #1e3a8a 0%, transparent 55%),
                radial-gradient(1000px 700px at 90% 90%, #0ea5e9 0%, transparent 50%),
                linear-gradient(135deg, #0b1220 0%, #0f172a 55%, #111c33 100%);
}
/* floating ambient blobs */
.login-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: 0; pointer-events: none; animation: floaty 14s ease-in-out infinite; }
.login-blob.b1 { width: 420px; height: 420px; background: #2563eb; top: -120px; left: -90px; }
.login-blob.b2 { width: 360px; height: 360px; background: #0ea5e9; bottom: -120px; right: -80px; animation-delay: -5s; }
.login-blob.b3 { width: 260px; height: 260px; background: #7c3aed; top: 40%; right: 30%; opacity: .35; animation-delay: -9s; }
@keyframes floaty { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-30px) translateX(20px); } }

.login-card {
    position: relative; z-index: 1; width: 100%; max-width: 860px; display: grid; grid-template-columns: 1.05fr 1fr;
    background: rgba(255,255,255,.95); border-radius: 26px; overflow: hidden;
    box-shadow: 0 30px 80px rgba(2,6,23,.55), 0 0 0 1px rgba(255,255,255,.08);
    backdrop-filter: blur(8px); animation: loginIn .5s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes loginIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
[data-bs-theme="dark"] .login-card { background: rgba(17,24,39,.96); }

/* hero / brand panel */
.login-hero {
    position: relative; padding: 2.6rem 2.2rem; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(900px 500px at 0% 0%, #3b82f6 0%, transparent 60%), linear-gradient(160deg, #1d4ed8, #0c4a6e);
    overflow: hidden;
}
.login-hero::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 12px, transparent 12px 24px); pointer-events: none; }
.login-hero-inner { position: relative; z-index: 1; }
.login-logo { width: 84px; height: 84px; border-radius: 22px; background: #fff; padding: 10px; object-fit: contain;
    box-shadow: 0 12px 30px rgba(0,0,0,.3); margin-bottom: 1.1rem; }
.login-brand { font-weight: 900; letter-spacing: .5px; margin: 0; font-size: 1.9rem; }
.login-brand span { color: #bae6fd; }
.login-tagline { opacity: .85; margin: .25rem 0 1.6rem; font-size: .95rem; }
.login-feats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .7rem; }
.login-feats li { display: flex; align-items: center; gap: .6rem; font-size: .92rem; opacity: .95; }
.login-feats i { color: #7dd3fc; font-size: 1.05rem; }
.login-hero-foot { position: relative; z-index: 1; font-size: .78rem; opacity: .7; margin-top: 1.4rem; }

/* form panel */
.login-form-pane { padding: 2.8rem 2.4rem; display: flex; flex-direction: column; justify-content: center; }
.login-logo-sm { display: none; }
.login-logo-sm img { width: 60px; height: 60px; border-radius: 16px; background: #fff; padding: 7px; object-fit: contain; box-shadow: 0 8px 20px rgba(37,99,235,.25); }
.login-ig .input-group-text { background: #f1f5f9; border-right: 0; color: var(--brand); }
[data-bs-theme="dark"] .login-ig .input-group-text { background: #1f2937; color: #93c5fd; border-color: #374151; }
.login-ig .form-control { border-left: 0; }
.login-ig .form-control:focus { box-shadow: none; border-color: #cbd5e1; }
.login-ig:focus-within { box-shadow: 0 0 0 3px rgba(37,99,235,.18); border-radius: .6rem; }
.login-eye { cursor: pointer; background: #f1f5f9; border-left: 0; color: #64748b; }
.login-eye:hover { color: var(--brand); }
.login-btn { border-radius: .7rem; box-shadow: 0 10px 24px rgba(37,99,235,.35); transition: transform .12s, box-shadow .12s; }
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(37,99,235,.45); }
.login-btn:active { transform: translateY(0); }

@media (max-width: 720px) {
    .login-card { grid-template-columns: 1fr; max-width: 420px; }
    .login-hero { display: none; }
    .login-logo-sm { display: block; margin-bottom: 1rem; }
}

/* ---------- Layout ---------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--sidebar-bg);
    color: #cbd5e1; display: flex; flex-direction: column; z-index: 1040; transition: transform .25s;
}
.sidebar-brand { padding: 1.25rem 1.4rem; font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: .5px; }
.sidebar-brand i { color: var(--brand-2); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .5rem .75rem; }
.nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 1rem .75rem .35rem; font-weight: 700; }
.nav-link-item {
    display: flex; align-items: center; gap: .75rem; padding: .65rem .85rem; border-radius: 10px;
    color: #cbd5e1; text-decoration: none; font-size: .9rem; font-weight: 500; margin-bottom: 2px; cursor: pointer;
    transition: background .15s, color .15s;
}
.nav-link-item i { font-size: 1.1rem; width: 20px; text-align: center; }
.nav-link-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-link-item.active { background: linear-gradient(90deg, var(--brand-2), var(--brand)); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.4); }
.sidebar-footer { padding: 1rem; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    height: 64px; background: #fff; display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem;
    position: sticky; top: 0; z-index: 1020; border-bottom: 1px solid rgba(0,0,0,.06);
}
[data-bs-theme="dark"] .topbar { background: #111827; }
.content { padding: 1.5rem; flex: 1; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.4); }
    .main { margin-left: 0; }
}

/* ---------- Cards / widgets ---------- */
.card { border: none; border-radius: var(--card-radius); box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04); transition: box-shadow .2s ease, transform .2s ease; }
[data-bs-theme="dark"] .card { background: #111827; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.14); }

/* ---------- Modern smooth tables ---------- */
.table-card .table { margin: 0; }
.table-card .table thead th {
    background: #f8fafc; color: #64748b; font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e9eef5; padding: .85rem 1rem; white-space: nowrap;
}
[data-bs-theme="dark"] .table-card .table thead th { background: #0f172a; color: #94a3b8; border-color: #1f2937; }
.table-card .table tbody td { border-top: 1px solid rgba(15,23,42,.05); padding: .8rem 1rem; }
[data-bs-theme="dark"] .table-card .table tbody td { border-color: rgba(255,255,255,.05); }
.table-card .table tbody tr { transition: background .15s ease; }
.table-card .table tbody tr:hover { background: rgba(37,99,235,.055); }
.table-card .table tbody tr:first-child td { border-top: none; }
.table-card .table tbody tr.table-warning { background: rgba(245,158,11,.10); }
.table-card .table tbody tr.table-warning:hover { background: rgba(245,158,11,.16); }
/* round action buttons in tables for a smoother feel */
.table-card .btn-sm { border-radius: 8px; }
.filter-bar .form-control, .filter-bar .form-select { border-radius: 9px; }
.stat-card { overflow: hidden; position: relative; }
.stat-card .stat-icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem;
}
.stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-label { color: #94a3b8; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

/* ---------- POS ---------- */
/* ===== POS / cashier ===== */
/* start right at the top — no wasted space above the toolbar */
.content:has(.pos-toolbar) { padding-top: .55rem; }
.pos-toolbar { display: flex; gap: .45rem; align-items: center; margin-bottom: .5rem; }
.pos-scan { flex: 1; display: flex; align-items: center; gap: .55rem; background: #fff7ed; border: 1.5px solid #fed7aa; border-radius: 10px; padding: 0 .8rem; height: 42px; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: border-color .15s, box-shadow .15s; }
.pos-scan:focus-within { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,.18); }
.pos-scan > .bi { font-size: 1.1rem; color: #ea580c; }
.pos-scan input { flex: 1; border: 0; outline: 0; background: transparent; font-size: .9rem; font-weight: 700; color: #9a3412; }
.pos-scan input::placeholder { color: #c2855f; font-weight: 500; font-size: .8rem; }
[data-bs-theme="dark"] .pos-scan { background: #2a1a0e; border-color: #7c3a12; }
[data-bs-theme="dark"] .pos-scan input { color: #fed7aa; }
[data-bs-theme="dark"] .pos-scan input::placeholder { color: #b9794e; }
.pos-tools { display: flex; gap: .35rem; }
.pos-tool { width: 42px; height: 42px; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; color: #475569; font-size: 1rem; display: grid; place-items: center; transition: all .12s; }
.pos-tool:hover { border-color: var(--brand-2); color: var(--brand-2); }
.pos-tool-danger:hover { border-color: #dc2626; color: #dc2626; }
[data-bs-theme="dark"] .pos-tool { background: #111827; border-color: #374151; color: #cbd5e1; }

/* cashier background colour (set in POS layout sizes) */
.content:has(.pos-grid) { background: var(--pos-bg, transparent); transition: background .2s; }
.pos-grid { display: grid; grid-template-columns: 1fr 8px 410px; gap: .7rem; height: calc(100vh - 64px - 5.2rem); }
/* restaurant bar adds a row → shrink the grid so the page never scrolls and the header stays frozen */
.content:has(.rest-bar) .pos-grid { height: calc(100vh - 64px - 5.2rem - 3rem); }
body.pos-fs .content:has(.rest-bar) .pos-grid { height: calc(100vh - 5.5rem - 3rem); }
.rest-bar { position: sticky; top: 0; z-index: 30; }   /* pinned header */
@media (max-width: 1199.98px) { .pos-grid { grid-template-columns: 1fr; height: auto; } .pos-splitter { display: none; } }
.pos-splitter { cursor: col-resize; background: linear-gradient(180deg, transparent, #cbd5e1, transparent); border-radius: 4px; }
.pos-splitter:hover { background: var(--brand-2); }
/* full-screen cashier mode */
body.pos-fs .sidebar, body.pos-fs .topbar { display: none !important; }
body.pos-fs .main { margin-left: 0 !important; }
body.pos-fs .content { padding: .6rem !important; }
body.pos-fs .pos-grid { height: calc(100vh - 5.5rem); }
.pos-products { overflow: hidden; display: flex; flex-direction: column; }
.pos-products .cat-pills { flex: 0 0 auto; }
.pos-products .product-grid { flex: 1; overflow: auto; position: relative; }
.pos-products .pos-shortcuts { flex: 0 0 auto; }
/* POS empty prompt (no category selected — items load on demand) */
.pos-pick { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 1.5rem; animation: posPickPop .4s ease both; pointer-events: none; }
@keyframes posPickPop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pos-pick-brand { font-weight: 900; font-size: 2.1rem; letter-spacing: .05em; color: #1e293b; line-height: 1.1; }
.pos-pick-brand span { display: block; font-weight: 600; font-size: 1.05rem; letter-spacing: .24em; text-transform: uppercase;
    color: #94a3b8; margin-top: .5rem; }
[data-bs-theme="dark"] .pos-pick-brand { color: #e5e7eb; }
/* cart price-tier badge */
.price-lvl { display: inline-block; margin-inline-start: .3rem; font-size: .6rem; font-weight: 800; vertical-align: middle;
    color: #2563eb; background: rgba(37,99,235,.12); border-radius: 4px; padding: 0 .25rem; }
/* Unit & Price picker modal */
.up-list { display: flex; flex-direction: column; gap: .6rem; }
.up-unit { border: 1px solid var(--border); border-radius: 12px; padding: .6rem .7rem; }
.up-unit.cur { border-color: rgba(37,99,235,.4); background: rgba(37,99,235,.04); }
.up-uhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: .45rem; font-weight: 700; }
.up-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .4rem; }
.up-price { display: flex; flex-direction: column; align-items: center; gap: .1rem; border: 1.5px solid var(--border);
    background: var(--card, #fff); border-radius: 10px; padding: .4rem .3rem; cursor: pointer; transition: all .12s; }
.up-price:hover { border-color: #2563eb; background: rgba(37,99,235,.06); }
.up-price.on { border-color: #2563eb; background: #2563eb; color: #fff; }
.up-price .up-lvl { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; opacity: .8; }
.up-price .up-val { font-size: .98rem; font-weight: 800; }
.up-price.prim .up-lvl::after { content: ' ★'; }
/* divider hidden — categories always show in full (auto height) */
.cat-splitter { display: none !important; }
.cat-splitter.legacy { flex: 0 0 auto; height: 12px; cursor: row-resize; display: flex; align-items: center; justify-content: center; }
.cat-splitter::before { content: ''; width: 100%; height: 1px; background: #e2e8f0; }
.cat-splitter::after { content: ''; position: absolute; width: 60px; height: 4px; border-radius: 999px; background: #cbd5e1; transition: background .12s; }
.cat-splitter { position: relative; }
.cat-splitter:hover::after { background: var(--brand-2); }
[data-bs-theme="dark"] .cat-splitter::before { background: #374151; }
/* on-screen keyboard shortcut legend */
.pos-shortcuts { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: .25rem .8rem; padding: .45rem .2rem .1rem; margin-top: .4rem; font-size: .66rem; color: #94a3b8; background: var(--bg, #f1f5f9); }
.pos-shortcuts span { display: inline-flex; align-items: center; gap: .25rem; }
.pos-shortcuts kbd { background: #fff; border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 5px; padding: 0 .3rem; font-size: .64rem; font-weight: 700; color: #475569; line-height: 1.5; }
[data-bs-theme="dark"] .pos-shortcuts { background: #0b1220; }
[data-bs-theme="dark"] .pos-shortcuts kbd { background: #1f2937; border-color: #374151; color: #cbd5e1; }
/* ===== Category cards — modern with icon tile ===== */
/* auto height: always shows ALL categories (wraps to as many rows as needed),
   never clipped on small/large screens; a generous cap keeps room for items. */
.cat-pills { display: flex; flex-wrap: wrap; gap: .55rem; padding: .15rem .1rem .5rem; align-content: start;
    flex: 0 0 auto; height: auto !important; max-height: 42vh; overflow-y: auto; }
.cat-pill { display: inline-flex; align-items: center; gap: .55rem; border: 1.5px solid var(--border); border-radius: 14px;
    padding: calc(.38rem * var(--cat-scale, 1)) calc(.95rem * var(--cat-scale, 1)) calc(.38rem * var(--cat-scale, 1)) calc(.38rem * var(--cat-scale, 1));
    white-space: nowrap; background: var(--card, #fff); color: #334155; cursor: pointer; box-shadow: 0 1px 2px rgba(15,23,42,.05);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease; }
.cat-pill:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,23,42,.1);
    border-color: color-mix(in srgb, var(--pill) 45%, var(--border)); }
.cat-pill:hover .cp-thumb { transform: scale(1.05); }
.cat-pill.active { border-color: var(--pill); background: color-mix(in srgb, var(--pill) 12%, var(--card, #fff));
    box-shadow: 0 6px 16px color-mix(in srgb, var(--pill) 26%, transparent); }
.cat-pill.active .cp-name { color: var(--pill); }
.cp-name { font-weight: 700; font-size: calc(.86rem * var(--cat-scale, 1)); letter-spacing: -.01em; }
.cp-thumb { width: calc(36px * var(--cat-scale, 1)); height: calc(36px * var(--cat-scale, 1)); border-radius: 11px; flex: 0 0 auto;
    background-size: cover; background-position: center; box-shadow: 0 2px 6px color-mix(in srgb, var(--pill) 35%, transparent);
    transition: transform .12s ease; }
.cp-thumb-ph { display: grid; place-items: center; color: #fff; font-size: calc(1rem * var(--cat-scale, 1));
    background: linear-gradient(140deg, color-mix(in srgb, var(--pill) 85%, #fff), var(--pill) 55%, color-mix(in srgb, var(--pill) 60%, #000)); }
.cat-pill.cp-img-only { padding: calc(.3rem * var(--cat-scale, 1)); }
.cat-pill.cp-img-only .cp-thumb { width: calc(48px * var(--cat-scale, 1)); height: calc(48px * var(--cat-scale, 1)); }
[data-bs-theme="dark"] .cat-pill { color: #cbd5e1; border-color: #374151; background: #1f2937; }

/* category image picker (CatForm) */
.cat-img-pick { width: 88px; height: 88px; border: 2px dashed var(--border); border-radius: 12px; display: flex;
    align-items: center; justify-content: center; cursor: pointer; overflow: hidden; color: #94a3b8; background: var(--bg); }
.cat-img-pick:hover { border-color: #2563eb; color: #2563eb; }
.cat-img-pick img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Product cards — price-tag style (coloured price footer) ===== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(124px * var(--item-scale, 1)), 1fr)); gap: .6rem; margin-top: .1rem; align-content: start; }
.product-tile {
    background: #fff; border-radius: 14px; cursor: pointer; border: 1px solid #e9edf3; overflow: hidden; position: relative;
    display: flex; flex-direction: column; min-height: calc(94px * var(--item-scale, 1));
    user-select: none; -webkit-user-select: none; box-shadow: 0 1px 3px rgba(16,24,40,.06);
    transition: box-shadow .15s, transform .12s;
}
[data-bs-theme="dark"] .product-tile { background: #1f2937; border-color: #374151; }
.product-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(16,24,40,.15); }
.product-tile.tile-sel { box-shadow: 0 0 0 3px rgba(37,99,235,.4); border-color: var(--brand-2); }
.product-tile .p-img { width: 100%; height: calc(54px * var(--item-scale, 1)); background: #f3f5f8; display: grid; place-items: center; overflow: hidden; }
.product-tile .p-img img { width: 100%; height: 100%; object-fit: cover; }
[data-bs-theme="dark"] .product-tile .p-img { background: #0b1220; }
.product-tile .p-name { flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    align-items: center; text-align: center; padding: .6rem .5rem; font-weight: 600; font-size: calc(.82rem * var(--item-scale, 1)); line-height: 1.25; color: #1f2937; }
[data-bs-theme="dark"] .product-tile .p-name { color: #e5e7eb; }
/* full-width price footer in the category colour (darkened so white text always reads) */
.product-tile .p-price { text-align: center; font-weight: 800; font-size: calc(.94rem * var(--item-scale, 1)); color: #fff; font-variant-numeric: tabular-nums;
    padding: calc(.42rem * var(--item-scale, 1)) .3rem; letter-spacing: .01em;
    background: linear-gradient(135deg, color-mix(in srgb, var(--cat, #2563eb) 88%, #0b1220), color-mix(in srgb, var(--cat, #2563eb) 62%, #0b1220)); }
/* multiple-units cue: a single accent line under the whole card (no corner icon) */
.product-tile.multi::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
    background: #0f172a; border-radius: 0 0 var(--radius, 12px) var(--radius, 12px); z-index: 3; }
.product-tile .exp-badge { position: absolute; top: 7px; inset-inline-start: 8px; background: #dc2626; color: #fff; font-size: .54rem; font-weight: 800; padding: 1px 5px; border-radius: 5px; z-index: 2; }
/* clickable qty pill in cart */
.qty-pill { min-width: 44px; padding: .25rem .5rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.qty-pill:hover { border-color: var(--brand-2); color: var(--brand-2); }
[data-bs-theme="dark"] .qty-pill { background: #1f2937; border-color: #374151; color: #e2e8f0; }
.cart-panel { background: #fff; border-radius: 18px; display: flex; flex-direction: column; height: 100%; overflow: hidden; box-shadow: 0 2px 14px rgba(15,23,42,.06); }
[data-bs-theme="dark"] .cart-panel { background: #111827; }
.cart-top { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; color: #fff;
    background: linear-gradient(135deg, var(--brand, #1e3a8a), var(--brand-2, #2563eb)); }
.cart-top-title { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.05rem; }
.cart-top-title > .bi { font-size: 1.2rem; }
.cart-pill-count { background: rgba(255,255,255,.25); border-radius: 999px; min-width: 26px; text-align: center; padding: 0 .5rem; font-size: .85rem; font-weight: 800; }
.cart-mode { background: rgba(255,255,255,.18); border-radius: 999px; padding: .25rem .7rem; font-size: .76rem; font-weight: 700; display: inline-flex; align-items: center; gap: .35rem; }

/* session tabs — multiple sales at once */
.cart-sessions { display: flex; align-items: center; gap: .35rem; padding: .45rem .6rem; overflow-x: auto; border-bottom: 1px solid #eef2f7; background: #f8fafc; }
[data-bs-theme="dark"] .cart-sessions { background: #0b1220; border-color: #1f2937; }
.sess-tab { position: relative; white-space: nowrap; border: 1px solid #e2e8f0; background: #fff; color: #475569; border-radius: 11px; padding: .5rem 1.6rem .5rem .8rem; display: flex; flex-direction: row; align-items: center; gap: .35rem; box-shadow: 0 1px 2px rgba(15,23,42,.05); transition: all .12s; }
.sess-tab .sess-lbl { font-size: .8rem; font-weight: 700; color: #475569; }
.sess-tab .sess-sep { color: #94a3b8; font-weight: 700; }
.sess-tab .sess-tot { font-size: .86rem; font-weight: 800; color: var(--accent, #16a34a); font-variant-numeric: tabular-nums; }
.sess-tab.active { border-color: var(--brand-2); background: rgba(37,99,235,.08); box-shadow: 0 4px 12px rgba(37,99,235,.18); }
.sess-tab.active .sess-lbl { color: var(--brand-2); }
.sess-tab .sess-x { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); font-size: .75rem; opacity: .35; border-radius: 5px; padding: 1px; }
.sess-tab .sess-x:hover { opacity: 1; color: #dc2626; background: #fee2e2; }
[data-bs-theme="dark"] .sess-tab { background: #1f2937; border-color: #374151; color: #cbd5e1; }
.sess-add { border: 1.5px dashed #cbd5e1; background: transparent; color: #64748b; border-radius: 11px; width: 40px; align-self: stretch; display: grid; place-items: center; font-size: 1.1rem; }
.sess-add:hover { border-color: var(--brand-2); color: var(--brand-2); }
.sess-add:hover { border-color: var(--brand-2); color: var(--brand-2); }
[data-bs-theme="dark"] .sess-tab { background: #1f2937; border-color: #374151; color: #cbd5e1; }

.cart-items { flex: 1; overflow-y: auto; padding: 0 .3rem .3rem; display: flex; flex-direction: column; }
.cart-empty { margin: auto; text-align: center; color: #94a3b8; padding: 2rem; }
.cart-empty .bi { font-size: 2.6rem; display: block; margin-bottom: .5rem; opacity: .6; }
.cart-empty small { opacity: .8; }

/* columnar cart rows (classic layout) */
.cart-head, .cart-row2 { display: grid; grid-template-columns: minmax(78px,1.5fr) minmax(56px,.9fr) .8fr 70px .9fr 26px; gap: .4rem; align-items: center; }
.cart-head.cart-no-unit, .cart-row2.cart-no-unit { grid-template-columns: minmax(90px,1.8fr) .9fr 72px 1fr 26px; }   /* restaurant: no Unit column */
.cart-head { padding: .5rem .6rem; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; border-bottom: 1px solid #eef2f7; position: sticky; top: 0; background: #fff; z-index: 1; }
[data-bs-theme="dark"] .cart-head { background: #111827; }
.cart-row2 { padding: .5rem .6rem; border-bottom: 1px solid #f1f5f9; font-size: .82rem; }
[data-bs-theme="dark"] .cart-row2 { border-color: rgba(255,255,255,.05); }
.cart-row2:hover { background: rgba(37,99,235,.05); }
.cart-row2.row-active { background: rgba(37,99,235,.08); box-shadow: inset 3px 0 0 var(--brand-2); }
.cart-row2 .c-name { font-weight: 600; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; }
.cart-unit-sel { width: 100%; font-size: .72rem; padding: .15rem 1.1rem .15rem .35rem; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; }
[data-bs-theme="dark"] .cart-unit-sel { background: #1f2937; color: #cbd5e1; border-color: #374151; }
.cart-unit-txt { font-size: .76rem; color: #475569; }
.cart-row2 .c-qty { display: flex; align-items: center; justify-content: center; }
.cart-row2 .c-price { font-variant-numeric: tabular-nums; color: #64748b; white-space: nowrap; }
.cart-row2 .c-total { font-variant-numeric: tabular-nums; white-space: nowrap; }
.qty-btn { width: 26px; height: 26px; border-radius: 7px; border: 1px solid #cbd5e1; background: #fff; font-weight: 700; line-height: 1; }

/* cart footer */
.cart-foot { padding: .8rem; border-top: 1px solid #eef2f7; background: #fff; }
[data-bs-theme="dark"] .cart-foot { background: #111827; border-color: #1f2937; }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-bottom: .7rem; }
.sum-box { background: #f8fafc; border-radius: 12px; padding: .6rem .85rem; margin-bottom: .7rem; }
[data-bs-theme="dark"] .sum-box { background: #0b1220; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; font-size: .85rem; color: #64748b; }
.sum-row.sum-total { margin-top: .25rem; font-size: 1rem; color: inherit; font-weight: 800; }
.sum-row.sum-total span:last-child { font-size: 1.9rem; line-height: 1; color: var(--accent, #16a34a); font-variant-numeric: tabular-nums; }
.cart-actions { display: grid; grid-template-columns: 46px 46px 1fr 1.4fr; gap: .45rem; }
.ca-btn { border: 0; border-radius: 12px; font-weight: 800; padding: .8rem .5rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font-size: .92rem; transition: transform .1s, filter .12s; }
.ca-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.ca-btn:active { transform: translateY(0); }
.ca-hold { background: #f1f5f9; color: #475569; font-size: 1.2rem; }
.ca-clear { background: #fef2f2; color: #dc2626; font-size: 1.15rem; }
[data-bs-theme="dark"] .ca-clear { background: #2a1416; }

/* total row separated from the data by a clear divider */
.pro-table tfoot td { border-top: 2px solid #94a3b8; background: #f8fafc; }
[data-bs-theme="dark"] .pro-table tfoot td { background: #0f172a; border-top-color: #475569; }

/* ===== Daily summary — clear total cards ===== */
.sum-card { display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid #eef2f7; border-left: 4px solid var(--c, #2563eb); border-radius: 14px; padding: .75rem .85rem; height: 100%; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
[data-bs-theme="dark"] .sum-card { background: #111827; border-color: #374151; }
.sum-card .sc-ic { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; display: grid; place-items: center; font-size: 1.2rem; background: color-mix(in srgb, var(--c, #2563eb) 14%, #fff); color: var(--c, #2563eb); }
[data-bs-theme="dark"] .sum-card .sc-ic { background: color-mix(in srgb, var(--c, #2563eb) 26%, #111827); }
.sum-card .sc-val { font-size: 1.15rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--c, #1e293b); }
.sum-card .sc-lbl { font-size: .72rem; color: #94a3b8; font-weight: 600; margin-top: 2px; }
body.rtl .sum-card { border-left: 1px solid #eef2f7; border-right: 4px solid var(--c, #2563eb); }
.sum-sales { --c: #16a34a; } .sum-purchases { --c: #2563eb; } .sum-expenses { --c: #dc2626; }
.sum-discount { --c: #f59e0b; } .sum-profit { --c: #7c3aed; } .sum-net { --c: #0891b2; }
.report-section-title { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; margin: .2rem 0 .6rem; }

/* activity — page (module) groups inside a user card */
.act-page-group { border-top: 1px solid #eef2f7; }
[data-bs-theme="dark"] .act-page-group { border-color: #1f2937; }
.act-page-head { display: flex; align-items: center; gap: .5rem; padding: .55rem 1rem; cursor: pointer; font-size: .85rem; }
.act-page-head:hover { background: rgba(37,99,235,.04); }
.act-page-head > .bi:first-child { color: var(--brand-2); }
.act-page-body { background: rgba(15,23,42,.015); }
[data-bs-theme="dark"] .act-page-body { background: rgba(255,255,255,.02); }

/* expiry groups */
.exp-group-head { display: flex; align-items: center; gap: .55rem; padding: .7rem 1rem; font-weight: 800; color: #fff; border-radius: 14px 14px 0 0;
    background: linear-gradient(135deg, var(--c, #2563eb), color-mix(in srgb, var(--c, #2563eb) 70%, #000)); }
.exp-group-head .exp-count { margin-inline-start: auto; background: rgba(255,255,255,.25); border-radius: 999px; padding: .1rem .6rem; font-size: .8rem; }

/* unknown-barcode feedback: page held red for 3s + corner notifications */
body.scan-bad::after { content: ''; position: fixed; inset: 0; background: rgba(220,38,38,.32); z-index: 6500; pointer-events: none; animation: scanBad 3s ease-out forwards; }
@keyframes scanBad { 0% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
#scanMsgZone { position: fixed; top: 16px; right: 16px; z-index: 6600; display: flex; flex-direction: column; gap: .55rem; max-height: 90vh; overflow: auto; }
body.rtl #scanMsgZone { right: auto; left: 16px; }
.scan-msg { display: flex; align-items: center; gap: .7rem; min-width: 300px;
    background: #dc2626; color: #fff; padding: .85rem 1rem .85rem 1.3rem; border-radius: 14px; box-shadow: 0 12px 30px rgba(220,38,38,.5); animation: scanPop .2s ease; }
.scan-msg .sm-x { border: 0; background: rgba(255,255,255,.22); color: #fff; width: 28px; height: 28px; border-radius: 8px; font-size: 1.2rem; line-height: 1; flex: 0 0 auto; }
.scan-msg .sm-x:hover { background: rgba(255,255,255,.4); }
.scan-msg.out { animation: scanOut .3s ease forwards; }
.scan-msg .bi { font-size: 2rem; }
.scan-msg .sm-t { font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.scan-msg .sm-c { font-size: .9rem; opacity: .92; font-variant-numeric: tabular-nums; }
.scan-msg .sm-last { margin-top: 5px; font-size: .82rem; font-weight: 700; background: rgba(255,255,255,.2); border-radius: 7px; padding: 2px 8px; display: inline-block; }
@keyframes scanPop { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes scanOut { to { transform: translateX(20px); opacity: 0; } }

/* ===== Settings — modern sidebar tabs ===== */
.set-nav-card { position: sticky; top: 80px; }
.set-nav .nav-link { display: flex; align-items: center; gap: .65rem; color: #475569; font-weight: 600; font-size: .9rem; border-radius: 10px; padding: .6rem .8rem; margin-bottom: 2px; text-align: start; }
.set-nav .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; color: #94a3b8; }
.set-nav .nav-link:hover { background: #f1f5f9; }
.set-nav .nav-link.active { background: linear-gradient(90deg, var(--brand-2), var(--brand)); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.set-nav .nav-link.active i { color: #fff; }
[data-bs-theme="dark"] .set-nav .nav-link { color: #cbd5e1; }
[data-bs-theme="dark"] .set-nav .nav-link:hover { background: #1f2937; }
body.rtl .set-nav .nav-link.active { background: linear-gradient(270deg, var(--brand-2), var(--brand)); }
@media (max-width: 991.98px) { .set-nav { flex-direction: row !important; flex-wrap: wrap; } .set-nav-card { position: static; } }
.ca-return { background: #fef2f2; color: #dc2626; }
.ca-checkout { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; box-shadow: 0 6px 16px rgba(22,163,74,.32); }
[data-bs-theme="dark"] .ca-hold { background: #1f2937; color: #cbd5e1; }

/* modern checkout modal action buttons (both side by side) */
.ck-actions { display: flex; gap: .6rem; width: 100%; align-items: stretch; }
.ck-actions .ck-cancel { flex: 0 0 auto; border-radius: 12px; font-weight: 700; }
.ckbtn { flex: 1; border: 1.5px solid transparent; border-radius: 14px; padding: .6rem .5rem; font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 1.15; transition: transform .1s, filter .12s, box-shadow .12s; }
.ckbtn .bi { font-size: 1.15rem; margin-bottom: 2px; }
.ckbtn small { font-weight: 600; font-size: .68rem; opacity: .85; }
.ckbtn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.ckbtn-ghost { background: #ecfdf5; color: #15803d; border-color: #86efac; }
.ckbtn-ghost:hover { box-shadow: 0 4px 12px rgba(22,163,74,.18); }
.ckbtn-go { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; box-shadow: 0 6px 16px rgba(22,163,74,.32); }
[data-bs-theme="dark"] .ckbtn-ghost { background: rgba(22,163,74,.16); color: #6ee7b7; border-color: rgba(22,163,74,.4); }

/* Product details card */
.prodcard { display: flex; gap: 1rem; align-items: flex-start; }
.prodcard-img { width: 96px; height: 96px; flex: 0 0 96px; border-radius: 12px; background: #f1f5f9; display: grid; place-items: center; overflow: hidden; color: #94a3b8; font-size: 2rem; }
.prodcard-img img { width: 100%; height: 100%; object-fit: cover; }
.prodcard-name { font-size: 1.15rem; font-weight: 800; line-height: 1.15; }

/* Modern category tiles */
/* Day modal — expandable invoice → items */
.day-inv { cursor: pointer; }
.day-inv:hover { background: rgba(37,99,235,.05); }
.di-chev { display: inline-block; font-size: .72rem; color: #94a3b8; transition: transform .15s ease; }
.day-items-wrap { background: var(--bg); border-left: 3px solid var(--brand-2, #2563eb); padding: .2rem .2rem .2rem .6rem; }
.day-items-wrap table { background: transparent; }
.day-items-wrap thead th { font-size: .68rem; text-transform: uppercase; color: #94a3b8; border: 0; }

/* ===== Food Options (admin) — two-panel ===== */
.fo-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; align-items: start; }
@media (max-width: 800px) { .fo-layout { grid-template-columns: 1fr; } }
.fo-side { border: 1px solid var(--border); border-radius: 14px; background: var(--card, #fff); overflow: hidden;
    box-shadow: 0 1px 2px rgba(15,23,42,.04); position: sticky; top: .5rem; }
.fo-side-search { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border-bottom: 1px solid var(--border); color: #94a3b8; }
.fo-side-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: .88rem; color: inherit; }
.fo-list { max-height: 70vh; overflow-y: auto; padding: .4rem; }
.fo-item { width: 100%; display: flex; align-items: center; gap: .5rem; border: 0; background: transparent; cursor: pointer;
    padding: .55rem .65rem; border-radius: 9px; text-align: start; font-weight: 600; color: #334155; transition: background .12s; }
.fo-item:hover { background: rgba(37,99,235,.06); }
.fo-item.on { background: rgba(37,99,235,.12); color: #2563eb; }
.fo-item-name { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-item-badge { font-size: .7rem; font-weight: 800; color: #16a34a; background: rgba(22,163,74,.12); border-radius: 999px; padding: .05rem .45rem; }
[data-bs-theme="dark"] .fo-side { background: #111827; border-color: #1f2937; }
[data-bs-theme="dark"] .fo-item { color: #cbd5e1; }
.fo-card { overflow: hidden; }
.fo-head { display: flex; align-items: center; padding: .7rem 1rem; font-weight: 800; border-bottom: 1px solid var(--border); }
.fo-head.fo-add { color: #16a34a; background: rgba(22,163,74,.06); }
.fo-head.fo-rem { color: #dc2626; background: rgba(220,38,38,.06); }
.fo-rows { padding: .6rem; display: flex; flex-direction: column; gap: .45rem; }
.fo-row { display: flex; align-items: center; gap: .4rem; }
.fo-row .fo-price { max-width: 110px; }
.fo-row .fo-qty { max-width: 70px; }
.fo-link { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; color: #2563eb;
    background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.25); border-radius: 8px; padding: .15rem .5rem; white-space: nowrap; }
.fo-link .bi-x { cursor: pointer; color: #ef4444; }
/* POS modifier picker — modern selectable cards + custom checkbox */
.fm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .fm-grid { grid-template-columns: 1fr; } }
.fm-sec { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: .7rem; }
.fm-h { display: flex; align-items: center; gap: .35rem; font-weight: 800; font-size: .76rem; text-transform: uppercase;
    letter-spacing: .05em; padding: .1rem .2rem .55rem; }
.fm-h.fm-add { color: #16a34a; }
.fm-h.fm-rem { color: #dc2626; }
.fm-opt { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; margin-bottom: .5rem; cursor: pointer;
    border: 1.5px solid var(--border); border-radius: 12px; background: var(--card, #fff); user-select: none;
    transition: border-color .14s ease, background .14s ease, transform .14s ease, box-shadow .14s ease; }
.fm-opt:last-child { margin-bottom: 0; }
.fm-opt:hover { border-color: #cbd5e1; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,23,42,.06); }
.fm-opt input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; flex: 0 0 auto; cursor: pointer;
    border: 2px solid #cbd5e1; border-radius: 7px; background: var(--card, #fff); position: relative; transition: all .14s ease; }
.fm-opt input:checked { border-color: transparent; }
.fm-opt input:checked::after { content: '\2713'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 900; }
.fm-opt .fm-name { flex: 1 1 auto; font-weight: 700; }
.fm-opt .fm-price { font-weight: 800; color: #16a34a; font-size: .92rem; }
/* checked states coloured per section (:has) */
.fm-sec:has(.fm-h.fm-add) .fm-opt:has(input:checked) { border-color: #16a34a; background: rgba(22,163,74,.08); }
.fm-sec:has(.fm-h.fm-add) .fm-opt input:checked { background: #16a34a; }
.fm-sec:has(.fm-h.fm-rem) .fm-opt:has(input:checked) { border-color: #dc2626; background: rgba(220,38,38,.08); }
.fm-sec:has(.fm-h.fm-rem) .fm-opt input:checked { background: #dc2626; }
.fm-sec:has(.fm-h.fm-rem) .fm-opt:has(input:checked) .fm-name { text-decoration: line-through; color: #dc2626; }
[data-bs-theme="dark"] .fm-sec { background: #0b1220; border-color: #1f2937; }
[data-bs-theme="dark"] .fm-opt { background: #111827; }
/* cart line modifier note + sub-line */
.c-note { font-size: .72rem; color: #64748b; font-weight: 500; margin-top: 2px; line-height: 1.25; }
.cart-row2 .c-name.c-mod { padding-left: .9rem; color: #475569; font-weight: 600; font-size: .85rem; border-left: 2px solid #16a34a; }

/* ===== Vouchers In / Out — two-tab page ===== */
.vio-tabs { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.vio-tab { display: inline-flex; align-items: center; gap: .5rem; border: 1.5px solid var(--border); background: var(--card, #fff);
    border-radius: 12px; padding: .6rem 1.15rem; font-weight: 800; cursor: pointer; color: #64748b;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.vio-tab .vio-tab-sub { font-weight: 500; font-size: .74rem; opacity: .85; }
.vio-tab .bi { font-size: 1.15rem; }
.vio-tab.in:not(.on):hover { border-color: #16a34a; color: #16a34a; }
.vio-tab.out:not(.on):hover { border-color: #dc2626; color: #dc2626; }
.vio-tab.in.on { background: #16a34a; border-color: #16a34a; color: #fff; box-shadow: 0 6px 16px rgba(22,163,74,.3); }
.vio-tab.out.on { background: #dc2626; border-color: #dc2626; color: #fff; box-shadow: 0 6px 16px rgba(220,38,38,.3); }
.vio-stat { display: inline-flex; align-items: center; gap: .8rem; padding: .65rem 1.1rem; border-radius: 14px; }
.vio-stat.in { background: rgba(22,163,74,.08); border: 1px solid rgba(22,163,74,.25); }
.vio-stat.out { background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.25); }
.vio-stat-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 1.15rem; flex: 0 0 auto; }
.vio-stat.in .vio-stat-ic { background: #16a34a; }
.vio-stat.out .vio-stat-ic { background: #dc2626; }
.vio-stat-val { font-weight: 800; font-size: 1.25rem; line-height: 1.1; }
.vio-stat-lbl { font-size: .76rem; color: #64748b; }
[data-bs-theme="dark"] .vio-tab { background: #1f2937; color: #cbd5e1; border-color: #374151; }

/* ===== Statements — modern multi-select + stacked cards ===== */
.stmt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; padding: .55rem;
    border: 1px solid var(--border); border-radius: 14px; background: var(--card, #fff); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.stmt-pick { position: relative; }
.stmt-search-box { display: flex; align-items: center; gap: .5rem; width: 320px; max-width: 70vw; height: 40px; padding: 0 .8rem;
    background: var(--card, #fff); border: 1px solid var(--border); border-radius: 10px; color: #94a3b8;
    transition: border-color .15s, box-shadow .15s; }
.stmt-search-box:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.stmt-search-box input { flex: 1; border: 0; outline: 0; background: transparent; font-size: .88rem; font-weight: 600; color: #334155; }
.stmt-search-box input::placeholder { font-weight: 500; }
.stmt-panel { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: 320px; max-width: 70vw;
    background: var(--card, #fff); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(15,23,42,.18); overflow: hidden; }
.stmt-options { max-height: 300px; overflow-y: auto; padding: .3rem; }
[data-bs-theme="dark"] .stmt-search-box { background: #111827; border-color: #1f2937; }
[data-bs-theme="dark"] .stmt-search-box input { color: #cbd5e1; }
.stmt-opt { display: flex; align-items: center; gap: .5rem; padding: .45rem .55rem; border-radius: 8px; cursor: pointer; margin: 0; font-size: .86rem; }
.stmt-opt:hover { background: rgba(37,99,235,.06); }
.stmt-opt.on { background: rgba(37,99,235,.1); font-weight: 600; }
.stmt-opt input { accent-color: #2563eb; }
.stmt-opt-name { flex: 1 1 auto; }
.stmt-opt-meta { font-size: .76rem; color: #94a3b8; }
.stmt-dates { display: inline-flex; align-items: center; gap: .35rem; }
.stmt-dates input[type=date] { width: 140px; }
.stmt-chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.stmt-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; color: #1e293b;
    background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
    border-radius: 999px; padding: .2rem .6rem; }
.stmt-chip .bi-x { cursor: pointer; color: #ef4444; font-size: 1rem; }
.stmt-card-slot { animation: posPickPop .25s ease both; }
.stmt-card { border-top: 3px solid var(--c, #2563eb); }
.stmt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--border); }
.stmt-party { display: flex; align-items: center; gap: .7rem; min-width: 180px; }
.stmt-avatar { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff;
    font-weight: 800; font-size: 1rem; flex: 0 0 auto; box-shadow: 0 3px 8px rgba(15,23,42,.18); }
.stmt-name { font-weight: 800; font-size: 1.1rem; line-height: 1.15; }
.stmt-stats { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
.stmt-stat { min-width: 96px; padding: .45rem .7rem; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); text-align: right; }
.stmt-stat span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; font-weight: 700; }
.stmt-stat b { font-size: 1.02rem; }
.stmt-stat-bal { background: rgba(220,38,38,.06); border-color: rgba(220,38,38,.25); }
.stmt-x { width: 32px; height: 32px; border: 1px solid var(--border); background: var(--card, #fff); border-radius: 9px; color: #94a3b8; cursor: pointer; flex: 0 0 auto; }
.stmt-x:hover { color: #dc2626; border-color: rgba(220,38,38,.4); }
.stmt-table thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; }
[data-bs-theme="dark"] .stmt-toolbar, [data-bs-theme="dark"] .stmt-panel { background: #111827; border-color: #1f2937; }
[data-bs-theme="dark"] .stmt-name { color: #e5e7eb; }

/* Categories — modern table */
.cat-table tbody td { padding: .6rem 1rem; vertical-align: middle; border-top: 1px solid var(--border); }
.cat-table tbody tr { transition: background .12s ease; }
.cat-table tbody tr:hover { background: rgba(37,99,235,.04); }
.cat-cell { display: flex; align-items: center; gap: .7rem; }
.cat-thumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: 0 0 auto;
    box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.cat-thumb-ph { display: grid; place-items: center; color: #fff; font-size: 1.1rem; }
.cat-name { font-weight: 700; font-size: .98rem; line-height: 1.2; }
.cat-code { font-size: .76rem; background: var(--bg); border: 1px solid var(--border); color: #64748b;
    padding: .1rem .45rem; border-radius: 6px; }
.cat-count-pill { display: inline-block; min-width: 2.2rem; text-align: center; font-weight: 800; font-size: .8rem;
    padding: .15rem .6rem; border-radius: 999px; color: var(--cc);
    background: color-mix(in srgb, var(--cc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--cc) 30%, transparent); }
.pay-method { border: 1.5px solid #e2e8f0; border-radius: 10px; padding: .5rem .25rem; text-align: center; cursor: pointer; font-size: .72rem; font-weight: 800; letter-spacing: .02em; color: #64748b; transition: all .12s; }
.pay-method:hover { border-color: #cbd5e1; }
.pay-method.active { border-color: var(--brand-2); background: rgba(37,99,235,.1); color: var(--brand-2); box-shadow: 0 2px 8px rgba(37,99,235,.15); }
[data-bs-theme="dark"] .pay-method { border-color: #374151; }

/* ---------- Misc ---------- */
.table-card { padding: 0; overflow: hidden; }
.table > :not(caption) > * > * { padding: .8rem 1rem; }
.badge-soft-success { background: rgba(16,185,129,.15); color: #059669; }
.badge-soft-warning { background: rgba(245,158,11,.15); color: #d97706; }
.badge-soft-danger  { background: rgba(239,68,68,.15); color: #dc2626; }
.badge-soft-info    { background: rgba(37,99,235,.12); color: #2563eb; }
.empty-state { text-align: center; padding: 3rem 1rem; color: #94a3b8; }
.empty-state i { font-size: 3rem; opacity: .4; }
.spinner-wrap { display: grid; place-items: center; padding: 3rem; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.cursor-pointer { cursor: pointer; }

/* ============================================================
   Pro table — modern, professional list design
   ============================================================ */
.pro-card { border: none; border-radius: 18px; overflow: hidden; background: #fff;
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 30px rgba(15,23,42,.06); }
[data-bs-theme="dark"] .pro-card { background: #111827; }
.pro-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0; }
.pro-table thead th {
    background: #f8fafc; color: #64748b; font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em; padding: .95rem 1.1rem;
    border-bottom: 1px solid #eef2f7; white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
[data-bs-theme="dark"] .pro-table thead th { background: #0b1220; color: #94a3b8; border-color: #1f2937; }
.pro-table tbody td { padding: .8rem 1.1rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
[data-bs-theme="dark"] .pro-table tbody td { border-color: rgba(255,255,255,.05); }
.pro-table tbody tr { transition: background .15s ease, box-shadow .15s ease; }
.pro-table tbody tr:hover { background: #f6faff; }
[data-bs-theme="dark"] .pro-table tbody tr:hover { background: rgba(37,99,235,.08); }
.pro-table tbody tr:last-child td { border-bottom: 0; }
.pro-table .row-accent { box-shadow: inset 3px 0 0 var(--accent-color, transparent); }

.avatar-sm { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    font-weight: 700; color: #fff; font-size: .82rem; flex: 0 0 38px; }
.cell-title { font-weight: 600; line-height: 1.15; }
.cell-sub { font-size: .72rem; color: #94a3b8; }
.amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .26rem .62rem;
    border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1; }
.pill-success { background: rgba(16,185,129,.14); color: #059669; }
.pill-warning { background: rgba(245,158,11,.16); color: #d97706; }
.pill-danger  { background: rgba(239,68,68,.14); color: #dc2626; }
.pill-muted   { background: rgba(100,116,139,.14); color: #475569; }
.pill-info    { background: rgba(37,99,235,.12); color: #2563eb; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.act-btn { width: 32px; height: 32px; border-radius: 9px; border: 1px solid #e2e8f0; background: #fff;
    color: #475569; display: inline-grid; place-items: center; transition: all .15s ease; }
[data-bs-theme="dark"] .act-btn { background: #1f2937; border-color: #374151; color: #cbd5e1; }
.act-btn:hover { background: var(--brand-2); color: #fff; border-color: var(--brand-2); transform: translateY(-1px); }
.act-btn.act-danger:hover { background: #ef4444; border-color: #ef4444; }
.act-group { display: inline-flex; gap: .35rem; opacity: .55; transition: opacity .15s; }
tr:hover .act-group { opacity: 1; }

/* refined gradient stat cards */
.metric-card { border: none; border-radius: 16px; color: #fff; overflow: hidden; position: relative; }
.metric-card .metric-label { font-size: .7rem; opacity: .9; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.metric-card .metric-value { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.metric-card .metric-icon { position: absolute; right: -6px; bottom: -10px; font-size: 4rem; opacity: .16; }

/* ============================================================
   Activity Log — grouped, readable timeline
   ============================================================ */
.act-date { font-size: .95rem; font-weight: 800; color: var(--brand); margin: 1.2rem 0 .6rem; display: flex; align-items: center; gap: .5rem; }
.act-date::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(37,99,235,.25), transparent); }
.act-user-card { background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(15,23,42,.05); margin-bottom: .8rem; overflow: hidden; }
[data-bs-theme="dark"] .act-user-card { background: #111827; }
.act-user-head { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; background: #f8fafc; border-bottom: 1px solid #eef2f7; }
[data-bs-theme="dark"] .act-user-head { background: #0b1220; border-color: #1f2937; }
.act-item { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border-bottom: 1px solid #f4f6fa; }
[data-bs-theme="dark"] .act-item { border-color: rgba(255,255,255,.05); }
.act-item:last-child { border-bottom: 0; }
.act-item:hover { background: #f8fbff; }
[data-bs-theme="dark"] .act-item:hover { background: rgba(37,99,235,.07); }
.act-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.15rem; flex: 0 0 40px;
    background: rgba(37,99,235,.1); color: var(--brand-2); }
.act-ic.ic-success { background: rgba(16,185,129,.14); color: #059669; }
.act-ic.ic-danger  { background: rgba(239,68,68,.14); color: #dc2626; }
.act-ic.ic-warning { background: rgba(245,158,11,.16); color: #d97706; }
.act-title { font-size: .98rem; font-weight: 700; color: #1e293b; line-height: 1.2; }
[data-bs-theme="dark"] .act-title { color: #e2e8f0; }
.act-detail { font-size: .85rem; color: #475569; margin-top: 2px; }
[data-bs-theme="dark"] .act-detail { color: #94a3b8; }
.act-detail .chip { display: inline-block; background: #eef2ff; color: #3730a3; border-radius: 7px; padding: .1rem .45rem; margin: 2px 4px 2px 0; font-size: .8rem; font-weight: 600; }
[data-bs-theme="dark"] .act-detail .chip { background: #1e293b; color: #c7d2fe; }
.act-time { font-size: .85rem; color: #94a3b8; font-weight: 600; white-space: nowrap; }

/* Expired highlighting */
.product-tile.tile-expired { border-color: #ef4444 !important; background: rgba(239,68,68,.08); position: relative; }
[data-bs-theme="dark"] .product-tile.tile-expired { background: rgba(239,68,68,.16); }
.product-tile .exp-badge { position: absolute; top: 6px; right: 6px; background: #dc2626; color: #fff; font-size: .6rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; letter-spacing: .03em; }
.pro-table tbody tr.row-expired { background: rgba(239,68,68,.08); }
.pro-table tbody tr.row-expired:hover { background: rgba(239,68,68,.14); }
[data-bs-theme="dark"] .pro-table tbody tr.row-expired { background: rgba(239,68,68,.15); }

/* ---------- Purchase editor ---------- */
.psearch-wrap { position: relative; }
.psearch-results {
    position: absolute; z-index: 1080; top: 100%; left: 0; right: 0; max-height: 260px; overflow-y: auto;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); margin-top: 2px;
}
[data-bs-theme="dark"] .psearch-results { background: #1f2937; border-color: #374151; }
.psearch-item { padding: .5rem .75rem; cursor: pointer; border-bottom: 1px solid rgba(0,0,0,.05); }
.psearch-item:hover, .psearch-item.active { background: rgba(37,99,235,.1); }
.psearch-fixed { position: fixed !important; z-index: 3000; }
.purchase-table { font-size: .85rem; }
.purchase-table input, .purchase-table select { min-width: 60px; }
.purchase-table td { padding: .35rem !important; vertical-align: middle; }
.purchase-table thead th {
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
    font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; border: none; position: sticky; top: 0;
}
.purchase-table tbody tr { transition: background .12s; }
.purchase-table tbody tr:focus-within { background: rgba(37,99,235,.07); }
.purchase-table input:focus, .purchase-table select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 .15rem rgba(37,99,235,.25); }
.purchase-table .cost-base { color: var(--accent); font-weight: 700; }
.pur-foot { position: sticky; bottom: 0; background: var(--bg); }
.hint { font-size: .68rem; color: #94a3b8; }

/* ── Dashboard license footer ── */
.lic-foot { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center;
    margin-top: 1.2rem; padding: .7rem; border-top: 1px solid var(--border); }
.lic-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 600;
    color: #64748b; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: .25rem .7rem; }
.lic-chip.lic-mode { color: #2563eb; border-color: rgba(37,99,235,.35); background: rgba(37,99,235,.07); }
.lic-chip.lic-life { color: #16a34a; border-color: rgba(22,163,74,.35); background: rgba(22,163,74,.07); }

/* Products page — toolbar: search + actions (New Product) in one row */
.prod-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem;
    margin-bottom: 1rem; padding: .5rem; border: 1px solid var(--border); border-radius: 14px;
    background: var(--card, #fff); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.prod-search { flex: 1 1 320px; max-width: 560px; }
.prod-search .input-group-text { background: var(--bg); border-right: 0; color: #94a3b8; }
.prod-search .form-control { border-left: 0; }
.prod-toolbar-actions { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
[data-bs-theme="dark"] .prod-toolbar { background: #111827; border-color: #1f2937; }

/* Products page — collapsible category groups (modern) */
.prod-group { border: 1px solid var(--border); border-radius: 14px; margin-bottom: .55rem; overflow: hidden;
    background: var(--card, #fff); box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: box-shadow .2s ease, border-color .2s ease; }
.prod-group.open { box-shadow: 0 6px 18px rgba(15,23,42,.07); border-color: rgba(37,99,235,.25); }
.prod-group-head { width: 100%; display: flex; align-items: center; gap: .65rem; padding: .8rem 1rem; border: 0;
    background: transparent; font-weight: 700; font-size: .95rem; color: #1e293b; cursor: pointer; text-align: start; }
.prod-group-head:hover { background: rgba(37,99,235,.04); }
.prod-group.open .prod-group-head { background: rgba(37,99,235,.05); }
.pg-thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: 0 0 auto;
    box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.pg-thumb-ph { display: grid; place-items: center; color: #fff; font-size: 1.05rem; }
.pg-info { flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.prod-group-head .pg-name { font-weight: 800; font-size: .98rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-sub { font-size: .74rem; font-weight: 500; color: #94a3b8; }
.pg-low { color: #f59e0b; font-weight: 700; }
.prod-group-head .pg-count { font-size: .74rem; font-weight: 800; color: var(--cc, #2563eb);
    background: color-mix(in srgb, var(--cc, #2563eb) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--cc, #2563eb) 28%, transparent);
    border-radius: 999px; padding: .15rem .65rem; min-width: 2.1rem; text-align: center; }
.prod-group-head .pg-chev { transition: transform .25s ease; color: #94a3b8; font-size: .8rem; }
.prod-group.open .pg-chev { transform: rotate(90deg); color: var(--cc, #2563eb); }
/* smooth open / close via grid-rows animation */
.prod-group-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.prod-group.open .prod-group-body { grid-template-rows: 1fr; }
.pg-inner { overflow: hidden; }
.prod-group.open .pg-inner { border-top: 1px solid var(--border); }
/* modern, airy rows inside a group */
.pg-table { margin: 0; }
.pg-table thead th { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8;
    font-weight: 700; background: transparent; border: 0; padding: .55rem 1rem; }
.pg-table tbody td { padding: .65rem 1rem; border-top: 1px solid var(--border); vertical-align: middle; }
.pg-table tbody tr { transition: background .12s ease; }
.pg-table tbody tr:hover { background: rgba(37,99,235,.045); }
.unit-defs { color: #475569; background: rgba(100,116,139,.08); border: 1px solid var(--border);
    border-radius: 6px; padding: .08rem .4rem; display: inline-block; font-size: .74rem; }

/* Paid-together groups */
.combo-wrap { display: flex; flex-direction: column; gap: .7rem; }
.combo-card { border: 1px solid var(--border); border-radius: 12px; padding: .8rem; background: var(--card, #fff); }
.combo-chips { display: flex; flex-wrap: wrap; gap: .4rem; min-height: 1.6rem; }
.combo-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600;
    color: #1e293b; background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.25);
    border-radius: 999px; padding: .15rem .6rem; }
.combo-chip .bi-x { cursor: pointer; color: #ef4444; font-size: 1rem; line-height: 1; }
.combo-chip .bi-x:hover { color: #b91c1c; }

/* Combos item picker (modal) */
.cp-list { max-height: 58vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: .3rem; }
.cp-cat { margin-bottom: .35rem; }
.cp-cat-head { position: sticky; top: 0; background: var(--bg); font-weight: 700; font-size: .76rem;
    text-transform: uppercase; letter-spacing: .03em; color: #64748b; padding: .35rem .55rem; border-radius: 6px; z-index: 1; }
.cp-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .3rem; padding: .25rem; }
.cp-item { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer; font-size: .85rem; margin: 0; transition: background .12s, border-color .12s; }
.cp-item:hover { background: rgba(37,99,235,.05); }
.cp-item.on { background: rgba(37,99,235,.1); border-color: rgba(37,99,235,.4); font-weight: 600; }
.cp-item input { accent-color: #2563eb; }

/* "Free with a meal" badge on a cart line (restaurant) */
.free-badge { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .02em;
    color: #16a34a; background: rgba(22,163,74,.12); border: 1px solid rgba(22,163,74,.35);
    border-radius: 999px; padding: .04rem .4rem; margin: 0 .25rem; vertical-align: middle; text-transform: uppercase; }
.lic-chip.lic-mid { font-family: monospace; letter-spacing: .3px; }

/* ════════ Restaurant — table board (modern, chairs per table) ════════ */
/* unified toolbar: floor tabs (left) + actions (right), one responsive row */
.rt-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem;
    margin-bottom: .7rem; padding: .35rem; border: 1px solid var(--border); border-radius: 14px;
    background: var(--card, #fff); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.rt-tabs { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .2rem; background: var(--bg); border-radius: 11px; }
.rt-tab { border: 0; background: transparent; color: #475569; font-weight: 700; font-size: .9rem;
    padding: .42rem .85rem; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
    transition: background .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.rt-tab:hover { background: rgba(37,99,235,.08); color: #1e293b; }
.rt-tab.on { background: var(--brand-2, #2563eb); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.rt-tab-count { font-size: .72rem; font-weight: 800; min-width: 1.4rem; text-align: center;
    padding: .02rem .4rem; border-radius: 999px; background: rgba(15,23,42,.08); color: inherit; }
.rt-tab.on .rt-tab-count { background: rgba(255,255,255,.25); }
.rt-tab-add { color: #2563eb; padding: .42rem .6rem; }
.rt-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.rt-size { display: inline-flex; align-items: center; gap: .35rem; padding: 0 .3rem; }
.rt-size .form-range { width: 110px; }
.rt-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: .8rem; padding: 0 .2rem; }
.rt-leg { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: #64748b; }
.rt-leg-dot { width: 12px; height: 12px; border-radius: 4px; }
[data-bs-theme="dark"] .rt-toolbar { background: #111827; border-color: #1f2937; }
[data-bs-theme="dark"] .rt-tab { color: #cbd5e1; }
[data-bs-theme="dark"] .rt-tabs { background: #0b1220; }
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(150px * var(--rt-scale, 1)), 1fr)); gap: calc(18px * var(--rt-scale, 1)); }
.rt-card { position: relative; cursor: pointer; border-radius: 16px; padding: 12px 12px 10px;
    background: #fff; border: 1px solid #e5e7eb; box-shadow: 0 2px 10px rgba(2,6,23,.06);
    transition: transform .14s, box-shadow .14s; --c: #16a34a; }
.rt-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(2,6,23,.14); }
[data-bs-theme="dark"] .rt-card { background: #111827; border-color: #1f2937; }
/* chairs */
.rt-chairs { display: flex; justify-content: center; gap: 7px; }
.rt-chairs.side { flex-direction: column; gap: 10px; }
.rt-chair { display: inline-block; width: calc(20px * var(--rt-scale, 1)); height: calc(8px * var(--rt-scale, 1)); border-radius: 5px; background: color-mix(in srgb, var(--c) 38%, #cbd5e1); }
.rt-chairs.side .rt-chair { width: calc(8px * var(--rt-scale, 1)); height: calc(20px * var(--rt-scale, 1)); }
.rt-mid { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 7px 0; }
.rt-top { flex: 1; max-width: calc(108px * var(--rt-scale, 1)); border-radius: 13px; padding: calc(16px * var(--rt-scale, 1)) 6px; text-align: center; color: #fff;
    background: linear-gradient(145deg, var(--c), color-mix(in srgb, var(--c) 72%, #0b1220)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
.rt-name { display: block; font-weight: 900; font-size: calc(1.6rem * var(--rt-scale, 1)); line-height: 1; }
.rt-seats { font-size: .72rem; opacity: .92; display: inline-flex; align-items: center; gap: 2px; }
.rt-status { text-align: center; margin-top: 6px; font-size: .76rem; font-weight: 800; color: var(--c); }
.rt-status b { font-variant-numeric: tabular-nums; }
.rt-edit { position: absolute; top: 6px; inset-inline-end: 6px; border: 0; background: transparent; color: #94a3b8; padding: 1px 6px; border-radius: 6px; z-index: 2; }
.rt-edit:hover { background: rgba(0,0,0,.06); color: #334155; }
/* status accents */
.rt-card.s-free    { --c: #16a34a; }
.rt-card.s-occupied{ --c: #dc2626; border-color: color-mix(in srgb, #dc2626 35%, #e5e7eb); }
.rt-card.s-billing { --c: #f59e0b; border-color: color-mix(in srgb, #f59e0b 35%, #e5e7eb); }
.rt-card.s-cleaning{ --c: #0ea5e9; border-color: color-mix(in srgb, #0ea5e9 35%, #e5e7eb); }

/* ════════ Restaurant — POS bar (single compact row) ════════ */
.rest-bar { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding: 5px 9px; margin-bottom: 5px;
    background: linear-gradient(135deg, #0f172a, #1e3a8a); color: #fff; border-radius: 11px; scrollbar-width: none; }
.rest-bar::-webkit-scrollbar { display: none; }
.rest-bar .rb-left { display: flex; align-items: center; gap: 6px; flex: none; }
.rest-bar .rb-table { font-weight: 800; font-size: 1rem; white-space: nowrap; }
.rest-bar .rb-table.muted { opacity: .75; font-weight: 600; }
.rest-bar .rb-link { background: rgba(255,255,255,.16); border: 0; color: #fff; border-radius: 8px; padding: 3px 9px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.rest-bar .rb-seg-group { display: flex; background: rgba(255,255,255,.1); border-radius: 9px; padding: 2px; flex: none; }
.rest-bar .rb-seg { background: transparent; border: 0; color: #cbd5e1; padding: 5px 11px; border-radius: 7px; font-weight: 700; font-size: .82rem; white-space: nowrap; }
.rest-bar .rb-seg.on { background: #fff; color: #1e3a8a; }
.rest-bar .rb-right { margin-inline-start: auto; display: flex; gap: 6px; flex: none; }
.rest-bar .rb-btn { background: rgba(255,255,255,.16); border: 0; color: #fff; border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: .82rem; white-space: nowrap; }
.rest-bar .rb-btn.set { background: #16a34a; }
.rest-bar .rb-btn.rb-cancel { background: rgba(220,38,38,.85); }
.rest-bar .rb-btn.rb-cancel:hover { background: #dc2626; }
.rest-bar .rb-kitchen { background: #f59e0b; color: #1f2937; }
.rest-bar .rb-kitchen:hover { background: #fbbf24; }
.rest-bar .rb-saved { font-size: .7rem; font-weight: 700; color: #86efac; opacity: 0; transition: opacity .2s; white-space: nowrap; }

/* restaurant: prominent product-search button replacing the scanner field */
.pos-search-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-weight: 700; font-size: 1rem; }
.pos-search-btn:hover { border-color: var(--brand); color: var(--brand); }
