/* ==========================================================================
   SMART CAFE LOUNGE ERP — Luxury Lounge design system
   Black · Gold · Dark Wood · Glassmorphism · Dark mode · Mobile first · RTL/LTR
   ========================================================================== */

@font-face { font-family: 'Tajawal'; font-weight: 400; font-display: swap; src: url('../fonts/tajawal-arabic-400-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 500; font-display: swap; src: url('../fonts/tajawal-arabic-500-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 700; font-display: swap; src: url('../fonts/tajawal-arabic-700-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 800; font-display: swap; src: url('../fonts/tajawal-arabic-800-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 400; font-display: swap; src: url('../fonts/tajawal-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: 'Tajawal'; font-weight: 500; font-display: swap; src: url('../fonts/tajawal-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: 'Tajawal'; font-weight: 700; font-display: swap; src: url('../fonts/tajawal-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: 'Tajawal'; font-weight: 800; font-display: swap; src: url('../fonts/tajawal-latin-800-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: 'Playfair Display'; font-weight: 600; font-display: swap; src: url('../fonts/playfair-display-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 700; font-display: swap; src: url('../fonts/playfair-display-latin-700-normal.woff2') format('woff2'); }

:root {
    --sc-black: #0a0907;
    --sc-ink: #12100c;
    --sc-coal: #1a1611;
    --sc-wood-1: #2a1b10;
    --sc-wood-2: #3b2615;
    --sc-wood-3: #5a3a1f;
    --sc-gold: #c9a227;
    --sc-gold-2: #e5c25e;
    --sc-gold-3: #f6e3a1;
    --sc-gold-dark: #8a6a17;
    --sc-text: #f2e9d8;
    --sc-muted: #a99d86;
    --sc-faint: #6f6553;
    --sc-glass: rgba(24, 20, 15, .62);
    --sc-glass-2: rgba(34, 28, 20, .72);
    --sc-border: rgba(201, 162, 39, .16);
    --sc-border-strong: rgba(201, 162, 39, .38);
    --sc-success: #3fbf7f;
    --sc-danger: #e5534b;
    --sc-warning: #e8a23a;
    --sc-info: #4aa3df;
    --sc-radius: 18px;
    --sc-radius-sm: 12px;
    --sc-shadow: 0 18px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 236, 179, .05);
    --sc-gold-grad: linear-gradient(135deg, #f6e3a1 0%, #e5c25e 28%, #c9a227 55%, #8a6a17 100%);
    --sc-sidebar-w: 270px;
    --sc-font: 'Tajawal', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --sc-display: 'Playfair Display', 'Tajawal', serif;

    --bs-body-bg: var(--sc-black);
    --bs-body-color: var(--sc-text);
    --bs-border-color: var(--sc-border);
    --bs-primary: var(--sc-gold);
    --bs-primary-rgb: 201, 162, 39;
    --bs-link-color: var(--sc-gold-2);
    --bs-link-hover-color: var(--sc-gold-3);
    --bs-secondary-color: var(--sc-muted);
    --bs-emphasis-color: #fff8e6;
    --bs-tertiary-bg: var(--sc-coal);
    --bs-font-sans-serif: var(--sc-font);
}

[data-bs-theme=dark] { --bs-body-bg: var(--sc-black); --bs-body-color: var(--sc-text); --bs-border-color: var(--sc-border); }

* { scrollbar-width: thin; scrollbar-color: var(--sc-wood-3) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--sc-wood-3); border-radius: 8px; }

html, body { min-height: 100%; }
body {
    font-family: var(--sc-font);
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(201, 162, 39, .10), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(90, 58, 31, .35), transparent 60%),
        repeating-linear-gradient(97deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 9px),
        linear-gradient(180deg, #0c0a08 0%, #0a0907 100%);
    background-attachment: fixed;
    color: var(--sc-text);
    -webkit-font-smoothing: antialiased;
    letter-spacing: .1px;
}
[dir=ltr] body { letter-spacing: .15px; }

h1, h2, h3, .display-font { font-family: var(--sc-display); letter-spacing: .3px; }
[dir=rtl] h1, [dir=rtl] h2, [dir=rtl] h3, [dir=rtl] .display-font { font-family: var(--sc-font); font-weight: 800; }
.text-gold { color: var(--sc-gold-2) !important; }
.text-muted, .text-secondary { color: var(--sc-muted) !important; }
.gold-gradient-text { background: var(--sc-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
a { text-decoration: none; }
::selection { background: rgba(201, 162, 39, .35); color: #fff; }

/* ---------- Glass ---------- */
.glass, .card {
    background: var(--sc-glass);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    box-shadow: var(--sc-shadow);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    color: var(--sc-text);
}
.card-header, .card-footer { background: transparent; border-color: var(--sc-border); }
.card-header { padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.card-title { font-weight: 700; margin: 0; font-size: 1.02rem; display: flex; align-items: center; gap: .55rem; }
.card-title i { color: var(--sc-gold); }
.card-body { padding: 1.25rem; }
.wood-panel {
    background:
        linear-gradient(180deg, rgba(10, 9, 7, .25), rgba(10, 9, 7, .55)),
        repeating-linear-gradient(92deg, rgba(0, 0, 0, .18) 0 3px, transparent 3px 11px),
        repeating-linear-gradient(88deg, rgba(255, 220, 160, .035) 0 1px, transparent 1px 7px),
        linear-gradient(135deg, var(--sc-wood-2), var(--sc-wood-1));
    border: 1px solid rgba(229, 194, 94, .18);
}
.gold-line { height: 1px; background: linear-gradient(90deg, transparent, var(--sc-gold), transparent); opacity: .5; }

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sc-sidebar-w); flex-shrink: 0; position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 1040;
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, rgba(18, 15, 11, .96), rgba(12, 10, 8, .98));
    border-inline-end: 1px solid var(--sc-border);
    transition: transform .3s ease;
}
.sidebar::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .45;
    background: repeating-linear-gradient(90deg, rgba(90, 58, 31, .08) 0 2px, transparent 2px 10px);
}
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; position: relative; }
.brand-mark {
    width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--sc-gold-grad); color: #1a1205; font-size: 1.35rem; box-shadow: 0 8px 24px rgba(201, 162, 39, .35);
}
.brand-name { font-family: var(--sc-display); font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
[dir=rtl] .brand-name { font-family: var(--sc-font); font-weight: 800; }
.brand-sub { font-size: .72rem; color: var(--sc-gold-2); letter-spacing: 2px; text-transform: uppercase; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .5rem .75rem 1.5rem; position: relative; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: 1.8px; color: var(--sc-faint); padding: 1.1rem .75rem .45rem; font-weight: 700; }
.sidebar .nav-link {
    display: flex; align-items: center; gap: .8rem; padding: .62rem .85rem; margin: 2px 0; border-radius: 12px;
    color: var(--sc-muted); font-weight: 500; font-size: .93rem; transition: all .18s ease; position: relative;
}
.sidebar .nav-link i { font-size: 1.1rem; width: 1.3rem; text-align: center; color: var(--sc-faint); transition: color .18s; }
.sidebar .nav-link:hover { color: var(--sc-text); background: rgba(201, 162, 39, .07); }
.sidebar .nav-link:hover i { color: var(--sc-gold-2); }
.sidebar .nav-link.active { color: #fff6dd; background: linear-gradient(90deg, rgba(201, 162, 39, .22), rgba(201, 162, 39, .04)); }
[dir=rtl] .sidebar .nav-link.active { background: linear-gradient(270deg, rgba(201, 162, 39, .22), rgba(201, 162, 39, .04)); }
.sidebar .nav-link.active i { color: var(--sc-gold-2); }
.sidebar .nav-link.active::before { content: ''; position: absolute; inset-inline-start: -.75rem; top: 20%; bottom: 20%; width: 3px; border-radius: 3px; background: var(--sc-gold-grad); }
.sidebar .nav-link .badge { margin-inline-start: auto; }
.sidebar-footer { padding: .9rem 1rem; border-top: 1px solid var(--sc-border); font-size: .75rem; color: var(--sc-faint); position: relative; }

.main { flex: 1; min-width: 0; margin-inline-start: var(--sc-sidebar-w); display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: .75rem;
    padding: .8rem 1.5rem; background: rgba(10, 9, 7, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--sc-border);
}
.topbar .page-title { font-weight: 700; font-size: 1.15rem; margin: 0; display: flex; align-items: center; gap: .6rem; }
.topbar .page-title i { color: var(--sc-gold); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: .4rem; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; position: relative;
    background: rgba(255, 255, 255, .03); border: 1px solid var(--sc-border); color: var(--sc-text); transition: all .18s;
}
.icon-btn:hover { border-color: var(--sc-border-strong); color: var(--sc-gold-2); background: rgba(201, 162, 39, .08); }
.icon-btn .dot { position: absolute; top: 6px; inset-inline-end: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: .65rem; line-height: 18px; background: var(--sc-danger); color: #fff; font-weight: 700; }
.rt-status { width: 9px; height: 9px; border-radius: 50%; background: var(--sc-faint); display: inline-block; box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.rt-status.ws { background: var(--sc-success); box-shadow: 0 0 10px var(--sc-success); }
.rt-status.poll { background: var(--sc-warning); box-shadow: 0 0 10px var(--sc-warning); }
.user-chip { display: flex; align-items: center; gap: .55rem; padding: .3rem .4rem .3rem .75rem; border-radius: 14px; border: 1px solid var(--sc-border); background: rgba(255,255,255,.02); color: var(--sc-text); }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--sc-gold-grad); color: #1a1205; font-weight: 800; font-size: .9rem; }
.content { padding: 1.5rem; flex: 1; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.55rem; margin: 0; }
.page-header .subtitle { color: var(--sc-muted); font-size: .9rem; margin-top: .25rem; }
.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    [dir=rtl] .sidebar { transform: translateX(100%); }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1035; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
    .main { margin-inline-start: 0; }
    .content { padding: 1rem; }
    .topbar { padding: .7rem 1rem; }
}

/* ---------- KPI ---------- */
.kpi { padding: 1.15rem 1.2rem; height: 100%; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; width: 140px; height: 140px; inset-inline-end: -40px; top: -50px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,39,.16), transparent 70%); }
.kpi-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; background: rgba(201, 162, 39, .12); color: var(--sc-gold-2); border: 1px solid var(--sc-border); }
.kpi-label { color: var(--sc-muted); font-size: .82rem; margin-top: .85rem; }
.kpi-value { font-size: 1.6rem; font-weight: 800; line-height: 1.2; margin-top: .15rem; }
.kpi-value small { font-size: .78rem; color: var(--sc-muted); font-weight: 500; }
.kpi-delta { font-size: .78rem; font-weight: 700; padding: .15rem .5rem; border-radius: 8px; }
.kpi-delta.up { color: var(--sc-success); background: rgba(63, 191, 127, .12); }
.kpi-delta.down { color: var(--sc-danger); background: rgba(229, 83, 75, .12); }
.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 230px; }

/* ---------- Buttons ---------- */
.btn { border-radius: 12px; font-weight: 600; padding: .55rem 1.05rem; transition: all .18s ease; }
.btn-sm { border-radius: 10px; padding: .35rem .7rem; }
.btn-lg { border-radius: 14px; padding: .8rem 1.4rem; }
.btn-gold, .btn-primary {
    background: var(--sc-gold-grad); border: none; color: #1b1406 !important; box-shadow: 0 8px 22px rgba(201, 162, 39, .22);
}
.btn-gold:hover, .btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(201, 162, 39, .32); }
.btn-gold:active, .btn-primary:active { transform: translateY(0); }
.btn-outline-gold { border: 1px solid var(--sc-border-strong); color: var(--sc-gold-2); background: rgba(201, 162, 39, .05); }
.btn-outline-gold:hover, .btn-outline-gold.active { background: rgba(201, 162, 39, .16); color: var(--sc-gold-3); border-color: var(--sc-gold); }
.btn-glass { background: rgba(255,255,255,.04); border: 1px solid var(--sc-border); color: var(--sc-text); }
.btn-glass:hover { background: rgba(255,255,255,.08); color: #fff; border-color: var(--sc-border-strong); }
.btn-success { background: linear-gradient(135deg, #4fd394, #2b9a63); border: none; }
.btn-danger { background: linear-gradient(135deg, #f0706a, #c03b34); border: none; }
.btn-warning { background: linear-gradient(135deg, #f3bb5d, #c9831f); border: none; color: #1b1406; }
.btn-info { background: linear-gradient(135deg, #6db9ec, #2f80bd); border: none; color: #fff; }

/* ---------- Forms ---------- */
.form-control, .form-select {
    background-color: rgba(8, 7, 5, .6); border: 1px solid var(--sc-border); color: var(--sc-text); border-radius: 12px; padding: .6rem .9rem;
}
.form-control:focus, .form-select:focus { background-color: rgba(8, 7, 5, .8); border-color: var(--sc-gold); color: #fff; box-shadow: 0 0 0 .2rem rgba(201, 162, 39, .18); }
.form-control::placeholder { color: var(--sc-faint); }
.form-control:disabled, .form-control[readonly] { background-color: rgba(255,255,255,.03); opacity: .8; }
.form-label { color: var(--sc-muted); font-size: .84rem; font-weight: 600; margin-bottom: .35rem; }
.form-check-input { background-color: rgba(8,7,5,.6); border-color: var(--sc-border-strong); }
.form-check-input:checked { background-color: var(--sc-gold); border-color: var(--sc-gold); }
.form-switch .form-check-input { width: 2.6em; height: 1.35em; }
.input-group-text { background: rgba(201, 162, 39, .08); border-color: var(--sc-border); color: var(--sc-gold-2); border-radius: 12px; }
.invalid-feedback { font-size: .78rem; }
.form-select option { background: var(--sc-ink); }

/* ---------- Tables / DataTables ---------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--sc-text); --bs-table-border-color: var(--sc-border); --bs-table-hover-bg: rgba(201, 162, 39, .05); --bs-table-striped-bg: rgba(255,255,255,.015); margin: 0; }
.table > thead th { color: var(--sc-gold-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; border-bottom-color: var(--sc-border-strong) !important; white-space: nowrap; background: rgba(201,162,39,.035); }
[dir=rtl] .table > thead th { letter-spacing: 0; text-transform: none; font-size: .84rem; }
.table td, .table th { vertical-align: middle; padding: .75rem .8rem; }
.table tfoot td, .table tfoot th { font-weight: 800; color: var(--sc-gold-3); border-top: 1px solid var(--sc-border-strong); }
.table-risk-high > td { background: rgba(229, 83, 75, .12) !important; color: #ffd2cf; }
.table-risk-high > td:first-child { box-shadow: inset 4px 0 0 var(--sc-danger); }
[dir=rtl] .table-risk-high > td:first-child { box-shadow: inset -4px 0 0 var(--sc-danger); }
.table-risk-medium > td { background: rgba(232, 162, 58, .08) !important; }
div.dt-container .dt-search input, div.dt-container .dt-length select { background: rgba(8,7,5,.6); border: 1px solid var(--sc-border); color: var(--sc-text); border-radius: 10px; padding: .35rem .7rem; }
div.dt-container .dt-paging .dt-paging-button { border-radius: 9px !important; }
div.dt-container .dt-paging .page-link { background: transparent; border-color: var(--sc-border); color: var(--sc-muted); border-radius: 9px; margin: 0 2px; }
div.dt-container .dt-paging .active .page-link { background: var(--sc-gold-grad); color: #1b1406; border: none; }
div.dt-container .dt-info { color: var(--sc-muted); font-size: .82rem; }
div.dt-processing > div:last-child > div { background: var(--sc-gold) !important; }
div.dt-container .dt-processing { background: var(--sc-glass-2); border: 1px solid var(--sc-border); border-radius: 12px; color: var(--sc-text); }
table.dataTable > tbody > tr.child ul.dtr-details > li { border-color: var(--sc-border); }
.table-actions { white-space: nowrap; display: flex; gap: .3rem; justify-content: flex-end; }

/* ---------- Badges ---------- */
.badge { font-weight: 700; border-radius: 8px; padding: .38em .65em; letter-spacing: .2px; }
.badge-soft-success { background: rgba(63,191,127,.14); color: #69dca1; border: 1px solid rgba(63,191,127,.25); }
.badge-soft-danger { background: rgba(229,83,75,.14); color: #ff8a84; border: 1px solid rgba(229,83,75,.28); }
.badge-soft-warning { background: rgba(232,162,58,.14); color: #f5c06d; border: 1px solid rgba(232,162,58,.28); }
.badge-soft-info { background: rgba(74,163,223,.14); color: #85c6f0; border: 1px solid rgba(74,163,223,.28); }
.badge-soft-primary { background: rgba(201,162,39,.14); color: var(--sc-gold-2); border: 1px solid rgba(201,162,39,.3); }
.badge-soft-secondary { background: rgba(255,255,255,.06); color: var(--sc-muted); border: 1px solid rgba(255,255,255,.1); }
.badge-soft-teal { background: rgba(32,201,151,.14); color: #5fe0bb; border: 1px solid rgba(32,201,151,.28); }
.badge-gold { background: var(--sc-gold-grad); color: #1b1406; }

/* ---------- Dropdowns / Modals / Offcanvas ---------- */
.dropdown-menu { background: var(--sc-glass-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--sc-border); border-radius: 14px; box-shadow: var(--sc-shadow); padding: .4rem; }
.dropdown-item { color: var(--sc-text); border-radius: 9px; padding: .5rem .75rem; }
.dropdown-item:hover, .dropdown-item:focus { background: rgba(201,162,39,.1); color: #fff; }
.dropdown-divider { border-color: var(--sc-border); }
.modal-content { background: linear-gradient(180deg, rgba(30, 25, 18, .97), rgba(16, 13, 10, .98)); border: 1px solid var(--sc-border-strong); border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal-header, .modal-footer { border-color: var(--sc-border); }
.modal-title { font-weight: 800; display: flex; align-items: center; gap: .6rem; }
.modal-title i { color: var(--sc-gold); }
.modal-backdrop.show { opacity: .7; backdrop-filter: blur(4px); }
.btn-close { filter: invert(1) sepia(1) saturate(4) hue-rotate(5deg); opacity: .7; }
.nav-tabs { border-color: var(--sc-border); gap: .25rem; }
.nav-tabs .nav-link { color: var(--sc-muted); border: none; border-radius: 12px 12px 0 0; padding: .65rem 1rem; font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--sc-gold-2); background: rgba(201,162,39,.08); border-bottom: 2px solid var(--sc-gold); }
.nav-pills .nav-link { color: var(--sc-muted); border-radius: 12px; font-weight: 600; }
.nav-pills .nav-link.active { background: var(--sc-gold-grad); color: #1b1406; }
.list-group-item { background: transparent; border-color: var(--sc-border); color: var(--sc-text); }
.alert { border-radius: 14px; border-width: 1px; }
.alert-warning { background: rgba(232,162,58,.1); border-color: rgba(232,162,58,.35); color: #f8d293; }
.alert-danger { background: rgba(229,83,75,.1); border-color: rgba(229,83,75,.35); color: #ffb3ae; }
.alert-success { background: rgba(63,191,127,.1); border-color: rgba(63,191,127,.35); color: #a6ebc8; }
.alert-info { background: rgba(74,163,223,.1); border-color: rgba(74,163,223,.35); color: #b2dcf6; }
.progress { background: rgba(255,255,255,.06); border-radius: 10px; }
.progress-bar { background: var(--sc-gold-grad); }
hr { border-color: var(--sc-border); opacity: 1; }

/* ---------- Notifications ---------- */
.notif-menu { width: 360px; max-height: 480px; overflow-y: auto; }
.notif-item { display: flex; gap: .7rem; padding: .65rem .7rem; border-radius: 10px; color: var(--sc-text); }
.notif-item:hover { background: rgba(201,162,39,.07); color: #fff; }
.notif-item .ni-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(201,162,39,.1); color: var(--sc-gold-2); flex-shrink: 0; }
.notif-item.unread .ni-title { font-weight: 800; }
.notif-item .ni-time { font-size: .72rem; color: var(--sc-faint); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: 100%; max-width: 440px; padding: 2.4rem 2.1rem; }
.auth-logo { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 1.1rem; display: grid; place-items: center; font-size: 2rem; background: var(--sc-gold-grad); color: #1a1205; box-shadow: 0 16px 40px rgba(201,162,39,.35); }
.auth-title { text-align: center; font-size: 1.6rem; margin-bottom: .25rem; }
.auth-sub { text-align: center; color: var(--sc-muted); margin-bottom: 1.6rem; font-size: .92rem; }
.auth-side { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.auth-side .orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }

/* ---------- POS ---------- */
body.pos-mode .content { padding: 0; }
.pos { display: grid; grid-template-columns: 1fr 420px; height: calc(100vh - 65px); }
.pos-catalog { display: flex; flex-direction: column; min-width: 0; border-inline-end: 1px solid var(--sc-border); }
.pos-toolbar { display: flex; gap: .6rem; padding: .9rem 1rem; align-items: center; flex-wrap: wrap; }
.pos-search { flex: 1; min-width: 200px; position: relative; }
.pos-search i { position: absolute; inset-inline-start: .9rem; top: 50%; transform: translateY(-50%); color: var(--sc-gold); }
.pos-search input { padding-inline-start: 2.5rem; height: 46px; }
.pos-cats { display: flex; gap: .5rem; overflow-x: auto; padding: 0 1rem .8rem; scrollbar-width: none; }
.pos-cats::-webkit-scrollbar { display: none; }
.pos-cat { flex-shrink: 0; padding: .55rem 1rem; border-radius: 12px; border: 1px solid var(--sc-border); background: rgba(255,255,255,.03); color: var(--sc-muted); font-weight: 600; display: flex; align-items: center; gap: .45rem; cursor: pointer; transition: all .15s; }
.pos-cat.active, .pos-cat:hover { color: #1b1406; background: var(--sc-gold-grad); border-color: transparent; }
.pos-grid { flex: 1; overflow-y: auto; padding: 0 1rem 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; align-content: start; }
.pos-item {
    position: relative; border-radius: 16px; padding: .9rem; cursor: pointer; text-align: start; user-select: none;
    background: linear-gradient(160deg, rgba(42, 30, 18, .75), rgba(18, 15, 11, .85)); border: 1px solid var(--sc-border);
    transition: transform .12s, border-color .12s, box-shadow .12s; min-height: 118px; display: flex; flex-direction: column;
}
.pos-item:hover { border-color: var(--sc-gold); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.4), 0 0 0 1px rgba(201,162,39,.2); }
.pos-item:active { transform: scale(.97); }
.pos-item .pi-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(201,162,39,.12); color: var(--sc-gold-2); font-size: 1.15rem; margin-bottom: .55rem; }
.pos-item img { width: 100%; height: 78px; object-fit: cover; border-radius: 11px; margin-bottom: .55rem; }
.pos-item .pi-name { font-weight: 700; font-size: .9rem; line-height: 1.3; flex: 1; }
.pos-item .pi-price { color: var(--sc-gold-2); font-weight: 800; margin-top: .35rem; }
.pos-item.unavailable { opacity: .35; pointer-events: none; }
.pos-cart { display: flex; flex-direction: column; background: rgba(12, 10, 8, .55); min-height: 0; }
.cart-head { padding: .9rem 1rem; border-bottom: 1px solid var(--sc-border); display: flex; flex-direction: column; gap: .55rem; }
.cart-lines { flex: 1; overflow-y: auto; padding: .5rem .75rem; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: .4rem; padding: .7rem .6rem; border-radius: 12px; border: 1px solid transparent; }
.cart-line:hover { background: rgba(255,255,255,.025); border-color: var(--sc-border); }
.cart-line .cl-name { font-weight: 700; font-size: .92rem; }
.cart-line .cl-meta { font-size: .76rem; color: var(--sc-muted); }
.cart-line .cl-total { font-weight: 800; color: var(--sc-gold-2); text-align: end; }
.qty-ctl { display: inline-flex; align-items: center; gap: .3rem; background: rgba(255,255,255,.04); border: 1px solid var(--sc-border); border-radius: 10px; padding: 2px; }
.qty-ctl button { width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent; color: var(--sc-gold-2); font-weight: 800; }
.qty-ctl button:hover { background: rgba(201,162,39,.15); }
.qty-ctl span { min-width: 26px; text-align: center; font-weight: 700; }
.cart-totals { padding: .9rem 1rem; border-top: 1px solid var(--sc-border); background: rgba(8,7,5,.5); }
.cart-totals .row-t { display: flex; justify-content: space-between; font-size: .9rem; color: var(--sc-muted); padding: .15rem 0; }
.cart-totals .grand { font-size: 1.45rem; font-weight: 800; color: var(--sc-text); margin-top: .35rem; }
.cart-totals .grand span:last-child { color: var(--sc-gold-2); }
.cart-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; padding: 0 1rem 1rem; background: rgba(8,7,5,.5); }
.cart-actions .btn-pay { grid-column: 1 / -1; height: 58px; font-size: 1.15rem; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.pay-method { border: 1px solid var(--sc-border); border-radius: 14px; padding: .8rem .5rem; text-align: center; cursor: pointer; background: rgba(255,255,255,.03); transition: all .15s; font-weight: 700; font-size: .85rem; }
.pay-method i { display: block; font-size: 1.5rem; color: var(--sc-gold-2); margin-bottom: .3rem; }
.pay-method.active, .pay-method:hover { border-color: var(--sc-gold); background: rgba(201,162,39,.12); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.keypad button { height: 52px; border-radius: 12px; border: 1px solid var(--sc-border); background: rgba(255,255,255,.04); color: var(--sc-text); font-size: 1.2rem; font-weight: 700; }
.keypad button:hover { background: rgba(201,162,39,.12); }
.split-line { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: 10px; background: rgba(255,255,255,.03); margin-bottom: .4rem; }
@media (max-width: 1199.98px) { .pos { grid-template-columns: 1fr 360px; } }
@media (max-width: 991.98px) {
    .pos { grid-template-columns: 1fr; height: auto; }
    .pos-cart { position: fixed; inset-inline: 0; bottom: 0; z-index: 1045; max-height: 85vh; border-radius: 22px 22px 0 0; border-top: 1px solid var(--sc-border-strong); transform: translateY(calc(100% - 74px)); transition: transform .3s; background: rgba(14,12,9,.98); }
    .pos-cart.open { transform: none; }
    .pos-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); padding-bottom: 100px; }
}

/* ---------- KDS ---------- */
body.kds-mode { background: #070605; }
.kds-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; padding: 1rem; align-items: start; }
.kds-ticket { border-radius: 18px; overflow: hidden; border: 1px solid var(--sc-border); background: rgba(20,17,12,.9); animation: pop .35s ease; }
.kds-ticket .kt-head { padding: .8rem 1rem; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, rgba(201,162,39,.2), rgba(201,162,39,.04)); border-bottom: 1px solid var(--sc-border); }
.kds-ticket .kt-no { font-weight: 800; font-size: 1.15rem; }
.kds-ticket .kt-timer { font-weight: 800; font-variant-numeric: tabular-nums; padding: .2rem .6rem; border-radius: 9px; background: rgba(255,255,255,.06); }
.kds-ticket.late .kt-timer { background: var(--sc-danger); color: #fff; animation: pulse 1.2s infinite; }
.kds-ticket.warn .kt-timer { background: var(--sc-warning); color: #1b1406; }
.kds-ticket .kt-items { padding: .6rem 1rem; }
.kds-ticket .kt-item { display: flex; gap: .7rem; padding: .45rem 0; border-bottom: 1px dashed var(--sc-border); font-size: 1.02rem; }
.kds-ticket .kt-item:last-child { border: none; }
.kds-ticket .kt-qty { font-weight: 800; color: var(--sc-gold-2); min-width: 30px; }
.kds-ticket .kt-note { font-size: .82rem; color: var(--sc-warning); }
.kds-ticket .kt-actions { padding: .7rem 1rem 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.kds-ticket.status-preparing { border-color: rgba(74,163,223,.5); }
.kds-ticket.status-pending { border-color: rgba(232,162,58,.6); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- Floor ---------- */
.floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.table-tile { border-radius: 18px; padding: 1rem; text-align: center; cursor: pointer; border: 1px solid var(--sc-border); background: rgba(20,17,12,.7); transition: all .18s; position: relative; min-height: 132px; }
.table-tile:hover { transform: translateY(-2px); border-color: var(--sc-border-strong); }
.table-tile .tt-icon { font-size: 2rem; color: var(--sc-gold-2); }
.table-tile .tt-name { font-weight: 800; margin-top: .3rem; }
.table-tile .tt-meta { font-size: .78rem; color: var(--sc-muted); }
.table-tile.status-occupied { border-color: rgba(229,83,75,.55); background: linear-gradient(160deg, rgba(229,83,75,.14), rgba(20,17,12,.75)); }
.table-tile.status-reserved { border-color: rgba(74,163,223,.55); background: linear-gradient(160deg, rgba(74,163,223,.12), rgba(20,17,12,.75)); }
.table-tile.status-cleaning { border-color: rgba(232,162,58,.55); background: linear-gradient(160deg, rgba(232,162,58,.12), rgba(20,17,12,.75)); }
.table-tile .tt-call { position: absolute; top: 8px; inset-inline-end: 8px; animation: pulse 1s infinite; }
.call-card { border-inline-start: 4px solid var(--sc-warning); }

/* ---------- Games ---------- */
.game-card { padding: 1.1rem; border-radius: 18px; position: relative; overflow: hidden; height: 100%; }
.game-card .gc-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: rgba(201,162,39,.12); color: var(--sc-gold-2); }
.game-card .gc-timer { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.game-card .gc-amount { color: var(--sc-gold-2); font-weight: 800; font-size: 1.2rem; }
.game-card.in_use { border-color: rgba(63,191,127,.5); box-shadow: 0 0 0 1px rgba(63,191,127,.18), var(--sc-shadow); }
.game-card.paused { border-color: rgba(232,162,58,.5); }
.game-card.maintenance { opacity: .6; }

/* ---------- Public QR menu ---------- */
body.menu-mode { background: radial-gradient(800px 400px at 50% -10%, rgba(201,162,39,.16), transparent 60%), #0a0907; }
.menu-hero { padding: 1.6rem 1.1rem 1.1rem; text-align: center; position: relative; }
.menu-hero .mh-logo { width: 64px; height: 64px; margin: 0 auto .6rem; border-radius: 20px; display: grid; place-items: center; font-size: 1.8rem; background: var(--sc-gold-grad); color: #1a1205; }
.menu-hero h1 { font-size: 1.4rem; margin: 0; }
.menu-hero .table-chip { display: inline-flex; align-items: center; gap: .4rem; margin-top: .6rem; padding: .35rem .85rem; border-radius: 20px; border: 1px solid var(--sc-border-strong); color: var(--sc-gold-2); font-weight: 700; font-size: .85rem; }
.menu-cats { position: sticky; top: 0; z-index: 20; display: flex; gap: .5rem; overflow-x: auto; padding: .7rem 1rem; background: rgba(10,9,7,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--sc-border); scrollbar-width: none; }
.menu-cats::-webkit-scrollbar { display: none; }
.menu-section { padding: 1rem; }
.menu-section h2 { font-size: 1.15rem; margin: .4rem 0 .9rem; display: flex; align-items: center; gap: .5rem; }
.menu-item { display: flex; gap: .85rem; padding: .8rem; border-radius: 16px; margin-bottom: .7rem; }
.menu-item .mi-img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: rgba(201,162,39,.08); display: grid; place-items: center; color: var(--sc-gold-2); font-size: 1.8rem; }
.menu-item .mi-body { flex: 1; min-width: 0; }
.menu-item .mi-name { font-weight: 800; }
.menu-item .mi-desc { font-size: .8rem; color: var(--sc-muted); margin: .15rem 0 .4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-item .mi-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.menu-item .mi-price { color: var(--sc-gold-2); font-weight: 800; }
.menu-item .mi-cal { font-size: .7rem; color: var(--sc-faint); }
.menu-fab { position: fixed; bottom: 1rem; inset-inline: 1rem; z-index: 40; display: flex; gap: .6rem; }
.menu-fab .btn { flex: 1; height: 56px; font-size: 1.05rem; border-radius: 16px; }
.menu-bottom-space { height: 100px; }
.track-steps { display: flex; justify-content: space-between; position: relative; margin: 1.5rem 0; }
.track-steps::before { content: ''; position: absolute; top: 20px; inset-inline: 8%; height: 2px; background: var(--sc-border); }
.track-step { position: relative; z-index: 1; text-align: center; flex: 1; font-size: .75rem; color: var(--sc-faint); }
.track-step .ts-dot { width: 42px; height: 42px; border-radius: 50%; margin: 0 auto .4rem; display: grid; place-items: center; background: var(--sc-ink); border: 2px solid var(--sc-border); font-size: 1.1rem; }
.track-step.done { color: var(--sc-gold-2); }
.track-step.done .ts-dot { background: var(--sc-gold-grad); color: #1b1406; border-color: transparent; }
.track-step.current .ts-dot { box-shadow: 0 0 0 6px rgba(201,162,39,.18); animation: pulse 1.6s infinite; }

/* ---------- Ready popup ---------- */
.ready-overlay { position: fixed; inset: 0; z-index: 2000; display: none; place-items: center; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); padding: 1.5rem; }
.ready-overlay.show { display: grid; animation: pop .35s ease; }
.ready-card { max-width: 380px; width: 100%; text-align: center; padding: 2rem 1.5rem; border-radius: 26px; }
.ready-card .rc-icon { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 3rem; background: var(--sc-gold-grad); color: #1b1406; box-shadow: 0 0 0 12px rgba(201,162,39,.15), 0 0 60px rgba(201,162,39,.4); }
.ready-card h2 { font-size: 1.5rem; }

/* ---------- Misc ---------- */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--sc-muted); }
.empty-state i { font-size: 3rem; color: var(--sc-wood-3); display: block; margin-bottom: .75rem; }
.stat-mini { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px dashed var(--sc-border); font-size: .9rem; }
.stat-mini:last-child { border: none; }
.stat-mini span:last-child { font-weight: 700; }
.perm-matrix th { position: sticky; top: 0; background: var(--sc-ink); z-index: 2; }
.perm-module { color: var(--sc-gold-2); font-weight: 800; background: rgba(201,162,39,.05); }
.code-block { background: #050403; border: 1px solid var(--sc-border); border-radius: 12px; padding: 1rem; font-size: .78rem; max-height: 420px; overflow: auto; direction: ltr; text-align: left; color: #d8cfbd; white-space: pre-wrap; word-break: break-all; }
.toast-container { z-index: 2100; }
.swal2-popup { background: linear-gradient(180deg, #1e1912, #110e0a) !important; color: var(--sc-text) !important; border: 1px solid var(--sc-border-strong); border-radius: 22px !important; }
.swal2-title, .swal2-html-container { color: var(--sc-text) !important; font-family: var(--sc-font); }
.swal2-confirm { background: var(--sc-gold-grad) !important; color: #1b1406 !important; border-radius: 12px !important; font-weight: 700 !important; }
.swal2-cancel, .swal2-deny { border-radius: 12px !important; font-weight: 700 !important; }
.swal2-input, .swal2-textarea, .swal2-select { background: rgba(8,7,5,.6) !important; color: var(--sc-text) !important; border: 1px solid var(--sc-border) !important; border-radius: 12px !important; }
.swal2-toast { background: var(--sc-glass-2) !important; backdrop-filter: blur(12px); }
.qr-print-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.qr-card { text-align: center; padding: 1.2rem; border-radius: 18px; }
.qr-card .qr-box { background: #fff; padding: 10px; border-radius: 14px; display: inline-block; }
.qr-card .qr-box img, .qr-card .qr-box svg { width: 170px; height: 170px; display: block; }
.risk-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.risk-dot.high { background: var(--sc-danger); box-shadow: 0 0 8px var(--sc-danger); }
.risk-dot.medium { background: var(--sc-warning); }
.risk-dot.low { background: var(--sc-success); }
.cursor-pointer { cursor: pointer; }
.ltr { direction: ltr; unicode-bidi: embed; }
.fw-800 { font-weight: 800 !important; }
.min-w-0 { min-width: 0; }
.img-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--sc-border); }
.color-chip { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: middle; border: 1px solid rgba(255,255,255,.2); }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.08), rgba(255,255,255,.03)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media print {
    .sidebar, .topbar, .no-print, .btn { display: none !important; }
    .main { margin: 0 !important; }
    body { background: #fff !important; color: #000 !important; }
    .card, .glass { background: #fff !important; color: #000 !important; box-shadow: none !important; border: 1px solid #ccc !important; backdrop-filter: none !important; }
}

/* ---------- Reports / misc additions ---------- */
[dir="rtl"] .rtl-flip { display: inline-block; transform: scaleX(-1); }
.report-tile { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; color: inherit; }
.report-tile:hover { transform: translateY(-4px); border-color: var(--sc-gold); box-shadow: 0 14px 40px rgba(201, 162, 39, .15); }
.report-tile h5 { color: var(--sc-text); }
.report-table td, .report-table th { white-space: nowrap; }
.insight { border-inline-start: 4px solid var(--sc-border); padding: .85rem 1rem; border-radius: 12px; background: rgba(255,255,255,.02); }
.insight.sev-positive { border-color: var(--sc-success); }
.insight.sev-warning { border-color: #e8a23a; }
.insight.sev-critical { border-color: var(--sc-danger); background: rgba(229, 83, 75, .06); }
.insight.sev-info { border-color: var(--sc-gold); }
.perm-module { border: 1px solid var(--sc-border); border-radius: 14px; padding: 1rem; height: 100%; }
.perm-module h6 { color: var(--sc-gold-2); font-weight: 800; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem 0; border-bottom: 1px dashed rgba(201,162,39,.08); }
.perm-row:last-child { border-bottom: 0; }
.tri-state .btn { padding: .15rem .5rem; font-size: .75rem; }
.diff-old { color: var(--sc-danger); text-decoration: line-through; }
.diff-new { color: var(--sc-success); }
.code-block { background: #0b0907; border: 1px solid var(--sc-border); border-radius: 10px; padding: .75rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-all; max-height: 380px; overflow: auto; color: #e9dfc6; }
.check-row { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem 0; border-bottom: 1px solid rgba(201,162,39,.08); }
.check-row:last-child { border-bottom: 0; }
.check-row .bi { font-size: 1.2rem; }
.step-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; border: 2px solid var(--sc-border); flex: none; }
.step-dot.done { background: var(--sc-success); border-color: var(--sc-success); color: #fff; }
.step-dot.active { border-color: var(--sc-gold); color: var(--sc-gold-2); }
