/* ==========================================================================
   EVAGONZ - ULTRA-MODERN LIGHT DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
    /* Brand & Accent Colors - Vibrant Indigo / Violet Light Palette */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
    --primary-glow: rgba(79, 70, 229, 0.22);
    
    --secondary: #64748b;
    --secondary-hover: #475569;
    --secondary-light: #f8fafc;
    
    --success: #10b981;
    --success-light: #ecfdf5;
    --success-text: #047857;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --warning-text: #b45309;
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-text: #b91c1c;
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    
    --info: #06b6d4;
    --info-light: #ecfeff;
    --info-text: #0e7490;
    --info-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    
    /* Slate / Neutral Scale */
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;

    /* Light Theme Layout Metrics */
    --sidebar-width: 260px;
    --sidebar-bg: #ffffff;
    --sidebar-border: #f1f5f9;
    --sidebar-color: #64748b;
    --sidebar-hover-bg: #f8fafc;
    --sidebar-active-bg: #eef2ff;
    --sidebar-active-color: #4f46e5;
    --topbar-height: 72px;
    --content-bg: #f8fafc;
    
    /* Radii & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-full: 9999px;
    
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 2px 6px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.02);
    --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 12px 28px -4px rgba(79, 70, 229, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 35px -5px rgba(79, 70, 229, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Styles & Typography
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--content-bg);
    color: var(--slate-700);
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--slate-900);
    font-weight: 700;
    letter-spacing: -0.025em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}
a:hover {
    color: var(--primary-hover);
}

.text-primary-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Layout Shell
   ========================================================================== */
.app-shell {
    display: flex;
    min-height: 100vh;
    background-color: var(--content-bg);
    position: relative;
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Modern Light Sidebar
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    box-shadow: 2px 0 16px rgba(15, 23, 42, 0.03);
    transition: transform var(--transition-normal);
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--sidebar-border);
    color: var(--slate-900);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.brand-icon-box {
    width: 38px;
    height: 38px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.sidebar-nav {
    padding: 1rem 0.85rem;
    overflow-y: auto;
    flex: 1;
}

.nav-section {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate-400);
    padding: 1rem 0.75rem 0.4rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: var(--sidebar-color);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
    margin-bottom: 2px;
    position: relative;
}

.sidebar-link i {
    font-size: 1.15rem;
    color: var(--slate-400);
    transition: color var(--transition-fast);
}

.sidebar-link:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--slate-900);
}

.sidebar-link:hover i {
    color: var(--primary);
}

.sidebar-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-color);
    font-weight: 700;
}

.sidebar-link.active i {
    color: var(--primary);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    background: var(--primary-gradient);
    border-radius: 0 4px 4px 0;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--sidebar-border);
    background: var(--slate-50);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ==========================================================================
   Main Content Shell & Navbar
   ========================================================================== */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
}

.content-area {
    padding: 1.75rem 2rem 3rem;
    flex: 1;
}

/* ==========================================================================
   Modern Cards & Glass Elements
   ========================================================================== */
.card {
    background: #ffffff;
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--sidebar-border);
    padding: 1.15rem 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--slate-50);
    border-top: 1px solid var(--sidebar-border);
    padding: 1rem 1.5rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}

/* Hero Stat Cards */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--slate-300);
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

/* ==========================================================================
   Modern Buttons
   ========================================================================== */
.btn {
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.55rem 1.15rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
}

.btn-success {
    background: var(--success-gradient);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.btn-warning {
    background: var(--warning-gradient);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-gradient);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-light {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    color: var(--slate-700);
}

.btn-light:hover {
    background: var(--slate-50);
    border-color: var(--slate-300);
    color: var(--slate-900);
}

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

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

/* ==========================================================================
   Modern Badges
   ========================================================================== */
.badge {
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-soft, .bg-primary-soft {
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
}

.bg-success-soft {
    background-color: var(--success-light) !important;
    color: var(--success-text) !important;
}

.bg-warning-soft {
    background-color: var(--warning-light) !important;
    color: var(--warning-text) !important;
}

.bg-danger-soft {
    background-color: var(--danger-light) !important;
    color: var(--danger-text) !important;
}

.bg-info-soft {
    background-color: var(--info-light) !important;
    color: var(--info-text) !important;
}

.bg-secondary-soft {
    background-color: var(--slate-100) !important;
    color: var(--slate-600) !important;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-control, .form-select {
    background-color: #ffffff;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.95rem;
    font-size: 0.9rem;
    color: var(--slate-800);
    transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    outline: none;
    background-color: #ffffff;
}

.input-icon-group {
    position: relative;
}

.input-icon-group i {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    font-size: 1rem;
    pointer-events: none;
}

.input-icon-group .form-control {
    padding-left: 2.6rem;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table {
    margin-bottom: 0;
    color: var(--slate-700);
}

.table > :not(caption) > * > * {
    padding: 0.95rem 1.15rem;
    background-color: transparent;
    border-bottom-color: var(--slate-100);
}

.table thead th {
    background-color: var(--slate-50);
    color: var(--slate-500);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1.5px solid var(--slate-200);
}

.table-hover > tbody > tr:hover > * {
    background-color: #fafbfc;
}

/* ==========================================================================
   Avatars
   ========================================================================== */
.avatar-sm, .avatar-md, .avatar-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-weight: 700;
    flex-shrink: 0;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
}

.avatar-md {
    width: 46px;
    height: 46px;
    font-size: 1.1rem;
}

.avatar-lg {
    width: 58px;
    height: 58px;
    font-size: 1.35rem;
}

/* ==========================================================================
   Filter & Empty States
   ========================================================================== */
.filter-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
}

.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--slate-300);
    margin-bottom: 0.75rem;
}

.empty-state-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 0.35rem;
}

.empty-state-desc {
    color: var(--slate-500);
    font-size: 0.875rem;
    max-width: 420px;
    margin: 0 auto;
}

/* ==========================================================================
   Responsiveness
   ========================================================================== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .topbar {
        padding: 0 1.25rem;
    }
    
    .content-area {
        padding: 1.25rem 1.25rem 2.5rem;
    }
}
