:root {
    --sidebar-bg: #0f172a;
    --sidebar-border: #1e293b;
    --sidebar-hover: rgba(99, 102, 241, 0.08);
    --sidebar-active: rgba(99, 102, 241, 0.15);
    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --accent-indigo: #6366f1;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

body {
    background: var(--body-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════ */
#sidebar {
    background: var(--sidebar-bg) !important;
    border-right: 1px solid var(--sidebar-border);
}

#sidebar .nav-link {
    color: #cbd5e1 !important;
    font-size: 0.835rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
}

#sidebar .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #f1f5f9 !important;
}

#sidebar .nav-link.active,
#sidebar .nav-link:active {
    background-color: var(--sidebar-active);
    color: #a5b4fc !important;
}

/* ═══════════════════════════════════════════════════════════
   TOP NAVBAR
   ═══════════════════════════════════════════════════════════ */
.navbar {
    background: var(--card-bg) !important;
    border-bottom: 1px solid var(--card-border) !important;
    box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════ */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border) !important;
    border-radius: var(--radius-md) !important;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-link:hover {
    border-color: var(--accent-indigo) !important;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99, 102, 241, 0.1) !important;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 2px;
}

.stat-card .stat-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

/* Stat icon color variants */
.stat-icon-blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.stat-icon-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.stat-icon-amber {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
}

.stat-icon-red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.stat-icon-purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.stat-icon-indigo {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-indigo);
}

.stat-icon-cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
}

.stat-icon-pink {
    background: rgba(236, 72, 153, 0.1);
    color: var(--accent-pink);
}

/* ═══════════════════════════════════════════════════════════
   CHART CARDS
   ═══════════════════════════════════════════════════════════ */
.chart-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.chart-card .card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-card .card-body {
    padding: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════
   DATA TABLE
   ═══════════════════════════════════════════════════════════ */
.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--card-border);
    padding: 0.75rem 1rem;
}

.table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8fafc;
}

/* ═══════════════════════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════════════════════ */
.page-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.page-header i {
    color: var(--accent-indigo);
}

/* ═══════════════════════════════════════════════════════════
   BADGES & PILLS
   ═══════════════════════════════════════════════════════════ */
.badge {
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════ */
.pagination .page-link {
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
}

/* ═══════════════════════════════════════════════════════════
   FORMS & FILTERS
   ═══════════════════════════════════════════════════════════ */
.form-control,
.form-select {
    border-color: var(--card-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-primary {
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}

.btn-primary:hover {
    background: #4f46e5;
    border-color: #4f46e5;
}

/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════
   UTILITY OVERRIDES
   ═══════════════════════════════════════════════════════════ */
.card {
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--card-border);
    font-weight: 600;
    font-size: 0.85rem;
}

.alert {
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

main {
    background: var(--body-bg);
}
