/* ================= RestoPOS UI ================= */
:root {
    --brand: #6b2c91; --brand-600: #7d3aa6; --brand-50: #f6effb; --brand-100: #eadcf4;
    --accent: #f97316; --accent-50: #fff7ed;
    --ink: #0f172a; --muted: #64748b; --line: #e7ecf2;
    --bg: #f4f6f9; --card: #ffffff; --sb-bg: #ffffff; --sb-w: 248px; --tb-h: 64px;
    --radius: 16px; --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
    --bs-primary: #6b2c91; --bs-primary-rgb: 107, 44, 145; --bs-link-color: #6b2c91; --bs-link-color-rgb: 107,44,145;
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
[data-bs-theme=dark] {
    --ink: #e2e8f0; --muted: #94a3b8; --line: #263244; --bg: #0b1220; --card: #111a2b; --sb-bg: #0e1626;
    --brand-50: rgba(20, 184, 166, .1); --brand-100: rgba(20, 184, 166, .18); --accent-50: rgba(249, 115, 22, .12);
    --bs-body-bg: #0b1220; --bs-body-color: #e2e8f0; --bs-border-color: #263244; --bs-tertiary-bg: #16213a; --bs-secondary-bg: #16213a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
}
html.is-rtl, .is-rtl { --bs-body-font-family: 'Noto Naskh Arabic', 'Plus Jakarta Sans', system-ui, sans-serif; }
* { -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--ink); font-size: 14.5px; }
a { text-decoration: none; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: #115e59; --bs-btn-hover-border-color: #115e59; --bs-btn-active-bg: #134e4a; --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); }
.btn-accent { background: var(--accent); color: #fff; border: 0; } .btn-accent:hover { background: #ea580c; color: #fff; }
.btn { border-radius: 11px; font-weight: 600; }
.btn-sm { border-radius: 9px; }
.form-control, .form-select { border-radius: 11px; border-color: var(--line); }
.form-control:focus, .form-select:focus { border-color: #c9a3e3; box-shadow: 0 0 0 .2rem rgba(107, 44, 145, .12); }
.form-label { font-weight: 600; font-size: 13px; margin-bottom: .3rem; }
.text-brand { color: var(--brand) !important; }
.bg-brand-soft { background: var(--brand-50) !important; }
.badge-soft.text-bg-success { background: #dcfce7 !important; color: #15803d !important; }
.badge-soft.text-bg-danger { background: #fee2e2 !important; color: #b91c1c !important; }
.badge-soft.text-bg-warning { background: #fef3c7 !important; color: #b45309 !important; }
.badge-soft.text-bg-info { background: #e0f2fe !important; color: #0369a1 !important; }
.badge-soft.text-bg-primary { background: var(--brand-100) !important; color: var(--brand) !important; }
.badge-soft.text-bg-secondary { background: #f1f5f9 !important; color: #475569 !important; }
[data-bs-theme=dark] .badge-soft { filter: saturate(1.2) brightness(.9); }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar { width: var(--sb-w); background: var(--sb-bg); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; }
@media (min-width: 992px) {
    .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 1030; transition: width .2s; }
    .main { margin-inline-start: var(--sb-w); transition: margin .2s; }
    body.sb-mini .sidebar { width: 76px; }
    body.sb-mini .main { margin-inline-start: 76px; }
    body.sb-mini .sb-name, body.sb-mini .sb-link span, body.sb-mini .sb-sec, body.sb-mini .sb-badge { display: none; }
    body.sb-mini .sb-link { justify-content: center; padding-inline: 0; }
}
@media (max-width: 991.98px) { .sidebar { --bs-offcanvas-width: 280px; } }
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.sb-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.sb-brand img, .sb-logo { width: 38px; height: 38px; border-radius: 11px; object-fit: cover; flex: none; }
.sb-logo { background: linear-gradient(135deg, var(--brand), #14b8a6); color: #fff; display: grid; place-items: center; font-size: 18px; }
.sb-name { font-weight: 800; line-height: 1.15; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-name small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; scrollbar-width: thin; }
.sb-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; font-weight: 700; padding: 14px 10px 6px; }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; color: var(--muted); font-weight: 600; margin-bottom: 2px; position: relative; }
.sb-link i { font-size: 17px; width: 20px; text-align: center; }
.sb-link:hover { background: var(--brand-50); color: var(--ink); }
.sb-link.active { background: var(--brand-50); color: var(--brand); }
.sb-link.active::before { content: ''; position: absolute; inset-inline-start: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 4px; background: var(--brand); }
.sb-badge { margin-inline-start: auto; font-style: normal; font-size: 11px; background: #fee2e2; color: #b91c1c; border-radius: 999px; padding: 1px 7px; }
.sb-foot { padding: 10px 12px 16px; border-top: 1px solid var(--line); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; height: var(--tb-h); display: flex; align-items: center; gap: 8px; padding: 0 16px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tb-title { font-size: 19px; font-weight: 800; margin: 0; flex: 1; min-width: 0; }
.tb-actions { display: flex; align-items: center; gap: 6px; }
.btn-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 17px; padding: 0; }
.btn-icon:hover { background: var(--brand-50); }
.btn-chip { background: var(--card); border: 1px solid var(--line); border-radius: 12px; height: 40px; font-weight: 600; }
.tb-user { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 4px 10px 4px 4px; height: 44px; }
.tb-user small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }
.tb-user b { font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-100); color: var(--brand); display: grid; place-items: center; font-weight: 800; }
.notif-dot { position: absolute; top: 8px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px var(--card); }
.notif-menu { width: min(340px, 92vw); }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.notif-item i { font-size: 18px; }
.impersonate-bar { background: #fef3c7; color: #92400e; padding: 8px 16px; font-size: 13px; }
.content { padding: 20px; flex: 1; }
@media (max-width: 575.98px) { .content { padding: 12px; } .topbar { padding: 0 10px; gap: 6px; } .tb-title { font-size: 16px; } .btn-icon { width: 36px; height: 36px; } }
.content-full { padding: 0; display: flex; flex-direction: column; min-height: 0; }
body.layout-full .main { height: 100vh; height: 100dvh; }
body.layout-full .content-full { overflow: hidden; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); padding: 14px 18px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-body { padding: 18px; }
@media (max-width: 575.98px) { .card-body { padding: 14px; } .card-header { padding: 12px 14px; } }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h2 { font-size: 18px; font-weight: 800; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); height: 100%; }
.stat .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; flex: none; }
.stat .lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat .val { font-size: 21px; font-weight: 800; line-height: 1.2; word-break: break-word; }
.stat .delta { font-size: 12px; font-weight: 700; }
.ic-teal { background: var(--brand-100); color: var(--brand); } .ic-orange { background: #ffedd5; color: #ea580c; }
.ic-pink { background: #fce7f3; color: #db2777; } .ic-blue { background: #dbeafe; color: #2563eb; }
.ic-violet { background: #ede9fe; color: #7c3aed; } .ic-amber { background: #fef3c7; color: #d97706; }
[data-bs-theme=dark] .ic-orange, [data-bs-theme=dark] .ic-pink, [data-bs-theme=dark] .ic-blue, [data-bs-theme=dark] .ic-violet, [data-bs-theme=dark] .ic-amber { filter: brightness(.75) saturate(1.3); }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; vertical-align: middle; }
.table > thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; border-bottom-width: 1px; white-space: nowrap; background: var(--bs-tertiary-bg); }
.table > :not(caption) > * > * { padding: .7rem .8rem; border-color: var(--line); }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--brand-50); }
.table-responsive { border-radius: 0 0 var(--radius) var(--radius); }
/* Mobile: stack table rows into cards */
@media (max-width: 767.98px) {
    .table-stack thead { display: none; }
    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
    .table-stack tr { border-bottom: 1px solid var(--line); padding: 8px 4px; }
    .table-stack td { border: 0 !important; padding: .25rem .8rem !important; display: flex; justify-content: space-between; gap: 12px; text-align: end; }
    .table-stack td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: start; flex: none; }
    .table-stack td.td-actions { justify-content: flex-end; }
    .table-stack td.td-actions::before { content: none; }
}
.td-actions { white-space: nowrap; text-align: end; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty i { font-size: 38px; display: block; margin: 0 auto 8px; opacity: .6; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters > * { flex: 1 1 140px; max-width: 240px; }
.filters .btn { flex: 0 0 auto; }
@media (max-width: 575.98px) { .filters > * { max-width: none; flex-basis: calc(50% - 8px); } }
.modal-content { border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.modal-header, .modal-footer { border-color: var(--line); }
@media (max-width: 575.98px) {
    .modal-dialog:not(.modal-fullscreen) { margin: 0; position: fixed; bottom: 0; left: 0; right: 0; max-width: none; }
    .modal-dialog:not(.modal-fullscreen) .modal-content { border-radius: 20px 20px 0 0; max-height: 92vh; }
    .modal-dialog:not(.modal-fullscreen) .modal-body { overflow-y: auto; }
    .modal.fade .modal-dialog { transform: translateY(40px); }
}
.nav-pills-soft .nav-link { border-radius: 10px; color: var(--muted); font-weight: 600; padding: .45rem .9rem; white-space: nowrap; }
.nav-pills-soft .nav-link.active { background: var(--brand); color: #fff; }
.nav-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-scroll::-webkit-scrollbar { display: none; }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: 1fr 400px; height: calc(100dvh - var(--tb-h)); min-height: 0; }
@media (max-width: 1399.98px) { .pos { grid-template-columns: 1fr 360px; } }
.pos-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 14px 16px 0; }
.pos-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.pos-search { position: relative; flex: 1; }
.pos-search i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pos-search input { padding-inline-start: 36px; height: 44px; background: var(--card); }
.cat-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-chip { flex: none; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 7px 12px; cursor: pointer; font-weight: 600; color: var(--ink); white-space: nowrap; }
.cat-chip .em { font-size: 20px; }
.cat-chip small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; line-height: 1; }
.cat-chip.active { border-color: var(--brand); background: var(--brand-50); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.prod-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 4px 2px 16px; align-content: start; }
@media (max-width: 575.98px) { .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.prod { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; transition: .15s; position: relative; user-select: none; }
.prod:hover { border-color: #c9a3e3; transform: translateY(-2px); box-shadow: var(--shadow); }
.prod:active { transform: scale(.98); }
.prod.in-cart { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.prod .img { aspect-ratio: 4/3; border-radius: 12px; background: var(--bs-tertiary-bg); display: grid; place-items: center; font-size: 34px; overflow: hidden; margin-bottom: 8px; }
.prod .img img { width: 100%; height: 100%; object-fit: cover; }
.prod .cat { font-size: 11px; color: var(--muted); }
.prod .nm { font-weight: 700; font-size: 13.5px; line-height: 1.25; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.prod .pr { font-weight: 800; margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.prod .qty-pill { background: var(--brand); color: #fff; border-radius: 999px; font-size: 12px; min-width: 24px; height: 24px; display: grid; place-items: center; padding: 0 6px; }
.prod .opt { position: absolute; top: 14px; inset-inline-end: 14px; background: rgba(15, 23, 42, .7); color: #fff; font-size: 10px; border-radius: 6px; padding: 1px 6px; }

.pos-right { background: var(--card); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart-head { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.otype { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--bs-tertiary-bg); padding: 4px; border-radius: 12px; }
.otype button { border: 0; background: transparent; border-radius: 9px; padding: 7px 4px; font-weight: 700; font-size: 12.5px; color: var(--muted); }
.otype button.active { background: var(--card); color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.cart-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.cart-meta .form-select, .cart-meta .form-control { font-size: 13px; padding: .4rem .6rem; }
.cart-items { flex: 1; overflow-y: auto; padding: 6px 14px; min-height: 80px; }
.ci { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ci .info { flex: 1; min-width: 0; }
.ci .nm { font-weight: 700; font-size: 13.5px; }
.ci .meta { font-size: 11.5px; color: var(--muted); }
.ci .note { font-size: 11.5px; color: var(--accent); }
.ci .ks { font-size: 10px; }
.ci .right { text-align: end; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 28px; height: 28px; border: 0; background: var(--bs-tertiary-bg); color: var(--ink); font-weight: 800; }
.qty span { min-width: 30px; text-align: center; font-weight: 700; font-size: 13px; }
.ci.cancelled { opacity: .5; text-decoration: line-through; }
.cart-sum { padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.cart-sum .r { display: flex; justify-content: space-between; padding: 2px 0; }
.cart-sum .tot { font-size: 19px; font-weight: 800; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; }
.cart-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 14px 8px; }
.cart-actions .btn { font-size: 12px; padding: .45rem .2rem; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cart-actions .btn i { font-size: 16px; }
.cart-main { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; padding: 0 14px 14px; }
.cart-main .btn { height: 48px; font-size: 15px; }
.pos-fab { display: none; }
@media (max-width: 991.98px) {
    .pos { grid-template-columns: 1fr; height: calc(100dvh - var(--tb-h)); }
    .pos-left { padding: 10px 10px 0; }
    .prod-grid { padding-bottom: 90px; }
    .pos-right { position: fixed; inset: 0; z-index: 1045; transform: translateY(100%); transition: transform .25s ease; border: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
    .pos-right.open { transform: none; }
    .pos-fab { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 1040; height: 56px; border-radius: 16px; align-items: center; justify-content: space-between; padding: 0 18px; box-shadow: 0 12px 28px -10px rgba(107, 44, 145, .7); font-size: 15px; }
}
.cart-close { display: none; }
@media (max-width: 991.98px) { .cart-close { display: inline-flex; } }
.pay-lines .row { align-items: center; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.numpad button { height: 46px; border-radius: 10px; border: 1px solid var(--line); background: var(--bs-tertiary-bg); font-weight: 700; font-size: 17px; color: var(--ink); }
.quick-cash { display: flex; flex-wrap: wrap; gap: 6px; }
.offline-badge { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2000; background: #b45309; color: #fff; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.opt-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.btn-check:checked + .opt-card { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }

/* ---------- KDS ---------- */
.kds-wrap { display: flex; flex-direction: column; height: calc(100dvh - var(--tb-h)); }
.kds-bar { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.kds-cols { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 14px; padding: 14px 16px; overflow: auto; min-height: 0; }
@media (max-width: 991.98px) { .kds-cols { grid-template-columns: repeat(3, 85vw); scroll-snap-type: x mandatory; } .kds-col { scroll-snap-align: start; } }
.kds-col { display: flex; flex-direction: column; min-height: 0; background: var(--bs-tertiary-bg); border-radius: 16px; padding: 10px; }
.kds-col h6 { font-weight: 800; display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; }
.kds-list { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.kt { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; border-top: 5px solid #94a3b8; animation: pop .3s; }
.kt.st-new { border-top-color: #0ea5e9; } .kt.st-preparing { border-top-color: #f59e0b; } .kt.st-ready { border-top-color: #22c55e; }
.kt.late { box-shadow: 0 0 0 2px #ef4444; }
.kt.prio { border-top-color: #ef4444; }
.kt-head { padding: 10px 12px; display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); }
.kt-head b { font-size: 15px; }
.kt-timer { font-variant-numeric: tabular-nums; font-weight: 800; }
.kt-items { padding: 8px 12px; }
.kt-item { display: flex; gap: 8px; padding: 4px 0; font-weight: 600; }
.kt-item .q { min-width: 30px; font-weight: 800; color: var(--brand); }
.kt-item.cx { text-decoration: line-through; color: #ef4444; }
.kt-item .n { font-size: 12px; color: var(--accent); font-weight: 600; display: block; }
.kt-foot { padding: 8px 12px 12px; display: flex; gap: 6px; }
.kt-foot .btn { flex: 1; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }

/* ---------- Floor plan ---------- */
.floor { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-height: 480px; aspect-ratio: 16/9; overflow: hidden;
    background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; }
@media (max-width: 767.98px) { .floor { display: none; } }
/* min-height + 16:9 forced the floor wider than tablets: keep the ratio, drop the minimum there */
@media (max-width: 1199.98px) { .floor { min-height: 0; width: 100%; } }
.ftable { position: absolute; width: 10%; min-width: 70px; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 16px; cursor: pointer; font-weight: 800; border: 2px solid; user-select: none; touch-action: none; transition: box-shadow .15s; }
.ftable.round { border-radius: 50%; }
.ftable small { font-weight: 600; font-size: 11px; opacity: .8; }
.ftable.available { background: #ecfdf5; border-color: #34d399; color: #047857; }
.ftable.occupied { background: #fef2f2; border-color: #f87171; color: #b91c1c; }
.ftable.reserved { background: #fffbeb; border-color: #fbbf24; color: #b45309; }
[data-bs-theme=dark] .ftable { filter: brightness(.85); }
.floor.editing .ftable { cursor: grab; box-shadow: 0 0 0 3px rgba(107, 44, 145, .2); }
.tlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.tcard { border-radius: 14px; border: 2px solid; padding: 12px; text-align: center; cursor: pointer; font-weight: 800; }
.tcard.available { background: #ecfdf5; border-color: #34d399; color: #047857; }
.tcard.occupied { background: #fef2f2; border-color: #f87171; color: #b91c1c; }
.tcard.reserved { background: #fffbeb; border-color: #fbbf24; color: #b45309; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-inline-end: 14px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: linear-gradient(140deg, #6b2c91, #3f1757 60%, #22102e); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(#f97316, transparent 65%); opacity: .35; right: -160px; bottom: -160px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 18px; }
.auth-card { width: 100%; max-width: 400px; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- Receipt / print ---------- */
.receipt { font-family: 'Courier New', monospace; color: #000; background: #fff; margin: 0 auto; padding: 8px; font-size: 12px; }
.receipt.w58 { width: 58mm; } .receipt.w80 { width: 76mm; } .receipt.wA4 { width: 190mm; font-size: 14px; }
.receipt h3 { font-size: 16px; margin: 4px 0; text-align: center; }
.receipt .c { text-align: center; } .receipt .r { text-align: right; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; opacity: 1; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 1px 0; vertical-align: top; }
.receipt .big { font-size: 15px; font-weight: 700; }
@media print {
    @page { margin: 2mm; }
    body { background: #fff !important; }
    .no-print, .sidebar, .topbar { display: none !important; }
    .main { margin: 0 !important; }
    .content { padding: 0 !important; }
    .card { border: 0; box-shadow: none; }
}
.chart-box { position: relative; height: 290px; }
@media (max-width: 575.98px) { .chart-box { height: 230px; } }
.progress { height: 7px; border-radius: 9px; background: var(--bs-tertiary-bg); }
.progress-bar { background: var(--brand); }
.list-rank li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.list-rank li:last-child { border-bottom: 0; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.img-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; background: var(--bs-tertiary-bg); display: inline-grid; place-items: center; font-size: 20px; }
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.qr-card { border: 2px dashed var(--line); border-radius: 16px; padding: 16px; text-align: center; break-inside: avoid; background: #fff; color: #000; }
.min-w-0 { min-width: 0; }
.cursor-pointer { cursor: pointer; }
.fw-800 { font-weight: 800; }
.text-xs { font-size: 12px; }

/* ---------- Refinements ---------- */
@media (min-width: 992px) { .sidebar.offcanvas-lg { background-color: var(--sb-bg) !important; } }
@media (max-width: 575.98px) {
    .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
    .stat .ic { width: 36px; height: 36px; font-size: 16px; border-radius: 11px; }
    .stat .val { font-size: clamp(15px, 4.6vw, 19px); white-space: nowrap; word-break: normal; }
    .stat .lbl, .stat .delta { font-size: 11.5px; }
}

/* ---------- MiniChart ---------- */
.mc-host { position: relative; }
.mc-svg { display: block; overflow: visible; }
.mc-ax { font-size: 11px; }
.mc-big { font-size: 22px; font-weight: 800; }
.mc-slice { transition: opacity .15s; } .mc-slice:hover { opacity: .85; }
.mc-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.mc-legend i, .mc-tip i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 5px; }
.mc-tip { position: absolute; display: none; pointer-events: none; z-index: 5; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 10px; padding: 8px 10px; font-size: 12px; white-space: nowrap; }
/* Toasts never block the POS buttons */
#toasts { pointer-events: none; width: min(420px, 100%); }
#toasts .toast { pointer-events: auto; width: 100%; }

/* =====================================================================
   Theme v2 — purple, dark top bar, slide-out dark menu (all screen sizes)
   ===================================================================== */
:root {
    --brand: #6b2c91; --brand-600: #7d3aa6; --brand-50: #f6effb; --brand-100: #eadcf4;
    --accent: #f97316; --ink: #1f2430; --muted: #6b7280; --line: #e3e0ea; --bg: #f7f6fb; --card: #fff;
    --sb-bg: #2f2f2f; --tb-h: 58px; --radius: 10px;
    --shadow: 0 1px 2px rgba(17, 12, 34, .04), 0 6px 18px -12px rgba(17, 12, 34, .18);
    --bs-primary: #6b2c91; --bs-primary-rgb: 107, 44, 145; --bs-link-color: #6b2c91; --bs-link-color-rgb: 107, 44, 145; --bs-link-hover-color: #522170;
    --bs-body-font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --t-dine: #6b2c91; --t-take: #8a2a46; --t-del: #255f5c; --t-svc: #b45309;
}
[data-bs-theme=dark] { --brand-50: rgba(167, 105, 210, .12); --brand-100: rgba(167, 105, 210, .22); --line: #2c2a36; --bg: #121118; --card: #1b1a23; --ink: #e8e6ef; }
body { font-size: 14px; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: #5a2379; --bs-btn-hover-border-color: #5a2379; --bs-btn-active-bg: #4b1d65; --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand); }
.btn { border-radius: 7px; font-weight: 500; }
.form-control, .form-select { border-radius: 6px; }
.form-control:focus, .form-select:focus { border-color: #b48bd0; box-shadow: 0 0 0 .2rem rgba(107, 44, 145, .12); }
.text-brand { color: var(--brand) !important; }
.badge-soft.text-bg-primary { background: var(--brand-100) !important; color: var(--brand) !important; }
.card { border-radius: var(--radius); border-color: #d9d3e3; box-shadow: none; }
.card-header { font-weight: 600; }
.stat { border-radius: var(--radius); box-shadow: none; border-color: #d9d3e3; }
.ic-teal { background: var(--brand); color: #fff; }
.nav-pills-soft .nav-link.active { background: var(--brand); }
.page-head h2 { font-weight: 600; }
.progress-bar { background: var(--brand); }

/* Layout: menu is a drawer everywhere */
@media (min-width: 992px) {
    .main, body.sb-mini .main { margin-inline-start: 0; }
    .sidebar { position: fixed; }
}
.sidebar.offcanvas { z-index: 1045; --bs-offcanvas-width: 250px; background: var(--sb-bg) !important; color: #fff; border: 0; }
.sb-head { padding: 22px 18px 14px; }
.sb-wordmark { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: #fff; letter-spacing: .12em; font-size: 13px; text-transform: uppercase; }
.sb-wordmark span { flex: 1; height: 1px; background: rgba(255, 255, 255, .7); min-width: 14px; }
.sb-wordmark b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-nav { padding: 6px 0 12px; }
.sb-link { color: #e5e5e5; border-radius: 0; margin: 0; padding: 9px 18px; font-weight: 400; font-size: 13.5px; }
.sb-link i { font-size: 16px; color: #cfcfcf; }
.sb-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sb-link.active { background: #fff; color: #222; font-weight: 600; margin: 2px 8px 2px 0; border-radius: 0 6px 6px 0; }
.is-rtl .sb-link.active { margin: 2px 0 2px 8px; border-radius: 6px 0 0 6px; }
.sb-link.active i { color: #222; }
.sb-link.active::before { content: none; }
.sb-foot { border-top: 0; padding: 12px 14px 14px; }
.sb-logout { background: var(--brand); color: #fff; font-weight: 600; }
.sb-logout:hover { background: #7d3aa6; color: #fff; }
.sb-ver { text-align: center; font-size: 11px; color: #bbb; margin-top: 6px; }
.offcanvas-backdrop.show { opacity: .45; }

.topbar { background: #333; border-bottom: 0; color: #fff; padding: 0 14px; backdrop-filter: none; }
.tb-title { color: #fff; font-size: 16px; font-weight: 500; }
.tb-burger { color: #fff; font-size: 22px; padding: 4px 8px; border: 0; }
.tb-burger:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.topbar .btn-icon { background: transparent; border-color: rgba(255, 255, 255, .18); color: #fff; width: 36px; height: 36px; }
.topbar .btn-icon:hover { background: rgba(255, 255, 255, .1); }
.tb-branch { border: 1px solid rgba(255, 255, 255, .55); color: #fff; border-radius: 3px; min-width: 120px; max-width: 260px; height: 36px; text-align: start; display: flex; align-items: center; padding: 0 12px; }
.tb-branch:hover, .tb-branch:disabled { color: #fff; border-color: #fff; opacity: 1; }
@media (min-width: 768px) { .tb-branch { min-width: 250px; } }
.tb-user { border: 0; background: transparent; padding: 0; height: auto; }
.tb-user .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; }
.notif-dot { box-shadow: 0 0 0 2px #333; }
body.layout-full .topbar { display: none; }
body.layout-full .main { height: 100dvh; }
.pos, .kds-wrap { height: 100dvh; }

/* Hub tiles (inventory / reports) */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 28px; }
.hub-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 120px; padding: 16px 10px; text-align: center;
    background: var(--card); border: 1px solid #8e5bb0; border-radius: 6px; color: var(--ink); font-weight: 600; font-size: 13.5px; transition: .15s; }
.hub-tile i { font-size: 22px; color: var(--brand); }
.hub-tile:hover { background: var(--brand-50); color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
@media (max-width: 575.98px) { .hub { grid-template-columns: repeat(2, 1fr); gap: 12px; } .hub-tile { min-height: 100px; font-size: 12.5px; } }
.section-title { font-weight: 600; font-size: 20px; margin-bottom: 14px; }

/* =====================================================================
   POS v2 — catalogue left, order panel right
   ===================================================================== */
.pos2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 40%); height: 100dvh; min-height: 0; background: var(--bg); }
@media (max-width: 1399.98px) { .pos2 { grid-template-columns: minmax(0, 1fr) 440px; } }
.pl { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pl-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #333; color: #fff; flex-wrap: wrap; }
.pl-burger { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: #fff; font-size: 16px; font-weight: 500; padding: 4px 6px 4px 0; }
.pl-burger i { font-size: 22px; }
.pl-tablet { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.pl-tablet .btn-link { color: #fff !important; font-size: 13px; }
.pl-tablet .form-check-input { cursor: pointer; }
.pl-tablet .form-check-input:checked { background-color: #a46bd0; border-color: #a46bd0; }
.pl-search { position: relative; flex: 1 1 160px; min-width: 140px; }
.pl-search input { height: 36px; padding-inline-end: 34px; border-radius: 4px; border: 0; }
.pl-search i { position: absolute; inset-inline-end: 11px; top: 50%; transform: translateY(-50%); color: #777; pointer-events: none; }
.pl-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-btns .btn { height: 36px; padding: 0 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; border-radius: 4px; white-space: nowrap; }
.pl-btns .btn i { font-size: 15px; }
@media (max-width: 1199.98px) { .pl-btns .btn span { display: none; } .pl-btns .btn { padding: 0 10px; } }

.catbar { display: flex; align-items: stretch; background: var(--card); border-bottom: 1px solid var(--line); }
.cat-arrow { border: 0; background: var(--card); width: 34px; flex: none; color: var(--brand); font-size: 16px; }
.cat-arrow:hover { background: var(--brand-50); }
.cat-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; padding: 6px 2px; scroll-snap-type: x proximity; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { border: 1px solid var(--line); background: var(--card); color: var(--ink); white-space: nowrap; padding: 6px 14px; border-radius: 4px; font-size: 13px; font-weight: 500; scroll-snap-align: start; }
.cat-tab:hover { border-color: var(--brand); color: var(--brand); }
.cat-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.pgrid { flex: 1; overflow-y: auto; display: grid; grid-auto-rows: max-content; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; padding: 10px 12px 16px; align-content: start; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: .12s; user-select: none; }
.pcard:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.pcard:active { transform: scale(.98); }
.pcard:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.pcard.in-cart { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.pimg { position: relative; flex: none; aspect-ratio: 4/3; background: var(--g, #eee); display: grid; place-items: center; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pimg > span { font-size: 40px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.15)); }
.pimg .pq { position: absolute; top: 6px; inset-inline-end: 6px; background: var(--brand); color: #fff; border-radius: 999px; min-width: 24px; height: 24px; display: grid; place-items: center; font-size: 12px; padding: 0 6px; }
.pimg .pv { position: absolute; bottom: 6px; inset-inline-start: 6px; background: rgba(0,0,0,.6); color: #fff; font-style: normal; font-size: 10.5px; border-radius: 3px; padding: 1px 6px; }
.pnm { font-size: 13px; font-weight: 500; line-height: 1.25; padding: 7px 8px 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(2.5em + 9px); }
.ppr { font-size: 13px; font-weight: 700; color: var(--brand); padding: 0 8px 8px; margin-top: auto; }
.ppr small { color: var(--muted); font-weight: 400; }
.pgrid.no-img .pimg { display: none; }
.pgrid.no-img { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.pgrid.no-img .pnm { padding-top: 12px; }

.pr { background: #f1f1f3; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
[data-bs-theme=dark] .pr { background: #17161e; }
.pr-top { display: flex; gap: 6px; padding: 8px 10px 0; }
.otabs { display: grid; gap: 4px; flex: 1; }
.otabs button { border: 1px solid var(--brand); background: var(--card); color: var(--brand); padding: 8px 4px; font-weight: 600; font-size: 12.5px; text-transform: uppercase; border-radius: 4px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.otabs button.active { background: var(--brand); color: #fff; }
.pr-order { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px 0; font-size: 12.5px; }
.pr-order .btn { padding: 2px 8px; font-size: 12px; }
.pr-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; padding: 8px 10px; }
.pr-fields.tri { grid-template-columns: 1fr 1fr; }
@media (min-width: 1600px) { .pr-fields.tri { grid-template-columns: 1.1fr 1.3fr 1fr 1fr; } }
.pr-fields .wide { grid-column: 1 / -1; }
.fld { display: block; margin: 0; min-width: 0; position: relative; }
.fld > span, .pf-grid span, .pf-pay span, .pf-del span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; font-weight: 500; }
.pr .form-control, .pr .form-select { font-size: 13px; height: 34px; padding-top: 4px; padding-bottom: 4px; border-radius: 4px; }
.pr .input-group .btn { height: 34px; padding: 0 9px; border-radius: 4px; }
.pr .input-group > :not(:first-child) { border-start-start-radius: 0; border-end-start-radius: 0; }
.pr .input-group > :not(:last-child) { border-start-end-radius: 0; border-end-end-radius: 0; }
.pr .input-group .btn-light { border: 1px solid var(--bs-border-color); background: var(--card); }
.cust-dd { display: none; position: absolute; top: 100%; inset-inline: 0; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; }
.cust-dd.show { display: block; }
.cust-dd a { display: block; padding: 7px 12px; color: var(--ink); font-size: 13px; border-bottom: 1px solid var(--line); }
.cust-dd a:hover { background: var(--brand-50); }
.cust-dd small { color: var(--muted); }

.pr-items { flex: 1; overflow-y: auto; min-height: 90px; margin: 0 10px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.it-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.it-table thead th { position: sticky; top: 0; z-index: 1; background: #e6e3ec; font-weight: 600; font-size: 12px; padding: 7px 6px; text-align: start; }
[data-bs-theme=dark] .it-table thead th { background: #26242f; }
.it-table th.c, .it-table td.c { text-align: center; }
.it-table th.e, .it-table td.e { text-align: end; white-space: nowrap; }
.it-table td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.it-table td.nm { min-width: 110px; }
.it-table td.nm small { color: var(--muted); }
.it-table td.nm .badge { font-size: 9.5px; vertical-align: middle; }
.it-table .sub { font-size: 11px; color: var(--muted); }
.it-table .sub.note { color: var(--accent); }
.it-table tr.cancelled td { opacity: .5; }
.it-table tr.cancelled td.nm { text-decoration: line-through; }
.it-table tr.empty-row td { border: 0; }
.qpill { display: inline-flex; align-items: center; border: 1px solid var(--brand); border-radius: 999px; overflow: hidden; height: 26px; }
.qpill button { border: 0; background: transparent; color: var(--brand); width: 24px; height: 26px; font-weight: 700; line-height: 1; }
.qpill button:hover { background: var(--brand-50); }
.qpill span { min-width: 22px; text-align: center; font-weight: 600; font-size: 12.5px; }
.it-table input.dp { width: 54px; height: 28px; padding: 2px 4px; font-size: 12px; text-align: center; margin: 0 auto; }
.it-table td.act { white-space: nowrap; }
.it-table td.act button { border: 0; background: none; color: var(--brand); padding: 2px 4px; font-size: 15px; }
.it-table td.act button[data-del] { color: #dc2626; }

.pr-foot { padding: 6px 10px 10px; }
.pf-row { display: flex; justify-content: space-between; font-size: 13px; padding: 2px 2px 6px; }
.pf-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.pf-grid label, .pf-pay label { margin: 0; min-width: 0; }
.pf-grid input[readonly], .pf-pay input[readonly] { background: #e9e7ee; }
[data-bs-theme=dark] .pf-grid input[readonly], [data-bs-theme=dark] .pf-pay input[readonly] { background: #22212a; }
.pf-del { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pf-del span { margin: 0; white-space: nowrap; }
.pf-del input { max-width: 140px; }
.gt { display: flex; justify-content: space-between; align-items: center; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 4px; margin: 8px 0; font-size: 15px; }
.gt b { font-size: 19px; font-weight: 700; }
.pf-pay { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 6px; }
.pf-notes { display: flex; gap: 6px; margin-top: 6px; }
.pf-notes .btn { height: 34px; padding: 0 10px; border: 1px solid var(--bs-border-color); background: var(--card); border-radius: 4px; }
.pf-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.pf-btns .btn { height: 42px; font-size: 13px; font-weight: 600; padding: 0 4px; border-radius: 4px; line-height: 1.1; }
.change-pop { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2000; }
@media (max-width: 575.98px) {
    .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pf-btns .btn { font-size: 12px; }
}

/* tables modal */
.tb-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.tbf { border: 1px solid var(--line); background: var(--card); border-radius: 4px; font-size: 12.5px; padding: 4px 10px; }
.tbf b { margin-inline-start: 4px; }
.tbf.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tbf.available b { color: #16a34a; } .tbf.reserved b { color: #2563eb; } .tbf.booked b { color: #ca8a04; }
.tbf.active b { color: #fff; }
.floor { margin-bottom: 14px; }
.floor-h { width: 100%; text-align: start; border: 0; background: var(--brand-50); color: var(--ink); font-weight: 600; padding: 8px 12px; border-radius: 4px; }
.floor-h i { transition: transform .2s; display: inline-block; }
.floor-h[aria-expanded=false] i { transform: rotate(-90deg); }
.tcircles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px; padding: 14px 4px 4px; }
.tcirc { position: relative; aspect-ratio: 1; border-radius: 50%; border: 2px solid #22c55e; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; transition: .12s; max-width: 120px; width: 100%; justify-self: center; }
.tcirc:hover { transform: scale(1.04); box-shadow: var(--shadow); }
.tcirc b { font-size: 15px; }
.tcirc small { font-size: 11px; color: var(--muted); }
.tcirc .amt { font-weight: 700; color: #713f12; }
.tcirc.booked { background: #fde047; border-color: #eab308; }
.tcirc.booked small { color: #713f12; }
.tcirc.reserved { background: #dbeafe; border-color: #3b82f6; }
.tcirc.cur { outline: 3px solid var(--brand); outline-offset: 3px; }
.tprint { position: absolute; top: -4px; inset-inline-end: -4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 13px; display: grid; place-items: center; }
[data-bs-theme=dark] .tcirc.booked { color: #1f1300; }

/* take away / delivery boards */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 767.98px) { .board { grid-template-columns: 1fr; } }
.bcol { background: var(--bs-tertiary-bg); border-radius: 6px; padding: 10px; min-height: 200px; }
.bcol h6 { font-weight: 600; display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 2px solid; }
.bc-progress h6 { border-color: #f59e0b; } .bc-ready h6 { border-color: #22c55e; } .bc-served h6 { border-color: var(--brand); }
.bcol h6 .badge { background: var(--brand); }
.bcircles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; padding-top: 10px; }
.bcirc { position: relative; aspect-ratio: 1; border-radius: 50%; background: var(--card); border: 3px solid #22c55e; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; padding: 6px; max-width: 120px; width: 100%; justify-self: center; }
.bcirc.unpaid, .bcirc.partial { border-color: #ef4444; }
.bcirc small { font-size: 10px; color: var(--muted); line-height: 1; }
.bcirc b { font-size: 20px; line-height: 1.1; }
.bcirc span { font-size: 11.5px; font-weight: 600; }
.bcirc em { font-style: normal; font-size: 10px; color: var(--muted); max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcirc:hover { box-shadow: var(--shadow); transform: scale(1.03); }
.bserve { position: absolute; bottom: -4px; inset-inline-end: -4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: #16a34a; color: #fff; display: grid; place-items: center; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #22c55e; vertical-align: middle; }
.dot.unpaid { border-color: #ef4444; }

/* order queue */
.qu-table { font-size: 13px; }
.qu-table th { font-size: 12px; background: #e6e3ec; white-space: nowrap; }
[data-bs-theme=dark] .qu-table th { background: #26242f; }
.qu-act .btn { padding: 2px 8px; font-size: 12px; }
.tpill { display: inline-block; font-size: 11px; font-weight: 600; color: #fff; padding: 2px 8px; border-radius: 3px; background: var(--t-dine); white-space: nowrap; }
.tpill.takeaway { background: var(--t-take); } .tpill.delivery, .tpill.online { background: var(--t-del); } .tpill.service { background: var(--t-svc); }

/* POS on tablets / phones: the order panel becomes a sheet */
@media (max-width: 991.98px) {
    .pos2 { grid-template-columns: 1fr; }
    .pgrid { padding-bottom: 90px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .pr { position: fixed; inset: 0; z-index: 1045; transform: translateY(100%); transition: transform .25s ease; border: 0; padding-bottom: env(safe-area-inset-bottom); }
    .pr.open { transform: none; }
    .pl-search { order: 5; flex-basis: 100%; }
}
@media (max-width: 575.98px) { .pgrid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; } .pl-head { padding: 6px 8px; gap: 6px; } }
.pr .cart-close { height: 36px; }

/* KDS v2 — ticket grid with coloured headers */
.kds2 { background: var(--bg); height: 100dvh; }
.kds-head { flex-wrap: wrap; }
.kds-types { display: flex; gap: 4px; flex-wrap: wrap; }
.kds-types button { border: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff; border-radius: 4px; font-size: 13px; padding: 5px 10px; }
.kds-types button b { background: rgba(255,255,255,.2); border-radius: 999px; padding: 0 7px; margin-inline-start: 4px; font-weight: 600; }
.kds-types button.active { background: var(--brand); border-color: var(--brand); }
.kds-station { max-width: 170px; height: 34px; }
.kds-clock { color: #fff; font-size: 13px; }
.kds-ic { color: #fff !important; border-color: rgba(255,255,255,.3) !important; background: transparent !important; width: 34px; height: 34px; }
.kds-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 12px; align-content: start; grid-auto-rows: max-content; }
.kc { background: var(--card); border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.kc-h { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; color: #fff; background: var(--t-dine); }
.kc.t-takeaway .kc-h { background: var(--t-take); }
.kc.t-delivery .kc-h, .kc.t-online .kc-h { background: var(--t-del); }
.kc.t-service .kc-h { background: var(--t-svc); }
.kc-no { font-weight: 700; font-size: 16px; }
.kc-type { font-size: 11.5px; opacity: .9; }
.kc-timer { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.kc.late .kc-timer { background: #dc2626; padding: 0 6px; border-radius: 4px; animation: kblink 1.2s infinite; }
@keyframes kblink { 50% { opacity: .55; } }
.kc-prio { background: #fde047; color: #713f12; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.kc.prio { border: 2px solid #f59e0b; }
.kc-who { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--brand-50); }
.kc-items { padding: 4px 8px; flex: 1; }
.kc-it { display: flex; align-items: flex-start; gap: 8px; padding: 7px 4px; border-bottom: 1px dashed var(--line); font-size: 14px; cursor: pointer; margin: 0; }
.kc-it:last-child { border-bottom: 0; }
.kc-it .form-check-input { margin-top: 3px; flex: none; width: 1.15em; height: 1.15em; }
.kc-it .form-check-input:checked { background-color: #16a34a; border-color: #16a34a; }
.kc-it .q { font-weight: 700; min-width: 22px; color: var(--brand); }
.kc-it small { color: var(--muted); }
.kc-it .n { display: block; font-size: 11.5px; }
.kc-it .n.warn { color: #c2410c; font-weight: 600; }
.kc-it.ok > span:not(.q) { text-decoration: line-through; color: var(--muted); }
.kc-it.cx { opacity: .55; text-decoration: line-through; cursor: default; }
.kc-note { font-size: 12px; color: #c2410c; font-weight: 600; padding: 4px; }
.kc-f { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); }
.kc-f .btn { flex: 1; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.kc-prog { font-size: 12px; color: var(--muted); min-width: 34px; }
.kc.st-ready { opacity: .9; }
.kc.st-ready .kc-h { filter: saturate(.6); }
@media (max-width: 575.98px) { .kds-grid { grid-template-columns: 1fr; padding: 8px; } }

/* Dashboard v2 */
.dash-filter .card-body { padding: 10px 12px; }
.dash-filter label { margin: 0; min-width: 140px; }
.dash-filter label span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dash-grid .dc { margin: 0; min-width: 0; }
.dash-grid .dc-wide { grid-column: span 2; }
@media (max-width: 1199.98px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .dash-grid { grid-template-columns: 1fr; } .dash-grid .dc-wide { grid-column: auto; } }
.dc .card-header { display: flex; justify-content: space-between; align-items: center; background: var(--card); }
.dc .card-header i { color: var(--brand); margin-inline-end: 4px; }
.dc-gn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: center; }
@media (max-width: 575.98px) { .dc-gn { grid-template-columns: 1fr; } }
.dash-kv { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.dash-kv li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.dash-kv li.neg b { color: #dc2626; }
.dash-kv li.hl { font-weight: 700; background: var(--brand-50); padding-inline: 8px; border-radius: 4px; border: 0; margin: 2px 0; }
.dash-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dash-tiles.three { grid-template-columns: repeat(3, 1fr); }
.dash-tiles > div { background: var(--brand-50); border-radius: 6px; padding: 8px 10px; min-width: 0; }
.dash-tiles small { display: block; font-size: 11.5px; color: var(--muted); }
.dash-tiles b { font-size: 18px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-tiles em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.dash-rank { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.dash-rank li { padding: 5px 0; }
.dash-rank small { color: var(--muted); }
.dash-rank .bar { height: 6px; background: var(--brand-50); border-radius: 4px; margin-top: 4px; overflow: hidden; }
.dash-rank .bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
@media print { .dash-grid { grid-template-columns: repeat(2, 1fr); } .dash-grid .dc { break-inside: avoid; } }
.stat-mini { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.stat-mini small { display: block; font-size: 11.5px; color: var(--muted); }
.stat-mini b { font-size: 16px; white-space: nowrap; }
.stat-mini.hl { background: var(--brand); color: #fff; border-color: var(--brand); }
.stat-mini.hl small { color: rgba(255,255,255,.8); }
.hist-table { font-size: 12.5px; }
.hist-table th { font-size: 11.5px; white-space: nowrap; background: #e6e3ec; }
[data-bs-theme=dark] .hist-table th { background: #26242f; }

/* Rider management */
.rd-search { max-width: 260px; }
.rd-search input { border: 1px solid var(--bs-border-color); }
.rider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.rider-card { background: var(--card); border: 1px solid #d9d3e3; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.rider-card.off { opacity: .6; }
.rc-top { display: flex; gap: 12px; align-items: center; padding: 14px; }
.rc-av { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 18px; flex: none; }
.rc-name { font-weight: 600; font-size: 15px; }
.rc-badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; align-self: flex-start; }
.rc-badge.free { background: #dcfce7; color: #166534; } .rc-badge.busy { background: #fef3c7; color: #92400e; }
.rc-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rc-stats > div { padding: 8px 10px; text-align: center; }
.rc-stats > div + div { border-inline-start: 1px solid var(--line); }
.rc-stats small { display: block; font-size: 11px; color: var(--muted); }
.rc-stats b { font-size: 15px; }
.rc-orders { padding: 4px 12px 8px; }
.rd-ord { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.rd-ord:last-child { border-bottom: 0; }
.online-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.on-card { overflow: hidden; }
.on-h { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; color: #fff; background: var(--t-dine); }
.on-h.t-takeaway { background: var(--t-take); } .on-h.t-delivery, .on-h.t-online { background: var(--t-del); } .on-h.t-service { background: var(--t-svc); }
.on-items { list-style: none; padding: 0; margin: 6px 0; font-size: 13px; }
.on-items li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.on-items small { color: var(--muted); }
.lines-table th { font-size: 12px; background: #e6e3ec; }
[data-bs-theme=dark] .lines-table th { background: #26242f; }
.pf-grid .form-control { padding-inline: 6px; }
.sb-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: #fff; padding: 2px; flex: none; margin-inline-end: 8px; }

/* ---- Detailed invoice & KOT (v1.3) ---- */
.rcpt .rc-logo { max-width: 60%; max-height: 70px; object-fit: contain; margin: 2px auto 4px; display: block; filter: grayscale(1); }
.receipt .small { font-size: 11px; line-height: 1.35; } .receipt .tiny { font-size: 9.5px; }
.rcpt .rc-name { text-align: center; font-size: 18px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; margin: 2px 0; }
.receipt .rc-title { text-align: center; font-weight: 800; font-size: 13px; letter-spacing: 2px; border-top: 2px solid #000; border-bottom: 2px solid #000; padding: 4px 0; margin: 8px 0 6px; }
.receipt .rc-meta td { font-size: 11.5px; padding: 1px 0; }
.receipt .rc-tag { border: 1.5px solid #000; padding: 0 5px; font-weight: 800; font-size: 11px; }
.receipt .rc-box { border: 1px dashed #000; padding: 4px 6px; margin: 6px 0; font-size: 11.5px; }
.receipt .rc-items, .receipt .kt-items { margin-top: 6px; }
.receipt .rc-items th, .receipt .kt-items th { border-top: 1px solid #000; border-bottom: 1px solid #000; font-size: 11px; padding: 3px 0; text-align: center; }
.receipt th.l, .receipt td.l { text-align: left; } .receipt th.r { text-align: right; }
.receipt .rc-items tr.it td { padding-top: 4px; font-weight: 600; } .receipt .rc-items td + td, .receipt .rc-items th + th { padding-left: 5px; }
.receipt .rc-items td:nth-child(2) { width: 13%; } .receipt .rc-items td:nth-child(3), .receipt .rc-items td:nth-child(4) { width: 21%; }
.receipt tr.sub td { font-size: 10.5px; padding: 0; }
.receipt .rc-count { display: flex; justify-content: space-between; border-top: 1px dashed #000; border-bottom: 1px dashed #000; padding: 3px 0; margin: 4px 0; font-size: 11px; font-weight: 700; }
.receipt .rc-tot td { padding: 1.5px 0; } .receipt .rc-tot tr.b td { font-weight: 800; }
.receipt .rc-grand { display: flex; justify-content: space-between; align-items: center; background: #000; color: #fff; padding: 6px 8px; margin: 6px 0; font-weight: 800; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.receipt .rc-grand b { font-size: 17px; }
.receipt .rc-status { text-align: center; font-weight: 800; letter-spacing: 3px; border: 2px solid #000; padding: 3px; margin: 8px 18%; }
.receipt .rc-foot { text-align: center; border-top: 1px dashed #000; margin-top: 8px; padding-top: 6px; }
.receipt .rc-no { font-family: 'Libre Barcode 39', 'Courier New', monospace; font-size: 15px; letter-spacing: 3px; font-weight: 700; margin: 4px 0; text-align: center; }
.receipt.kot { margin-bottom: 16px; page-break-after: always; }
.kot .kt-head { display: block; text-align: center; border-bottom: 2px solid #000; padding-bottom: 4px; }
.kot .kt-title { font-weight: 800; font-size: 14px; letter-spacing: 1px; }
.kot .kt-station { display: table; margin-left: auto; margin-right: auto; background: #000; color: #fff; padding: 2px 10px; margin-top: 3px; font-weight: 800; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.kot .kt-flag { text-align: center; font-weight: 800; border: 2px solid #000; margin: 5px 0; padding: 2px; letter-spacing: 1px; }
.kot .kt-big { display: flex; justify-content: space-between; margin: 6px 0; border-bottom: 1px dashed #000; padding-bottom: 5px; }
.kot .kt-big small { display: block; font-size: 10px; text-transform: uppercase; }
.kot .kt-big b { font-size: 22px; line-height: 1.1; }
.kot .kt-items td { font-size: 15px; font-weight: 700; padding: 3px 0; vertical-align: top; }
.kot .kt-items td.q { width: 38px; text-align: center; font-size: 17px; border: 1.5px solid #000; }
.kot .kt-items tr.it td.q + td { padding-left: 8px; } .kot .kt-items tr.sub td { font-size: 13px; font-weight: 600; padding-left: 8px; }
.kot .kt-items .v { font-weight: 600; } .kot .kt-items .nt { font-style: italic; }
.kot .kt-items tr.x td { text-decoration: line-through; }
.kc-timer.stopped { background: #16a34a; color: #fff; padding: 0 6px; border-radius: 4px; }
.chip-check, .spice-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.spice-pick .btn { min-width: 44px; }
/* Deals & offers */
.deal-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; height: 100%; display: flex; flex-direction: column; gap: 10px; background: var(--card); }
.deal-img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--bs-tertiary-bg); font-size: 28px; flex: none; }
.place-center { place-items: center; }
.deal-lines { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--bs-secondary-color); flex: 1; }
.deal-lines li { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.pick-list.tall { max-height: 240px; }
.pick { display: flex; gap: 6px; align-items: center; font-size: 14px; cursor: pointer; }
.pick[hidden] { display: none; }
.pcard { position: relative; }
.pcard .poffer, .pcard .pdeal { position: absolute; z-index: 2; top: 6px; font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; color: #fff; pointer-events: none; }
.pcard .poffer { inset-inline-start: 6px; background: #dc2626; }
.pcard .pdeal { inset-inline-start: 6px; background: #f59e0b; }
.pcard .poffer ~ .pdeal { top: 28px; }
#items .sub.offer { color: #dc2626; font-weight: 600; }
/* QR menu centre */
.kpi-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; }
.qr-mini { width: 112px; height: 112px; flex: none; }
.qr-mini svg { width: 100%; height: 100%; display: block; border-radius: 8px; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.qr-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; text-align: center; }
.qr-tile:has(.qr-pick:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.qr-tile .qr-pick { position: absolute; top: 8px; inset-inline-start: 8px; }
.qr-tile .qr-mini { width: 104px; height: 104px; }
.qr-acts { display: flex; gap: 4px; margin-top: 4px; }
.qr-acts a { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--bs-tertiary-bg); color: inherit; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #ccc; cursor: pointer; }
/* Live guest requests */
.greq-dock { position: fixed; z-index: 1040; bottom: 16px; inset-inline-end: 16px; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.greq { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 12px 12px 12px 14px; border-radius: 14px; background: #1f1028; color: #fff; box-shadow: 0 18px 40px -16px rgba(0,0,0,.55); animation: greqIn .3s ease; border-inline-start: 5px solid #f59e0b; }
.greq.bill { border-inline-start-color: #22c55e; }
.greq.help { border-inline-start-color: #ef4444; }
.greq .ic { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 19px; flex: none; }
.greq .tx { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.greq .tx b { font-size: 14.5px; display: block; }
.greq .tx small { opacity: .75; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.greq button { border: 0; border-radius: 10px; padding: 8px 12px; font-weight: 700; background: #fff; color: #1f1028; flex: none; }
.greq.new { animation: greqIn .3s ease, greqShake .5s .3s 3; }
@keyframes greqIn { from { transform: translateY(16px); opacity: 0; } }
@keyframes greqShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.ftable.calling { animation: tblCall 1s ease-in-out infinite; z-index: 3; }
.ftable.calling::after { content: '🔔'; position: absolute; top: -12px; inset-inline-end: -12px; font-size: 18px; background: #fff; border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
@keyframes tblCall { 50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, .35); } }
@media print { .greq-dock { display: none !important; } }
/* POS / KDS: keep the action buttons on the right free */
.layout-full .greq-dock { inset-inline-end: auto; inset-inline-start: 16px; }
.ppr s { color: var(--bs-secondary-color); font-weight: 500; font-size: .85em; margin-inline-start: 4px; }
body.modal-open .greq-dock, body:has(.offcanvas.show) .greq-dock { display: none; }
.greq-head { pointer-events: auto; align-self: flex-end; border: 0; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; background: #1f1028; color: #fff; box-shadow: 0 10px 24px -12px rgba(0,0,0,.5); display: inline-flex; gap: 6px; align-items: center; }
.greq-head b { background: #ef4444; border-radius: 999px; min-width: 20px; padding: 0 6px; }
.greq-dock.min .greq { display: none; }
/* Guest requests queue */
.q-col { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-height: 200px; }
.q-h { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.q-h b { background: var(--brand); color: #fff; border-radius: 999px; padding: 0 9px; font-size: 13px; }
.q-list { display: flex; flex-direction: column; gap: 10px; }
.q-card { display: flex; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); border-inline-start: 5px solid #f59e0b; background: var(--bs-body-bg); transition: background .2s; }
.q-card.bill { border-inline-start-color: #22c55e; }
.q-card.help { border-inline-start-color: #ef4444; }
.q-card.warn { background: color-mix(in srgb, #f59e0b 10%, var(--bs-body-bg)); }
.q-card.late { background: color-mix(in srgb, #ef4444 12%, var(--bs-body-bg)); }
.q-card.late .q-age { color: #dc2626; font-weight: 800; }
.q-card.taken { opacity: .6; }
.q-card.mine { box-shadow: inset 0 0 0 2px var(--brand); }
.q-pos { width: 30px; height: 30px; border-radius: 50%; background: var(--bs-tertiary-bg); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.q-body { flex: 1; min-width: 0; }
.q-top { display: flex; align-items: baseline; gap: 8px; }
.q-top b { font-size: 17px; }
.q-top small { color: var(--bs-secondary-color); }
.q-age { margin-inline-start: auto; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.q-what { font-size: 13.5px; margin-top: 2px; }
.q-det { font-size: 13px; color: var(--bs-secondary-color); margin-top: 2px; }
.q-due { font-size: 14px; margin-top: 4px; }
.q-claim { font-size: 12.5px; font-weight: 700; color: var(--brand); margin-top: 4px; }
.q-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.greq-more { pointer-events: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: #1f1028; color: #fff; font-size: 13px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.55); }
.greq-more a { color: #fff; font-weight: 700; background: rgba(255,255,255,.15); padding: 6px 10px; border-radius: 9px; text-decoration: none; white-space: nowrap; }
.greq .who { color: #fde68a; }
.nav-badge { background: #ef4444; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; margin-inline-start: auto; line-height: 18px; }
/* KDS live / history */
.kds-mode { display: flex; border: 1px solid rgba(255,255,255,.45); border-radius: 6px; overflow: hidden; }
.kds-mode button { border: 0; background: transparent; color: #fff; font-size: 13px; font-weight: 600; padding: 5px 12px; }
.kds-mode button.active { background: #fff; color: var(--brand); }
.kds-hbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); color: var(--bs-secondary-color); font-size: 13.5px; }
.kds-hbar input { width: auto; }
.kds-hbar b { color: var(--bs-body-color); }
.kc.kh .kc-h { filter: saturate(.55); }
.kc.kh .kc-it { cursor: default; }

/* ---------- Menu import / export & photos (v1.6) ---------- */
.io-head { display: flex; gap: 14px; align-items: flex-start; }
.io-ic { flex: 0 0 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; }
.io-ic.imp { background: rgba(242,107,58,.12); color: #f26b3a; }
.io-ic.exp { background: rgba(25,135,84,.12); color: #198754; }
.io-ic.pho { background: rgba(13,110,253,.1); color: #0d6efd; }
.io-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
    border: 2px dashed var(--bs-border-color); border-radius: 16px; padding: 26px 16px; cursor: pointer; transition: .15s; background: var(--bs-tertiary-bg); }
.io-drop.big { padding: 40px 16px; min-height: 190px; }
.io-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.io-drop > i { font-size: 34px; color: #f26b3a; }
.io-drop.over, .io-drop:hover { border-color: #f26b3a; background: rgba(242,107,58,.06); }
.io-drop.has { border-style: solid; border-color: #198754; }
.io-drop.has > i { color: #198754; }
.io-drop.busy { opacity: .6; pointer-events: none; }
.io-steps { display: grid; gap: 10px; }
.io-steps > div { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.io-steps b { flex: 0 0 24px; height: 24px; border-radius: 50%; background: #f26b3a; color: #fff; display: grid; place-items: center; font-size: .8rem; }
.io-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.io-stats span { min-width: 78px; padding: 8px 12px; border-radius: 12px; background: var(--bs-tertiary-bg); text-align: center; font-size: .78rem; color: var(--bs-secondary-color); }
.io-stats b { display: block; font-size: 1.35rem; color: var(--bs-body-color); line-height: 1.1; }
.io-stats .s-new b { color: #198754; } .io-stats .s-upd b { color: #0d6efd; } .io-stats .s-err b { color: #dc3545; }
.io-new { display: grid; gap: 6px; }
.io-tip { background: var(--bs-tertiary-bg); border-radius: 16px; padding: 16px; height: 100%; }
.io-result { display: grid; gap: 4px; }
.io-result .ok { color: #198754; font-weight: 600; }
.io-unm { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.io-unm span { font-size: .78rem; padding: 3px 8px; border-radius: 8px; background: rgba(255,193,7,.15); }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.ph-card { border-radius: 14px; overflow: hidden; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); transition: box-shadow .2s; }
.ph-card.flash { box-shadow: 0 0 0 3px rgba(25,135,84,.45); }
.ph-card.busy { opacity: .5; }
.ph-img { position: relative; aspect-ratio: 4/3; background: var(--bs-tertiary-bg); display: grid; place-items: center; }
.ph-img img { width: 100%; height: 100%; object-fit: cover; }
.ph-img > span { font-size: 38px; opacity: .6; }
.ph-card.none .ph-img { outline: 2px dashed rgba(242,107,58,.35); outline-offset: -8px; }
.ph-set, .ph-del { position: absolute; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center;
    background: rgba(0,0,0,.6); color: #fff; cursor: pointer; margin: 0; }
.ph-set { inset-inline-end: 8px; background: #f26b3a; }
.ph-del { inset-inline-start: 8px; }
.ph-name { padding: 8px 10px; }
.ph-name b { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-name small { color: var(--bs-secondary-color); font-size: .72rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 576px) { .ph-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .io-stats span { min-width: 64px; } }

/* ---------- Sign-up, billing & support (v2.0) ---------- */
.su-wrap { min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 32px 16px; background: radial-gradient(900px 500px at 0% 0%, #efe3f8 0%, #f7f6fb 60%); }
.su-box { width: 100%; max-width: 440px; background: #fff; border-radius: 20px; padding: 28px 24px; box-shadow: 0 20px 60px -30px rgba(60, 20, 90, .35); }
.su-box.wide { max-width: 860px; }
.su-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--brand); margin-bottom: 18px; }
.su-brand .sb-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.su-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.su-plan { position: relative; cursor: pointer; margin: 0; }
.su-plan input { position: absolute; opacity: 0; }
.su-plan-in { display: flex; flex-direction: column; gap: 2px; height: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 14px; transition: .15s; }
.su-plan input:checked + .su-plan-in { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(107, 44, 145, .1); }
.su-plan input:focus-visible + .su-plan-in { outline: 2px solid var(--brand); }
.su-plan-in em { position: absolute; top: -9px; inset-inline-end: 12px; font-style: normal; font-size: 11px; background: var(--accent); color: #fff; border-radius: 99px; padding: 1px 9px; font-weight: 600; }
.su-plan-in .su-price { font-size: 1.25rem; font-weight: 700; } .su-plan-in .su-price small { font-size: 12px; font-weight: 400; color: var(--muted); }
.su-plan-in ul { margin: 6px 0 0; padding-inline-start: 16px; font-size: 12px; color: var(--muted); }
.su-disclose { display: flex; gap: 10px; background: #f6f3fa; border: 1px solid #e6dcf0; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.su-disclose > i { color: var(--brand); font-size: 18px; }
.su-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-size: 30px; margin: 0 auto 12px; }
@media (max-width: 576px) { .su-box { padding: 22px 16px; } .su-wrap { padding: 16px 10px; } }
.saas-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 16px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.saas-bar.info { background: #eef4ff; color: #1e3a8a; } .saas-bar.warning { background: #fff7e6; color: #8a4b00; } .saas-bar.danger { background: #fdecec; color: #8b1a1a; } .saas-bar.success { background: #e9f8ef; color: #14532d; }
.saas-bar .btn { --bs-btn-padding-y: .2rem; --bs-btn-font-size: .8rem; }
.saas-bar .x { margin-inline-start: auto; background: none; border: 0; color: inherit; opacity: .6; }
.bill-hero { border-radius: 16px; padding: 20px; background: linear-gradient(135deg, #6b2c91, #8f46b8); color: #fff; }
.bill-hero .big { font-size: 1.6rem; font-weight: 700; }
.bill-hero .st-pill { background: rgba(255, 255, 255, .18); color: #fff; }
.st-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: #eef0f6; color: #475069; }
.st-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-trialing { background: #e8f1ff; color: #1d4ed8; }
.st-active, .st-approved, .st-succeeded, .st-paid, .st-answered, .st-sent { background: #e7f7ee; color: #15803d; }
.st-past_due, .st-pending, .st-unpaid, .st-open, .st-queued, .st-pending_card { background: #fff5e0; color: #b45309; }
.st-suspended, .st-failed, .st-rejected, .st-unverified, .st-inactive { background: #fdecec; color: #c62828; }
.st-expired, .st-void, .st-refunded, .st-closed, .st-partially_refunded { background: #eef0f6; color: #5b6276; }
.plan-pick { border: 2px solid var(--line); border-radius: 14px; padding: 14px; height: 100%; display: flex; flex-direction: column; }
.plan-pick.cur { border-color: var(--brand); background: var(--brand-50); }
.msg { border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; max-width: 760px; }
.msg.me { background: var(--brand-50); margin-inline-start: auto; } .msg.them { background: #f3f4f7; }
.msg small { color: var(--muted); display: block; font-size: 11.5px; margin-bottom: 3px; }
