* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #818CF8;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --radius: 12px;
}
body { font-family: 'Inter', sans-serif; background: #F1F5F9; color: var(--gray-800); }
.app-container { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: var(--gray-900); color: #fff; position: fixed; top: 0; left: 0; height: 100vh; z-index: 1000; display: flex; flex-direction: column; }
.sidebar-brand { padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; gap: 12px; }
.sidebar-brand .logo-icon { width: 42px; height: 42px; background: linear-gradient(135deg, #818CF8, #4F46E5); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; }
.sidebar-brand .logo-text { font-size: 18px; font-weight: 700; color: #fff; }
.sidebar-brand .logo-text span { color: #818CF8; }
.sidebar-brand .logo-sub { font-size: 10px; color: #94A3B8; display: block; margin-top: -2px; }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-link { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: #CBD5E1; text-decoration: none; border-radius: 8px; font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-link.active { background: #4F46E5; color: #fff; }
.sidebar-link i { width: 20px; text-align: center; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.06); padding: 12px; }
.main-content { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; }
.top-bar { height: var(--topbar-height); background: #fff; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; position: sticky; top: 0; z-index: 100; }
.top-bar-left { display: flex; align-items: center; gap: 16px; }
.toggle-sidebar { display: none; background: none; border: none; font-size: 20px; color: var(--gray-600); cursor: pointer; }
.page-title { font-size: 20px; font-weight: 700; color: var(--gray-900); }
.top-bar-right { display: flex; align-items: center; gap: 20px; }
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #818CF8, #4F46E5); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; }
.user-details .name { font-weight: 600; font-size: 14px; color: var(--gray-800); }
.user-details .role { font-size: 12px; color: var(--gray-500); }
.badge-role { background: #EEF2FF; color: #4F46E5; padding: 2px 12px; border-radius: 9999px; font-size: 11px; font-weight: 600; }
.btn-logout { background: none; border: none; color: var(--gray-400); font-size: 18px; cursor: pointer; padding: 8px; border-radius: 8px; }
.btn-logout:hover { color: #EF4444; background: #FEF2F2; }
.content-wrapper { flex: 1; padding: 28px 32px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card { background: #fff; padding: 24px 28px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 12px; }
.stat-card .stat-icon.blue { background: #EEF2FF; color: #4F46E5; }
.stat-card .stat-icon.green { background: #ECFDF5; color: #10B981; }
.stat-card .stat-icon.yellow { background: #FFFBEB; color: #F59E0B; }
.stat-card .stat-icon.red { background: #FEF2F2; color: #EF4444; }
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); font-weight: 500; }
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: var(--gray-900); margin-top: 2px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--gray-200); overflow: hidden; margin-bottom: 24px; }
.card-header { padding: 18px 24px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 16px; font-weight: 600; color: var(--gray-800); display: flex; align-items: center; gap: 10px; }
.card-title i { color: #4F46E5; }
.card-body { padding: 20px 24px; }
.footer { padding: 16px 32px; text-align: center; color: var(--gray-400); font-size: 13px; border-top: 1px solid var(--gray-200); background: #fff; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn-primary { background: #4F46E5; color: #fff; }
.btn-primary:hover { background: #3730A3; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-xs { padding: 2px 10px; font-size: 11px; }
.error { background: #FEE2E2; color: #991B1B; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid #FECACA; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 4px; color: #374151; }
.form-group .form-control { width: 100%; padding: 10px 14px; border: 1px solid #D1D5DB; border-radius: 8px; font-size: 14px; }
.form-group .form-control:focus { outline: none; border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.text-center { text-align: center; margin-top: 16px; font-size: 14px; color: #6B7280; }
@media (max-width: 992px) { .sidebar { transform: translateX(-100%); } .sidebar.open { transform: translateX(0); } .main-content { margin-left: 0; } .toggle-sidebar { display: block; } .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .stat-card { padding: 16px 18px; } .stat-card .stat-value { font-size: 24px; } .top-bar-right .user-details { display: none; } .content-wrapper { padding: 12px; } }