:root {
    /* Base Tokens */
    --primary: #D4AF37; 
    --primary-glow: rgba(212, 175, 55, 0.4);
    --whatsapp: #25D366;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Dark Theme (Default) */
    --bg-base: #030712; 
    --bg-surface: #111827;
    --bg-surface-raised: rgba(31, 41, 55, 0.6);
    --sidebar-bg: #0A1128;
    --text-primary: #F9FAFB;
    --text-sub: #E5E7EB;
    --text-muted: #9CA3AF;
    --border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(0,0,0,0.2);
    --overlay-bg: rgba(3, 7, 18, 0.85);
    --scrollbar-thumb: rgba(255,255,255,0.1);
}

[data-theme="light"] {
    --bg-base: #F3F4F6;
    --bg-surface: #FFFFFF;
    --bg-surface-raised: #FFFFFF;
    --sidebar-bg: #FFFFFF;
    --text-primary: #111827;
    --text-sub: #374151;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --input-bg: #F9FAFB;
    --overlay-bg: rgba(255, 255, 255, 0.85);
    --scrollbar-thumb: rgba(0,0,0,0.1);
}

        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
        
        body { 
            background-color: var(--bg-base); 
            background-image: radial-gradient(circle at 15% 50%, rgba(212, 175, 55, 0.05), transparent 40%),
                              radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.05), transparent 40%);
            color: var(--text-primary); 
            overflow-x: hidden; 
            font-size: 14px;
        }

        h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
        
        /* Inputs & Controls */
        input, select {
            width: 100%; padding: 12px 16px; margin-top: 6px;
            background: var(--input-bg); 
            border: 1px solid var(--border);
            color: var(--text-primary); 
            border-radius: 8px;
            font-size: 14px;
            transition: var(--transition);
        }
        input:focus, select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-glow);
            background: rgba(0,0,0,0.4);
        }

        /* Buttons */
        .btn-gold { 
            background: linear-gradient(135deg, var(--primary), #B08D35); 
            color: #000; font-weight: 600; padding: 12px 24px; 
            border: none; border-radius: 8px; cursor: pointer; 
            display: flex; justify-content: center; align-items: center; gap: 8px;
            transition: var(--transition);
            box-shadow: 0 4px 15px var(--primary-glow);
        }
        .btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--primary-glow); filter: brightness(1.1); }
        .btn-gold:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

        .btn-secondary {
            background: transparent;
            border: 1px solid var(--border);
            color: var(--text-primary);
            font-weight: 600; padding: 12px 24px;
            border-radius: 8px; cursor: pointer;
            transition: var(--transition);
        }
        .btn-secondary:hover {
            background: var(--border);
            transform: translateY(-1px);
        }

        .btn-wa { background: var(--whatsapp); color: white; font-weight: 600; padding: 12px 24px; border: none; border-radius: 8px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; transition: var(--transition); box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3); }
        .btn-wa:hover { transform: translateY(-2px); filter: brightness(1.1); }

        /* App Layout */
        #app-layout { display: flex; height: 100vh; }
        
        .sidebar { 
            width: 260px; background: var(--sidebar-bg);
            border-right: 1px solid var(--border); display: flex; flex-direction: column; 
            z-index: 10; overflow-y: auto;
        }
        .sidebar .logo { padding: 24px; display: flex; align-items: center; }
        
        .nav-header {
            color: #6B7280; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em;
            padding: 10px 24px; text-transform: uppercase; margin-top: 10px;
        }

        .nav-link { 
            padding: 14px 24px; display: flex; align-items: center; gap: 16px; 
            color: var(--text-sub); cursor: pointer; font-weight: 500; font-size: 0.95rem;
            transition: background 0.2s; text-decoration: none;
        }
        .nav-link i { font-size: 1.2rem; }
        .nav-link:hover { 
            background: rgba(255, 255, 255, 0.05); 
        }
        .nav-link.active { 
            background: #3B82F6; /* Solid bright blue from screenshot */
            color: #FFFFFF; 
        }
        
        .main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; }
        .topbar { 
            height: 72px; display: flex; justify-content: space-between; align-items: center; 
            padding: 0 32px; border-bottom: 1px solid var(--border); 
            background: var(--bg-surface); backdrop-filter: blur(10px); z-index: 5;
        }
        
        .view-container { flex: 1; padding: 32px; overflow-y: auto; }
        .page-view { display: none; }
        .page-view.active { display: block; animation: fadeSlideUp 0.4s ease-out forwards; }

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

        /* Cards & Panels */
        .card { 
            background: var(--bg-surface-raised); backdrop-filter: blur(12px); 
            border: 1px solid var(--border); padding: 24px; 
            border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }
        
        /* POS Grid */
        .pos-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; height: 100%; align-items: start; }
        .pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; padding-right: 8px; }
        .pos-item { 
            background: var(--bg-surface); border: 1px solid var(--border); 
            padding: 20px; border-radius: var(--radius-md); cursor: pointer; 
            text-align: center; transition: var(--transition);
            display: flex; flex-direction: column; align-items: center; justify-content: center;
        }
        .pos-item:hover { 
            border-color: var(--primary); transform: translateY(-4px); 
            box-shadow: 0 10px 20px rgba(0,0,0,0.3); background: rgba(212, 175, 55, 0.05);
        }

        /* Modals & Alerts */
        .modal-overlay {
            position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
            background: var(--overlay-bg); backdrop-filter: blur(8px);
            display: none; align-items: center; justify-content: center; z-index: 1000;
        }
        .modal-card {
            background: var(--bg-surface); border: 1px solid var(--border);
            border-radius: var(--radius-lg); width: 90%; max-width: 500px; padding: 32px;
            box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
            animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        @keyframes modalPop { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

        #customAlert {
            position: fixed; top: 24px; right: -350px; width: 320px;
            background: var(--bg-surface); border-left: 4px solid var(--primary);
            padding: 16px 20px; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.6);
            transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 9999;
        }
        #customAlert.show { right: 24px; }
        
        /* Scrollbar */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--primary); }
/* Notification Center */
.notification-wrapper { position: relative; }
.notification-bell {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--input-bg); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-sub); cursor: pointer; transition: var(--transition);
    position: relative;
}
.notification-bell:hover { background: var(--border); color: var(--primary); transform: translateY(-1px); }
.notification-badge {
    position: absolute; top: -5px; right: -5px;
    background: #EF4444; color: white; font-size: 0.65rem;
    font-weight: 700; min-width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; border: 2px solid var(--bg-surface);
    animation: pulse 2s infinite;
}
@keyframes pulse { 
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } 
}

.notification-panel {
    position: absolute; top: 55px; right: 0; width: 340px;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    display: none; flex-direction: column; z-index: 1001;
    overflow: hidden; animation: slideDown 0.3s ease-out;
}
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.notification-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.notification-body { max-height: 400px; overflow-y: auto; }
.notification-item {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    cursor: pointer; transition: background 0.2s; display: flex; gap: 12px;
}
.notification-item:hover { background: rgba(255,255,255,0.02); }
.notification-item.unread { border-left: 3px solid var(--primary); background: rgba(212, 175, 55, 0.02); }
.notification-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notification-content h5 { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.notification-content p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.notification-footer { padding: 12px; text-align: center; border-top: 1px solid var(--border); }
