/* 
    IRIS Smart POS ERP - Premium Modern Design System
    Theme: Modern Enterprise (Glassmorphism, High Contrast, Dynamic Accents)
*/

:root {
    /* Base Colors - Fallbacks if not injected */
    --primary: #6366f1;
    --primary-rgb: 99, 102, 241;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    
    --secondary: #64748b;
    --success: #10b981;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --dark: #0f172a;
    
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    --sidebar-w: 280px;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-dark: rgba(15, 23, 42, 0.85);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --card-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

* { 
    transition: all 0.2s ease; 
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--slate-100);
    color: var(--slate-700);
    margin: 0;
    overflow-x: hidden;
    letter-spacing: -0.015em;
    -webkit-font-smoothing: antialiased;
}

/* --- Layout Structure --- */
#wrapper { display: flex; min-height: 100vh; }
#content-wrapper { 
    flex: 1; 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    overflow-x: hidden; 
    background: var(--slate-100);
    position: relative;
}

/* --- Refined Sidebar --- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--slate-900);
    color: #fff;
    z-index: 1100;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 15px 0 35px rgba(0,0,0,0.1);
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.sidebar-header {
    padding: 2.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
}

.sidebar .nav-link {
    color: var(--slate-400);
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    border-radius: 0.85rem;
    margin: 0.35rem 1rem;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.sidebar .nav-link i { 
    width: 26px; 
    margin-right: 14px; 
    font-size: 1.15rem; 
    opacity: 0.6;
    text-align: center;
}

.sidebar .nav-link:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: #fff;
    transform: translateX(4px);
}

.sidebar .nav-link:hover i { opacity: 1; color: var(--primary-light); }

.sidebar .nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 20px -4px rgba(var(--primary-rgb), 0.5);
    border-color: rgba(255,255,255,0.1);
}

.sidebar .nav-link.active i { opacity: 1; }

.sidebar-heading {
    padding: 1.75rem 1.75rem 0.65rem;
    color: var(--slate-500);
    font-size: 0.65rem !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.8;
}

/* --- Modern Topbar --- */
.topbar {
    height: 75px;
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* --- Premium Cards & Elements --- */
.card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 1.5rem;
    box-shadow: var(--card-shadow);
}

.rounded-xl { border-radius: 1rem !important; }
.rounded-2xl { border-radius: 1.5rem !important; }
.rounded-3xl { border-radius: 2.25rem !important; }

/* Status Badges */
.badge {
    padding: 0.5em 1em;
    border-radius: 9999px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Inputs & Forms */
.form-control, .form-select {
    border-radius: 1rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--slate-200);
    background-color: var(--slate-50);
}

.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.35);
}

/* Scrollbar Modernization */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--slate-100); }
::-webkit-scrollbar-thumb { 
    background: var(--slate-300); 
    border-radius: 20px; 
    border: 2px solid var(--slate-100);
}
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }

/* Icons & Visuals */
.avatar-box img {
    border: 3px solid #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Custom Helpers */
.text-xs { font-size: 0.75rem; }
.text-xxs { font-size: 0.65rem; }
.tracking-tight { letter-spacing: -0.025em; }

@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar.show { transform: translateX(0); }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(8px);
        z-index: 1050;
    }
    .sidebar-overlay.show { display: block; }
}

