/* a-OK POS Custom Styles */

/* Design Tokens - Light Mode Theme Variables */
:root {
    /* Brand Colors */
    --brand-primary: #FF7E47;
    --brand-primary-dark: #E6603A;
    --brand-primary-darker: #CC4D28;
    --brand-primary-light: #FFB399;
    --brand-primary-pale: #FFF0EB;
    --brand-accent: #FF9B6B;
    --brand-accent-dark: #F06C37;

    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-surface: #F1F3F4;
    --bg-elevated: #FAFBFC;

    /* Header Colors */
    --header-bg: #FFFFFF;
    --header-border: var(--border-light);

    /* Text Colors */
    --text-primary: #1A1D23;
    --text-secondary: #5A6C7D;
    --text-muted: #868E96;
    --text-on-brand: #FFFFFF;

    /* Border Colors */
    --border-light: #DEE2E6;
    --border-medium: #CED4DA;
    --border-dark: #ADB5BD;

    /* Status Colors */
    --success: #198754;
    --success-dark: #157347;
    --success-darker: #146C43;
    --success-light: #D1E7DD;
    --warning: #FFC107;
    --warning-dark: #E0A800;
    --warning-darker: #D39E00;
    --warning-light: #FFF3CD;
    --error: #DC3545;
    --error-dark: #B02A37;
    --error-darker: #A02834;
    --error-light: #F8D7DA;
    --info: #0DCAF0;
    --info-dark: #3DD5F3;
    --info-darker: #25CAE0;
    --info-light: #D1ECF1;

    /* Interactive States */
    --hover-overlay: rgba(0, 0, 0, 0.04);
    --active-overlay: rgba(0, 0, 0, 0.08);
    --disabled-opacity: 0.6;

    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    /* Focus Ring */
    --focus-ring: 2px solid var(--brand-primary);
    --focus-ring-offset: 2px;

    /* Mobile-First Design Tokens */
    /* Spacing Scale */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */

    /* Typography Scale - Mobile Base */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */

    /* Touch Target Sizes */
    --touch-min: 44px;       /* Minimum accessible tap target */
    --touch-comfortable: 48px;
    --touch-generous: 56px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;

    /* Z-index Scale */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;

    /* Legacy variables for compatibility */
    --pos-bg-primary: var(--bg-secondary);
    --pos-bg-secondary: var(--bg-primary);
    --pos-text-primary: var(--text-primary);
    --pos-text-secondary: var(--text-secondary);
    --pos-border-color: var(--border-light);
    --pos-card-bg: var(--bg-surface);
    --pos-card-border: var(--border-light);
}

/* Dark mode theme variables */
[data-bs-theme="dark"],
body[data-bs-theme="dark"] {
    /* Brand Colors */
    --brand-primary: #FF7E47;
    --brand-primary-dark: #E6603A;
    --brand-primary-darker: #CC4D28;
    --brand-primary-light: #FFB399;
    --brand-primary-pale: rgba(255, 126, 71, 0.1);
    --brand-accent: #FF9B6B;
    --brand-accent-dark: #F06C37;

    /* Background Colors - Improved contrast */
    --bg-primary: #1E2029;
    --bg-secondary: #282A3A;
    --bg-surface: #34364A;
    --bg-elevated: #3A3D4D;

    /* Header Colors */
    --header-bg: #1A1C26;
    --header-border: var(--border-medium);

    /* Text Colors - Improved readability */
    --text-primary: #EDEDF0;
    --text-secondary: #B4B8C5;
    --text-muted: #868E96;
    --text-on-brand: #FFFFFF;

    /* Border Colors */
    --border-light: #3A3D4D;
    --border-medium: #495057;
    --border-dark: #6C757D;

    /* Status Colors */
    --success: #22A868;
    --success-dark: #1E9A5E;
    --success-darker: #1A8752;
    --success-light: rgba(34, 168, 104, 0.2);
    --warning: #FFC107;
    --warning-dark: #E0A800;
    --warning-darker: #D39E00;
    --warning-light: rgba(255, 193, 7, 0.2);
    --error: #EF4444;
    --error-dark: #DC3545;
    --error-darker: #C82333;
    --error-light: rgba(239, 68, 68, 0.2);
    --info: #3B9CE8;
    --info-dark: #2A8BD9;
    --info-darker: #1E78C7;
    --info-light: rgba(59, 156, 232, 0.2);

    /* Interactive States */
    --hover-overlay: rgba(255, 255, 255, 0.08);
    --active-overlay: rgba(255, 255, 255, 0.12);
    --disabled-opacity: 0.5;

    /* Shadow */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);

    /* Legacy variables for compatibility */
    --pos-bg-primary: var(--bg-primary);
    --pos-bg-secondary: var(--bg-secondary);
    --pos-text-primary: var(--text-primary);
    --pos-text-secondary: var(--text-secondary);
    --pos-border-color: var(--border-light);
    --pos-card-bg: var(--bg-surface);
    --pos-card-border: var(--border-light);
}

/* ============================================
   Header & Navigation - Mobile-First Styles
   ============================================ */

/* Header Container */
.pos-header {
    background: var(--header-bg);
    border-bottom: 2px solid var(--brand-primary);
    padding: var(--space-2) 0;
    margin-bottom: var(--space-8);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

[data-bs-theme="light"] .pos-header {
    box-shadow: var(--shadow-sm);
}

/* Navbar Brand */
.pos-header .navbar-brand {
    font-size: var(--text-xl);
    font-weight: 700;
    padding: var(--space-2) var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--touch-min);
    color: var(--text-primary);
}

[data-bs-theme="light"] .pos-header .navbar-brand {
    color: var(--text-primary);
}

/* Navbar Toggler - Mobile Hamburger */
.pos-header .navbar-toggler {
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    padding: var(--space-3);
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
}

.pos-header .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 126, 71, 0.25);
    border-color: var(--brand-primary);
}

/* Nav Links - Base Styles (applies to all screen sizes) */
.pos-header .nav-link {
    min-height: var(--touch-min);
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: center;
    font-size: var(--text-base);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease, color 0.2s ease;
    color: var(--text-primary);
}

[data-bs-theme="light"] .pos-header .nav-link {
    color: var(--text-primary);
}

[data-bs-theme="light"] .pos-header .nav-link:hover {
    color: var(--brand-primary);
}

/* Active State - Works on all screen sizes */
.pos-header .nav-link.active {
    background: var(--brand-primary);
    color: var(--text-on-brand);
    font-weight: 600;
}

.pos-header .nav-link.active:hover {
    background: var(--brand-primary-dark);
    color: var(--text-on-brand);
}

/* Desktop Navigation (≥992px) */
@media (min-width: 992px) {
    .pos-header .navbar-nav {
        gap: var(--space-2);
    }
    
    .pos-header .nav-link:hover {
        background: var(--hover-overlay);
    }
    
    .pos-header .nav-link.active {
        background: transparent;
        color: var(--brand-primary);
    }
    
    .pos-header .nav-link.active:hover {
        background: var(--hover-overlay);
        color: var(--brand-primary);
    }
}

/* Mobile Navigation (<992px) */
@media (max-width: 991px) {
    .pos-header {
        padding: var(--space-2) 0;
        margin-bottom: var(--space-6);
    }
    
    .pos-header .navbar-collapse {
        background: var(--bg-secondary);
        padding: var(--space-4);
        margin-top: var(--space-3);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }
    
    [data-bs-theme="dark"] .pos-header .navbar-collapse {
        background: var(--bg-surface);
    }
    
    .pos-header .navbar-nav {
        gap: var(--space-1);
    }
    
    .pos-header .nav-link {
        width: 100%;
        padding: var(--space-4);
        margin-bottom: var(--space-1);
        justify-content: flex-start;
    }
    
    .pos-header .nav-link i {
        width: 24px;
        text-align: center;
        margin-right: var(--space-2);
    }
    
    /* Active state: solid brand background on mobile */
    .pos-header .nav-link.active {
        background: var(--brand-primary);
        color: var(--text-on-brand);
    }
    
    .pos-header .nav-link.active:hover {
        background: var(--brand-primary-dark);
        color: var(--text-on-brand);
    }
    
    /* Shift status indicator - left border on mobile */
    .pos-header .nav-item .nav-link.text-success,
    .pos-header .nav-item .nav-link.text-warning {
        border-left: 4px solid currentColor;
        padding-left: var(--space-3);
    }
}

/* Small Mobile (<768px) */
@media (max-width: 767px) {
    .pos-header .navbar-brand {
        font-size: var(--text-lg);
    }
    
    .pos-header .nav-link .badge {
        display: block;
        margin-top: var(--space-1);
        margin-left: 0;
    }
}

/* Extra Small Mobile (<576px) */
@media (max-width: 575px) {
    .pos-header {
        padding: var(--space-2) 0;
        margin-bottom: var(--space-4);
    }
    
    .pos-header .navbar-brand {
        font-size: var(--text-base);
    }
    
    .pos-header .container-fluid {
        padding-left: var(--space-2);
        padding-right: var(--space-2);
    }
}


.pos-sidebar {
    background: var(--pos-bg-secondary);
    min-height: calc(100vh - 100px);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--pos-border-color);
}

.pos-main {
    padding: 1.5rem;
    background: var(--pos-bg-primary);
    border-radius: 12px;
    min-height: calc(100vh - 100px);
    box-shadow: var(--shadow-sm);
}

/* Category tabs - Mobile-First */
.category-tabs {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--space-3) var(--space-2) var(--space-4);
    margin: 0 calc(var(--space-2) * -1);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    max-width: 100%;
    padding: var(--space-2);
}

/* Tablet: 3 columns */
@media (min-width: 576px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-4);
    }
}

/* Desktop: 4 columns */
@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop: 5-6 columns */
@media (min-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1400px) {
    .category-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Consistent Category Buttons - Mobile First */
.category-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--brand-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-sm);
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: var(--touch-comfortable);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Larger touch targets on tablets and up */
@media (min-width: 768px) {
    .category-btn {
        min-height: var(--touch-generous);
        font-size: var(--text-base);
        padding: var(--space-4) var(--space-5);
    }
}

/* Dark mode category buttons */
[data-bs-theme="dark"] .category-btn {
    background: linear-gradient(135deg, var(--pos-card-bg) 0%, var(--pos-bg-primary) 100%);
    border: 2px solid var(--pos-border-color);
    border-left: 4px solid var(--brand-primary);
    color: var(--pos-text-secondary);
}

/* Category button hover state */
.category-btn:hover {
    background: var(--bg-surface);
    border-color: var(--border-medium);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

[data-bs-theme="dark"] .category-btn:hover {
    background: linear-gradient(135deg, var(--brand-primary-dark) 0%, var(--brand-accent-dark) 100%);
    color: var(--text-on-brand);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 126, 71, 0.3), 0 0 15px rgba(255, 155, 107, 0.4);
}

/* Category button active state */
.category-btn:active {
    transform: translateY(1px);
    background: var(--border-light);
}

[data-bs-theme="dark"] .category-btn:active {
    transform: translateY(-1px);
}

/* Category button focus state */
.category-btn:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
}

/* Category button selected state */
.category-btn.active {
    background: var(--brand-primary-pale);
    border-color: var(--brand-primary);
    border-left-color: var(--brand-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

[data-bs-theme="dark"] .category-btn.active {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-darker) 100%);
    color: var(--text-on-brand);
    border-color: var(--brand-primary);
    box-shadow: 0 4px 15px rgba(255, 126, 71, 0.5), 0 0 20px rgba(255, 126, 71, 0.3);
    transform: translateY(-1px);
}

.category-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--brand-primary);
    border-radius: 2px;
}

[data-bs-theme="dark"] .category-btn.active::after {
    background: var(--text-on-brand);
}

/* Category button disabled state */
.category-btn.disabled {
    background: var(--bg-surface) !important;
    color: var(--text-muted) !important;
    border-color: var(--border-light) !important;
    border-left-color: var(--border-medium) !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
}

.category-btn.disabled:hover {
    background: var(--bg-surface) !important;
    color: var(--text-muted) !important;
    border-color: var(--border-light) !important;
    border-left-color: var(--border-medium) !important;
    transform: none !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .category-btn.disabled {
    background: var(--bg-surface) !important;
    color: var(--text-muted) !important;
    border-color: var(--border-light) !important;
    cursor: not-allowed !important;
    opacity: 0.5;
    transform: none !important;
    box-shadow: none !important;
}

/* Item tiles - Mobile First */
.item-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    padding: var(--space-2);
}

/* Single column on very small screens */
@media (max-width: 400px) {
    .item-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

/* 3 columns on tablets */
@media (min-width: 768px) {
    .item-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-5);
        padding: var(--space-3);
    }
}

/* 4 columns on desktop */
@media (min-width: 992px) {
    .item-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-6);
    }
}

/* 5 columns on large desktop */
@media (min-width: 1400px) {
    .item-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.item-tile {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 140px;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    position: relative;
}

/* Larger tiles on bigger screens */
@media (min-width: 768px) {
    .item-tile {
        min-height: 160px;
        padding: var(--space-5);
    }
}

.item-tile[style*="pointer-events: none"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--brand-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

[data-bs-theme="dark"] .item-tile {
    background: var(--pos-card-bg);
    color: var(--text-on-brand);
    border: 2px solid var(--pos-card-border);
}

.item-tile:hover {
    border-color: var(--brand-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-surface);
}

[data-bs-theme="dark"] .item-tile:hover {
    box-shadow: 0 6px 20px rgba(255, 126, 71, 0.4), 0 0 15px rgba(255, 126, 71, 0.2);
    background: var(--pos-bg-primary);
}

.item-tile:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
}

.item-tile h6 {
    font-weight: 600;
    margin-bottom: 0.8rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.3;
}

[data-bs-theme="dark"] .item-tile h6 {
    color: var(--text-on-brand);
}

.item-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--success);
    margin-bottom: 0.8rem;
}

.item-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.item-badges .badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    font-weight: 600;
}

/* Badge styles using design tokens */
.badge-primary {
    background: var(--brand-primary) !important;
    color: var(--text-on-brand) !important;
}

.badge-success {
    background: var(--success) !important;
    color: var(--text-on-brand) !important;
}

.badge-warning {
    background: var(--warning) !important;
    color: var(--text-primary) !important;
}

.badge-danger {
    background: var(--error) !important;
    color: var(--text-on-brand) !important;
}

.badge-info {
    background: var(--info) !important;
    color: var(--text-primary) !important;
}

.badge-secondary {
    background: var(--text-secondary) !important;
    color: var(--text-on-brand) !important;
}

/* Cart sidebar */
.cart-sidebar {
    background: var(--pos-bg-secondary);
    border-left: 3px solid var(--pos-border-color);
    min-height: calc(100vh - 100px);
    padding: 1.5rem;
    color: var(--pos-text-primary);
    box-shadow: var(--shadow-sm);
}

.cart-sidebar h5 {
    color: var(--pos-text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.cart-item {
    background: var(--pos-card-bg);
    border: 1px solid var(--pos-card-border);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    position: relative;
    color: var(--pos-text-primary);
    box-shadow: var(--shadow-sm);
}

.cart-item h6 {
    color: var(--pos-text-primary);
    font-weight: 600;
}

.cart-item .text-muted {
    color: var(--pos-text-secondary) !important;
}

.cart-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    border: none;
    background: none;
    color: var(--error);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cart-item-remove:hover {
    background: var(--error);
    color: var(--text-on-brand);
}

.cart-item-remove:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
}

.cart-totals {
    background: var(--pos-card-bg);
    border: 2px solid var(--brand-primary);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: var(--pos-text-primary);
    box-shadow: var(--shadow-sm);
}

.cart-totals .total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--pos-text-primary);
}

.cart-totals .grand-total {
    border-top: 2px solid var(--brand-primary);
    padding-top: 0.5rem;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--pos-text-primary);
}

/* Sticky Bottom Cart Summary Bar - Mobile Only */
.cart-sticky-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 2px solid var(--brand-primary);
    padding: var(--space-4) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: var(--z-fixed);
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

/* Mobile POS Layout - Hide cart sidebar on mobile, show sticky bottom bar */
@media (max-width: 991.98px) {
    .pos-interface .cart-sidebar {
        display: none !important;
    }
    
    .cart-sticky-bottom {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    .cart-sticky-bottom {
        display: none !important;
    }
}

[data-bs-theme="dark"] .cart-sticky-bottom {
    background: var(--bg-surface);
    border-top-color: var(--brand-primary);
}

.cart-sticky-bottom .cart-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.cart-sticky-bottom .cart-summary-line {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-primary);
}

.cart-sticky-bottom .cart-icon {
    font-size: var(--text-lg);
    color: var(--brand-primary);
}

.cart-sticky-bottom .cart-count {
    font-weight: 600;
    font-size: var(--text-base);
}

.cart-sticky-bottom .cart-total {
    font-weight: bold;
    font-size: var(--text-xl);
    color: var(--success);
}

.cart-sticky-bottom .btn-view-cart {
    flex-shrink: 0;
    min-height: var(--touch-min);
    padding: var(--space-3) var(--space-5);
    font-weight: 600;
    white-space: nowrap;
}

/* Adjust main content bottom padding when sticky cart is visible */
@media (max-width: 991px) {
    .pos-interface {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* Button improvements using design tokens */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-width: 1px;
    border-style: solid;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
}

.btn-primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--text-on-brand);
}

.btn-primary:hover {
    background: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
    color: var(--text-on-brand);
}

.btn-primary:active {
    background: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
    color: var(--text-on-brand);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: var(--text-on-brand);
}

.btn-success:hover {
    background: var(--success-dark);
    border-color: var(--success-darker);
    color: var(--text-on-brand);
}

.btn-warning {
    background: var(--warning);
    border-color: var(--warning);
    color: var(--text-primary);
}

.btn-warning:hover {
    background: var(--warning-dark);
    border-color: var(--warning-darker);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--error);
    border-color: var(--error);
    color: var(--text-on-brand);
}

.btn-danger:hover {
    background: var(--error-dark);
    border-color: var(--error-darker);
    color: var(--text-on-brand);
}

.btn-info {
    background: var(--info);
    border-color: var(--info);
    color: var(--text-primary);
}

.btn-info:hover {
    background: var(--info-dark);
    border-color: var(--info-darker);
    color: var(--text-primary);
}

.btn-secondary {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
    color: var(--text-on-brand);
}

.btn-secondary:hover {
    background: var(--text-secondary);
    border-color: var(--text-muted);
    color: var(--text-on-brand);
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-outline-primary:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--text-on-brand);
}

.btn-outline-secondary {
    background: transparent;
    border-color: var(--border-medium);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
    color: var(--text-on-brand);
}

.btn-outline-success {
    background: transparent;
    border-color: var(--success);
    color: var(--success);
}

.btn-outline-success:hover {
    background: var(--success);
    border-color: var(--success);
    color: var(--text-on-brand);
}

.btn-outline-warning {
    background: transparent;
    border-color: var(--warning);
    color: var(--warning);
}

.btn-outline-warning:hover {
    background: var(--warning);
    border-color: var(--warning);
    color: var(--text-primary);
}

.btn-outline-danger {
    background: transparent;
    border-color: var(--error);
    color: var(--error);
}

.btn-outline-danger:hover {
    background: var(--error);
    border-color: var(--error);
    color: var(--text-on-brand);
}

.btn-outline-info {
    background: transparent;
    border-color: var(--info);
    color: var(--info);
}

.btn-outline-info:hover {
    background: var(--info);
    border-color: var(--info);
    color: var(--text-primary);
}

/* Small remove buttons for cart items */
.btn-remove {
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    font-size: 0.7rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--error);
    background: transparent;
    color: var(--error);
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: var(--error);
    color: var(--text-on-brand);
    transform: scale(1.1);
}

.btn-remove:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
}

/* Form controls */
.form-control {
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem var(--brand-primary-pale);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-select {
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem var(--brand-primary-pale);
}

/* Table improvements */
.table {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    margin-bottom: 0;
}

/* Light mode specific table styles */
[data-bs-theme="light"] .table,
body[data-bs-theme="light"] .table,
.table {
    --bs-table-bg: var(--bg-primary);
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-light);
    --bs-table-striped-bg: var(--bg-surface);
    --bs-table-hover-bg: var(--bg-surface);
    --bs-table-active-bg: var(--brand-primary-pale);
}

/* Dark mode table styles */
[data-bs-theme="dark"] .table,
body[data-bs-theme="dark"] .table {
    --bs-table-bg: var(--pos-card-bg);
    --bs-table-color: var(--pos-text-primary);
    --bs-table-border-color: var(--pos-border-color);
    --bs-table-striped-bg: var(--pos-bg-primary);
    --bs-table-hover-bg: var(--pos-bg-primary);
    background: var(--pos-card-bg);
    color: var(--pos-text-primary);
}

.table thead th {
    background: var(--brand-primary);
    color: var(--text-on-brand);
    border: none;
    font-weight: 600;
    padding: 0.75rem;
    text-align: left;
}

.table tbody td {
    padding: 0.75rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .table tbody td {
    border-top: 1px solid var(--pos-border-color);
    background: var(--pos-card-bg);
    color: var(--pos-text-primary);
}

.table tbody tr:hover td {
    background: var(--bg-surface);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .table tbody tr:hover td {
    background: var(--pos-bg-primary);
    color: var(--pos-text-primary);
}

.table-striped tbody tr:nth-of-type(odd) td {
    background: var(--bg-surface);
}

[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd) td {
    background: var(--pos-bg-primary);
}

.table-striped tbody tr:nth-of-type(odd):hover td {
    background: var(--border-light);
}

[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd):hover td {
    background: var(--pos-bg-secondary);
}

/* Status badges */
.badge {
    border-radius: 20px;
    font-weight: 500;
}

.status-active {
    background: var(--success);
    color: var(--text-on-brand);
}

.status-locked {
    background: var(--error);
    color: var(--text-on-brand);
}

.status-held {
    background: var(--warning);
    color: var(--text-primary);
}

.status-paid {
    background: var(--success);
    color: var(--text-on-brand);
}

/* Login form */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--info) 100%);
}

.login-card {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    color: var(--brand-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.login-form .input-group {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
    height: 48px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-primary);
    transition: all 0.2s ease;
}

.login-form .input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.login-form .input-group-text i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.1rem;
    line-height: 1;
    vertical-align: middle;
    transform: translateY(0);
}

.login-form .input-group .form-control {
    display: flex;
    align-items: center;
    border: none;
    outline: none;
    padding: 0 1rem 0 0;
    height: 100%;
    line-height: 1;
    flex: 1;
    background: transparent;
    border-radius: 0;
    position: relative;
    z-index: 1;
}

.login-form .input-group .form-control::placeholder {
    line-height: 1;
}

.login-form .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1;
    height: 48px;
}

.login-form .btn-primary i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    line-height: 1;
    vertical-align: middle;
}

.login-form .form-control {
    border-radius: 8px;
    border: 2px solid var(--border-light);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    height: 48px;
    line-height: 1.5;
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.login-form .form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
    line-height: 1.5;
}

.login-form .form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem var(--brand-primary-pale);
}

.login-form .input-group:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem var(--brand-primary-pale);
}

.login-form .input-group:focus-within .input-group-text {
    color: var(--brand-primary);
}

.login-form .btn-primary {
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 600;
    width: 100%;
}

/* Dark mode login form adjustments */
[data-bs-theme="dark"] .login-form .input-group {
    background: var(--bg-surface);
    border-color: var(--border-light);
}

[data-bs-theme="dark"] .login-form .input-group-text {
    width: 40px;
    padding: 0;
    margin: 0;
}

[data-bs-theme="dark"] .login-form .input-group-text i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.1rem;
    line-height: 1;
    vertical-align: middle;
    transform: translateY(0);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.4;
}

[data-bs-theme="dark"] .login-form .input-group .form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.4;
    line-height: 1;
}

[data-bs-theme="dark"] .login-form .input-group:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem var(--brand-primary-pale);
}

[data-bs-theme="dark"] .login-form .input-group:focus-within .input-group-text {
    color: var(--brand-primary);
}

/* Modal improvements */
.modal-content {
    border-radius: 12px;
    border: 2px solid var(--pos-border-color);
    background: var(--pos-card-bg);
}

[data-bs-theme="dark"] .modal-content {
    --bs-modal-bg: var(--pos-card-bg);
    --bs-modal-color: var(--pos-text-primary);
    --bs-modal-border-color: var(--pos-border-color);
}

.modal-header {
    background: var(--brand-primary);
    color: var(--text-on-brand);
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid var(--brand-primary);
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    background: var(--pos-card-bg);
    color: var(--pos-text-primary);
}

.modal-footer {
    background: var(--pos-card-bg);
    border-top: 1px solid var(--pos-border-color);
    border-radius: 0 0 12px 12px;
}

/* Item selection modal specific styles */
.item-modal .modal-header {
    background: var(--brand-primary);
    color: var(--text-on-brand);
}

.item-modal .modal-title {
    color: var(--text-on-brand);
    font-weight: 600;
}

/* Responsive modal for mobile devices */
.item-modal .modal-dialog {
    max-width: 90%;
    width: auto;
    margin: 1rem auto;
}

.item-modal .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.item-modal .modal-body {
    overflow-y: auto;
    max-height: calc(90vh - 140px);
    padding: 1rem;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .item-modal .modal-dialog {
        max-width: 95%;
        margin: 0.5rem auto;
    }

    .item-modal .modal-content {
        max-height: 95vh;
    }

    .item-modal .modal-body {
        max-height: calc(95vh - 120px);
        padding: 0.75rem;
    }

    .item-modal .modal-header {
        padding: 0.75rem 1rem;
    }

    .item-modal .modal-title {
        font-size: 1.25rem;
    }

    .item-modal .modal-footer {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .item-modal .modal-footer .btn {
        flex: 1 1 auto;
        min-width: 120px;
    }

    /* Adjust option cards for mobile */
    .option-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }

    .option-card {
        padding: 0.75rem;
        min-height: 56px;
    }

    .option-content {
        margin-left: 0.75rem;
    }

    .option-name {
        font-size: 0.9rem;
    }

    .option-price {
        font-size: 0.85rem;
    }

    /* Quantity controls for mobile */
    .quantity-controls {
        gap: 0.25rem;
    }

    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .qty-input {
        width: 38px;
        height: 28px;
        font-size: 0.85rem;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .item-modal .modal-dialog {
        max-width: 98%;
        margin: 0.25rem auto;
    }

    .item-modal .modal-content {
        max-height: 98vh;
        border-radius: 8px;
    }

    .item-modal .modal-body {
        max-height: calc(98vh - 110px);
        padding: 1rem;
    }

    .item-modal .modal-header {
        padding: 0.5rem 0.75rem;
        border-radius: 8px 8px 0 0;
    }

    .item-modal .modal-title {
        font-size: 1.1rem;
    }

    .item-modal .modal-footer {
        padding: 0.5rem 0.75rem;
        border-radius: 0 0 8px 8px;
    }

    .item-modal .modal-footer .btn {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Option grid layout */
.option-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 992px) {
    .option-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Prevent modal overflow on mobile */
.modal-content {
    overflow-x: hidden;
}

.modal-body {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Modifier group header - ensure label wraps properly */
.modal-body .d-flex.justify-content-between.align-items-center {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
}

.modal-body .d-flex.justify-content-between.align-items-center h6 {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.modal-body .d-flex.justify-content-between.align-items-center .selection-counter {
    flex: 0 0 auto;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
    text-align: right;
}

@media (max-width: 768px) {
    .modal-body .d-flex.justify-content-between.align-items-center {
        gap: 0.25rem;
    }

    .modal-body .d-flex.justify-content-between.align-items-center h6 {
        flex-basis: 100%;
        margin-bottom: 0.25rem;
        padding-right: 0;
    }

    .modal-body .selection-counter {
        flex-basis: 100%;
        text-align: left;
        margin-top: 0.25rem;
    }
}

@media (max-width: 576px) {
    .modal-body .d-flex.justify-content-between.align-items-center {
        gap: 0.25rem;
    }

    .modal-body .d-flex.justify-content-between.align-items-center h6 {
        flex-basis: 100%;
        margin-bottom: 0.25rem;
        font-size: 0.9rem;
    }

    .modal-body .selection-counter {
        flex-basis: 100%;
        text-align: left;
        margin-top: 0.25rem;
    }
}

/* Option cards */
.option-card {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: 8px;
    padding: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0;
    position: relative;
    min-height: 64px;
}

[data-bs-theme="dark"] .option-card {
    background: var(--pos-card-bg);
    border-color: var(--pos-border-color);
}

.option-card:hover {
    border-color: var(--brand-primary);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

[data-bs-theme="dark"] .option-card:hover {
    background: var(--pos-bg-primary);
    box-shadow: 0 4px 12px rgba(255, 126, 71, 0.15);
}

.option-card:focus-within {
    outline: var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
}

/* Selected state */
.option-card:has(.option-input:checked) {
    border-color: var(--brand-primary);
    background: var(--brand-primary-pale);
    box-shadow: var(--shadow-sm);
}

[data-bs-theme="dark"] .option-card:has(.option-input:checked) {
    background: rgba(255, 126, 71, 0.1);
    border-color: var(--brand-primary);
}

/* Disabled state */
.option-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-surface);
    border-color: var(--border-light);
}

.option-card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-light);
    background: var(--bg-surface);
}

/* Option input (radio/checkbox) */
.option-input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--brand-primary);
    align-self: flex-start;
    margin-top: 2px;
}

/* Option content */
.option-content {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 0.875rem;
    margin-right: 0;
    width: calc(100% - 0.875rem - 20px);
    min-width: 0;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: 32px;
}

.option-name {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: none;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.4;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
}

[data-bs-theme="dark"] .option-name {
    color: var(--pos-text-primary);
}

.option-price {
    font-weight: 600;
    color: var(--success);
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    line-height: 1.4;
    white-space: nowrap;
}

/* Quantity controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    margin-left: auto;
    height: 32px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-medium);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

[data-bs-theme="dark"] .qty-btn {
    background: var(--pos-bg-primary);
    border-color: var(--pos-border-color);
    color: var(--pos-text-primary);
}

.qty-btn:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--text-on-brand);
}

.qty-btn:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 1px;
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-surface);
    color: var(--text-muted);
}

.qty-btn:disabled:hover {
    background: var(--bg-surface);
    border-color: var(--border-light);
    color: var(--text-muted);
}

.qty-input {
    width: 44px;
    height: 32px;
    text-align: center;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-weight: 600;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 0 0.25rem;
    line-height: 1.4;
}

[data-bs-theme="dark"] .qty-input {
    background: var(--pos-bg-secondary);
    border-color: var(--pos-border-color);
    color: var(--pos-text-primary);
}

.qty-input:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 1px;
    border-color: var(--brand-primary);
}

/* Selection counter */
.selection-counter {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    white-space: nowrap;
    flex-shrink: 0;
}

[data-bs-theme="dark"] .selection-counter {
    background: var(--pos-bg-primary);
    border-color: var(--pos-border-color);
    color: var(--pos-text-secondary);
}

/* Mobile responsiveness for option group headers and labels */
@media (max-width: 768px) {
    .modal-body h6 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .selection-counter {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }

    /* Ensure option content wraps properly */
    .option-content {
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
    }

    .option-name {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 0;
        margin-bottom: 0.25rem;
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
        hyphens: manual;
    }

    .option-price {
        flex-shrink: 0;
        font-size: 0.8rem;
        margin-left: 0;
        margin-right: 0.5rem;
    }

    /* Adjust quantity controls to prevent overflow */
    .quantity-controls {
        flex-shrink: 0;
        margin-left: auto;
        margin-top: 0.25rem;
    }
}

@media (max-width: 991.98px) {
    .selection-counter {
        font-size: 0.7rem;
        padding: 0.15rem 0.35rem;
    }

    /* Force single column layout on mobile */
    .option-grid {
        grid-template-columns: 1fr !important;
        display: grid !important;
    }

    /* Force option cards to full width */
    .option-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
    }

    /* Force option content to use available space */
    .option-content {
        width: auto !important;
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }

    /* Force horizontal text layout */
    .option-name {
        font-size: 0.9rem !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
        display: block !important;
    }
}

/* Guest hold modal */
.guest-hold-checkbox {
    cursor: pointer;
    width: 1.2rem;
    height: 1.2rem;
}

.guest-hold-checkbox:checked + label {
    font-weight: 600;
}

#guest-hold-options .list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

#guest-hold-options .list-group-item:has(.guest-hold-checkbox:checked) {
    background-color: var(--brand-primary-pale);
    border-left-color: var(--brand-primary);
}

/* Category tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    border-bottom: 2px solid var(--border-light);
}

/* Legacy support for existing classes */
.variant-option, .modifier-option {
    display: none !important;
}

.price-breakdown {
    background: var(--pos-card-bg);
    border: 2px solid var(--brand-primary);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: var(--pos-text-primary);
}

.price-breakdown h6 {
    color: var(--brand-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--pos-text-primary);
}

.price-line.total {
    border-top: 2px solid var(--brand-primary);
    padding-top: 0.5rem;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Quantity controls */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--brand-primary);
    background: var(--bg-primary);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: var(--brand-primary);
    color: var(--text-on-brand);
}

.quantity-btn:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
}

.quantity-input {
    width: 80px;
    text-align: center;
    border: 2px solid var(--pos-border-color);
    border-radius: 6px;
    padding: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Notes input */
.notes-input {
    border: 2px solid var(--pos-border-color);
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
    width: 100%;
    color: var(--pos-text-primary);
    background: var(--pos-card-bg);
}

.notes-input:focus {
    border-color: var(--brand-primary);
    outline: none;
    box-shadow: 0 0 0 0.2rem var(--brand-primary-pale);
}

/* Dashboard widgets */
.dashboard-widget {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.dashboard-widget:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dashboard-widget h3 {
    font-size: 2rem;
    font-weight: bold;
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
}

.dashboard-widget p {
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

/* Settings sections */
.settings-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.settings-section h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brand-primary);
}

/* Alert styles */
.alert {
    border-radius: 8px;
    border-width: 1px;
    font-size: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: var(--success-light);
    border-color: var(--success);
    color: var(--success-darker);
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(25, 135, 84, 0.25);
    border-color: var(--success);
    color: var(--text-primary);
}

.alert-warning {
    background-color: var(--warning-light);
    border-color: var(--warning);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(255, 193, 7, 0.25);
    border-color: var(--warning);
    color: var(--text-primary);
}

.alert-danger {
    background-color: var(--error-light);
    border-color: var(--error);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(220, 53, 69, 0.25);
    border-color: var(--error);
    color: var(--text-primary);
}

.alert-info {
    background-color: var(--info-light);
    border-color: var(--info);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .alert-info {
    background-color: rgba(13, 202, 240, 0.25);
    border-color: var(--info);
    color: var(--text-primary);
}

/* Enhanced toast visibility */
.alert.show {
    opacity: 1;
}

.alert strong {
    font-weight: 600;
}

/* Text utilities */
.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--error) !important;
}

.text-info {
    color: var(--info) !important;
}

.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Focus ring utility */
.focus-ring:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-ring-offset);
}

/* Theme transition and forced update */
* {
    transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}

/* Force immediate style recalculation on theme change */
[data-bs-theme] * {
    animation: none !important;
}

/* Ensure theme variables are inherited properly */
html[data-bs-theme="light"],
body[data-bs-theme="light"] {
    color-scheme: light;
}

html[data-bs-theme="dark"],
body[data-bs-theme="dark"] {
    color-scheme: dark;
}

/* Lock screen overlay */
.lock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lock-modal {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.lock-modal h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.lock-modal p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Receipt styles */
.receipt {
    max-width: 400px;
    font-family: 'Courier New', monospace;
}

.receipt-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.1rem;
    border-top: 1px solid var(--border-medium);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* Card styles */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.card-body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Print styles */
@media print {
    .card-header,
    .btn,
    .alert {
        display: none !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }

    body {
        background: #FFFFFF !important;
        color: #000000 !important;
    }
}

/* === PIN EYE TOGGLE: ICON-ONLY, NO CHROME === */

/* Positioning context */
.login-form .input-group { position: relative; }

/* Reserve space for the icon so text doesn't overlap */
.login-form .input-group .form-control { padding-right: 2.5rem !important; }

/* Icon-only button: absolutely positioned, no background/border/box */
.login-form .input-group #pin-visibility-toggle,
.login-form .input-group [data-testid="pin-visibility-toggle"],
.login-form .input-group #pin-visibility-toggle.btn,
.login-form .input-group [data-testid="pin-visibility-toggle"].btn,
.login-form .input-group #pin-visibility-toggle.input-group-text,
.login-form .input-group [data-testid="pin-visibility-toggle"].input-group-text,
.login-form .input-group #pin-visibility-toggle.btn-pin-toggle,
.login-form .input-group [data-testid="pin-visibility-toggle"].btn-pin-toggle {
  /* Nuclear reset: remove ALL visual chrome */
  position: absolute !important;
  top: 50% !important;
  right: 10px !important;
  transform: translateY(-50%) !important;

  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10 !important;
  pointer-events: auto !important;

  /* Remove all borders, backgrounds, shadows, outlines */
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-style: none !important;
  border-width: 0 !important;
  border-top-width: 0 !important;
  border-right-width: 0 !important;
  border-bottom-width: 0 !important;
  border-left-width: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  outline-width: 0 !important;
  outline-style: none !important;
  padding: 0 !important;
  margin: 0 !important;

  /* Color only */
  color: var(--text-secondary) !important;
  cursor: pointer !important;
}

/* Kill pseudo-elements */
.login-form .input-group #pin-visibility-toggle::before,
.login-form .input-group #pin-visibility-toggle::after,
.login-form .input-group [data-testid="pin-visibility-toggle"]::before,
.login-form .input-group [data-testid="pin-visibility-toggle"]::after {
  content: none !important;
  display: none !important;
}

/* Center the icon glyph */
.login-form .input-group #pin-visibility-toggle i,
.login-form .input-group [data-testid="pin-visibility-toggle"] i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  line-height: 1;
  vertical-align: middle;
}

/* Hover: color change only, no background/border */
.login-form .input-group #pin-visibility-toggle:hover,
.login-form .input-group [data-testid="pin-visibility-toggle"]:hover,
.login-form .input-group:focus-within #pin-visibility-toggle,
.login-form .input-group:focus-within [data-testid="pin-visibility-toggle"] {
  color: var(--brand-primary) !important;
  background: none !important;
  background-color: transparent !important;
  border: 0 !important;
  border-style: none !important;
  box-shadow: none !important;
}

/* Focus: circular outline around icon only, no background/border */
.login-form .input-group #pin-visibility-toggle:focus-visible,
.login-form .input-group [data-testid="pin-visibility-toggle"]:focus-visible {
  outline: 2px solid var(--brand-primary) !important;
  outline-offset: 2px;
  border-radius: 9999px;
  background: none !important;
  background-color: transparent !important;
  border: 0 !important;
  border-style: none !important;
  box-shadow: none !important;
}

/* Dark mode */
[data-bs-theme="dark"] .login-form .input-group #pin-visibility-toggle,
[data-bs-theme="dark"] .login-form .input-group [data-testid="pin-visibility-toggle"] {
  color: var(--text-muted) !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

[data-bs-theme="dark"] .login-form .input-group #pin-visibility-toggle:hover,
[data-bs-theme="dark"] .login-form .input-group:focus-within #pin-visibility-toggle,
[data-bs-theme="dark"] .login-form .input-group:focus-within [data-testid="pin-visibility-toggle"] {
  color: var(--text-secondary) !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* --- Hard center for input icons --- */
.login-form .input-group {
    align-items: stretch;
    height: 48px;
}

/* Use grid to get pixel-perfect center and kill baseline effects */
.login-form .input-group-text {
    display: grid !important;
    place-items: center !important;
    width: 40px;
    height: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    line-height: 0 !important;
}

/* Normalize the <i> glyph box */
.login-form .input-group-text i {
    font-size: 1.1rem;
    width: 1.25rem;
    height: 1.25rem;
    display: inline-grid;
    place-items: center;
    line-height: 0 !important;
    vertical-align: middle;
    transform: none !important;
}

/* Ensure the input vertically centers its text (visual parity) */
.login-form .input-group .form-control {
    display: flex;
    align-items: center;
    line-height: 1.2;
}

/* Button: center icon+label as a unit */
.login-form .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1;
    height: 48px;
}

.login-form .btn-primary i {
    display: inline-grid;
    place-items: center;
    width: 1em;
    height: 1em;
    line-height: 0 !important;
    vertical-align: middle;
}

/* Dark theme mirrors */
[data-bs-theme="dark"] .login-form .input-group-text {
    display: grid !important;
    place-items: center !important;
    line-height: 0 !important;
}

[data-bs-theme="dark"] .login-form .input-group-text i {
    display: inline-grid;
    place-items: center;
    line-height: 0 !important;
    transform: none !important;
}

/* ============================================
   Tables Page - Mobile-First Styles
   ============================================ */

/* Page Header - Mobile optimized */
.container-fluid .d-flex.justify-content-between.align-items-center {
    gap: var(--space-3);
    flex-wrap: wrap;
}

.container-fluid .d-flex.justify-content-between.align-items-center h2 {
    font-size: var(--text-2xl);
    margin: 0;
}

/* Table Cards - Mobile First */
#tables-container .card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#tables-container .card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

#tables-container .card-body {
    padding: var(--space-4);
}

/* Table Card Title */
#tables-container .card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

/* Status Badges */
#tables-container .badge {
    font-size: var(--text-xs);
    font-weight: 600;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

/* Guest Count and Info */
#tables-container .text-muted {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Guests List Section */
#tables-container .mb-3:has(.badge.bg-secondary) {
    background: var(--bg-secondary);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    margin-top: var(--space-3);
}

#tables-container .badge.bg-secondary {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
    margin-bottom: var(--space-1);
}

/* Action Buttons - Mobile Optimized */
#tables-container .d-flex.gap-2.flex-wrap {
    gap: var(--space-2) !important;
    margin-top: var(--space-3);
}

#tables-container .btn-sm {
    min-height: var(--touch-min);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

/* Primary action buttons get full width on mobile */
@media (max-width: 575px) {
    #tables-container .btn-sm.btn-primary,
    #tables-container .btn-sm.btn-success {
        flex: 1 1 calc(50% - var(--space-2));
        justify-content: center;
    }
    
    /* Icon-only buttons stay compact */
    #tables-container .btn-sm.btn-outline-secondary,
    #tables-container .btn-sm.btn-outline-info,
    #tables-container .btn-sm.btn-outline-danger {
        flex: 0 0 var(--touch-min);
        justify-content: center;
        padding: var(--space-2);
    }
}

/* Tablet and up - all buttons inline */
@media (min-width: 576px) {
    #tables-container .d-flex.gap-2.flex-wrap {
        flex-wrap: nowrap;
    }
}

/* Empty State */
#tables-container .text-center.text-muted {
    padding: var(--space-12) var(--space-4);
}

#tables-container .text-center.text-muted i {
    color: var(--text-muted);
    opacity: 0.5;
}

#tables-container .text-center.text-muted h4 {
    font-size: var(--text-xl);
    margin-top: var(--space-4);
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
}

#tables-container .text-center.text-muted p {
    font-size: var(--text-base);
    color: var(--text-muted);
}

/* Create New Table Button - Mobile Optimized */
#new-table-btn-page {
    min-height: var(--touch-min);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 575px) {
    #new-table-btn-page {
        font-size: var(--text-xs);
        padding: var(--space-2) var(--space-3);
    }
    
    #new-table-btn-page i {
        margin-right: var(--space-1) !important;
    }
}

/* Dark Mode Support */
[data-bs-theme="dark"] #tables-container .card {
    background: var(--bg-primary);
    border-color: var(--border-light);
}

[data-bs-theme="dark"] #tables-container .mb-3:has(.badge.bg-secondary) {
    background: var(--bg-surface);
}

[data-bs-theme="dark"] #tables-container .text-muted {
    color: var(--text-muted);
}

[data-bs-theme="dark"] #tables-container .card-title {
    color: var(--text-primary);
}

/* ============================================
   Orders/History Page - Mobile-First Styles
   ============================================ */

/* Filter Form - Mobile Optimized */
.card .card-body form.row {
    gap: var(--space-4);
}

.card .card-body form .form-label {
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
}

.card .card-body form .form-control,
.card .card-body form .form-select {
    min-height: var(--touch-min);
    font-size: var(--text-base);
    border-radius: var(--radius-md);
}

/* Filter buttons */
.card .card-body form button[type="submit"],
.card .card-body form .btn {
    min-height: var(--touch-min);
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-base);
    font-weight: 500;
}

@media (max-width: 767px) {
    .card .card-body form button[type="submit"],
    .card .card-body form .btn {
        width: 100%;
        margin-left: 0 !important;
        margin-top: var(--space-2);
    }
}

/* Orders Table - Mobile Card View */
@media (max-width: 767px) {
    /* Hide table header on mobile */
    .table-responsive thead {
        display: none;
    }
    
    /* Hide the default table structure, show tbody as flex */
    .table-responsive table {
        border: none;
        background: transparent;
    }
    
    .table-responsive tbody {
        display: flex;
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .table-responsive tr {
        display: block;
        background: var(--bg-surface);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-lg);
        padding: var(--space-4);
        margin-bottom: var(--space-3);
        box-shadow: var(--shadow-sm);
    }
    
    .table-responsive td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-2) 0;
        border: none;
    }
    
    .table-responsive td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: var(--text-sm);
        color: var(--text-secondary);
        margin-right: var(--space-3);
    }
    
    .table-responsive td:first-child {
        font-size: var(--text-lg);
        font-weight: 700;
        padding-bottom: var(--space-3);
        border-bottom: 1px solid var(--border-light);
        margin-bottom: var(--space-2);
    }
    
    .table-responsive td:first-child::before {
        display: none;
    }
    
    .table-responsive td:last-child {
        border-top: 1px solid var(--border-light);
        padding-top: var(--space-3);
        margin-top: var(--space-2);
    }
    
    /* Action buttons in mobile cards */
    .table-responsive .btn-group {
        display: flex;
        gap: var(--space-2);
        width: 100%;
    }
    
    .table-responsive .btn-group .btn {
        min-height: var(--touch-min);
        flex: 1;
    }
}

/* Pagination - Mobile Optimized */
.pagination {
    gap: var(--space-1);
    flex-wrap: wrap;
}

.pagination .page-link {
    min-height: var(--touch-min);
    min-width: var(--touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    padding: var(--space-2) var(--space-3);
}

@media (max-width: 575px) {
    .pagination {
        justify-content: center;
    }
    
    /* Hide page numbers on very small screens, keep prev/next */
    .pagination .page-item:not(:first-child):not(:last-child):not(.active) {
        display: none;
    }
    
    .pagination .page-item.active {
        display: flex;
    }
}

/* Empty State - Mobile Optimized */
.card-body.text-center.py-5 {
    padding: var(--space-12) var(--space-4) !important;
}

.card-body.text-center.py-5 i {
    color: var(--text-muted);
    opacity: 0.6;
}

.card-body.text-center.py-5 h4 {
    font-size: var(--text-xl);
    margin-top: var(--space-4);
    margin-bottom: var(--space-3);
    color: var(--text-secondary);
}

.card-body.text-center.py-5 p {
    font-size: var(--text-base);
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto var(--space-4);
}

/* Sales Reports Button - Mobile */
@media (max-width: 575px) {
    .d-flex.justify-content-between .btn-outline-primary {
        font-size: var(--text-xs);
        padding: var(--space-2) var(--space-3);
    }
}

/* Dark Mode */
[data-bs-theme="dark"] .table-responsive tr {
    background: var(--bg-surface);
    border-color: var(--border-light);
}

[data-bs-theme="dark"] .table-responsive td::before {
    color: var(--text-muted);
}

/* ============================================
   Dashboard Page - Mobile-First Styles
   ============================================ */

/* Dashboard Widgets - Mobile Optimized */
.dashboard-widget {
    padding: var(--space-4);
    text-align: center;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.dashboard-widget h3 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: var(--space-2);
}

.dashboard-widget p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

/* Payment Methods Breakdown - Mobile Grid */
.row:has(.h5.text-success) .col-md-2,
.row:has(.h5.text-success) .col-md-3 {
    margin-bottom: var(--space-3);
}

@media (max-width: 767px) {
    .row:has(.h5.text-success) .col-md-2,
    .row:has(.h5.text-success) .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Quick Action Cards - Mobile Touch Targets */
.card:has(.fa-file-alt),
.card:has(.fa-chart-line),
.card:has(.fa-history) {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:has(.fa-file-alt):hover,
.card:has(.fa-chart-line):hover,
.card:has(.fa-history):hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Only apply touch targets to primary action buttons in quick action cards */
.card:has(.fa-file-alt) .btn,
.card:has(.fa-chart-line) .btn,
.card:has(.fa-history) .btn {
    min-height: var(--touch-min);
    padding: var(--space-3) var(--space-5);
    font-weight: 600;
}

/* Dark Mode */
[data-bs-theme="dark"] .dashboard-widget {
    background: var(--bg-surface);
}

/* ============================================
   Settings Pages - Mobile-First Styles
   ============================================ */

/* Settings Index - Card Grid */
.col-md-6.col-lg-4:has(.fa-store),
.col-md-6.col-lg-4:has(.fa-users),
.col-md-6.col-lg-4:has(.fa-th-large) {
    display: flex;
}

@media (max-width: 767px) {
    .col-md-6.col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Settings Cards - Touch Friendly (only settings index cards) */
.card:has(.fa-store) > .card-body > .btn,
.card:has(.fa-users) > .card-body > .btn,
.card:has(.fa-th-large) > .card-body > .btn,
.card:has(.fa-boxes) > .card-body > .btn,
.card:has(.fa-money-bill-wave) > .card-body > .btn,
.card:has(.fa-list) > .card-body > .btn,
.card:has(.fa-plus-circle) > .card-body > .btn,
.card:has(.fa-clipboard-list) > .card-body > .btn {
    min-height: var(--touch-min);
    padding: var(--space-3) var(--space-6);
    font-weight: 600;
    width: 100%;
}

/* System Information Table - Mobile */
@media (max-width: 767px) {
    .card:has(.fa-info-circle) .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: var(--space-4);
    }
}

/* Category Management - Form & Table Mobile */
.card:has(#name) .form-control,
.card:has(#name) .form-select,
.card:has(#name) textarea {
    min-height: var(--touch-min);
    font-size: var(--text-base);
}

.card:has(#name) .btn {
    min-height: var(--touch-min);
    padding: var(--space-3) var(--space-5);
    font-weight: 600;
}

@media (max-width: 767px) {
    .card:has(#name) {
        margin-bottom: var(--space-4);
    }
    
    /* Hide bulk actions on very small screens */
    #bulkDeleteBtn {
        font-size: var(--text-sm);
        padding: var(--space-2) var(--space-3);
    }
    
    /* Make category table more compact on mobile */
    .table th,
    .table td {
        font-size: var(--text-sm);
        padding: var(--space-2);
    }
    
    /* Stack action buttons vertically on small screens */
    .btn-group-sm .btn {
        min-height: var(--touch-min);
        min-width: var(--touch-min);
    }
}

/* Forms - Universal Mobile Optimization */
.form-control,
.form-select,
textarea.form-control {
    min-height: var(--touch-min);
    font-size: var(--text-base);
    border-radius: var(--radius-md);
    padding: var(--space-3);
}

.form-label {
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
}

.form-text {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* Checkboxes and Radio Buttons - Touch Friendly */
.form-check-input {
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
}

.form-check-label {
    font-size: var(--text-base);
    margin-left: var(--space-2);
    cursor: pointer;
}

/* Modal Forms - Mobile Optimized */
.modal-body .form-control,
.modal-body .form-select {
    min-height: var(--touch-min);
}

.modal-footer .btn {
    min-height: var(--touch-min);
    padding: var(--space-3) var(--space-5);
    font-weight: 600;
}

@media (max-width: 575px) {
    .modal-dialog {
        margin: var(--space-2);
    }
    
    .modal-footer {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Dark Mode Forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background: var(--bg-surface);
    border-color: var(--border-light);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .form-label {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .form-text {
    color: var(--text-muted);
}

/* Dropdown Menus - Touch Friendly (applies to all dropdowns in navbar) */
.pos-header .dropdown-menu {
    border-radius: var(--radius-lg);
    padding: var(--space-2);
    box-shadow: var(--shadow-lg);
    margin-top: var(--space-2);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Override Bootstrap dropdown-item defaults to ensure 44px touch targets */
.pos-header .dropdown-item {
    min-height: var(--touch-min) !important;
    padding: var(--space-4) var(--space-4) !important;
    display: flex;
    align-items: center;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    transition: background-color 0.2s ease;
    color: var(--text-primary);
}

.pos-header .dropdown-item:hover,
.pos-header .dropdown-item:focus {
    background: var(--hover-overlay);
    color: var(--text-primary);
}

.pos-header .dropdown-item i {
    width: 24px;
    text-align: center;
    margin-right: var(--space-2);
}

.pos-header .dropdown-header {
    padding: var(--space-3) var(--space-4) !important;
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pos-header .dropdown-divider {
    margin: var(--space-2) 0 !important;
}

/* Mobile: Dropdown positioning - Full width, no clipping */
@media (max-width: 991px) {
    .pos-header .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        background: var(--bg-surface);
        margin: var(--space-1) 0 !important;
        width: 100% !important;
        float: none;
        box-shadow: none;
        max-height: 60vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .pos-header .dropdown-item {
        padding: var(--space-4) var(--space-4) !important;
    }
    
    .pos-header .dropdown-menu.show {
        animation: slideDown 0.2s ease-out;
    }
}

/* Desktop: Proper absolute positioning */
@media (min-width: 992px) {
    .pos-header .dropdown-menu {
        position: absolute;
        min-width: 220px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        overflow-x: hidden;
    }
}

[data-bs-theme="dark"] .pos-header .dropdown-menu {
    background: var(--bg-surface);
    border-color: var(--border-medium);
}

[data-bs-theme="dark"] .pos-header .dropdown-item:hover {
    background: var(--hover-overlay);
}

/* Live Clock - Better Typography */
[data-live-clock] {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* Badge Styling */
.pos-header .badge {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

/* Dropdown Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}