/* ==========================================================================
   Restaurant Management & POS ERP - Mohammed Saber Theme (Pixel-Perfect Clone)
   ========================================================================== */

:root, [data-theme="dark-navy"] {
    --font-primary: 'Cairo', system-ui, -apple-system, sans-serif;
    
    /* Sapphire Navy Theme */
    --bg-main: #0b1328;
    --bg-sidebar: #090e1d;
    --bg-header: #0d172e;
    --bg-card: #121e38;
    --bg-card-alt: #0e182f;
    --bg-card-hover: #172648;
    
    /* Borders */
    --border-card: #1c2e52;
    --border-subtle: rgba(255, 255, 255, 0.08);
    
    /* Accents */
    --primary-amber: #f59e0b;
    --primary-amber-hover: #fbbf24;
    --accent-theme: #38bdf8;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-fire: #f97316;
    
    /* Text */
    --text-white: #ffffff;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    /* ERP Specific */
    --erp-bg-dark: #070d1e;
    --erp-card-bg: #0e172e;
    --erp-card-border: #1c2b4a;
}

/* ==========================================================================
   2. EMERALD OBSIDIAN THEME (الزمردي الإمبراطوري)
   ========================================================================== */
[data-theme="dark-emerald"] {
    --bg-main: #061310;
    --bg-sidebar: #040d0b;
    --bg-header: #081a16;
    --bg-card: #0c241f;
    --bg-card-alt: #091c18;
    --bg-card-hover: #10302a;
    
    --border-card: #154238;
    --border-subtle: rgba(255, 255, 255, 0.08);
    
    --primary-amber: #10b981;
    --primary-amber-hover: #34d399;
    --accent-theme: #10b981;
    --accent-cyan: #2dd4bf;
    --accent-green: #10b981;
    --accent-fire: #f59e0b;
    
    --text-white: #ffffff;
    --text-light: #e2f2ee;
    --text-muted: #86b8ad;
    --text-dark: #4d7a70;

    --erp-bg-dark: #040e0c;
    --erp-card-bg: #0c241f;
    --erp-card-border: #154238;
}

/* ==========================================================================
   3. GOLDEN AMBER THEME (الذهبي الأرستقراطي)
   ========================================================================== */
[data-theme="dark-gold"] {
    --bg-main: #140e06;
    --bg-sidebar: #0d0904;
    --bg-header: #1c1409;
    --bg-card: #241a0d;
    --bg-card-alt: #1a1309;
    --bg-card-hover: #302312;
    
    --border-card: #453219;
    --border-subtle: rgba(255, 255, 255, 0.08);
    
    --primary-amber: #f59e0b;
    --primary-amber-hover: #fbbf24;
    --accent-theme: #f59e0b;
    --accent-cyan: #fbbf24;
    --accent-green: #10b981;
    --accent-fire: #f97316;
    
    --text-white: #ffffff;
    --text-light: #fef3c7;
    --text-muted: #d4a373;
    --text-dark: #8c6d48;

    --erp-bg-dark: #0c0803;
    --erp-card-bg: #241a0d;
    --erp-card-border: #453219;
}

/* ==========================================================================
   4. ROYAL AMETHYST THEME (البنفسجي المخملي)
   ========================================================================== */
[data-theme="dark-amethyst"] {
    --bg-main: #0e0c1c;
    --bg-sidebar: #090812;
    --bg-header: #141126;
    --bg-card: #1c1836;
    --bg-card-alt: #16132b;
    --bg-card-hover: #26204a;
    
    --border-card: #32285e;
    --border-subtle: rgba(255, 255, 255, 0.08);
    
    --primary-amber: #a855f7;
    --primary-amber-hover: #c084fc;
    --accent-theme: #c084fc;
    --accent-cyan: #38bdf8;
    --accent-green: #10b981;
    --accent-fire: #f43f5e;
    
    --text-white: #ffffff;
    --text-light: #f3e8ff;
    --text-muted: #b8a3d4;
    --text-dark: #745f94;

    --erp-bg-dark: #090714;
    --erp-card-bg: #1c1836;
    --erp-card-border: #32285e;
}

/* ==========================================================================
   LIGHT MODE THEME (الوضع الفاتح الأنيق والفاخر)
   ========================================================================== */
[data-theme="light"] {
    --bg-main: #f4f6fb;
    --bg-sidebar: #ffffff;
    --bg-header: #ffffff;
    --bg-card: #ffffff;
    --bg-card-alt: #f8fafc;
    --bg-card-hover: #f1f5f9;
    
    --border-card: #e2e8f0;
    --border-subtle: rgba(0, 0, 0, 0.06);
    
    --text-white: #0f172a;
    --text-light: #1e293b;
    --text-muted: #64748b;
    --text-dark: #94a3b8;

    --erp-bg-dark: #f8fafc;
    --erp-card-bg: #ffffff;
    --erp-card-border: #e2e8f0;
}

[data-theme="light"] body {
    background-color: #f4f6fb;
    color: #1e293b;
}

[data-theme="light"] .app-container {
    background: #f4f6fb;
}

[data-theme="light"] .sidebar {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .top-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .main-content {
    background: #f4f6fb;
}

[data-theme="light"] .nav-section-title {
    color: #94a3b8;
}

[data-theme="light"] .nav-item-link {
    color: #64748b;
}

[data-theme="light"] .nav-item-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

[data-theme="light"] .nav-item-link.active {
    color: #0284c7;
    background: #e0f2fe;
    border-right: 3px solid #0284c7;
    box-shadow: none;
}

[data-theme="light"] .btn-top-dark {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}
[data-theme="light"] .btn-top-dark:hover {
    background: #e2e8f0;
    color: #0f172a;
}

[data-theme="light"] .metric-card-box,
[data-theme="light"] .dashboard-panel,
[data-theme="light"] .studio-section-card,
[data-theme="light"] .studio-card,
[data-theme="light"] .erp-card,
[data-theme="light"] .pro-kpi-card,
[data-theme="light"] .pos-cart-panel,
[data-theme="light"] .food-card,
[data-theme="light"] .kds-card-container {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #1e293b;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .text-white {
    color: #0f172a !important;
}

[data-theme="light"] .studio-table thead th,
[data-theme="light"] .erp-table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .studio-table tbody td,
[data-theme="light"] .erp-table tbody td {
    background: #ffffff !important;
    color: #1e293b !important;
    border-color: #f1f5f9 !important;
}

[data-theme="light"] .studio-table tr:hover td,
[data-theme="light"] .erp-table tr:hover td {
    background: #f8fafc !important;
}

[data-theme="light"] .table-total-row,
[data-theme="light"] .studio-table tfoot tr {
    background: #f8fafc !important;
    border-top: 2px solid #cbd5e1 !important;
}

[data-theme="light"] .table-total-row td,
[data-theme="light"] .studio-table tfoot td {
    background: #f8fafc !important;
    color: #0f172a !important;
}

/* Light Mode Forms & Inputs */
[data-theme="light"] .form-control,
[data-theme="light"] .form-select,
[data-theme="light"] .studio-form-control,
[data-theme="light"] .custom-date-input {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .studio-form-control:focus,
[data-theme="light"] .custom-date-input:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
}

/* Light Mode Report Elements */
[data-theme="light"] .report-tabs-bar {
    background: #eef2f8 !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .report-tab-pill {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}
[data-theme="light"] .report-tab-pill:hover {
    background: #f8fafc !important;
    border-color: #38bdf8 !important;
}
[data-theme="light"] .report-tab-pill.active {
    background: #fffbeb !important;
    border-color: #f59e0b !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15) !important;
}

[data-theme="light"] .erp-filter-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .date-preset-chip {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}
[data-theme="light"] .date-preset-chip:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}
[data-theme="light"] .date-preset-chip.active {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #0f172a !important;
}

[data-theme="light"] .waterfall-flow-container,
[data-theme="light"] .bg-dark-50,
[data-theme="light"] .channel-legend-row,
[data-theme="light"] .dish-profit-card {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .waterfall-step-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .waterfall-bar-track,
[data-theme="light"] .bar-track {
    background: #e2e8f0 !important;
}

[data-theme="light"] .pnl-ledger-item {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}
[data-theme="light"] .pnl-ledger-item:hover {
    background: #f8fafc !important;
}
[data-theme="light"] .pnl-item-num {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

[data-theme="light"] .pnl-final-hero {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    border-color: #10b981 !important;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15) !important;
}

/* ==========================================================================
   Universal High-Contrast Form Controls & Inputs (Dark & Light)
   ========================================================================== */
.form-control, .form-select, input, select, textarea {
    color: #ffffff !important;
    background-color: #080e1e;
    border: 1px solid #1c2e52;
}

input[type="number"], .form-control[type="number"] {
    color: #fbbf24 !important;
    font-weight: 800 !important;
}

.form-control:focus, .form-select:focus, input:focus, select:focus, textarea:focus {
    color: #ffffff !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35) !important;
    outline: none !important;
}

[data-theme="light"] .form-control,
[data-theme="light"] .form-select,
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    color: #0f172a !important;
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] input[type="number"],
[data-theme="light"] .form-control[type="number"] {
    color: #d97706 !important;
    font-weight: 800 !important;
}

[data-theme="light"] .kds-topbar {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .kds-item-card-row {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .modal-studio-card {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .modal-studio-header,
[data-theme="light"] .modal-studio-footer {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
}

body {
    background-color: var(--bg-main);
    color: var(--text-light);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* App Container Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    background: var(--bg-main);
}

/* Sidebar on Right (in RTL) */
.sidebar {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-card, #162444);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 40;
    transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
}

.sidebar.collapsed .brand-header-text,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-item-link span,
.sidebar.collapsed .sidebar-role-switcher {
    display: none !important;
}

.sidebar.collapsed .brand-header-box {
    justify-content: center !important;
    padding: 0.35rem !important;
}

.sidebar.collapsed .nav-item-link {
    justify-content: center !important;
    padding: 0.65rem 0 !important;
}

.sidebar.collapsed .nav-item-link i {
    font-size: 1.25rem !important;
    margin: 0 !important;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    background: var(--bg-main);
}

/* Top Navbar */
.top-navbar {
    height: 60px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-card, #162444);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 30;
    transition: height 0.2s ease;
}

/* Page Body */
.page-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
}

.page-body.page-body-pos {
    padding: 0.5rem 0.75rem !important;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    overflow: hidden !important;
}

@media (max-height: 850px) {
    .top-navbar {
        height: 52px;
        padding: 0 0.85rem;
    }
    .page-body {
        padding: 0.75rem 1rem;
    }
    .page-body.page-body-pos {
        padding: 0.4rem 0.6rem !important;
        height: calc(100vh - 52px);
        max-height: calc(100vh - 52px);
    }
}

/* Brand Flame Box */
.brand-flame-box {
    width: 42px;
    height: 42px;
    background: #f59e0b;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* Navigation Links */
.nav-section-title {
    color: var(--text-dark);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1rem 0.35rem;
    text-align: right;
}

.nav-item-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    margin-bottom: 0.2rem;
    transition: all 0.2s ease;
    text-align: right;
}

.nav-item-link:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item-link.active {
    color: #38bdf8;
    background: #122442;
    border-right: 3px solid #38bdf8;
    box-shadow: inset 0 0 15px rgba(56, 189, 248, 0.08);
}

.nav-item-link i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}

/* Top Buttons */
.btn-top-amber {
    background: #f59e0b;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.45rem 1.15rem;
    border-radius: var(--radius-sm);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
}
.btn-top-amber:hover {
    background: #fbbf24;
    color: #0f172a;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
}

.btn-top-dark {
    background: #14223d;
    color: #cbd5e1;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.45rem 1.15rem;
    border-radius: var(--radius-sm);
    border: 1px solid #1e355c;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
}
.btn-top-dark:hover {
    background: #1b2d4e;
    color: #fff;
}

.badge-live-aspire {
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid #d97706;
    color: #fbbf24;
    padding: 0.35rem 0.95rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dot-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

/* 4 Metric Cards Grid */
.metric-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
    margin-bottom: 1.5rem;
}

.metric-card-box {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    padding: 1.15rem 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.metric-card-box:hover {
    transform: translateY(-2px);
    border-color: #2a4373;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.metric-icon-sq {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.metric-icon-sq.green { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.metric-icon-sq.fire { background: rgba(239, 68, 68, 0.15); color: #f97316; border: 1px solid rgba(239, 68, 68, 0.3); }
.metric-icon-sq.cyan { background: rgba(6, 182, 212, 0.15); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.3); }
.metric-icon-sq.amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }

/* Main 2-Column Analytics Grid */
.dashboard-columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.dashboard-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Progress Bars */
.progress-container {
    background: #0e172a;
    height: 7px;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.progress-fill-cyan {
    background: linear-gradient(90deg, #06b6d4, #38bdf8);
    height: 100%;
    border-radius: 9999px;
}

.progress-fill-gold {
    background: linear-gradient(90deg, #d97706, #f59e0b);
    height: 100%;
    border-radius: 9999px;
}

/* ==========================================================================
   Kitchen Display System (KDS) Custom Grid & Cards (Exact Clone)
   ========================================================================== */
.kds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.kds-card-container {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    min-height: 480px;
}

.kds-topbar {
    background: #14223f;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kds-table-pill {
    background: #3b1828;
    color: #f43f5e;
    border: 1px solid #622036;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
}

.kds-item-card-row {
    background: #0e182f;
    border: 1px solid #1c2e52;
    border-radius: 8px;
    padding: 0.65rem 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kds-qty-badge {
    background: #f59e0b;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 6px;
}

.kds-filter-tab {
    background: #121e38;
    border: 1px solid #1e3056;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #23395d;
}

.kds-filter-tab:hover {
    background: #18284a;
    color: #fff;
}

.kds-filter-tab.active {
    background: #f59e0b;
    color: #0f172a;
    border-color: #f59e0b;
    font-weight: 800;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* Responsive */
@media (max-width: 1200px) {
    .metric-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-columns-grid {
        grid-template-columns: 1fr;
    }
    .kds-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Recipe Costing & BOM Studio - Professional Modal & Grid Design
   ========================================================================== */

.recipes-dish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.25rem;
}

.recipe-dish-card {
    background: #101c38;
    border: 1px solid #1c2e52;
    border-top: 4px solid #f59e0b;
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 290px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.recipe-dish-card:hover {
    background: #142347;
    border-color: #2a4378;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-backdrop-studio {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.88);
    backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-studio-dialog {
    width: 100%;
    max-width: 1050px;
    max-height: 92vh;
    background: #0b1328;
    border: 1px solid #223a68;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95);
    overflow: hidden;
}

.modal-studio-header {
    background: #121e38;
    border-bottom: 1px solid #1c2e52;
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-studio-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.studio-section-card {
    background: #101c38;
    border: 1px solid #1c2e52;
    border-radius: 12px;
    padding: 1.25rem;
}

.studio-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #1c2e52;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.studio-form-grid-4 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 1rem;
}

.studio-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
}

.studio-add-ingredient-bar {
    background: #080e1e;
    border: 1px solid #1c2e52;
    border-radius: 10px;
    padding: 1rem;
    display: grid;
    grid-template-columns: 3fr 1.2fr 1.2fr auto;
    gap: 0.85rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.studio-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: right;
    font-size: 0.88rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #1c2e52;
}

.studio-table th {
    background: #080e1e;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #1c2e52;
}

.studio-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #162444;
    background: #0d172e;
    vertical-align: middle;
}

.studio-table tr:nth-child(even) td {
    background: #0a1122;
}

.studio-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.studio-metric-tile {
    background: #080e1e;
    border: 1px solid #1c2e52;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.modal-studio-footer {
    background: #121e38;
    border-top: 1px solid #1c2e52;
    padding: 1rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 900px) {
    .studio-form-grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .studio-form-grid-2 {
        grid-template-columns: 1fr;
    }
    .studio-add-ingredient-bar {
        grid-template-columns: 1fr;
    }
    .studio-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   POS Terminal - Laptop Optimized (تنسيق شاشات اللاب توب وجميع المقاسات)
   ========================================================================== */

.pos-container {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 0.85rem;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    width: 100%;
    overflow: hidden;
}

@media (max-width: 1200px) {
    .pos-container {
        grid-template-columns: 320px 1fr;
        gap: 0.65rem;
    }
}

@media (max-width: 900px) {
    .pos-container {
        grid-template-columns: 1fr;
        overflow-y: auto;
        height: auto;
    }
}

/* ==========================================================================
   POS Cart Panel (Full Height & Never Overflows on Laptop Screen)
   ========================================================================== */
.pos-cart-panel {
    background: var(--bg-card, #101c38);
    border: 1px solid var(--border-card, #1c2e52);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
}

/* 1. Order Type Switcher (صالة / سفري / توصيل) */
.pos-order-type-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    background: var(--bg-card-alt, #090f20);
    border: 1px solid var(--border-card, #1c2e52);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.pos-type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.pos-type-btn:hover {
    color: var(--text-white, #fff);
    background: rgba(255, 255, 255, 0.05);
}

.pos-type-btn.active {
    background: var(--primary-amber, #f59e0b);
    color: #0b1328;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

/* 2. Table & Customer Inputs */
.pos-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.pos-meta-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pos-meta-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 3px;
    text-align: right;
    white-space: nowrap;
}

.pos-meta-input,
.pos-meta-select {
    height: 32px;
    background: var(--bg-card-alt, #080e1e);
    border: 1px solid var(--border-card, #1c2e52);
    color: var(--text-white, #fff);
    border-radius: 6px;
    font-size: 0.8rem;
    padding: 0 8px;
    width: 100%;
    outline: none;
    text-align: right;
    transition: border-color 0.15s ease;
}

.pos-meta-select {
    color: var(--accent-theme, #38bdf8);
    font-weight: 700;
    cursor: pointer;
}

.pos-meta-input:focus,
.pos-meta-select:focus {
    border-color: var(--primary-amber, #f59e0b);
}

.pos-delivery-box {
    margin-bottom: 0.45rem;
    flex-shrink: 0;
}

.pos-delivery-highlight {
    border-color: rgba(245, 158, 11, 0.45) !important;
    background: rgba(245, 158, 11, 0.05) !important;
}

.pos-delivery-highlight:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.35) !important;
}

[data-theme="light"] .pos-delivery-highlight {
    border-color: #f59e0b !important;
    background: #fffdf5 !important;
}

.pos-customer-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0d172e;
    border: 1px solid var(--primary-amber, #f59e0b);
    border-radius: 8px;
    z-index: 1000;
    max-height: 180px;
    overflow-y: auto;
    margin-top: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.pos-customer-suggestion-item {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.15s ease;
}

.pos-customer-suggestion-item:hover {
    background: rgba(245, 158, 11, 0.15);
}

[data-theme="light"] .pos-customer-dropdown {
    background: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .pos-customer-suggestion-item {
    border-bottom-color: #f1f5f9;
}

[data-theme="light"] .pos-customer-suggestion-item:hover {
    background: #fffbeb;
}

/* 3. Cart Items List (The scrollable middle section) */
.pos-cart-items-list {
    flex: 1 1 auto;
    min-height: 80px;
    overflow-y: auto;
    background: var(--bg-card-alt, #080e1e);
    border: 1px solid var(--border-card, #1c2e52);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Sleek custom scrollbars */
.pos-cart-items-list::-webkit-scrollbar,
.pos-food-grid::-webkit-scrollbar,
.pos-category-scroll::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
.pos-cart-items-list::-webkit-scrollbar-track,
.pos-food-grid::-webkit-scrollbar-track,
.pos-category-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}
.pos-cart-items-list::-webkit-scrollbar-thumb,
.pos-food-grid::-webkit-scrollbar-thumb,
.pos-category-scroll::-webkit-scrollbar-thumb {
    background: var(--border-card, #1c2e52);
    border-radius: 4px;
}
.pos-cart-items-list::-webkit-scrollbar-thumb:hover,
.pos-food-grid::-webkit-scrollbar-thumb:hover,
.pos-category-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-amber, #f59e0b);
}

.pos-cart-empty {
    height: 100%;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted, #94a3b8);
    padding: 1rem;
}

/* Single Cart Item Row */
.pos-cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 8px;
    background: var(--bg-card, #101c38);
    border: 1px solid var(--border-card, #1c2e52);
    border-radius: 6px;
    min-height: 44px;
    transition: background-color 0.15s ease;
}

.pos-cart-item-row:hover {
    background: var(--bg-card-hover, #172648);
}

.pos-item-info {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
}

.pos-item-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-white, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    line-height: 1.25;
}

.pos-item-unit-price {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.2;
}

.pos-item-stepper {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.pos-step-btn {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: var(--bg-card-alt, #080e1e);
    border: 1px solid var(--border-card, #1c2e52);
    color: var(--accent-theme, #38bdf8);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: all 0.15s ease;
}

.pos-step-btn:hover {
    background: var(--primary-amber, #f59e0b);
    color: #0b1328;
    border-color: var(--primary-amber, #f59e0b);
}

.pos-step-qty {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-white, #ffffff);
    min-width: 18px;
    text-align: center;
}

.pos-item-total {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--primary-amber, #f59e0b);
    min-width: 62px;
    text-align: center;
    flex-shrink: 0;
}

.pos-item-del-btn {
    background: transparent;
    border: none;
    color: #f87171;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.pos-item-del-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* 4. Cart Footer (Totals, Payment, Checkout - ALWAYS PINNED AT BOTTOM!) */
.pos-cart-footer {
    margin-top: auto;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pos-footer-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
}

.pos-footer-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-total-label {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-white, #ffffff);
}

.pos-total-amount {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--primary-amber, #f59e0b);
    line-height: 1.1;
}

.pos-payment-methods {
    display: flex;
    gap: 4px;
}

.pos-pay-btn {
    flex: 1;
    height: 32px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    background: var(--bg-card-alt, #090f20);
    color: var(--text-muted, #94a3b8);
    border: 1px solid var(--border-card, #1c2e52);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.pos-pay-btn:hover {
    border-color: var(--primary-amber, #f59e0b);
    color: var(--text-white, #ffffff);
}

.pos-pay-btn.active {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.pos-checkout-btn {
    width: 100%;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0b1328;
    font-weight: 800;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.3);
    transition: all 0.15s ease;
}

.pos-checkout-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(245, 158, 11, 0.4);
}

.pos-checkout-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   POS Menu Panel (Search, Categories, Food Grid - Laptop Sized)
   ========================================================================== */
.pos-menu-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    min-width: 0;
    gap: 0.55rem;
    overflow: hidden;
}

/* Search & Categories Bar */
.pos-filter-card {
    background: var(--bg-card, #101c38);
    border: 1px solid var(--border-card, #1c2e52);
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.pos-filter-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.pos-search-wrap {
    position: relative;
    flex-grow: 1;
    max-width: 520px;
}

.pos-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #94a3b8);
    font-size: 0.8rem;
    pointer-events: none;
}

.pos-search-input {
    width: 100%;
    height: 34px;
    background: var(--bg-card-alt, #080e1e);
    border: 1px solid var(--border-card, #1c2e52);
    color: var(--text-white, #fff);
    padding-right: 2.2rem;
    padding-left: 0.75rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    text-align: right;
    outline: none;
    transition: border-color 0.15s ease;
}

.pos-search-input:focus {
    border-color: var(--primary-amber, #f59e0b);
}

.pos-filter-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pos-refresh-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card-alt, #080e1e);
    border: 1px solid var(--border-card, #1c2e52);
    color: var(--text-muted, #94a3b8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s ease;
}

.pos-refresh-btn:hover {
    color: var(--text-white, #fff);
    border-color: var(--primary-amber, #f59e0b);
    transform: rotate(90deg);
}

.pos-count-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Category Pills */
.pos-category-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.pos-category-pill {
    padding: 0.38rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid var(--border-card, #1c2e52);
    background: var(--bg-card-alt, #090f20);
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pos-category-pill:hover {
    color: var(--text-white, #fff);
    border-color: var(--accent-theme, #38bdf8);
    background: rgba(255, 255, 255, 0.05);
}

.pos-category-pill.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0b1328 !important;
    border-color: #f59e0b;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
}

.pos-pill-count {
    background: rgba(0, 0, 0, 0.28);
    color: inherit;
    border-radius: 9999px;
    padding: 1px 7px;
    font-size: 0.7rem;
    font-weight: 800;
}

.pos-category-pill.active .pos-pill-count {
    background: rgba(0, 0, 0, 0.2);
    color: #0b1328;
}

/* Food Grid (Rich Visual Cards & Smooth Vertical Scrolling) */
.pos-food-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)) !important;
    grid-auto-rows: minmax(315px, max-content) !important;
    align-content: start !important;
    align-items: stretch !important;
    gap: 1.15rem !important;
    flex: 1 1 auto;
    overflow-y: auto !important;
    overflow-x: hidden;
    min-height: 0;
    padding: 0.65rem 0.65rem 5rem 0.65rem;
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    .pos-food-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
        grid-auto-rows: minmax(280px, max-content) !important;
        gap: 0.75rem !important;
        padding-bottom: 4rem;
    }
}

/* Food Card */
.food-card {
    background: var(--bg-card, #101c38);
    border: 1px solid var(--border-card, #1c2e52);
    border-radius: 14px;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    min-height: 315px !important;
    height: 100%;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    user-select: none;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.food-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-amber, #f59e0b);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5), 0 0 16px rgba(245, 158, 11, 0.25);
}

.food-card-img-wrap {
    height: 145px !important;
    min-height: 145px !important;
    max-height: 145px !important;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #080e1e;
    flex-shrink: 0;
}

.food-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.food-card:hover .food-card-img {
    transform: scale(1.08);
}

.food-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: linear-gradient(to top, rgba(16, 28, 56, 1) 0%, rgba(16, 28, 56, 0.5) 50%, transparent 100%);
    pointer-events: none;
}

.food-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(10, 18, 36, 0.85);
    backdrop-filter: blur(8px);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 9999px;
    padding: 2px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

[dir="ltr"] .food-card-badge {
    right: auto;
    left: 8px;
}

.food-card-code-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(10, 18, 36, 0.85);
    backdrop-filter: blur(8px);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.68rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

[dir="ltr"] .food-card-code-badge {
    left: auto;
    right: 8px;
}

.pos-food-body {
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 auto;
    gap: 0.45rem;
}

.pos-food-names {
    margin-bottom: 2px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 48px;
}

.food-name-ar {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-white, #ffffff);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: right;
}

[dir="ltr"] .food-name-ar {
    text-align: left;
}

.food-name-en-wrap {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    max-width: 100%;
}

.food-name-en {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 4px;
    padding: 1px 7px;
    letter-spacing: 0.2px;
    transition: transform 3s ease-in-out;
}

.food-card:hover .food-name-en {
    animation: marquee-text 5s linear infinite alternate;
}

@keyframes marquee-text {
    0% { transform: translateX(0); }
    100% { transform: translateX(-25%); }
}

.food-card-desc {
    font-size: 0.7rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    text-align: right;
    margin-bottom: 4px;
}

[dir="ltr"] .food-card-desc {
    text-align: left;
}

.food-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .food-card-bottom {
    border-top-color: #e2e8f0;
}

.food-card-price-label {
    font-size: 0.65rem;
    color: var(--text-muted, #94a3b8);
    font-weight: 600;
}

.food-card-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-amber, #f59e0b);
}

.food-add-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0b1328;
    border: none;
    font-size: 0.95rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.35);
}

.food-add-btn:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: scale(1.15);
    box-shadow: 0 5px 14px rgba(245, 158, 11, 0.5);
}

.pos-empty-menu {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: var(--bg-card, #101c38);
    border: 1px dashed var(--border-card, #1c2e52);
    border-radius: 12px;
    color: var(--text-muted, #94a3b8);
    text-align: center;
}
.pos-empty-menu i {
    font-size: 2.2rem;
    color: var(--primary-amber, #f59e0b);
    opacity: 0.6;
}

/* Light Theme Theme-Specific Overrides for POS */
[data-theme="light"] .pos-cart-panel,
[data-theme="light"] .pos-filter-card,
[data-theme="light"] .food-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #1e293b;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .pos-order-type-switch,
[data-theme="light"] .pos-cart-items-list,
[data-theme="light"] .pos-search-input,
[data-theme="light"] .pos-refresh-btn,
[data-theme="light"] .pos-category-pill,
[data-theme="light"] .pos-step-btn,
[data-theme="light"] .pos-pay-btn,
[data-theme="light"] .pos-meta-input,
[data-theme="light"] .pos-meta-select {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .pos-cart-item-row {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .pos-item-name,
[data-theme="light"] .food-card-title,
[data-theme="light"] .pos-total-label,
[data-theme="light"] .pos-step-qty {
    color: #0f172a !important;
}

[data-theme="light"] .pos-type-btn.active,
[data-theme="light"] .pos-category-pill.active {
    background: var(--primary-amber, #f59e0b) !important;
    color: #0b1328 !important;
    border-color: var(--primary-amber, #f59e0b) !important;
}

[data-theme="light"] .pos-pay-btn.active {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

/* ==========================================================================
   LTR (English) Mode Overrides (دعم كامل للغة الإنجليزية والاتجاه LTR)
   ========================================================================== */
[dir="ltr"] {
    --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[dir="ltr"] body, 
[dir="ltr"] * {
    font-family: var(--font-primary);
}

/* Sidebar Flip to Left in LTR */
[dir="ltr"] .sidebar {
    border-left: none !important;
    border-right: 1px solid var(--border-card, #162444) !important;
}

[dir="ltr"][data-theme="light"] .sidebar {
    border-left: none !important;
    border-right: 1px solid #e2e8f0 !important;
}

/* Nav Menu Text Alignments in LTR */
[dir="ltr"] .nav-section-title {
    text-align: left;
}

[dir="ltr"] .nav-item-link {
    justify-content: flex-start;
    text-align: left;
}

[dir="ltr"] .nav-item-link.active {
    border-right: none;
    border-left: 3px solid #38bdf8;
}

[dir="ltr"][data-theme="light"] .nav-item-link.active {
    border-right: none;
    border-left: 3px solid #0284c7;
}

/* Top Navbar & Dropdowns in LTR */
[dir="ltr"] .theme-dropdown-header {
    text-align: left;
}

[dir="ltr"] .theme-option-row {
    text-align: left;
}

/* POS Terminal in LTR */
[dir="ltr"] .pos-search-icon {
    right: auto;
    left: 12px;
}

[dir="ltr"] .pos-search-input {
    padding-right: 0.75rem;
    padding-left: 2.2rem;
    text-align: left;
}

[dir="ltr"] .food-card-badge {
    right: auto;
    left: 6px;
}

[dir="ltr"] .pos-item-name {
    text-align: left;
}

[dir="ltr"] .pos-meta-label,
[dir="ltr"] .pos-meta-input,
[dir="ltr"] .pos-meta-select {
    text-align: left;
}

[dir="ltr"] .pos-receipt-paper {
    text-align: left;
}
/* ========================================================================= */
/* THEME & LANGUAGE DROPDOWN MENUS                                           */
/* ========================================================================= */
.theme-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1050;
  min-width: 280px;
  background: var(--bg-card, #121e38);
  border: 1px solid var(--border-card, #1c2e52);
  border-radius: 14px;
  padding: 0.6rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.theme-dropdown-header {
  padding: 0.5rem 0.6rem 0.6rem;
  border-bottom: 1px solid var(--border-card, #1c2e52);
  margin-bottom: 0.4rem;
  text-align: right;
}

.theme-list-items {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.25rem;
}

.theme-option-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.6rem 0.75rem !important;
  border-radius: 8px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--text-light, #e2e8f0) !important;
  cursor: pointer;
  width: 100% !important;
  text-align: right !important;
  transition: all 0.15s ease;
}
.theme-option-row:hover {
  background: var(--bg-card-hover, #172648) !important;
  color: var(--text-white, #ffffff) !important;
}
.theme-option-row.selected {
  background: rgba(24, 119, 242, 0.2) !important;
  border-color: rgba(24, 119, 242, 0.4) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
}

.palette-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.theme-name-text {
  font-size: 0.82rem;
}

.animate-fade-in {
  animation: fadeInMenu 0.18s ease-out;
}
@keyframes fadeInMenu {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Full-screen Login Portal Styles (Matches MainLayout.razor Exactly)
   ========================================================================== */
.login-portal-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at 50% 20%, #15223e 0%, #0a1122 65%, #050812 100%);
    padding: 1.5rem;
    overflow: hidden;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

.login-portal-topbar {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    z-index: 20;
}

.login-util-btn {
    background: rgba(18, 30, 56, 0.75);
    backdrop-filter: blur(8px);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.45rem 0.95rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.login-util-btn:hover {
    background: rgba(30, 48, 88, 0.9);
    border-color: #f59e0b;
    color: #ffffff;
    transform: translateY(-1px);
}

.login-ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    opacity: 0.35;
    z-index: 1;
}
.login-ambient-glow.glow-1 {
    width: 380px;
    height: 380px;
    background: #f59e0b;
    top: -100px;
    right: -100px;
}
.login-ambient-glow.glow-2 {
    width: 440px;
    height: 440px;
    background: #0284c7;
    bottom: -120px;
    left: -120px;
}

.login-card-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
}

.login-brand-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #1877f2 0%, #0d6efd 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(24, 119, 242, 0.35);
}

.login-card-box {
    background: rgba(27, 37, 55, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-group .input-icon {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 3;
}

[dir="ltr"] .login-input-group .input-icon {
    right: auto;
    left: 14px;
}

.login-input,
input.login-input,
.form-control.login-input {
    background: #0d1527 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    padding: 0.72rem 2.6rem 0.72rem 1rem !important;
    font-size: 0.95rem !important;
    caret-color: #38bdf8 !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
}

[dir="ltr"] .login-input,
[dir="ltr"] input.login-input,
[dir="ltr"] .form-control.login-input {
    padding: 0.72rem 1rem 0.72rem 2.6rem !important;
}

.login-input:focus,
input.login-input:focus,
.form-control.login-input:focus {
    background: #111e38 !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35) !important;
    outline: none !important;
}

.login-input::placeholder {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
    opacity: 0.75 !important;
    font-size: 0.88rem !important;
    font-weight: 400 !important;
}

.btn-toggle-pw {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.88rem;
    z-index: 3;
}
[dir="ltr"] .btn-toggle-pw {
    left: auto;
    right: 10px;
}
.btn-toggle-pw:hover {
    color: #1877f2;
}

.login-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-login-submit {
    background: linear-gradient(135deg, #1877f2 0%, #0d6efd 100%);
    border: none;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 800;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 6px 18px rgba(24, 119, 242, 0.35);
}
.btn-login-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(24, 119, 242, 0.5);
    color: #ffffff;
}
.btn-login-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
