/* ==========================================================
   SCARFACE LOUNGE & CAFÉ POS DASHBOARD
   100% PURE LIGHT THEME (Ergonomic for POS, PC, Tablet, Phone)
   Native RTL Support | High Contrast | Crisp Typography
   ========================================================== */

:root {
    /* ==========================================================
       SCARFACE 60-30-10 HARMONY PALETTE (نظام ألوان 60-30-10 المتناسق)
       60% أبيض على تبني فاتح جداً | 30% بني قهوة وإسبريسو | 10% أبيض ناصع
       ========================================================== */
    /* 60% Dominant Base: Very Light Straw / Wheat Off-White */
    --bg-base: #f7f4ee;                 /* أبيض على تبني فاتح جداً (خلفية المنظومة العامة 60%) */
    --bg-surface-elevated: #ede7dc;     /* تبني ناعم للحاويات وبوكسات التوقيت */
    --border-subtle: #e5ded2;           /* حدود تبنية ناعمة */
    --border-accent: #c9bea8;           /* حدود تأكيد دافئة */

    /* 30% Secondary: Rich Espresso Coffee Brown */
    --coffee-brown: #36261e;            /* بني القهوة والإسبريسو الفاخر (30%) */
    --coffee-brown-hover: #241812;
    --coffee-brown-light: rgba(54, 38, 30, 0.08);
    --coffee-brown-glow: rgba(54, 38, 30, 0.2);
    --sidebar-bg: #36261e;              /* القائمة الجانبية بلون القهوة الداكن الفاخر */
    --text-primary: #36261e;            /* العناوين والنصوص الرئيسية بالبني الفاخر */
    --text-secondary: #6e584c;          /* النصوص الفرعية بلون القهوة المحمصة */
    --text-muted: #9c877a;              /* التلميحات والأيقونات الهادئة */

    /* 10% Accent: Crisp Pure White */
    --pure-white: #ffffff;              /* أبيض ناصع (10%) للبطاقات والنوافذ والأزرار الكبسولية */
    --bg-surface: #ffffff;              /* أسطح بيضاء ناصعة */
    --bg-card: #ffffff;                 /* بطاقات الطاولات ناصعة البياض */

    /* Functional Accents */
    --scarface-red: #c2410c;            /* تيراكوتا دافئ للإنهاء والعمليات النشطة */
    --scarface-red-hover: #9a3412;
    --scarface-red-light: rgba(194, 65, 12, 0.12);
    --scarface-red-glow: rgba(194, 65, 12, 0.22);

    --status-free: #15803d;             /* أخضر عشبي فاخر للطاولات المتاحة */
    --status-free-light: rgba(21, 128, 61, 0.12);
    --status-free-glow: rgba(21, 128, 61, 0.2);

    --status-busy: #c2410c;             /* مشغولة */
    --status-busy-light: rgba(194, 65, 12, 0.12);
    --status-busy-glow: rgba(194, 65, 12, 0.2);

    --status-warning: #b45309;
    --status-warning-light: rgba(180, 83, 9, 0.12);

    --status-expired: #b91c1c;
    --status-expired-light: rgba(185, 28, 28, 0.12);

    --gold: #b45309;
    --gold-light: rgba(180, 83, 9, 0.12);
    --gold-glow: rgba(180, 83, 9, 0.2);

    --neon-cyan: #0284c7;
    --neon-cyan-light: rgba(2, 132, 199, 0.12);

    --neon-purple: #7c3aed;
    --neon-purple-light: rgba(124, 58, 237, 0.12);

    /* Typography & Metrics */
    --app-font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --app-base-font-size: 14px;
    --sidebar-width: 270px;
    --topbar-height: 72px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(54, 38, 30, 0.06), 0 1px 2px rgba(54, 38, 30, 0.04);
    --shadow-card: 0 4px 16px rgba(54, 38, 30, 0.06), 0 1px 3px rgba(54, 38, 30, 0.03);
    --shadow-elevated: 0 14px 35px rgba(54, 38, 30, 0.12), 0 4px 10px rgba(54, 38, 30, 0.05);
}

/* Reset & Global */
html {
    font-size: var(--app-base-font-size, 14px); /* Scaled base font size controlled dynamically */
    -webkit-text-size-adjust: 100%;
    font-variant-numeric: tabular-nums lining-nums;
    -webkit-font-feature-settings: "lnum" 1, "tnum" 1;
    font-feature-settings: "lnum" 1, "tnum" 1;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: var(--app-font-family);
}

button, input, select, textarea, optgroup, option {
    font-family: var(--app-font-family);
}

/* ==========================================================
   FONT AWESOME ICONS PROTECTION
   Strictly preserve icon font families from universal font rules
   ========================================================== */
.fa, .fas, .fa-solid, .far, .fa-regular {
    font-family: "Font Awesome 6 Free" !important;
}

.fab, .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
}

.fa::before, .fas::before, .fa-solid::before, .far::before, .fa-regular::before,
.fab::before, .fa-brands::before,
[class*="fa-"]::before {
    font-family: inherit !important;
}

body {
    font-size: 1rem;
    font-variant-numeric: tabular-nums lining-nums;
    -webkit-font-feature-settings: "lnum" 1, "tnum" 1;
    font-feature-settings: "lnum" 1, "tnum" 1;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--border-accent);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scarface-red);
}

/* App Layout Grid */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

/* ==========================================================
   SIDEBAR (RIGHT RTL)
   ========================================================== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 95;
    opacity: 0;
    transition: opacity 0.25s ease;
}

@media (max-width: 900px) {
    .sidebar-backdrop.active {
        display: block;
        opacity: 1;
    }
}

.brand {
    padding: 16px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, var(--scarface-red-light) 0%, transparent 100%);
    position: relative;
    min-height: 74px;
}

.brand-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.brand-logo {
    width: 44px;
    height: 44px;
    background: #111;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.brand-text h2 {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    line-height: 1.1;
    white-space: nowrap;
}

.brand-text span {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 700;
    white-space: nowrap;
}

/* Sidebar Toggle Arrow Button */
.sidebar-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    background: var(--scarface-red);
    color: #ffffff;
    border-color: var(--scarface-red);
    box-shadow: 0 4px 12px var(--scarface-red-glow);
    transform: scale(1.04);
}

.sidebar-toggle-btn:active {
    transform: scale(0.92);
}

/* Desktop Sidebar Collapse Engine */
@media (min-width: 901px) {
    .mobile-menu-toggle,
    body.sidebar-collapsed .mobile-menu-toggle {
        display: none !important;
    }

    body.sidebar-collapsed .sidebar {
        right: calc(-1 * var(--sidebar-width));
        box-shadow: none;
    }

    body.sidebar-collapsed .main-content {
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body.sidebar-collapsed .topbar {
        padding-right: 60px;
    }

    body.sidebar-collapsed .sidebar-toggle-btn {
        position: absolute;
        left: -42px;
        top: 15px;
        width: 42px;
        height: 42px;
        border-radius: 10px 0 0 10px;
        background: #ffffff;
        border: 1.5px solid var(--border-accent);
        border-right: none;
        color: var(--scarface-red);
        box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.1);
        z-index: 105;
        font-size: 1.05rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body.sidebar-collapsed .sidebar-toggle-btn:hover {
        background: var(--scarface-red);
        color: #ffffff;
        border-color: var(--scarface-red);
        left: -46px;
        width: 46px;
    }
}

.nav-menu {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    width: 100%;
    min-height: 46px;
}

.nav-item i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    color: var(--text-muted);
    transition: var(--transition);
}

/* Sidebar Nav Item Hover - RED HOVER as requested by AN0N */
.nav-item:hover {
    color: #dc2626 !important;
    background: rgba(220, 38, 38, 0.08) !important;
    border-color: rgba(220, 38, 38, 0.3) !important;
    transform: translateX(-3px);
}

.nav-item:hover i {
    color: #dc2626 !important;
    transform: scale(1.12);
}

.nav-item:hover span {
    color: #dc2626 !important;
}

.nav-item:hover .badge {
    background: rgba(220, 38, 38, 0.15) !important;
    color: #dc2626 !important;
}

.nav-item.active {
    color: var(--coffee-brown);
    background: #ffffff;
    border: 1.5px solid var(--coffee-brown);
    box-shadow: 0 3px 10px rgba(54, 38, 30, 0.12);
    font-weight: 800;
}

.nav-item.active i {
    color: var(--coffee-brown);
}

.nav-item.active:hover {
    color: #dc2626 !important;
    background: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25) !important;
    transform: translateX(-3px);
}

.nav-item.active:hover i {
    color: #dc2626 !important;
}

.nav-item.active:hover span {
    color: #dc2626 !important;
}

.nav-item .badge {
    margin-right: auto;
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-item.active .badge {
    background: var(--scarface-red);
    color: #ffffff;
}

.nav-item .badge.warning {
    background: var(--gold-light);
    color: var(--gold);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-surface);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface-elevated);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.user-chip .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--scarface-red-light);
    color: var(--scarface-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.user-chip .user-info {
    display: flex;
    flex-direction: column;
}

.user-chip strong {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 800;
}

.user-chip small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ==========================================================
   MAIN CONTENT & TOPBAR
   ========================================================== */
.main-content {
    flex: 1 1 0%;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-base);
    transition: margin-right 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
}

.topbar {
    height: var(--topbar-height);
    background-color: var(--pure-white);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    width: 100%;
    min-width: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-title {
    min-width: 0;
}

.page-title h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-title p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.live-clock {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface-elevated);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: var(--app-font-family) !important;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1px;
    white-space: nowrap;
}

.content-container {
    padding: 24px 26px;
    flex: 1;
    width: 100%;
    min-width: 0;
}

/* Tab Panes */
.tab-pane {
    display: none;
    animation: fadeIn 0.25s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   BUTTONS & TOUCH CONTROLS (POS ERGONOMICS)
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    min-height: 42px;
    user-select: none;
}

.btn:active, .action-btn-primary:active {
    transform: scale(0.98);
}

.btn-primary, .action-btn-primary {
    background: var(--coffee-brown);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--coffee-brown-glow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    min-height: 42px;
}

.btn-primary:hover, .action-btn-primary:hover {
    background: var(--coffee-brown-hover);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.35);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-accent);
}

.btn-secondary:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--coffee-cream);
    color: #ffffff;
}

.btn-success {
    background: var(--status-free);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--status-free-glow);
}

.btn-success:hover {
    background: #047857;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-accent);
}

.btn-outline:hover {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
}

.btn-sm {
    padding: 7px 12px;
    font-size: 0.82rem;
    min-height: 36px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-danger {
    background: var(--scarface-red-light);
    color: var(--scarface-red);
    border: 1px solid rgba(211, 47, 47, 0.25);
}

.btn-danger:hover {
    background: var(--scarface-red);
    color: #ffffff;
}

/* ==========================================================
   TAB 1: TABLES SECTION (POS CARDS & STATUS)
   ========================================================== */
.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 14px;
}

.filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    overflow-x: auto;
    padding-bottom: 4px;
}

.pill {
    padding: 8px 16px;
    background: var(--pure-white);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    min-height: 38px;
    box-shadow: var(--shadow-sm);
}

.pill:hover {
    border-color: var(--border-accent);
    color: var(--text-primary);
}

.pill.active {
    background: var(--coffee-brown);
    color: #ffffff;
    border-color: var(--coffee-brown);
    font-weight: 800;
    box-shadow: 0 4px 14px var(--coffee-brown-glow);
}

.status-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.free { background-color: var(--status-free); }
.dot.busy { background-color: var(--status-busy); }
.dot.expired { background-color: var(--status-expired); animation: pulseAlert 1.2s infinite; }

@keyframes pulseAlert {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

/* Tables Grid & Cards */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.table-card {
    background: var(--pure-white);
    border: 1.5px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    padding: 20px;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-height: 380px;
    box-sizing: border-box;
}

.table-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--border-accent);
}

/* Category Accent Strip - Cleaned: No colored top lines */
.table-card.type-vip,
.table-card.type-gaming,
.table-card.type-scooter,
.table-card.type-snooker,
.table-card.type-cafe {
    border-top: 1px solid var(--border-subtle);
}

/* Status Modes - Clean neutral borders without colored frames */
.table-card.status-busy {
    border-color: var(--border-subtle);
    background: var(--bg-card);
}

.table-card.status-expired {
    border-color: var(--border-subtle);
    background: var(--bg-card);
}

@keyframes alertBorder {
    from { border-color: rgba(220, 38, 38, 0.4); }
    to { border-color: rgba(220, 38, 38, 1); }
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    min-height: 48px;
    box-sizing: border-box;
}

.table-identity h3 {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.type-tag {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.tag-gaming { background: var(--scarface-red-light); color: var(--scarface-red); }
.tag-scooter, .tag-snooker { background: var(--neon-cyan-light); color: var(--neon-cyan); }
.tag-vip { background: var(--gold-light); color: var(--gold); }
.tag-cafe { background: var(--neon-purple-light); color: var(--neon-purple); }

.table-status-badge {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.status-badge-free { background: var(--status-free-light); color: var(--status-free); border: 1px solid rgba(5, 150, 105, 0.2); }
.status-badge-busy { background: var(--status-busy-light); color: var(--status-busy); border: 1px solid rgba(2, 132, 199, 0.25); }
.status-badge-expired { background: var(--scarface-red-light); color: var(--status-expired); border: 1px solid rgba(220, 38, 38, 0.4); font-weight: 900; }

/* Timer Display Box */
.timer-display-box {
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    min-height: 110px;
    height: 110px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.timer-digits {
    font-family: var(--app-font-family) !important;
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.table-card.status-busy .timer-digits {
    color: var(--neon-cyan);
}

.table-card.status-expired .timer-digits {
    color: var(--scarface-red);
}

.timer-label {
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-bar-wrap {
    display: none !important;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--scarface-red));
    width: 0%;
    transition: width 1s linear;
}

/* Card Cost & Summary */
.session-financials {
    display: flex;
    justify-content: space-between;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 0.84rem;
    min-height: 62px;
    height: 62px;
    box-sizing: border-box;
    align-items: center;
}

.session-financials .fin-item {
    display: flex;
    flex-direction: column;
}

.session-financials .fin-item span {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.session-financials .fin-item strong {
    color: var(--text-primary);
    font-weight: 800;
}

.session-financials .fin-item.total strong {
    color: var(--scarface-red);
    font-size: 0.95rem;
}

/* Table Card Action Buttons */
.card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.card-actions .btn {
    flex: 1;
}

/* ==========================================================
   DATA TABLES (INVENTORY & ARCHIVE)
   ========================================================== */
.card-surface {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 22px;
    box-shadow: var(--shadow-card);
}

.section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 14px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    min-width: 280px;
    min-height: 44px;
}

.search-box i {
    color: var(--text-muted);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    width: 100%;
    outline: none;
    font-weight: 600;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.9rem;
}

.data-table th {
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    padding: 14px 16px;
    font-weight: 800;
    border-bottom: 2px solid var(--border-subtle);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--bg-surface-elevated);
}

.badge-stock {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.74rem;
    font-weight: 800;
}
.badge-stock.in-stock { background: var(--status-free-light); color: var(--status-free); }
.badge-stock.low-stock { background: var(--gold-light); color: var(--gold); }
.badge-stock.out-of-stock { background: var(--scarface-red-light); color: var(--scarface-red); }

/* ==========================================================
   UNIVERSAL TABLE BADGES & STATUS CHIPS (Modern Soft-Pill)
   ========================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 8px;
    line-height: 1.3;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: var(--transition);
}

.badge i {
    font-size: 0.78rem;
}

/* Category Badges for Expenses */
.badge-cat-purchases {
    background: rgba(2, 132, 199, 0.08) !important;
    color: #0284c7 !important;
    border: 1px solid rgba(2, 132, 199, 0.25) !important;
}
.badge-cat-bills {
    background: rgba(217, 119, 6, 0.08) !important;
    color: #b45309 !important;
    border: 1px solid rgba(217, 119, 6, 0.25) !important;
}
.badge-cat-maintenance {
    background: rgba(220, 38, 38, 0.08) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.25) !important;
}
.badge-cat-salaries {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
}
.badge-cat-rent {
    background: rgba(139, 92, 246, 0.08) !important;
    color: #7c3aed !important;
    border: 1px solid rgba(139, 92, 246, 0.25) !important;
}
.badge-cat-marketing {
    background: rgba(236, 72, 153, 0.08) !important;
    color: #db2777 !important;
    border: 1px solid rgba(236, 72, 153, 0.25) !important;
}
.badge-cat-general {
    background: rgba(100, 116, 139, 0.08) !important;
    color: #475569 !important;
    border: 1px solid rgba(100, 116, 139, 0.25) !important;
}

/* Status Badges for Invoices & Operations */
.badge-cancelled {
    background: rgba(220, 38, 38, 0.08) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.25) !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
}
.badge-paid {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
}

/* ==========================================================
   USERS SECTION
   ========================================================== */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.user-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.user-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.user-card .user-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--scarface-red-light);
    border: 2px solid var(--scarface-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--scarface-red);
    margin-bottom: 14px;
}

.user-card h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.user-role-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.role-admin { background: var(--scarface-red-light); color: var(--scarface-red); }
.role-cashier { background: var(--neon-cyan-light); color: var(--neon-cyan); }
.role-barista { background: var(--gold-light); color: var(--gold); }
.role-supervisor { background: var(--neon-purple-light); color: var(--neon-purple); }

.user-contact-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-card-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

/* ==========================================================
   EMPLOYEES & STAFF SECTION (كادر الموظفين والعاملين)
   ========================================================== */
.employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.employee-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.employee-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.employee-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.employee-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 2px solid rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.employee-avatar.dept-bar {
    background: rgba(168, 85, 247, 0.12);
    color: #9333ea;
    border-color: rgba(168, 85, 247, 0.3);
}

.employee-avatar.dept-shisha {
    background: rgba(234, 88, 12, 0.12);
    color: #ea580c;
    border-color: rgba(234, 88, 12, 0.3);
}

.employee-avatar.dept-cleaning {
    background: rgba(13, 148, 136, 0.12);
    color: #0d9488;
    border-color: rgba(13, 148, 136, 0.3);
}

.employee-avatar.dept-admin {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.3);
}

.employee-card-meta {
    flex: 1;
    min-width: 0;
}

.employee-card-meta h4 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-job-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.employee-status-pill {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
}
.status-working { background: rgba(16, 185, 129, 0.15); color: #059669; }
.status-leave { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.status-stopped { background: rgba(220, 38, 38, 0.15); color: #dc2626; }

.employee-details-list {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
    background: var(--bg-base);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.employee-details-list div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.employee-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

/* ==========================================================
   REPORTS SECTION
   ========================================================== */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-accent);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.red, .revenue-glow { background: var(--scarface-red-light); color: var(--scarface-red); }
.stat-icon.cyan, .gaming-glow { background: var(--neon-cyan-light); color: var(--neon-cyan); }
.stat-icon.gold, .cafe-glow { background: var(--gold-light); color: var(--gold); }
.stat-icon.green, .session-glow { background: var(--status-free-light); color: var(--status-free); }

.stat-data span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-data h3 {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.1;
}

.reports-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

@media (max-width: 992px) {
    .reports-split {
        grid-template-columns: 1fr;
    }
}

.card-header {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.top-item-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.top-item-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 800;
}

.occupancy-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.occ-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.occ-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
}

.occ-bar {
    height: 10px;
    background: var(--bg-surface-elevated);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.occ-bar-inner {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s ease;
}

.bg-gaming { background: var(--scarface-red); }
.bg-scooter, .bg-snooker { background: var(--neon-cyan); }
.bg-vip { background: var(--gold); }
.bg-cafe { background: var(--neon-purple); }

/* ==========================================================
   MANAGE & ADD TABLES SECTION (LIGHT THEME)
   ========================================================== */
.tables-summary-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
    width: 100%;
}

.summary-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    min-width: 0;
}

.summary-pill:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.summary-pill i {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.summary-pill span {
    display: block;
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.summary-pill strong {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.1;
}

.manage-tables-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 22px;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
}

.manage-tables-layout > * {
    min-width: 0;
}

@media (max-width: 1250px) {
    .manage-tables-layout {
        grid-template-columns: 1fr;
    }

    .manage-tables-layout .type-selector-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .manage-tables-layout .type-selector-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.type-selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}

.type-select-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 80px;
}

.type-select-card i {
    font-size: 1.25rem;
    margin-bottom: 4px;
    color: var(--text-muted);
    transition: var(--transition);
}

.type-select-card strong {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 800;
}

.type-select-card span {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.type-select-card:hover {
    border-color: var(--border-accent);
    background: #e2e8f0;
}

.type-select-card.active {
    border-color: var(--scarface-red);
    background: var(--scarface-red-light);
    box-shadow: var(--shadow-sm);
}

.type-select-card.active i {
    color: var(--scarface-red);
}

.type-select-card[data-type="scooter"].active,
.type-select-card[data-type="snooker"].active {
    border-color: var(--neon-cyan);
    background: var(--neon-cyan-light);
}
.type-select-card[data-type="scooter"].active i {
    color: var(--neon-cyan);
}

.type-select-card[data-type="vip"].active {
    border-color: var(--gold);
    background: var(--gold-light);
}
.type-select-card[data-type="vip"].active i {
    color: var(--gold);
}

.type-select-card[data-type="cafe"].active {
    border-color: var(--neon-purple);
    background: var(--neon-purple-light);
}
.type-select-card[data-type="cafe"].active i {
    color: var(--neon-purple);
}

.quick-price-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chip-btn {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-accent);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    min-height: 32px;
}

.chip-btn:hover {
    color: #ffffff;
    border-color: var(--scarface-red);
    background: var(--scarface-red);
}

.specs-badge {
    display: inline-block;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: var(--bg-surface-elevated);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    font-weight: 600;
}

/* ==========================================================
   MODALS (POPUP DIALOGS)
   ========================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.modal-dialog {
    background: var(--pure-white);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    transform: scale(0.96);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.modal-backdrop.active .modal-dialog {
    transform: scale(1);
}

.modal-dialog.modal-lg {
    max-width: 980px;
    width: 96%;
}

.modal-dialog.modal-receipt {
    max-width: 500px;
}

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--pure-white);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
}

.modal-dialog > form,
.modal-dialog form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    margin: 0;
}

.modal-body {
    padding: 22px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 18px;
    font-weight: 600;
}

.modal-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--bg-surface-elevated);
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 14px;
}

.col-6 {
    flex: 1;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: var(--pure-white);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    transition: var(--transition);
    min-height: 44px;
}

.form-input:focus {
    border-color: var(--coffee-brown);
    background: var(--pure-white);
    box-shadow: 0 0 0 3px var(--coffee-brown-light);
}

.form-input:focus {
    border-color: var(--scarface-red);
    box-shadow: 0 0 0 3px var(--scarface-red-light);
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
    font-weight: 600;
}

.input-with-action {
    display: flex;
    align-items: center;
    position: relative;
}

.input-suffix {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

/* Quick Time Buttons (Touch Optimized) */
.quick-time-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.quick-btn {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 10px 6px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;
}

.quick-btn:hover {
    border-color: var(--scarface-red);
    color: var(--scarface-red);
    background: var(--scarface-red-light);
}

.timer-mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.radio-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-primary);
    min-height: 48px;
}

.radio-card.active {
    border-color: var(--scarface-red);
    background: var(--scarface-red-light);
    color: var(--scarface-red);
}

.radio-card input {
    display: none;
}

.session-price-preview {
    background: var(--gold-light);
    border: 1px solid rgba(180, 83, 9, 0.25);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold);
}

.session-price-preview strong {
    font-size: 1.2rem;
    font-weight: 900;
}

/* Orders Modal Split */
.orders-split {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.items-picker {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.items-picker .search-box {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.current-orders-view {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 840px) {
    .orders-split {
        grid-template-columns: 1fr;
    }
}

/* Order Modal Category Filter Pills */
.order-categories-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 2px 6px 2px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.order-categories-bar::-webkit-scrollbar {
    height: 4px;
}

.order-categories-bar::-webkit-scrollbar-track {
    background: transparent;
}

.order-categories-bar::-webkit-scrollbar-thumb {
    background: var(--border-accent);
    border-radius: 4px;
}

.order-cat-pill {
    padding: 6px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.order-cat-pill:hover {
    border-color: var(--border-accent);
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
}

.order-cat-pill.active {
    background: var(--scarface-red);
    color: #ffffff;
    border-color: var(--scarface-red);
    box-shadow: 0 2px 8px var(--scarface-red-glow);
}

.order-cat-pill.add-new-btn {
    background: var(--bg-surface);
    border: 1px dashed var(--scarface-red);
    color: var(--scarface-red);
}

.order-cat-pill.add-new-btn:hover {
    background: var(--scarface-red-light);
    border-color: var(--scarface-red);
    color: var(--scarface-red);
}

#productModal {
    z-index: 1100;
}

.order-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 10px;
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 4px;
    padding-right: 2px;
}

.product-order-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    min-height: 85px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-order-card:hover {
    border-color: var(--scarface-red);
    background: var(--scarface-red-light);
    transform: translateY(-2px);
}

.product-order-card h5 {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.product-order-card span {
    font-size: 0.78rem;
    color: var(--scarface-red);
    font-weight: 800;
}

.current-orders-view {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.receipt-header-small {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 12px;
}

.receipt-header-small h4 {
    font-weight: 800;
    color: var(--text-primary);
}

.table-badge {
    background: var(--scarface-red);
    color: #ffffff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 800;
}

.current-items-list {
    flex: 1;
    overflow-y: auto;
    max-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ordered-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    border: 1px solid var(--border-subtle);
    gap: 10px;
}

.item-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-qty {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: var(--border-accent);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    font-weight: 900;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-qty:hover {
    background: var(--scarface-red);
    color: #ffffff;
}

.order-subtotal {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-accent);
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 800;
}

.order-subtotal strong {
    color: var(--scarface-red);
}

/* ==========================================================
   RECEIPT & PRINT STYLES
   ========================================================== */
.receipt-paper {
    background: #ffffff;
    color: #111;
    font-family: var(--app-font-family) !important;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    font-size: 0.88rem;
    border: 1px solid var(--border-subtle);
}

.receipt-brand {
    text-align: center;
    margin-bottom: 12px;
}

.receipt-brand h2 {
    font-size: 1.4rem;
    font-weight: 900;
    color: #000;
}

.receipt-brand p {
    font-size: 0.78rem;
    color: #444;
}

.receipt-divider {
    text-align: center;
    letter-spacing: 1px;
    color: #666;
    margin: 8px 0;
    user-select: none;
}

.receipt-meta div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
}

.receipt-table th {
    text-align: right;
    border-bottom: 1px dashed #444;
    padding-bottom: 4px;
}

.receipt-table td {
    padding: 4px 0;
}

.receipt-totals {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.total-row {
    display: flex;
    justify-content: space-between;
}

.total-row.grand-total {
    font-size: 1.2rem;
    font-weight: 900;
    color: #000;
    border-top: 2px solid #000;
    padding-top: 8px;
}

.discount-input-box input {
    width: 90px;
    padding: 4px 6px;
    font-size: 0.88rem;
    border: 1px solid #aaa;
    border-radius: 4px;
    text-align: center;
    font-family: inherit;
    font-weight: 800;
}

.receipt-footer-text {
    text-align: center;
    font-size: 0.82rem;
    color: #444;
    margin-top: 8px;
}

.print-only {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }
    #printableReceipt, #printableReceipt *,
    #printableQRCards, #printableQRCards * {
        visibility: visible;
    }
    #printableReceipt {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 10px;
        box-shadow: none;
        border: none;
    }
    #printableQRCards {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        display: block !important;
        background: #ffffff;
    }
    .no-print {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }
}

/* ==========================================================
   QR TABLE STAND CARDS & MENU MANAGEMENT
   ========================================================== */
.qr-stand-card {
    background: #ffffff;
    border: 2px solid var(--border-accent);
    border-radius: var(--radius-xl);
    padding: 22px 18px;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    margin: 10px 0;
}

.qr-stand-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--scarface-red), var(--gold-accent));
}

.qr-stand-header {
    margin-bottom: 10px;
}

.qr-stand-crown {
    width: 42px;
    height: 42px;
    background: var(--scarface-red);
    color: #ffffff;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px var(--scarface-red-glow);
    margin-bottom: 6px;
}

.qr-stand-header h4 {
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    line-height: 1.1;
}

.qr-stand-header span {
    font-size: 0.72rem;
    color: var(--scarface-red);
    font-weight: 800;
}

.qr-stand-table-badge {
    display: inline-block;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    padding: 4px 16px;
    border-radius: var(--radius-xl);
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.qr-code-box {
    background: #ffffff;
    padding: 10px;
    border: 1px dashed var(--border-accent);
    border-radius: var(--radius-lg);
    display: inline-block;
    margin-bottom: 10px;
}

.qr-stand-footer p {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.qr-stand-footer small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Printable QR Sheets */
.print-qr-sheet {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 24px;
    background: #ffffff;
}

.print-qr-single-item {
    page-break-inside: avoid;
    border: 2px solid #0f172a;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    background: #ffffff;
}

/* Color Helpers */
.text-danger { color: var(--scarface-red) !important; }
.text-gold { color: var(--gold) !important; }
.text-cyan { color: var(--neon-cyan) !important; }
.text-purple { color: var(--neon-purple) !important; }

/* Date Filter Box */
.date-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.date-filter input[type="date"] {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Menu Item Image Upload & Thumbnails */
.menu-image-upload-box {
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--bg-surface-elevated);
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-accent);
    transition: var(--transition);
}

.menu-image-upload-box:hover {
    border-color: var(--scarface-red);
}

.btn-preset-img {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 3px 8px;
    font-size: 0.72rem;
    font-family: inherit;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-preset-img:hover {
    background: var(--scarface-red-light);
    border-color: var(--scarface-red);
    color: var(--scarface-red);
    transform: translateY(-1px);
}

.table-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.table-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================
   RESPONSIVENESS (POS, PC, TABLET, PHONE)
   ========================================================== */

/* Large Tablets & POS Terminals (992px to 1200px) */
@media (max-width: 1200px) {
    .tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
        gap: 16px;
    }
}

/* Small Tablets & iPads (768px to 991px) */
@media (max-width: 991px) {
    :root {
        --sidebar-width: 250px;
    }
    .content-container {
        padding: 18px;
    }
    .topbar {
        padding: 0 18px;
    }
    .tables-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile & Touch POS Screens (Under 900px) */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(100%);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .mobile-menu-toggle {
        display: inline-flex;
    }
    .topbar-right {
        gap: 10px;
    }
    .page-title h1 {
        font-size: 1.1rem;
    }
    .page-title p {
        display: none;
    }
    .live-clock {
        padding: 6px 10px;
        font-size: 0.95rem;
    }
}

/* Smartphones (Under 600px) */
@media (max-width: 600px) {
    .content-container {
        padding: 14px;
    }
    .topbar {
        padding: 0 12px;
        height: 64px;
    }
    .topbar-left {
        gap: 8px;
    }
    .action-btn-primary span {
        display: none;
    }
    .action-btn-primary {
        padding: 8px 12px;
    }
    .tables-grid {
        grid-template-columns: 1fr;
    }
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    .status-legend {
        justify-content: space-between;
        font-size: 0.76rem;
    }
    .quick-time-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    .modal-dialog {
        max-height: 95vh;
        border-radius: var(--radius-lg);
    }
    .modal-body {
        padding: 16px;
    }
    .modal-footer {
        padding: 14px 16px;
        flex-direction: column;
    }
    .modal-footer .btn {
        width: 100%;
    }
    .card-actions {
        flex-direction: column;
    }
    .card-actions .btn {
        width: 100%;
    }
    .stats-overview {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .stat-card {
        padding: 14px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .stat-data h3 {
        font-size: 1.2rem;
    }
    .search-box {
        min-width: 100%;
    }
}


/* ==========================================================
   CASH DRAWER / SAFE & SHIFT MANAGEMENT STYLES
   ========================================================== */
.badge.success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.nav-item.active .badge.success {
    background: #ffffff !important;
    color: #059669 !important;
    border-color: #ffffff !important;
}

.money-badge-in {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.money-badge-out {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.text-money-in {
    color: #059669 !important;
    font-weight: 800;
}

.text-money-out {
    color: #dc2626 !important;
    font-weight: 800;
}


/* ==========================================================
   MODERN RECEIPT & CHECKOUT DIALOG STYLES
   ========================================================== */
.modal-receipt-modern {
    max-width: 500px;
    width: 95%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
}

.receipt-header-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.12);
    color: var(--scarface-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.receipt-paper-modern {
    background: #ffffff;
    color: var(--text-primary);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    font-family: inherit;
}

.modern-receipt-head {
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 14px;
}

.modern-brand-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 10px;
    border-radius: 14px;
    background: #111;
    overflow: hidden;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.modern-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.modern-brand-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #0f172a;
}

.modern-brand-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 700;
    display: block;
    margin-top: 2px;
}

/* Meta Grid */
.modern-receipt-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.meta-pill {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-pill.full-width {
    grid-column: span 2;
}

.meta-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 700;
}

.meta-value {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--text-primary);
}

.meta-value.bill-tag {
    background: rgba(220, 38, 38, 0.1);
    color: var(--scarface-red);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
}

/* Session Box */
.modern-session-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.session-box-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.session-box-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
    margin-top: 4px;
}

.session-box-row.highlight {
    border-top: 1px dashed var(--border-subtle);
    padding-top: 6px;
    margin-top: 6px;
    font-weight: 800;
}

.session-box-row.highlight .session-val {
    color: var(--scarface-red);
    font-size: 0.95rem;
}

.badge-duration {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Orders Box */
.modern-orders-box {
    margin-bottom: 14px;
}

.orders-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.modern-receipt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.modern-receipt-table th {
    background: #f1f5f9;
    padding: 6px 10px;
    font-size: 0.74rem;
    color: var(--text-secondary);
    font-weight: 800;
    border-bottom: 1px solid var(--border-subtle);
}

.modern-receipt-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.82rem;
}

/* Totals Box */
.modern-totals-card {
    background: linear-gradient(135deg, #f8fafc 0%, rgba(220, 38, 38, 0.03) 100%);
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.tot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.tot-row.discount-line {
    border-top: 1px dashed var(--border-subtle);
    padding-top: 6px;
    margin-top: 6px;
}

.discount-input-box {
    display: flex;
    align-items: center;
    gap: 4px;
}

.discount-input-box input {
    width: 90px;
    padding: 3px 8px;
    font-size: 0.85rem;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    text-align: center;
    font-weight: 800;
    background: #ffffff;
}

.discount-input-box input:focus {
    border-color: var(--scarface-red);
    outline: none;
}

.tot-grand-row {
    border-top: 2px solid var(--scarface-red);
    padding-top: 10px;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grand-label span {
    font-size: 0.95rem;
    font-weight: 900;
    color: #0f172a;
    display: block;
}

.grand-label small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.grand-amount {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--scarface-red);
    letter-spacing: -0.5px;
}

/* Modern Receipt Footer */
.modern-receipt-footer {
    text-align: center;
    padding-top: 8px;
}

.footer-msg {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
}

.footer-sub {
    margin: 2px 0 0;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Modal Footer Action Bar */
.modern-checkout-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8fafc;
    padding: 12px 18px;
    border-top: 1px solid var(--border-subtle);
}

.footer-left-actions, .footer-right-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-pay-open {
    background: var(--scarface-red) !important;
    border-color: var(--scarface-red) !important;
    font-weight: 800;
}





/* ==========================================================
   BALANCE & NET PROFIT SECTION STYLES
   ========================================================== */
.btn-period-pill {
    background: transparent;
    border: none;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-period-pill:hover {
    color: var(--text-primary);
}

.btn-period-pill.active {
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ==========================================================
   MONTH STEPPER & GRANULAR DATE FILTER BAR
   ========================================================== */
.month-stepper-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface-elevated, #f8fafc);
    padding: 3px 8px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-subtle);
}

.month-stepper-control input[type="month"] {
    border: none;
    background: transparent;
    font-family: var(--app-font-family) !important;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    padding: 2px 4px;
}

.custom-date-filter-bar {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   NON-TIMED TABLE DISPLAY BOXES (CAFE & VIP)
   ========================================================== */
.nontimed-display-box {
    border-radius: var(--radius-md);
    padding: 12px 14px;
    text-align: center;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    min-height: 110px;
    height: 110px;
    box-sizing: border-box;
}

.nontimed-badge-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 2px;
}

.nontimed-headline {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
}

.nontimed-sub {
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* Cafe Table Box */
.nontimed-display-box.cafe-box.active-free {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, rgba(16, 185, 129, 0.08) 100%);
    border-color: rgba(16, 185, 129, 0.25);
}
.nontimed-display-box.cafe-box.active-free .nontimed-badge-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}
.nontimed-display-box.cafe-box.active-free .nontimed-headline {
    color: #059669;
}

.nontimed-display-box.cafe-box.active-busy {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(5, 150, 105, 0.18) 100%);
    border-color: rgba(5, 150, 105, 0.4);
    box-shadow: 0 0 15px rgba(5, 150, 105, 0.12);
}
.nontimed-display-box.cafe-box.active-busy .nontimed-badge-icon {
    background: #059669;
    color: #ffffff;
}
.nontimed-display-box.cafe-box.active-busy .nontimed-headline {
    color: #047857;
}

/* VIP Table Box */
.nontimed-display-box.vip-box.active-free {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.04) 0%, rgba(217, 119, 6, 0.08) 100%);
    border-color: rgba(217, 119, 6, 0.25);
}
.nontimed-display-box.vip-box.active-free .nontimed-badge-icon {
    background: rgba(217, 119, 6, 0.15);
    color: #d97706;
}
.nontimed-display-box.vip-box.active-free .nontimed-headline {
    color: #d97706;
}

.nontimed-display-box.vip-box.active-busy {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(180, 83, 9, 0.18) 100%);
    border-color: rgba(217, 119, 6, 0.4);
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.12);
}
.nontimed-display-box.vip-box.active-busy .nontimed-badge-icon {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
}
.nontimed-display-box.vip-box.active-busy .nontimed-headline {
    color: #b45309;
}

/* ==========================================================
   SETTINGS & SYSTEM CUSTOMIZATION MODULE
   ========================================================== */
.settings-page-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 30px;
}

.settings-hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 14px;
}

.settings-hero-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.settings-hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.22) 100%);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.settings-hero-text h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-hero-text p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.settings-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
    gap: 18px;
}

.settings-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.settings-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    background: #fafbfc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-card-title i {
    font-size: 1.2rem;
}

.settings-card-title h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.settings-card-title small {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.settings-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-hint {
    font-size: 0.78rem;
    color: #0284c7;
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Section Reordering List */
.sections-reorder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
    padding-left: 4px;
}

.reorder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    transition: var(--transition);
}

.reorder-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.reorder-item.item-hidden {
    opacity: 0.55;
    background: #f1f5f9;
}

.reorder-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reorder-handle {
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: grab;
}

.reorder-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.reorder-item-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.reorder-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reorder-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.78rem;
    transition: var(--transition);
}

.reorder-btn:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.reorder-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.reorder-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-right: 6px;
    user-select: none;
}

.reorder-toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #059669;
    cursor: pointer;
}

/* ==========================================================
   Language Selector Cards (Arabic & English)
   ========================================================== */
.lang-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (max-width: 768px) {
    .lang-picker-grid {
        grid-template-columns: 1fr;
    }
}
.lang-card {
    border: 2px solid var(--border-subtle);
    border-radius: 14px;
    padding: 16px 18px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.22s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    user-select: none;
}
.lang-card:hover {
    border-color: var(--coffee-brown);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 24, 16, 0.08);
}
.lang-card.active {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.07) 0%, rgba(255, 255, 255, 0.95) 100%);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25), 0 4px 14px rgba(212, 175, 55, 0.12);
}
.lang-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lang-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}
.lang-card-title i {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}
.lang-card.active .lang-card-title i {
    transform: scale(1.1);
}
.lang-card-tag {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
}
.lang-card-tag.primary {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}
.lang-card.active .lang-card-tag.primary {
    background: #059669;
    color: #ffffff;
}
.lang-card-tag.secondary {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}
.lang-card.active .lang-card-tag.secondary {
    background: #2563eb;
    color: #ffffff;
}
.lang-card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Font Picker Grid */
.font-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.font-card {
    border: 1.5px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px 14px;
    background: #ffffff;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.font-card:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.font-card.active {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.03);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.font-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.font-card-header strong {
    font-size: 0.88rem;
    color: var(--text-primary);
}

.font-tag {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--text-secondary);
    font-weight: 700;
}

.font-card.active .font-tag {
    background: #2563eb;
    color: #ffffff;
}

.font-sample {
    font-size: 0.82rem;
    color: #0f172a;
    font-weight: 700;
    margin: 4px 0 2px;
}

.font-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.font-live-preview {
    margin-top: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-badge {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 800;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.preview-price {
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--scarface-red);
}

.preview-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Size Preset Chips & Stepper */
.size-preset-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-chip {
    flex: 1;
    min-width: 80px;
    padding: 8px 10px;
    border: 1.5px solid var(--border-subtle);
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: var(--transition);
}

.size-chip:hover {
    border-color: #94a3b8;
}

.size-chip.active {
    border-color: #059669;
    background: rgba(5, 150, 105, 0.05);
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

.size-chip span {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-primary);
}

.size-chip small {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.stepper-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.stepper-display {
    min-width: 90px;
    text-align: center;
    padding: 6px 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stepper-display span {
    font-size: 1.15rem;
    font-weight: 900;
    color: #059669;
}

.stepper-display small {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.density-buttons {
    display: flex;
    gap: 8px;
}

.density-btn {
    flex: 1;
    padding: 9px 12px;
    border: 1.5px solid var(--border-subtle);
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition);
}

.density-btn:hover {
    border-color: #94a3b8;
}

.density-btn.active {
    border-color: #7c3aed;
    background: rgba(124, 58, 237, 0.05);
    color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

/* Backup Grid */
.backup-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.backup-action-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: #fafbfc;
}

.backup-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.backup-info {
    flex: 1;
}

.backup-info h4 {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.backup-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Density overrides */
body.density-compact {
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
}
body.density-compact .stat-card {
    padding: 10px 14px;
}
body.density-compact .table th, 
body.density-compact .table td {
    padding: 8px 10px;
}
body.density-compact .nav-item {
    padding: 8px 12px;
}

body.density-comfortable {
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
}
body.density-comfortable .stat-card {
    padding: 20px 24px;
}
body.density-comfortable .table th, 
body.density-comfortable .table td {
    padding: 16px 18px;
}
body.density-comfortable .nav-item {
    padding: 14px 18px;
}

/* ==========================================================
   AUTHENTICATION & SECURITY SENTINEL LOCKDOWN RULES
   ========================================================== */
body.pos-locked {
    overflow: hidden !important;
    background: #0f172a !important;
}

body.pos-locked .app-layout,
body.pos-locked .modal-backdrop:not(.login-gateway-overlay) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.96) !important;
    filter: blur(25px) !important;
}

/* ==========================================================
   AUTHENTICATION & LOGIN GATEWAY (ORGANIC COFFEE & LOUNGE MODERN THEME)
   ========================================================== */
.login-gateway-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #141517;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    overflow: hidden;
}

.login-gateway-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Ambient organic contour shapes in background */
.login-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(85px);
    pointer-events: none;
    opacity: 0.22;
}

.login-bg-blob-1 {
    width: 480px;
    height: 480px;
    background: #2a2d32;
    top: -120px;
    left: -120px;
}

.login-bg-blob-2 {
    width: 520px;
    height: 520px;
    background: #1e2023;
    bottom: -140px;
    right: -120px;
}

/* Main Card Container */
.login-gateway-card {
    width: 100%;
    max-width: 920px;
    min-height: 540px;
    background: #212326;
    border-radius: 32px;
    box-shadow: 0 35px 85px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: row;
    direction: ltr;
    overflow: hidden;
    position: relative;
    animation: loginCardPop 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginCardPop {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* LEFT SIDE: Cream Organic Art Section */
.login-art-panel {
    width: 44%;
    min-width: 360px;
    background: #ece7dd;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 32px;
    text-align: center;
    z-index: 2;
    user-select: none;
}

/* Organic Wave SVG Boundary attaching to right of cream panel */
.art-wave-separator {
    position: absolute;
    top: 0;
    right: -59px;
    height: 100%;
    width: 60px;
    pointer-events: none;
    z-index: 3;
}

/* SVG Coffee Cup Illustration */
.coffee-illustration-wrap {
    width: 195px;
    height: 195px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coffee-illustration-wrap svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.06));
}

.art-text-title {
    font-size: 1.55rem;
    font-weight: 900;
    color: #1a1c1e;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    font-family: inherit;
}

.art-text-subtitle {
    font-size: 0.85rem;
    color: #555b62;
    font-weight: 600;
    line-height: 1.45;
    max-width: 260px;
    margin-bottom: 6px;
}

.art-text-arabic {
    font-size: 0.78rem;
    color: #7b8189;
    font-weight: 700;
}

/* RIGHT SIDE: Dark Form Section */
.login-form-panel {
    flex: 1;
    background: #212326;
    padding: 46px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    direction: rtl;
    text-align: right;
}

/* Brand Emblem at Top */
.login-brand-emblem {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.brand-icon-shield {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #191b1d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ece7dd;
    font-size: 1.35rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}

.login-welcome-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.3;
    font-family: inherit;
}

.login-welcome-subtitle {
    font-size: 0.84rem;
    color: #8c939d;
    font-weight: 600;
    margin-bottom: 24px;
}

/* Form Inputs */
.login-form-group {
    margin-bottom: 16px;
}

.login-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #8c939d;
    margin-bottom: 7px;
    text-align: right;
}

.login-input-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.login-input-field {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    background: #17181a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.92rem;
    font-family: inherit;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.login-input-field:focus {
    border-color: #ece7dd;
    background: #1a1c1e;
    box-shadow: 0 0 0 3px rgba(236, 231, 221, 0.14);
}

.login-input-field::placeholder {
    color: #555b62;
    font-weight: 500;
    font-size: 0.86rem;
}

.login-pwd-toggle {
    position: absolute;
    left: 14px;
    background: none;
    border: none;
    color: #717882;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.login-pwd-toggle:hover {
    color: #ffffff;
}

/* Options Row */
.login-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 20px;
    font-size: 0.8rem;
    color: #717882;
}

.login-remember-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.login-remember-wrap input[type="checkbox"] {
    accent-color: #ece7dd;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.login-quick-admin-link {
    color: #8c939d;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    cursor: pointer;
}

.login-quick-admin-link:hover {
    color: #ece7dd;
}

/* Sign In Button (Centered Pill Button Matching Reference) */
.login-submit-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 0;
}

.login-btn-pill {
    min-width: 195px;
    height: 46px;
    background: #ece7dd;
    color: #161719;
    border: none;
    border-radius: 28px;
    font-size: 0.95rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-btn-pill:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.12);
}

.login-btn-pill:active {
    transform: translateY(0);
}

/* Divider */
.login-divider-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
}

.login-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.login-divider-text {
    font-size: 0.74rem;
    color: #555b62;
    font-weight: 600;
    text-transform: lowercase;
}

/* Secondary Button */
.login-btn-secondary {
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #8c939d;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-bottom: 18px;
}

.login-btn-secondary:hover {
    color: #ece7dd;
    border-color: rgba(236, 231, 221, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

/* Footer Link */
.login-footer-text {
    text-align: center;
    font-size: 0.78rem;
    color: #717882;
    font-weight: 600;
}

.login-footer-text span {
    color: #ece7dd;
    font-weight: 700;
}

/* Alert Banner */
.login-alert-banner {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    display: none;
    animation: alertBannerFade 0.25s ease forwards;
}

@keyframes alertBannerFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-alert-banner.error {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
    border: 1px solid rgba(220, 38, 38, 0.3);
    display: block;
}

.login-alert-banner.success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    display: block;
}

/* Responsive Stacking */
@media (max-width: 860px) {
    .login-gateway-card {
        flex-direction: column;
        max-width: 440px;
    }
    .login-art-panel {
        width: 100%;
        min-width: unset;
        padding: 30px 20px;
    }
    .art-wave-separator {
        display: none;
    }
    .login-form-panel {
        padding: 35px 25px;
    }
}

/* ==========================================================
   IN-APP TOAST NOTIFICATIONS (نظام تنبيهات الموقع الداخلية)
   ========================================================== */
.in-app-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    max-width: 90vw;
    width: 440px;
}

.in-app-toast {
    pointer-events: auto;
    width: 100%;
    background: #ffffff;
    color: #0f172a;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 14px 38px -6px rgba(0, 0, 0, 0.22), 0 4px 14px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    animation: toastDropIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.25s ease;
}

@keyframes toastDropIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.in-app-toast.toast-hiding {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
    pointer-events: none;
}

.in-app-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.in-app-toast.success .in-app-toast-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
}

.in-app-toast.error .in-app-toast-icon,
.in-app-toast.danger .in-app-toast-icon {
    background: rgba(220, 38, 38, 0.14);
    color: #dc2626;
}

.in-app-toast.warning .in-app-toast-icon {
    background: rgba(217, 119, 6, 0.14);
    color: #d97706;
}

.in-app-toast.info .in-app-toast-icon {
    background: rgba(37, 99, 235, 0.14);
    color: #2563eb;
}

.in-app-toast-content {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.in-app-toast-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2px;
}

.in-app-toast-msg {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.45;
    white-space: pre-line;
}

.in-app-toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition);
    flex-shrink: 0;
}

.in-app-toast-close:hover {
    color: #dc2626;
    background: #f1f5f9;
}

.in-app-toast-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3.5px;
    background: #cbd5e1;
    width: 100%;
    animation: toastProgress linear forwards;
}

.in-app-toast.success .in-app-toast-progress { background: #10b981; }
.in-app-toast.error .in-app-toast-progress,
.in-app-toast.danger .in-app-toast-progress { background: #ef4444; }
.in-app-toast.warning .in-app-toast-progress { background: #f59e0b; }
.in-app-toast.info .in-app-toast-progress { background: #3b82f6; }

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ==========================================================
   IN-APP ALERT & CONFIRM MODAL (تصميم تنبيهات المنظومة المطابق)
   ========================================================== */
.modal-backdrop.app-alert-backdrop {
    z-index: 99999999;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-dialog.app-alert-dialog {
    max-width: 440px;
    width: 92%;
    border-radius: 20px;
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-subtle, #e2e8f0);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.04);
    text-align: center;
    overflow: hidden;
    padding: 0;
    transform: scale(0.92);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.app-alert-backdrop.active .app-alert-dialog {
    transform: scale(1);
}

.app-alert-header {
    padding: 28px 24px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: none;
    background: transparent;
}

.app-alert-close {
    position: absolute;
    top: 14px;
    left: 18px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    transition: var(--transition, all 0.2s ease);
}

.app-alert-close:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

.app-alert-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 14px;
    transition: all 0.25s ease;
}

.app-alert-icon-wrap.success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.06);
}

.app-alert-icon-wrap.error,
.app-alert-icon-wrap.danger {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.06);
}

.app-alert-icon-wrap.warning {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
    box-shadow: 0 0 0 8px rgba(217, 119, 6, 0.06);
}

.app-alert-icon-wrap.info {
    background: rgba(211, 47, 47, 0.12);
    color: var(--scarface-red, #d32f2f);
    box-shadow: 0 0 0 8px rgba(211, 47, 47, 0.06);
}

.app-alert-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    margin: 0;
    font-family: inherit;
}

.app-alert-body {
    padding: 8px 26px 20px;
}

.app-alert-message {
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text-secondary, #475569);
    line-height: 1.65;
    margin: 0;
    white-space: pre-line;
    word-break: break-word;
    font-family: inherit;
}

.app-alert-footer {
    padding: 14px 24px 24px;
    border-top: 1px solid var(--border-subtle, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.app-alert-btn {
    min-width: 130px;
    padding: 11px 24px;
    font-size: 0.95rem;
    font-weight: 800;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition, all 0.2s ease);
}


/* Quick Account Picker Chips on Login Card */
.login-quick-users-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 18px;
}

.quick-login-chip {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.quick-login-chip:hover,
.quick-login-chip.active {
    background: #fee2e2;
    border-color: #d32f2f;
    color: #b71c1c;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.15);
}

.quick-login-chip small {
    font-size: 0.72rem;
    opacity: 0.8;
}

/* ==========================================================
   GAMING & SNOOKER PLAYER TIER STYLES (فردي، زوجي، ثلاثي، رباعي)
   ========================================================== */
.player-tier-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 6px;
}

.player-tier-btn {
    background: var(--bg-surface-elevated);
    border: 1.5px solid var(--border-subtle);
    border-radius: 14px;
    padding: 12px 6px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    outline: none;
}

.player-tier-btn:hover {
    border-color: var(--border-accent);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.player-tier-btn.active {
    background: var(--bg-card);
    border-color: var(--coffee-cream);
    color: var(--text-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 0 1.5px var(--coffee-cream);
}

.tier-btn-icon {
    font-size: 1.25rem;
    color: var(--coffee-cream);
    margin-bottom: 2px;
}

.tier-btn-title {
    font-size: 0.96rem;
    font-weight: 800;
}

.tier-btn-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.tier-btn-rate {
    font-size: 0.76rem;
    font-weight: 800;
    color: #38bdf8;
    margin-top: 4px;
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
}

.player-tier-btn.active .tier-btn-rate {
    color: #161719;
    background: var(--coffee-cream);
    font-weight: 900;
}

.tier-badge-summary {
    background: rgba(236, 231, 221, 0.12);
    color: var(--coffee-cream);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
}

.table-tier-chip {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(236, 231, 221, 0.14);
    color: var(--coffee-cream);
    border: 1px solid rgba(236, 231, 221, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 6px;
}


/* ==========================================================================
   VIEW MODE TOGGLE (CARDS VS TABLE VIEW)
   ========================================================================== */
.btn-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.btn-view-toggle:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--coffee-brown);
    color: var(--coffee-brown);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(54, 38, 30, 0.08);
}

.btn-view-toggle:active {
    transform: translateY(0);
}

.btn-view-toggle.active-table-mode {
    background: rgba(54, 38, 30, 0.08);
    border-color: var(--coffee-brown);
    color: var(--coffee-brown);
    font-weight: 800;
}

.btn-view-toggle i {
    font-size: 0.95rem;
    color: var(--coffee-brown);
    transition: transform 0.2s ease;
}

.btn-view-toggle:hover i {
    transform: scale(1.12);
}


/* ==========================================================================
   RED HOVER STYLING SYSTEM (أنظمة الهوفر بالأحمر استجابة لطلب AN0N)
   ========================================================================== */

/* 1. Logout & Exit Buttons (أزرار تسجيل الخروج في القائمة والواجهة) */
.sidebar-footer button[onclick*="lockPOSScreen"],
.btn-logout,
button[onclick*="lockPOSScreen"] {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sidebar-footer button[onclick*="lockPOSScreen"]:hover,
.btn-logout:hover,
button[onclick*="lockPOSScreen"]:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35) !important;
    transform: translateY(-1px);
}

.sidebar-footer button[onclick*="lockPOSScreen"]:hover i,
.btn-logout:hover i,
button[onclick*="lockPOSScreen"]:hover i {
    color: #ffffff !important;
    transform: translateX(-2px);
}

.user-chip:hover {
    border-color: rgba(220, 38, 38, 0.35) !important;
    background: rgba(220, 38, 38, 0.04) !important;
}

/* 2. Cancelled Shift Pills in Tab Cancelled (كبسولات وردية المكنسل) */
#tab-cancelled .btn-period-pill {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid transparent !important;
}

#tab-cancelled .btn-period-pill:hover {
    background: rgba(220, 38, 38, 0.12) !important;
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, 0.3) !important;
    transform: translateY(-1px);
}

#tab-cancelled .btn-period-pill.active {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35) !important;
}

#tab-cancelled .btn-period-pill.active:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
}

#tab-cancelled .btn-period-pill.active span.badge {
    background: #ffffff !important;
    color: #dc2626 !important;
}

/* 3. Filter Toolbar Controls in Tab Cancelled (أزرار وحقول قسم المكنسل) */
#tab-cancelled .btn-secondary:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3) !important;
    transform: translateY(-1px);
}

#tab-cancelled .btn-outline:hover {
    background: rgba(220, 38, 38, 0.1) !important;
    border-color: #dc2626 !important;
    color: #dc2626 !important;
    transform: translateY(-1px);
}

#tab-cancelled .search-box:hover,
#tab-cancelled .search-box:focus-within {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

#tab-cancelled select:hover,
#tab-cancelled select:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

#tab-cancelled input[type="date"]:hover,
#tab-cancelled input[type="date"]:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12) !important;
}

/* 4. Cancelled Table Rows & Detail Button (جدول الفواتير الملغاة) */
#tab-cancelled .data-table tr:hover td {
    background: rgba(220, 38, 38, 0.04) !important;
}

#tab-cancelled .data-table button:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

/* 5. Sidebar Nav Item for Cancelled Invoices */
.nav-item[data-tab="cancelled"]:hover {
    background: rgba(220, 38, 38, 0.1) !important;
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, 0.25) !important;
}

.nav-item[data-tab="cancelled"]:hover i {
    color: #dc2626 !important;
}

/* ==========================================================
   ARCHIVE SECTION REFINED LAYOUT & CONTROLS
   تنسيق راقي ومتناسق 100% لقسم أرشيف الفواتير
   ========================================================== */
#tab-archive .stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

#tab-archive .btn-period-pill {
    padding: 5px 11px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.2s ease;
}

#tab-archive .btn-period-pill:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

#tab-archive .btn-period-pill.active {
    background: #ffffff;
    color: #2563eb;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

#tab-archive .search-box:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#tab-archive .custom-table-trigger {
    height: 38px;
    border-radius: 8px;
    background: var(--bg-surface-elevated);
}

.nav-item[data-tab="cancelled"].active {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

.nav-item[data-tab="cancelled"].active i {
    color: #ffffff !important;
}

.nav-item[data-tab="cancelled"].active .badge {
    background: #ffffff !important;
    color: #dc2626 !important;
}

/* 6. Navigate to Cancelled Tab Button in Archive */
button[onclick*="navigateToCancelledTab"]:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

/* ==========================================================
   PWA Installed & Standalone Detection (إخفاء أزرار التثبيت عند التثبيت)
   ========================================================== */
@media all and (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
    #btnPwaInstall,
    #btnTopbarPwaInstall {
        display: none !important;
    }
}

body.is-pwa-installed #btnPwaInstall,
body.is-pwa-installed #btnTopbarPwaInstall,
body.is-standalone #btnPwaInstall,
body.is-standalone #btnTopbarPwaInstall,
html.is-pwa-installed #btnPwaInstall,
html.is-pwa-installed #btnTopbarPwaInstall,
html.is-standalone #btnPwaInstall,
html.is-standalone #btnTopbarPwaInstall {
    display: none !important;
}



/* ==========================================================
   SCARFACE LUXURY CUSTOM TABLE SELECT DROPDOWN
   تصميم مخصص فخم ومنسجم 100% مع هوية المنظومة
   ========================================================== */
.custom-table-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.custom-table-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface-elevated, #ede7dc);
    padding: 4px 12px;
    border-radius: var(--radius-sm, 10px);
    border: 1px solid var(--border-subtle, #e5ded2);
    height: 38px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-primary, #36261e);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-sizing: border-box;
    white-space: nowrap;
}

.custom-table-trigger:hover {
    background: #f5efe6;
    border-color: var(--gold, #b45309);
    box-shadow: 0 2px 8px rgba(54, 38, 30, 0.08);
}

.custom-table-trigger.active {
    background: #ffffff;
    border-color: var(--gold, #b45309);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.15), 0 4px 12px rgba(54, 38, 30, 0.1);
}

.custom-table-trigger .trigger-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--text-muted, #9c877a);
    font-weight: 700;
}

.custom-table-trigger .trigger-value {
    color: var(--text-primary, #36261e);
    font-weight: 800;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-table-trigger .trigger-chevron {
    font-size: 0.72rem;
    color: var(--text-muted, #9c877a);
    transition: transform 0.25s ease;
    margin-right: 2px;
}

.custom-table-trigger.active .trigger-chevron {
    transform: rotate(180deg);
    color: var(--gold, #b45309);
}

/* Dropdown Menu Container */
.custom-table-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 260px;
    max-width: 330px;
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-subtle, #e5ded2);
    border-radius: var(--radius-md, 14px);
    box-shadow: 0 16px 36px rgba(54, 38, 30, 0.16), 0 4px 12px rgba(0, 0, 0, 0.05);
    z-index: 1050;
    padding: 6px;
    display: none;
    transform-origin: top right;
    animation: customDropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    direction: rtl;
    text-align: right;
}

.custom-table-dropdown-menu.show {
    display: block;
}

@keyframes customDropdownPop {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Custom Sleek Scrollbar */
.custom-table-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}
.custom-table-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}
.custom-table-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(54, 38, 30, 0.18);
    border-radius: 10px;
}
.custom-table-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(180, 83, 9, 0.4);
}

/* Section Header (Optgroup Label) */
.custom-dropdown-group-header {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 8px;
    margin: 6px 0 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    border: none !important;
}

.custom-dropdown-group-header.group-gaming {
    background: rgba(99, 102, 241, 0.08);
    color: #4338ca;
}

.custom-dropdown-group-header.group-scooter {
    background: rgba(16, 185, 129, 0.08);
    color: #047857;
}

.custom-dropdown-group-header.group-vip {
    background: rgba(217, 119, 6, 0.08);
    color: #b45309;
}

.custom-dropdown-group-header.group-cafe {
    background: rgba(180, 83, 9, 0.08);
    color: #78350f;
}

.custom-dropdown-group-header.group-other {
    background: rgba(100, 116, 139, 0.08);
    color: #334155;
}

/* Item Options */
.custom-dropdown-item {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary, #36261e);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    margin-bottom: 2px;
}

.custom-dropdown-item:hover {
    background: rgba(54, 38, 30, 0.05);
    color: var(--gold, #b45309);
    transform: translateX(-3px);
}

.custom-dropdown-item.all-option {
    border-bottom: none;
    margin-bottom: 6px;
    padding: 9px 12px;
    font-weight: 800;
}

.custom-dropdown-item.selected {
    background: rgba(180, 83, 9, 0.12);
    color: #92400e;
    font-weight: 900;
}

.custom-dropdown-item .item-check {
    font-size: 0.8rem;
    color: var(--gold, #b45309);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.custom-dropdown-item.selected .item-check {
    opacity: 1;
}

/* ==========================================================
   USER PERMISSIONS & ACCESS CONTROL MODAL
   نظام إدارة الصلاحيات ومستوى الوصول للمستخدمين
   ========================================================== */
.perm-group-card {
    background: var(--bg-surface-elevated, #f8f6f2);
    border: 1px solid var(--border-subtle, #e5ded2);
    border-radius: var(--radius-md, 12px);
    padding: 14px;
    margin-bottom: 14px;
}

.perm-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid var(--border-subtle, #e5ded2);
    border-radius: 8px;
    padding: 9px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    box-sizing: border-box;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary, #36261e);
}

.perm-toggle-item:hover {
    border-color: var(--gold, #b45309);
    background: #faf8f5;
    transform: translateY(-1px);
}

.perm-toggle-item.checked {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.4);
    color: #065f46;
}

.perm-toggle-item.disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.perm-toggle-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #059669;
    cursor: pointer;
    margin: 0;
}
