:root, [data-theme="dark"] {
    /* Pure Black OLED Theme (#000000) */
    --pos-bg: #000000;
    --pos-surface: #09090b;
    --pos-surface-card: #121215;
    --pos-surface-hover: #18181c;
    --pos-surface-active: #22222a;
    --pos-border: rgba(255, 255, 255, 0.08);
    --pos-border-subtle: rgba(255, 255, 255, 0.04);
    --pos-border-hover: rgba(255, 255, 255, 0.18);
    
    --pos-text: #ffffff;
    --pos-text-secondary: #a1a1aa;
    --pos-text-muted: #71717a;
    
    --pos-primary: #ff4757; /* Vibrant Coral Red */
    --pos-primary-gradient: linear-gradient(135deg, #ff4757, #ff6b81);
    --pos-primary-glow: rgba(255, 71, 87, 0.35);

    --pos-success: #10b981; /* Emerald */
    --pos-success-gradient: linear-gradient(135deg, #10b981, #059669);
    --pos-success-glow: rgba(16, 185, 129, 0.35);

    --pos-warning: #f59e0b; /* Amber */
    --pos-warning-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    
    --pos-danger: #ef4444;
    --pos-info: #3b82f6;
    --pos-purple: #8b5cf6;

    --pos-table-free: #10b981;
    --pos-table-busy: #f59e0b;
    --pos-table-wait: #ef4444;
    --pos-table-inactive: #52525b;

    --border-radius: 18px;
    --border-radius-sm: 12px;
    --border-radius-lg: 24px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    --pos-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --pos-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --pos-shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.85);
    --glass-blur: blur(16px);
}

[data-theme="light"] {
    /* Clean Modern Light Mode */
    --pos-bg: #f4f4f6;
    --pos-surface: #ffffff;
    --pos-surface-card: #ffffff;
    --pos-surface-hover: #f1f5f9;
    --pos-surface-active: #e2e8f0;
    --pos-border: rgba(0, 0, 0, 0.08);
    --pos-border-subtle: rgba(0, 0, 0, 0.04);
    --pos-border-hover: rgba(0, 0, 0, 0.16);
    
    --pos-text: #09090b;
    --pos-text-secondary: #52525b;
    --pos-text-muted: #a1a1aa;
    
    --pos-primary: #ff4757;
    --pos-primary-gradient: linear-gradient(135deg, #ff4757, #ff6b81);
    --pos-primary-glow: rgba(255, 71, 87, 0.25);

    --pos-success: #10b981;
    --pos-success-gradient: linear-gradient(135deg, #10b981, #059669);
    --pos-success-glow: rgba(16, 185, 129, 0.25);

    --pos-warning: #f59e0b;
    --pos-warning-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    
    --pos-danger: #ef4444;
    --pos-info: #3b82f6;
    --pos-purple: #8b5cf6;

    --pos-table-free: #10b981;
    --pos-table-busy: #f59e0b;
    --pos-table-wait: #ef4444;
    --pos-table-inactive: #94a3b8;

    --pos-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --pos-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --pos-shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--pos-bg);
    color: var(--pos-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    user-select: none;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Container Layout */
.pos-container {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

/* ==========================================================================
   1. SIDEBAR / APP NAVIGATION
   ========================================================================== */
.pos-sidebar {
    width: 84px;
    background-color: var(--pos-surface);
    border-right: 1px solid var(--pos-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    z-index: 100;
    flex-shrink: 0;
    gap: 8px;
}

.pos-sidebar-logo {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: var(--pos-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px var(--pos-primary-glow);
    cursor: pointer;
    transition: var(--transition);
}

.pos-sidebar-logo:hover {
    transform: scale(1.05);
}

.pos-sidebar-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--pos-text-muted);
    font-size: 19px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    text-decoration: none;
}

.pos-sidebar-btn span {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: none;
}

.pos-sidebar-btn:hover {
    background-color: var(--pos-surface-hover);
    color: var(--pos-text);
    border-color: var(--pos-border-hover);
    transform: translateY(-1px);
}

.pos-sidebar-btn.active {
    background: var(--pos-primary-gradient);
    color: #ffffff;
    box-shadow: 0 6px 18px var(--pos-primary-glow);
    border-color: transparent;
}

.pos-sidebar-btn.btn-action-close {
    color: var(--pos-warning);
}
.pos-sidebar-btn.btn-action-close:hover {
    background-color: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.pos-sidebar-btn.btn-action-exit {
    color: var(--pos-text-muted);
}
.pos-sidebar-btn.btn-action-exit:hover {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--pos-danger);
}

/* ==========================================================================
   2. MAIN CONTENT AREA
   ========================================================================== */
.pos-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: transparent;
}

/* Header */
.pos-header {
    height: 72px;
    background: var(--pos-surface);
    border-bottom: 1px solid var(--pos-border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
    gap: 20px;
    flex-shrink: 0;
}

.pos-search {
    flex: 1;
    max-width: 480px;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--pos-bg);
    border: 1px solid var(--pos-border);
    border-radius: 24px;
    padding: 2px 6px 2px 16px;
    transition: var(--transition);
}

.pos-search:focus-within {
    border-color: var(--pos-primary);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
}

.pos-search i.fa-search {
    color: var(--pos-text-muted);
    font-size: 14px;
    margin-right: 10px;
}

.pos-search input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--pos-text);
    font-size: 13.5px;
    font-weight: 500;
    outline: none;
    padding: 10px 0;
}

.pos-search input::placeholder {
    color: var(--pos-text-muted);
}

.btn-scanner-shortcut {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--pos-surface-card);
    color: var(--pos-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-scanner-shortcut:hover {
    background: var(--pos-primary);
    color: #fff;
}

.pos-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 550;
}

.pos-theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--pos-border);
    background: var(--pos-surface-card);
    color: var(--pos-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.pos-theme-toggle-btn:hover {
    background: var(--pos-surface-hover);
    border-color: var(--pos-border-hover);
    transform: scale(1.05);
}

.pos-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--pos-success);
    font-size: 12px;
    font-weight: 600;
}

.pos-status-badge .pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--pos-success);
    box-shadow: 0 0 8px var(--pos-success);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* User Profile & Dropdown Submenu */
.pos-user-dropdown-wrap {
    position: relative;
    z-index: 600;
}

.pos-user-info {
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--pos-surface-card);
    padding: 6px 14px 6px 8px;
    border-radius: 20px;
    border: 1px solid var(--pos-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--pos-text);
}

.pos-user-info:hover, .pos-user-dropdown-wrap.open .pos-user-info {
    background: var(--pos-surface-hover);
    border-color: rgba(255, 71, 87, 0.4);
}

.pos-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--pos-primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.pos-user-caret {
    font-size: 10px;
    color: var(--pos-text-muted);
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.pos-user-dropdown-wrap.open .pos-user-caret {
    transform: rotate(180deg);
}

.pos-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 270px;
    background: var(--pos-surface) !important;
    border: 1px solid var(--pos-border);
    border-radius: var(--border-radius);
    padding: 8px;
    box-shadow: var(--pos-shadow-lg) !important;
    z-index: 999999 !important;
    display: none;
    flex-direction: column;
    animation: menuFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.pos-user-dropdown-wrap.open .pos-user-menu {
    display: flex !important;
}

.pos-user-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

.pos-user-menu-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--pos-primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.pos-user-menu-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-user-menu-details strong {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--pos-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-user-menu-details span {
    font-size: 11px;
    color: var(--pos-text-muted);
}

.pos-user-menu-divider {
    height: 1px;
    background: var(--pos-border);
    margin: 6px 0;
}

.pos-user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--pos-text-secondary);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: 100%;
    transition: var(--transition);
}

.pos-user-menu-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--pos-text-muted);
    transition: var(--transition);
}

.pos-user-menu-item div {
    display: flex;
    flex-direction: column;
}

.pos-user-menu-item strong {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pos-text);
}

.pos-user-menu-item span {
    font-size: 10.5px;
    color: var(--pos-text-muted);
}

.pos-user-menu-item:hover {
    background: var(--pos-surface-hover);
}

.pos-user-menu-item:hover i {
    color: var(--pos-text);
}

.pos-user-menu-item.item-close-register:hover {
    background: rgba(245, 158, 11, 0.12);
}
.pos-user-menu-item.item-close-register:hover i,
.pos-user-menu-item.item-close-register:hover strong {
    color: var(--pos-warning);
}

.pos-user-menu-item.item-logout:hover {
    background: rgba(239, 68, 68, 0.12);
}
.pos-user-menu-item.item-logout:hover i,
.pos-user-menu-item.item-logout:hover strong {
    color: var(--pos-danger);
}

.pos-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbars */
.pos-content-area::-webkit-scrollbar,
.cart-items::-webkit-scrollbar,
.pos-tabs::-webkit-scrollbar,
.pos-modal-body::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
.pos-content-area::-webkit-scrollbar-thumb,
.cart-items::-webkit-scrollbar-thumb,
.pos-tabs::-webkit-scrollbar-thumb,
.pos-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

/* ==========================================================================
   3. CATEGORY TABS
   ========================================================================== */
.pos-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 6px;
    align-items: center;
    scrollbar-width: thin;
}

.pos-tab {
    padding: 10px 20px;
    background: var(--pos-surface-card);
    border-radius: 24px;
    border: 1px solid var(--pos-border);
    color: var(--pos-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.pos-tab:hover {
    background-color: var(--pos-surface-hover);
    color: #fff;
    border-color: var(--pos-border-hover);
    transform: translateY(-1px);
}

.pos-tab.active {
    background: var(--pos-primary-gradient);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 14px var(--pos-primary-glow);
}

/* ==========================================================================
   4. PRODUCTS GRID
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 18px;
}

.product-card {
    background: var(--pos-surface-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--pos-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--pos-shadow-sm);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pos-shadow-md);
    border-color: rgba(255, 71, 87, 0.4);
}

.product-card:active {
    transform: scale(0.97);
}

.product-img {
    height: 135px;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    position: relative;
    overflow: hidden;
}

.product-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(9, 13, 22, 0.85) 100%);
}

.product-price-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
    letter-spacing: 0.2px;
}

/* Product Type Badges on Cards */
.product-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    backdrop-filter: blur(6px);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.product-type-badge.type-menu {
    background: rgba(245, 158, 11, 0.95);
    color: #000;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.product-type-badge.type-variable {
    background: rgba(139, 92, 246, 0.95);
    color: #fff;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.product-type-badge.type-extras {
    background: rgba(59, 130, 246, 0.95);
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Free Item Banner in Modal */
.menu-free-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 71, 87, 0.08));
    border: 1.5px solid rgba(245, 158, 11, 0.3);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.menu-free-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f59e0b;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.menu-free-details strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--pos-text);
}

.menu-free-details span {
    font-size: 11.5px;
    color: var(--pos-text-muted);
}

/* Menu Option Cards in Modal */
.menu-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.menu-option-card {
    background: var(--pos-bg);
    border: 1.5px solid var(--pos-border);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.menu-option-card:hover {
    border-color: var(--pos-border-hover);
    background: var(--pos-surface-hover);
}

.menu-option-card.active {
    border-color: var(--pos-primary);
    background: rgba(255, 71, 87, 0.08);
    box-shadow: 0 0 12px var(--pos-primary-glow);
}

.menu-option-img {
    height: 75px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    margin-bottom: 8px;
    background-color: var(--pos-surface-card);
}

.menu-option-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pos-text);
    margin-bottom: 2px;
    line-height: 1.3;
}

.menu-option-desc {
    font-size: 10.5px;
    color: var(--pos-text-muted);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-option-price {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--pos-primary);
    margin-top: 4px;
}

.menu-option-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--pos-surface-card);
    border: 1.5px solid var(--pos-border);
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--transition);
}

.menu-option-card.active .menu-option-check {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
    color: #fff;
}

.product-info {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    background: var(--pos-surface-card);
}

.product-name {
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1.35;
    color: var(--pos-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.product-price-display {
    font-size: 15px;
    font-weight: 800;
    color: var(--pos-success);
}

.product-add-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 71, 87, 0.15);
    color: var(--pos-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: var(--transition);
}

.product-card:hover .product-add-btn {
    background: var(--pos-primary);
    color: #fff;
    transform: scale(1.1);
}

/* ==========================================================================
   5. RIGHT CART PANEL (DESKTOP & DRAWER ON MOBILE)
   ========================================================================== */
.pos-cart {
    width: 380px;
    background-color: var(--pos-surface);
    border-left: 1px solid var(--pos-border);
    display: flex;
    flex-direction: column;
    z-index: 10;
    flex-shrink: 0;
}

.cart-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--pos-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--pos-surface-card);
}

.cart-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-table-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 12px;
    background: rgba(255, 71, 87, 0.12);
    border: 1px solid rgba(255, 71, 87, 0.25);
    color: var(--pos-primary);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.cart-table-pill:hover {
    background: rgba(255, 71, 87, 0.2);
}

/* Order Type Toggle in Cart */
.cart-order-types {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
    background: var(--pos-bg);
    border-bottom: 1px solid var(--pos-border);
}

.order-type-btn {
    flex: 1;
    padding: 7px 4px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--pos-text-muted);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

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

.order-type-btn.active {
    background: var(--pos-surface-card);
    border-color: var(--pos-border);
    color: var(--pos-text);
    box-shadow: var(--pos-shadow-sm);
}

/* Cart Items Container */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
}

.cart-empty-state {
    text-align: center;
    color: var(--pos-text-muted);
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.cart-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pos-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--pos-text-muted);
    opacity: 0.6;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--pos-surface-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--border-radius-sm);
    gap: 12px;
    transition: var(--transition);
}

.cart-item:hover {
    border-color: var(--pos-border-hover);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 700;
    font-size: 13.5px;
    margin-bottom: 2px;
    color: var(--pos-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-extras {
    margin-top: 4px;
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-extra-row {
    font-size: 11.5px;
    line-height: 1.35;
    color: var(--pos-text-secondary);
}

.cart-extra-main {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
}

.cart-extra-bullet {
    color: var(--pos-primary);
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
}

.cart-extra-qty {
    color: var(--pos-text);
    font-weight: 700;
}

.cart-extra-title {
    color: var(--pos-text);
    font-weight: 500;
}

.cart-extra-price {
    color: var(--pos-primary);
    font-weight: 700;
    font-size: 11px;
}

.cart-extra-free {
    color: var(--pos-success);
    font-weight: 700;
    font-size: 10.5px;
}

.cart-subextra-list {
    margin-left: 12px;
    margin-top: 3px;
    padding-left: 8px;
    border-left: 2px solid rgba(255, 71, 87, 0.3);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-subextra-row {
    font-size: 11px;
    color: var(--pos-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-subextra-row i {
    font-size: 9px;
    color: var(--pos-primary);
    opacity: 0.8;
}

.cart-item-price {
    color: var(--pos-success);
    font-size: 13px;
    font-weight: 700;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--pos-bg);
    border: 1px solid var(--pos-border);
    border-radius: 20px;
    padding: 3px 6px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--pos-surface);
    border: none;
    color: var(--pos-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--pos-primary);
    color: #fff;
}

.qty-val {
    font-weight: 700;
    font-size: 13px;
    width: 20px;
    text-align: center;
    color: #fff;
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--pos-border);
    background: var(--pos-surface-card);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.3);
}

.cart-totals {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--pos-text-muted);
}

.cart-row.total {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed var(--pos-border);
}

.cart-row.total span:last-child {
    color: var(--pos-success);
}

/* Action Buttons */
.btn-pay {
    width: 100%;
    padding: 16px;
    border-radius: var(--border-radius);
    background: var(--pos-success-gradient);
    color: #fff;
    border: none;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 6px 20px var(--pos-success-glow);
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.5);
}

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

.cart-secondary-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.btn-send-kitchen {
    flex: 1;
    padding: 11px 12px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 165, 2, 0.15);
    border: 1px solid rgba(255, 165, 2, 0.3);
    color: #ffa502;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-send-kitchen:hover {
    background: #ffa502;
    color: #000;
}

.btn-precomanda {
    flex: 1;
    padding: 11px 12px;
    border-radius: var(--border-radius-sm);
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-precomanda:hover {
    background: #3b82f6;
    color: #fff;
}

/* ==========================================================================
   6. TABLES VIEW & FLOOR PLAN DESIGNER
   ========================================================================== */
.floors-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--pos-border);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.floors-container {
    display: flex;
    gap: 8px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.floors-container::-webkit-scrollbar {
    display: none;
}

.pos-floor-pill {
    background: var(--pos-surface-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-text-muted);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 12px;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pos-floor-pill:hover {
    color: var(--pos-text);
    border-color: var(--pos-border-hover);
    background: var(--pos-surface-hover);
}

.pos-floor-pill.active {
    color: #fff;
    background: var(--pos-primary);
    border-color: var(--pos-primary);
    box-shadow: 0 4px 14px var(--pos-primary-glow);
}

.pos-floor-actions-btn {
    opacity: 0.6;
    font-size: 11px;
    margin-left: 4px;
    transition: var(--transition);
}

.pos-floor-pill:hover .pos-floor-actions-btn {
    opacity: 1;
}

.tables-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-action-pill {
    background: var(--pos-surface-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-text);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition);
    font-family: inherit;
}

.pos-action-pill:hover {
    border-color: var(--pos-primary);
    color: var(--pos-primary);
    background: rgba(255, 71, 87, 0.08);
}

.pos-action-pill.active {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--pos-primary-glow);
}

.pos-action-pill.btn-save-layout {
    background: var(--pos-success);
    border-color: var(--pos-success);
    color: #fff;
    box-shadow: 0 4px 14px var(--pos-success-glow);
}

.tables-canvas-container {
    flex: 1;
    position: relative;
    overflow: auto;
    border-radius: var(--border-radius);
    min-height: 480px;
    background: var(--pos-bg);
}

.tables-canvas-container.edit-mode {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    border: 2px dashed rgba(255, 71, 87, 0.4);
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
    padding: 8px;
    position: relative;
}

.tables-grid.is-canvas {
    display: block;
    position: relative;
    min-width: 800px;
    min-height: 600px;
}

.table-card {
    background: var(--pos-surface-card);
    border: 2px solid var(--pos-border);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    position: relative;
    padding: 14px 10px;
    min-height: 110px;
    box-shadow: var(--pos-shadow-sm);
    user-select: none;
    text-align: center;
}

.tables-grid.is-canvas .table-card {
    position: absolute;
    margin: 0;
    transition: transform 0.05s ease;
}

.table-card.shape-cuadrada {
    border-radius: 18px;
    width: 120px;
    height: 120px;
}

.table-card.shape-redonda {
    border-radius: 50%;
    width: 120px;
    height: 120px;
}

.table-card.shape-rectangular {
    border-radius: 18px;
    width: 180px;
    height: 110px;
}

/* Table States */
.table-card.state-libre {
    border-color: rgba(16, 185, 129, 0.4);
}

.table-card.state-libre:hover {
    border-color: var(--pos-success);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.2);
}

.table-card.state-ocupada {
    border-color: var(--pos-primary);
    background: rgba(255, 71, 87, 0.06);
    box-shadow: 0 4px 16px rgba(255, 71, 87, 0.2);
}

.table-card.state-esperando {
    border-color: var(--pos-warning);
    background: rgba(245, 158, 11, 0.08);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
    animation: pulseWait 1.8s infinite ease-in-out;
}

@keyframes pulseWait {
    0%, 100% { border-color: var(--pos-warning); box-shadow: 0 0 10px rgba(245, 158, 11, 0.2); }
    50% { border-color: #ffb142; box-shadow: 0 0 22px rgba(245, 158, 11, 0.5); }
}

.table-card.state-unida {
    border-color: #a55eea;
    background: rgba(165, 94, 234, 0.08);
    box-shadow: 0 4px 14px rgba(165, 94, 234, 0.25);
}

.table-card.is-dragging {
    opacity: 0.9;
    transform: scale(1.06);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    z-index: 1000 !important;
    cursor: grabbing !important;
}

.table-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.table-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--pos-text);
}

.table-capacity {
    font-size: 11px;
    color: var(--pos-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.table-amount-pill {
    margin-top: 4px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--pos-success);
    background: rgba(16, 185, 129, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
}

.table-joined-badge {
    position: absolute;
    top: -8px;
    background: #a55eea;
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.table-timer-badge {
    font-size: 10px;
    color: var(--pos-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}

.table-edit-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.table-edit-btn {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--pos-bg);
    border: 1px solid var(--pos-border);
    color: var(--pos-text-muted);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.table-edit-btn:hover {
    background: var(--pos-primary);
    color: #fff;
    border-color: var(--pos-primary);
}

/* ==========================================================================
   6.1 ORDERS VIEW (GESTOR DE PEDIDOS Y COMANDAS)
   ========================================================================== */
.orders-view-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    gap: 16px;
    padding-bottom: 20px;
}

.orders-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.orders-filter-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.orders-filter-tabs::-webkit-scrollbar {
    display: none;
}

.order-filter-pill {
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--pos-surface-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-text-muted);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.order-filter-pill:hover {
    color: var(--pos-text);
    border-color: var(--pos-border-hover);
}

.order-filter-pill.active {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--pos-primary-glow);
}

.orders-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.pos-order-card {
    background: var(--pos-surface-card);
    border: 1.5px solid var(--pos-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition);
    box-shadow: var(--pos-shadow-sm);
}

.pos-order-card:hover {
    border-color: var(--pos-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--pos-shadow-md);
}

.pos-order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px dashed var(--pos-border);
    padding-bottom: 10px;
}

.pos-order-id-badge {
    font-size: 15px;
    font-weight: 800;
    color: var(--pos-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pos-order-type-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pos-order-type-tag.salon {
    background: rgba(255, 71, 87, 0.12);
    color: var(--pos-primary);
}

.pos-order-type-tag.llevar {
    background: rgba(59, 130, 246, 0.12);
    color: var(--pos-info);
}

.pos-order-type-tag.delivery {
    background: rgba(245, 158, 11, 0.12);
    color: var(--pos-warning);
}

.pos-order-status-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    text-transform: uppercase;
}

.pos-order-status-badge.abierta,
.pos-order-status-badge.esperando_cuenta {
    background: rgba(245, 158, 11, 0.15);
    color: var(--pos-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.pos-order-status-badge.pagado {
    background: rgba(16, 185, 129, 0.15);
    color: var(--pos-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.pos-order-items-preview {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
    font-size: 12.5px;
}

.pos-order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--pos-text-secondary);
}

.pos-order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--pos-border);
    padding-top: 10px;
    margin-top: auto;
}

.pos-order-total-amount {
    font-size: 17px;
    font-weight: 800;
    color: var(--pos-success);
}

.pos-order-actions {
    display: flex;
    gap: 6px;
}

.btn-order-action {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--pos-border);
    background: var(--pos-bg);
    color: var(--pos-text);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-order-action:hover {
    background: var(--pos-surface-hover);
    border-color: var(--pos-border-hover);
}

.btn-order-action.primary {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
    color: #fff;
}

/* ==========================================================================
   7. DASHBOARD VIEW (RESUMEN EN POS)
   ========================================================================== */
.dashboard-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: var(--pos-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--pos-surface-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--pos-shadow-sm);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.kpi-data h3 {
    margin: 0 0 4px 0;
    font-size: 12px;
    color: var(--pos-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--pos-text);
}

.dashboard-recent-orders {
    background: var(--pos-surface-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--border-radius);
    padding: 20px;
}

.dashboard-recent-orders h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
}

.recent-orders-table {
    border-collapse: collapse;
    font-size: 13px;
}

.recent-orders-table th {
    padding: 12px 14px;
    text-align: left;
    color: var(--pos-text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--pos-border);
}

.recent-orders-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--pos-border-subtle);
    color: var(--pos-text-secondary);
}

/* ==========================================================================
   8. MODALS & POPUPS (MODERN BOTTOM SHEET ON MOBILE)
   ========================================================================== */
.pos-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.pos-modal-overlay.active {
    display: flex;
    animation: modalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.pos-modal {
    background: var(--pos-surface);
    width: 100%;
    max-width: 540px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--pos-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    box-shadow: var(--pos-shadow-lg);
    position: relative;
}

.modal-drag-handle {
    display: none;
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    margin: 10px auto 4px auto;
}

.pos-modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--pos-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--pos-surface-card);
}

.pos-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.pos-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--pos-bg);
    border: 1px solid var(--pos-border);
    color: var(--pos-text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.pos-modal-close:hover {
    background: var(--pos-primary);
    color: #fff;
}

.pos-modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.pos-modal-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--pos-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--pos-surface-card);
    gap: 14px;
}

/* --------------------------------------------------------------------------
   8.1 PRODUCT CONFIGURATION MODAL (VARIANTS & EXTRAS REDESIGN)
   -------------------------------------------------------------------------- */
/* Variants Grid */
.variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.variant-btn {
    padding: 12px 14px;
    border-radius: var(--border-radius-sm);
    background: var(--pos-surface-card);
    border: 1.5px solid var(--pos-border);
    color: var(--pos-text);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.variant-btn .variant-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--pos-text);
}

.variant-btn .variant-price {
    font-size: 11.5px;
    color: var(--pos-success);
    font-weight: 600;
}

.variant-btn:hover {
    border-color: var(--pos-border-hover);
    background: var(--pos-surface-hover);
}

.variant-btn.active {
    border-color: var(--pos-primary);
    background: rgba(255, 71, 87, 0.12);
    box-shadow: 0 0 12px var(--pos-primary-glow);
}

.variant-btn.active .variant-name {
    color: var(--pos-primary);
}

.extras-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.extra-group-card {
    background: var(--pos-surface-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--border-radius-sm);
    padding: 12px;
}

.extra-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.extra-group-title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--pos-text);
}

.extra-group-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--pos-bg);
    color: var(--pos-text-muted);
}

.extra-group-badge.required {
    background: rgba(255, 71, 87, 0.15);
    color: var(--pos-primary);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.extra-group-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.extra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--pos-bg);
    border: 1.5px solid var(--pos-border);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    gap: 10px;
}

.extra-item:hover {
    border-color: var(--pos-border-hover);
    background: var(--pos-surface-card-hover);
}

.extra-item.active {
    border-color: var(--pos-primary);
    background: rgba(255, 71, 87, 0.08);
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.15);
}

.extra-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.extra-item-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--pos-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.extra-item.active .extra-item-check {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
    color: #fff;
}

.extra-item-thumb {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    background-color: var(--pos-surface-card);
    flex-shrink: 0;
}

.extra-item-details {
    flex: 1;
    min-width: 0;
}

.extra-item-name {
    font-weight: 700;
    font-size: 12.5px;
    color: var(--pos-text);
}

.extra-item-desc {
    font-size: 11px;
    color: var(--pos-text-muted);
    margin-top: 1px;
}

.extra-item-price-tag {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pos-success);
    white-space: nowrap;
}

.extra-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--pos-surface-card);
    border: 1px solid var(--pos-border);
    border-radius: 16px;
    padding: 2px 6px;
}

.extra-stepper-btn {
    border: none;
    background: var(--pos-bg);
    color: var(--pos-text);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--transition);
}

.extra-stepper-btn:hover {
    background: var(--pos-primary);
    color: #fff;
}

.extra-stepper-val {
    font-weight: 800;
    font-size: 12.5px;
    min-width: 16px;
    text-align: center;
    color: var(--pos-text);
}

/* Free Extra Badge */
.extra-free-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--pos-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Sub Extras Section */
.sub-extras-wrap {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--pos-border);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fadeInSub 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.sub-extras-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--pos-text-muted);
    margin-bottom: 2px;
}

.sub-extra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    background: var(--pos-surface-card);
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.sub-extra-item:hover {
    border-color: var(--pos-border-hover);
    background: var(--pos-surface-hover);
}

.sub-extra-item.active {
    border-color: var(--pos-primary);
    background: rgba(255, 71, 87, 0.08);
}

.sub-extra-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-extra-check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--pos-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: transparent;
    transition: var(--transition);
}

.sub-extra-item.active .sub-extra-check {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
    color: #fff;
}

.sub-extra-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--pos-text);
}

.sub-extra-price {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--pos-primary);
}

/* Payment Modal Grid */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 16px 0;
}

.pay-method-btn {
    padding: 14px 8px;
    border-radius: 14px;
    background: var(--pos-surface-card);
    border: 1.5px solid var(--pos-border);
    color: var(--pos-text);
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.pay-method-btn i {
    font-size: 20px;
    color: var(--pos-text-muted);
}

.pay-method-btn:hover {
    border-color: var(--pos-border-hover);
    transform: translateY(-1px);
}

.pay-method-btn.active {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--pos-success);
    color: var(--pos-success);
    box-shadow: 0 4px 14px var(--pos-success-glow);
}

.pay-method-btn.active i {
    color: var(--pos-success);
}

.quick-cash-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.quick-cash-btn {
    padding: 8px 3px;
    border-radius: 8px;
    background: var(--pos-surface-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-text-secondary);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.quick-cash-btn:hover {
    background: var(--pos-success);
    color: #fff;
    border-color: var(--pos-success);
}

/* ==========================================================================
   8.2 SPLIT BILL & MULTI-PAYMENT MODAL
   ========================================================================== */
.split-mode-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    background: var(--pos-bg);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--pos-border);
}

.split-tab-btn {
    flex: 1;
    padding: 9px 4px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--pos-text-muted);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.split-tab-btn:hover {
    color: var(--pos-text);
}

.split-tab-btn.active {
    background: var(--pos-surface-card);
    color: var(--pos-text);
    box-shadow: var(--pos-shadow-sm);
    border: 1px solid var(--pos-border);
}

.payment-total-banner {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 14px;
    padding: 12px 18px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-label {
    font-size: 11px;
    color: var(--pos-text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.banner-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--pos-success);
    line-height: 1.2;
}

.payment-subpanel {
    animation: fadeInSub 0.2s ease-out;
}

/* Mixed Payments */
.mixed-payments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.mixed-payment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--pos-surface-card);
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--pos-border);
}

.mixed-method-select {
    flex: 1;
    padding: 8px 10px;
    background: var(--pos-bg);
    color: var(--pos-text);
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    outline: none;
}

.mixed-amount-input {
    width: 120px;
    padding: 8px 10px;
    background: var(--pos-bg);
    color: var(--pos-success);
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    outline: none;
    text-align: right;
}

.btn-remove-mixed-row {
    background: rgba(255, 71, 87, 0.12);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: var(--pos-danger);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition);
}

.btn-remove-mixed-row:hover {
    background: var(--pos-danger);
    color: #fff;
}

.btn-add-mixed-row {
    width: 100%;
    padding: 10px;
    background: var(--pos-surface-card);
    border: 1.5px dashed var(--pos-border);
    color: var(--pos-text-muted);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-add-mixed-row:hover {
    border-color: var(--pos-primary);
    color: var(--pos-primary);
    background: rgba(255, 71, 87, 0.05);
}

/* Split Equal */
.split-persons-picker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--pos-surface-card);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--pos-border);
    margin-bottom: 12px;
}

.split-share-card {
    background: var(--pos-bg);
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.split-persons-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.split-person-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--pos-surface-card);
    border: 1.5px solid var(--pos-border);
    border-radius: 10px;
}

.split-person-row.paid {
    border-color: var(--pos-success);
    background: rgba(16, 185, 129, 0.06);
}

.split-person-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.split-person-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--pos-bg);
    border: 1px solid var(--pos-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    font-weight: 800;
}

/* Split Items */
.split-items-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.split-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--pos-surface-card);
    border: 1.5px solid var(--pos-border);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.split-item-row:hover {
    border-color: var(--pos-border-hover);
}

.split-item-row.selected {
    border-color: var(--pos-primary);
    background: rgba(255, 71, 87, 0.08);
}

.split-item-row.already-paid {
    opacity: 0.5;
    pointer-events: none;
    background: var(--pos-bg);
}

.split-items-subtotal-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--pos-bg);
    border-radius: 10px;
    border: 1px solid var(--pos-border);
    font-size: 12.5px;
    font-weight: 600;
}

/* Generic Button Classes */
.btn-success {
    background: var(--pos-success-gradient);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
}

.btn-success:hover {
    box-shadow: 0 4px 14px var(--pos-success-glow);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--pos-danger);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

/* Toast */
.pos-toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pos-toast {
    background: var(--pos-surface);
    color: var(--pos-text);
    padding: 10px 18px;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--pos-primary);
    border-right: 1px solid var(--pos-border);
    border-top: 1px solid var(--pos-border);
    border-bottom: 1px solid var(--pos-border);
    box-shadow: var(--pos-shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    font-size: 13px;
    font-weight: 600;
}

@keyframes toastIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    to { opacity: 0; visibility: hidden; }
}

/* Scanner Modal */
.scanner-viewport-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 14px auto;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--pos-border);
    background: #000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.scanner-laser-line {
    position: absolute;
    top: 12%;
    left: 5%;
    right: 5%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--pos-primary), transparent);
    box-shadow: 0 0 12px var(--pos-primary);
    animation: laserScan 2s infinite ease-in-out;
    pointer-events: none;
    z-index: 10;
}

@keyframes laserScan {
    0%, 100% { top: 12%; opacity: 0.8; }
    50% { top: 88%; opacity: 1; }
}

.scanner-hint-text {
    font-size: 12px;
    color: var(--pos-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Overrides for Html5Qrcode */
#reader { border: none !important; }
#reader video { width: 100% !important; border-radius: 14px !important; object-fit: cover !important; }
#reader__dashboard_section, #reader__dashboard_section_csr, #reader__dashboard_section_swaplink {
    padding: 6px !important; color: var(--pos-text) !important;
}
#reader select {
    background: var(--pos-surface-card) !important;
    color: var(--pos-text) !important;
    border: 1px solid var(--pos-border) !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    font-size: 11.5px !important;
}
#reader button {
    background: var(--pos-primary-gradient) !important;
    color: #fff !important;
    border: none !important;
    padding: 7px 14px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-size: 11.5px !important;
}

/* Mobile Floating Cart Trigger Pill - Strictly Hidden on Desktop */
.pos-mobile-cart-float,
.pos-mobile-cart-float.visible {
    display: none !important;
}

/* Print Ticket */
.print-ticket { display: none; }
@media print {
    body * { visibility: hidden; }
    .print-ticket, .print-ticket * { visibility: visible; }
    .print-ticket {
        display: block !important; position: absolute; left: 0; top: 0;
        width: 80mm; padding: 5mm; font-family: monospace; font-size: 12px;
        color: #000; background: #fff;
    }
}

/* ==========================================================================
   11. MOBILE & TABLET RESPONSIVENESS (<= 900px)
   ========================================================================== */
@media (max-width: 900px) {
    .pos-container {
        flex-direction: column;
    }
    
    /* Bottom Navigation App Bar */
    .pos-sidebar {
        width: 100%;
        height: 60px;
        height: calc(60px + env(safe-area-inset-bottom));
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 4px 6px;
        padding-bottom: calc(4px + env(safe-area-inset-bottom));
        border-right: none;
        border-top: 1px solid var(--pos-border);
        order: 3;
        background-color: var(--pos-surface);
        gap: 2px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        z-index: 100;
    }
    
    .pos-sidebar-logo {
        display: none;
    }

    .pos-btn-mobile-only {
        display: flex;
    }
    
    .pos-sidebar-btn {
        flex: 1;
        max-width: 68px;
        height: 48px;
        border-radius: 12px;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        background: transparent;
        border: 1px solid transparent;
        color: var(--pos-text-muted);
        position: relative;
        padding: 0;
    }

    .pos-sidebar-btn i {
        font-size: 16px;
        transition: transform 0.2s ease;
    }

    .pos-sidebar-btn span {
        display: block !important;
        font-size: 10px;
        font-weight: 600;
        line-height: 1;
    }

    .pos-sidebar-btn.active {
        background: rgba(255, 71, 87, 0.12);
        color: var(--pos-primary);
        border: 1px solid rgba(255, 71, 87, 0.25);
    }

    .pos-sidebar-btn.active i {
        transform: scale(1.05);
        color: var(--pos-primary);
    }

    .pos-sidebar-btn.active span {
        color: var(--pos-primary);
        font-weight: 700;
    }

    .nav-cart-badge {
        position: absolute;
        top: 2px;
        right: calc(50% - 15px);
        background: var(--pos-primary);
        color: #fff;
        font-size: 9px;
        font-weight: 800;
        min-width: 15px;
        height: 15px;
        border-radius: 8px;
        padding: 0 3px;
        display: none;
        align-items: center;
        justify-content: center;
        border: 2px solid var(--pos-surface);
    }
    
    .pos-main {
        order: 1;
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
    }
    
    .pos-header {
        padding: 0 12px;
        height: 56px;
        gap: 8px;
        position: relative;
        z-index: 500;
    }
    
    .pos-status-badge {
        display: none;
    }

    .pos-user-info span {
        max-width: 80px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .pos-content-area {
        padding: 12px;
        padding-bottom: 90px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
        gap: 10px;
    }
    
    .product-img {
        height: 110px;
    }

    .product-price-badge {
        font-size: 11px;
        padding: 2px 7px;
    }

    .product-name {
        font-size: 12px;
    }

    .product-price-display {
        font-size: 13px;
    }
    
    /* Slide-up Cart Drawer on Mobile */
    .pos-cart {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        width: 100% !important;
        max-width: 400px !important;
        transform: translateX(110%) !important;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 9999 !important;
        box-shadow: -10px 0 40px rgba(0,0,0,0.85) !important;
    }
    
    .pos-cart.open {
        transform: translateX(0) !important;
    }

    #btnCloseCart {
        display: flex !important;
    }

    /* Mobile Floating Cart Trigger Banner */
    .pos-mobile-cart-float.visible {
        display: flex !important;
        position: fixed;
        bottom: 70px;
        left: 12px;
        right: 12px;
        background: var(--pos-primary-gradient);
        color: #ffffff;
        padding: 12px 18px;
        border-radius: 18px;
        box-shadow: 0 8px 24px var(--pos-primary-glow);
        z-index: 90;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        animation: floatBounce 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-cart-float-left {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-cart-badge {
        background: #ffffff;
        color: var(--pos-primary);
        font-weight: 800;
        font-size: 11px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-cart-label {
        font-weight: 700;
        font-size: 13.5px;
    }

    .mobile-cart-float-right {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 14px;
    }

    /* Bottom Sheet Modals on Mobile */
    .pos-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .pos-modal {
        max-width: 100%;
        width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
        max-height: 85dvh;
        animation: sheetSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes sheetSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .modal-drag-handle {
        display: block;
    }

    .pos-modal-header {
        padding: 12px 16px;
    }

    .pos-modal-body {
        padding: 14px 16px;
    }

    .pos-modal-footer {
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}
