/* ===================================================
   SUPERMARKET POS PRO - MODERN PREMIUM CSS STYLESHEET
   Design System: Dark Slate / Emerald & Cyan Glassmorphism
   Fonts: Cairo (Arabic) & Inter (Numbers)
   =================================================== */

:root {
    /* Color Palette */
    --bg-dark: #0b0f19;
    --bg-surface: #111827;
    --bg-card: #1f2937;
    --bg-card-hover: #283548;
    --bg-input: #151d2f;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-focus: #10b981;

    /* Text Colors */
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Accent & Brand Colors */
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.25);
    
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-cyan: #06b6d4;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.25);

    /* Radii & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Layout */
.pos-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background: radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 90% 90%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
                var(--bg-dark);
}

/* ===================================================
   TOP HEADER
   =================================================== */
.pos-header {
    height: 72px;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 20px;
    z-index: 50;
    flex-shrink: 0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 240px;
}

.brand-logo {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.brand-info h1 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Fast Search / Barcode Input */
.header-search {
    flex: 1;
    max-width: 650px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.scanner-icon {
    position: absolute;
    right: 16px;
    font-size: 1.25rem;
    color: var(--primary);
    pointer-events: none;
}

.search-input-wrapper input {
    width: 100%;
    height: 46px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0 50px 0 42px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: #172136;
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.clear-search-btn {
    position: absolute;
    left: 82px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px;
    display: none;
}
.clear-search-btn:hover {
    color: #fff;
}

.open-camera-btn {
    position: absolute;
    left: 8px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(99, 102, 241, 0.2));
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: var(--radius-full);
    color: #38bdf8;
    padding: 0 12px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.open-camera-btn:hover {
    background: linear-gradient(135deg, #06b6d4, #6366f1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4);
    transform: scale(1.03);
}
.open-camera-btn:active {
    transform: scale(0.97);
}

.scanner-status {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
    animation: pulseDot 2s infinite ease-in-out;
}

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

.status-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.live-clock {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-family: 'Inter', 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-card-hover);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.user-badges-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cashier-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.cashier-pill:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.cashier-pill .avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #fff;
}

.auditor-pill .avatar.auditor-avatar {
    background: linear-gradient(135deg, #059669, #10b981);
}

.cashier-details {
    display: flex;
    flex-direction: column;
}

.cashier-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}

.shift-badge {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.shift-badge.auditor-badge {
    color: #34d399;
}

/* ===================================================
   MAIN POS CONTENT (SPLIT LAYOUT)
   =================================================== */
.pos-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ===================================================
   PRODUCTS SECTION (LEFT / CENTER)
   =================================================== */
.products-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px 20px 10px 20px;
}

/* Category Pills Bar */
.categories-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    flex-shrink: 0;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.cat-pill:hover {
    background: var(--bg-card);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.cat-pill.active {
    background: linear-gradient(135deg, var(--primary), #059669);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* Products Grid */
.products-grid-wrapper {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 12px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

/* Product Card */
.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 180px;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(16, 185, 129, 0.08) 100%);
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-3px);
    background: var(--bg-card);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.product-card:hover::before {
    opacity: 1;
}

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

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.product-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--accent-cyan);
    transition: var(--transition);
}

.product-card:hover .product-icon-wrap {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    border-color: rgba(16, 185, 129, 0.3);
}

.stock-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', 'Cairo', sans-serif;
}

.stock-badge.in-stock {
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.stock-badge.low-stock {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.stock-badge.out-of-stock {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-barcode-text {
    font-family: 'Inter', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
}

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

.price-tag {
    display: flex;
    align-items: baseline;
    gap: 3px;
    color: #fff;
}

.price-tag .amount {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}

.price-tag .currency {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.add-btn-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: var(--transition);
}

.product-card:hover .add-btn-icon {
    background: var(--primary);
    color: #fff;
}

/* Empty search state */
.no-products-found {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-products-found i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.no-products-found h3 {
    color: #fff;
    margin-bottom: 8px;
}

.no-products-found p {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Shortcuts Footer */
.shortcuts-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    overflow-x: auto;
}

.shortcut-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

kbd {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: 'Inter', monospace;
    font-size: 0.72rem;
    color: #fff;
}

/* ===================================================
   CART & BILL SECTION (RIGHT SIDEBAR)
   =================================================== */
.cart-section {
    width: 440px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-shrink: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

/* Cart Header */
.cart-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.015);
}

.cart-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.invoice-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.invoice-tag strong {
    font-family: 'Inter', sans-serif;
    color: var(--accent-cyan);
}

.btn-clear-cart {
    background: none;
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-clear-cart:hover {
    background: rgba(239, 68, 68, 0.15);
}

.customer-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-input-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.customer-input-box i {
    position: absolute;
    right: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.customer-input-box input {
    width: 100%;
    height: 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 34px 0 10px;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
}

.customer-input-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.cart-items-counter {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.cart-items-counter span {
    font-weight: 700;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
}

/* Cart Items Container */
.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.empty-cart-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.empty-cart-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 14px;
    color: var(--text-muted);
}

.empty-cart-state h3 {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.empty-cart-state p {
    font-size: 0.82rem;
    max-width: 260px;
    line-height: 1.4;
}

/* Cart Item Row */
.cart-item-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: var(--transition);
    animation: slideInRight 0.2s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(15px); }
    to { opacity: 1; transform: translateX(0); }
}

.cart-item-row:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--bg-card-hover);
}

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

.cart-item-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.cart-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.cart-item-meta .unit-price {
    font-family: 'Inter', sans-serif;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Stepper Quantity */
.cart-stepper {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.stepper-btn {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition);
}

.stepper-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.stepper-input {
    width: 36px;
    height: 28px;
    background: none;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: center;
}

.stepper-input:focus {
    outline: none;
}

.cart-item-total {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 70px;
    text-align: left;
}

.cart-item-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    transition: var(--transition);
}

.cart-item-delete:hover {
    color: var(--danger);
    transform: scale(1.15);
}

/* Cart Summary */
.cart-summary {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.summary-line .value {
    font-family: 'Inter', 'Cairo', sans-serif;
    font-weight: 700;
    color: #fff;
}

.summary-line.discount-line .discount-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discount-inputs {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.discount-inputs input {
    width: 50px;
    height: 26px;
    background: none;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    text-align: center;
}

.discount-inputs input:focus {
    outline: none;
}

.discount-inputs select {
    height: 26px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0 4px;
    cursor: pointer;
}

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

/* Tax Toggle */
.tax-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: 0.3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(16px);
}

/* Grand Total Line */
.grand-total-line {
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    margin-top: 4px;
    align-items: center;
}

.grand-total-line span:first-child {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.grand-total-amount {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.grand-total-amount .currency {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 700;
}

.grand-total-amount .total-number {
    font-family: 'Inter', sans-serif;
    font-size: 1.85rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

/* ===================================================
   PAYMENT & CHANGE CALCULATOR (BOTTOM RIGHT)
   =================================================== */
.payment-box {
    padding: 14px 20px 18px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.paid-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.paid-input-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-with-currency {
    position: relative;
    width: 170px;
}

.input-with-currency input {
    width: 100%;
    height: 38px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 12px 0 38px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: left;
    transition: var(--transition);
}

.input-with-currency input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.input-with-currency .currency-tag {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Quick Cash Pills */
.quick-cash-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.cash-pill {
    flex: 1;
    height: 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: 'Inter', 'Cairo', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.cash-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cash-pill:active {
    transform: translateY(1px);
}

/* Change Display */
.change-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
}

.change-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.change-amount {
    font-family: 'Inter', 'Cairo', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

/* Checkout Action Buttons */
.checkout-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-checkout-cash {
    flex: 2;
    height: 52px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    padding: 0 16px;
    font-size: 0.95rem;
}

.btn-checkout-cash i {
    font-size: 1.3rem;
}

.btn-checkout-cash:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

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

.btn-checkout-card {
    flex: 1.2;
    height: 52px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    padding: 0 12px;
}

.btn-checkout-card i {
    font-size: 1.2rem;
}

.btn-checkout-card:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.btn-text .primary-text {
    font-size: 0.95rem;
}

.btn-text .sub-text {
    font-size: 0.68rem;
    opacity: 0.85;
    font-weight: 500;
}

/* ===================================================
   MODALS & OVERLAYS
   =================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wide-modal-card {
    max-width: 950px;
}

.receipt-modal-card {
    max-width: 440px;
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.015);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
}
.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 18px;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* ===================================================
   THERMAL RECEIPT DESIGN (80mm STANDARD)
   =================================================== */
.thermal-receipt {
    background: #ffffff;
    color: #111827;
    padding: 20px 16px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12.5px;
    line-height: 1.4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.receipt-header {
    text-align: center;
    margin-bottom: 8px;
}

.receipt-logo {
    font-size: 2rem;
    margin-bottom: 4px;
    color: #10b981;
}

.receipt-shop-name {
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 2px;
}

.receipt-sub {
    font-size: 11px;
    color: #4b5563;
    font-family: 'Cairo', sans-serif;
}

.receipt-divider {
    text-align: center;
    font-weight: bold;
    margin: 4px 0;
    letter-spacing: 1px;
    color: #6b7280;
    overflow: hidden;
    white-space: nowrap;
}

.receipt-meta {
    font-family: 'Cairo', monospace;
    font-size: 11.5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 6px 0;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-family: 'Cairo', monospace;
    font-size: 11.5px;
}

.receipt-table th {
    border-bottom: 1px dashed #000;
    padding: 4px 2px;
    font-weight: bold;
}

.receipt-table td {
    padding: 4px 2px;
    border-bottom: 1px dotted #e5e7eb;
}

.col-item { text-align: right; width: 45%; }
.col-qty { text-align: center; width: 15%; }
.col-price { text-align: center; width: 20%; }
.col-total { text-align: left; width: 20%; font-weight: bold; }

.receipt-totals {
    font-family: 'Cairo', monospace;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 8px 0;
}

.r-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.r-grand-total {
    font-size: 14px;
    font-weight: 900;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 4px 0;
}

.receipt-qr-section {
    text-align: center;
    margin-top: 12px;
}

.qr-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 2.5rem;
    margin-bottom: 6px;
}

.receipt-footer-msg {
    font-family: 'Cairo', sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: #111;
}

.receipt-software-tag {
    font-size: 9.5px;
    color: #6b7280;
    margin-top: 4px;
}

/* ===================================================
   FORM & TABLE STYLES (PRODUCTS & SETTINGS)
   =================================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

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

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input, 
.form-group select {
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.input-with-action {
    display: flex;
    gap: 6px;
}

.input-with-action input {
    flex: 1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

/* Products Management Layout */
.products-mgr-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-form-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
}

.product-form-card h3 {
    font-size: 1rem;
    margin-bottom: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.table-search {
    position: relative;
    max-width: 350px;
    flex: 1;
}

.table-search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.table-search input {
    width: 100%;
    height: 38px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 34px 0 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
}

.table-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}

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

.data-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 14px;
    color: var(--text-secondary);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

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

.btn-tbl-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: var(--transition);
}

.btn-tbl-action.edit:hover {
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.btn-tbl-action.delete:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Sales Stats Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.icon-revenue { background: rgba(16, 185, 129, 0.15); color: var(--primary); }
.icon-invoices { background: rgba(99, 102, 241, 0.15); color: var(--accent-indigo); }
.icon-cash { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.icon-card { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }

.stat-content .stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.stat-content .stat-val {
    font-family: 'Inter', 'Cairo', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-top: 2px;
}

/* ===================================================
   TOAST NOTIFICATIONS
   =================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: #1f2937;
    color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toastIn 0.25s ease-out;
}

.toast.success { border-right: 4px solid var(--primary); }
.toast.error { border-right: 4px solid var(--danger); }
.toast.info { border-right: 4px solid var(--accent-blue); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
/* ===================================================
   CAMERA BARCODE SCANNER MODAL STYLES
   =================================================== */
.scanner-modal-card {
    max-width: 580px;
}

.scanner-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 20px;
}

.camera-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.camera-select-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.camera-select-wrapper i {
    position: absolute;
    right: 12px;
    color: var(--accent-cyan);
    font-size: 0.9rem;
}

.camera-select-wrapper select {
    width: 100%;
    height: 38px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 34px 0 10px;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.camera-viewport-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

#cameraReaderView {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

#cameraReaderView video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: var(--radius-md);
}

/* Scanner Laser & Frame Overlay */
.scanner-target-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
}

.target-frame {
    position: relative;
    width: 260px;
    height: 160px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    overflow: hidden;
}

.target-frame .corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--primary);
    border-style: solid;
}

.target-frame .corner.top-left {
    top: 0;
    right: 0;
    border-width: 3px 3px 0 0;
    border-top-right-radius: 6px;
}

.target-frame .corner.top-right {
    top: 0;
    left: 0;
    border-width: 3px 0 0 3px;
    border-top-left-radius: 6px;
}

.target-frame .corner.bottom-left {
    bottom: 0;
    right: 0;
    border-width: 0 3px 3px 0;
    border-bottom-right-radius: 6px;
}

.target-frame .corner.bottom-right {
    bottom: 0;
    left: 0;
    border-width: 0 0 3px 3px;
    border-bottom-left-radius: 6px;
}

.laser-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ef4444, #f43f5e, #ef4444, transparent);
    box-shadow: 0 0 10px #f43f5e, 0 0 18px #ef4444;
    animation: laserScan 2s infinite ease-in-out;
}

@keyframes laserScan {
    0% { top: 5%; opacity: 0.2; }
    50% { top: 92%; opacity: 1; }
    100% { top: 5%; opacity: 0.2; }
}

.camera-status-banner {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 0.8rem;
    z-index: 10;
}

.camera-status-banner i {
    color: var(--accent-cyan);
}

/* Quick Simulation Test Box */
.scanner-test-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
}

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

.test-box-title i {
    color: var(--warning);
}

.quick-sim-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.btn-sim-scan {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-sim-scan:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-sim-scan:active {
    transform: scale(0.97);
}

.scanner-instructions {
    font-size: 0.78rem;
    color: var(--text-muted);
    flex: 1;
}

/* ===================================================
   USER PILLS CLICKABLE & LOCK BUTTON
   =================================================== */
.clickable-pill {
    cursor: pointer;
    position: relative;
}

.clickable-pill:hover {
    border-color: var(--primary) !important;
    background: rgba(16, 185, 129, 0.08) !important;
    transform: translateY(-1px);
}

.mini-edit-icon {
    font-size: 0.65rem;
    color: var(--primary);
    margin-right: 4px;
    opacity: 0.8;
}

.btn-lock {
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.btn-lock:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
    color: #fff;
}

/* ===================================================
   ACCOUNTS MODAL & PASSWORD INPUTS
   =================================================== */
.account-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.account-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.account-tab:hover {
    background: var(--bg-card-hover);
    color: #fff;
}

.account-tab.active {
    background: linear-gradient(135deg, var(--primary), #059669);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

.input-with-eye input {
    width: 100%;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 38px 0 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.btn-toggle-eye {
    position: absolute;
    left: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-toggle-eye:hover {
    color: #fff;
}

/* ===================================================
   LOCK SCREEN & FAST NUMPAD UNLOCK
   =================================================== */
.lock-screen-overlay {
    backdrop-filter: blur(20px);
    background: rgba(11, 15, 25, 0.92);
    z-index: 10000;
}

.lock-screen-box {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    width: 100%;
    max-width: 380px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lock-avatar-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 12px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

.lock-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.lock-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.lock-user-selector {
    display: flex;
    width: 100%;
    gap: 8px;
    margin-bottom: 16px;
}

.lock-role-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.lock-role-btn:hover {
    color: #fff;
    background: var(--bg-card-hover);
}

.lock-role-btn.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.lock-input-wrap {
    width: 100%;
    margin-bottom: 12px;
}

.lock-input-wrap input {
    width: 100%;
    height: 48px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 1.6rem;
    color: var(--primary);
    letter-spacing: 8px;
    font-family: 'Inter', monospace;
    transition: var(--transition);
}

.lock-input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.lock-error-msg {
    color: #f87171;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Touch PIN Numpad */
.pin-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin-bottom: 16px;
}

.numpad-key {
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    user-select: none;
}

.numpad-key:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.numpad-key:active {
    transform: scale(0.95);
    background: rgba(16, 185, 129, 0.2);
}

.numpad-key.action-clear {
    color: var(--warning);
    font-size: 1.1rem;
}

.numpad-key.action-back {
    color: #f87171;
    font-size: 1.1rem;
}

.btn-unlock {
    width: 100%;
    height: 48px;
    font-size: 0.95rem;
}

/* ===================================================
   PRINT STYLESHEET (@media print)
   =================================================== */
@media print {
    body * {
        visibility: hidden;
    }
    #thermalReceipt, #thermalReceipt * {
        visibility: visible;
    }
    #thermalReceipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 78mm !important;
        margin: 0;
        padding: 0;
        box-shadow: none !important;
        border: none !important;
    }
    .modal-overlay {
        background: none !important;
        position: static !important;
        padding: 0 !important;
    }
    .modal-card {
        border: none !important;
        box-shadow: none !important;
        background: none !important;
        max-width: 100% !important;
    }
    .modal-header, .modal-footer {
        display: none !important;
    }
}
