:root {
    --primary: #1565c0;
    --primary-dark: #0d47a1;
    --primary-light: #1e88e5;
    --accent: #f57c00;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --sidebar-width: 240px;
    --topbar-height: 60px;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg-light); color: var(--text-primary); font-size: 14px; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
.layout { display: flex; min-height: 100vh; }

.sidebar { width: var(--sidebar-width); background: var(--primary); color: #fff; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; overflow-y: auto; transition: var(--transition); }
.sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: space-between; }
.sidebar-header h2 { font-size: 18px; font-weight: 700; }
.sidebar-badge { background: var(--accent); color: #fff; font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-nav { padding: 12px 0; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: rgba(255,255,255,0.6); font-size: 13px; font-weight: 500; transition: var(--transition); border-left: 3px solid transparent; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-item.active { color: #fff; background: rgba(255,255,255,0.1); border-left-color: #fff; }
.nav-item i { width: 18px; text-align: center; font-size: 14px; }

.main-wrapper { flex: 1; margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar { height: var(--topbar-height); background: var(--bg-white); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 50; }
.sidebar-toggle { background: none; border: none; font-size: 18px; color: var(--text-secondary); cursor: pointer; display: none; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.admin-info { text-align: right; }
.admin-name { display: block; font-size: 13px; font-weight: 600; }
.admin-role { display: block; font-size: 11px; color: var(--text-muted); }
.logout-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); color: var(--text-secondary); transition: var(--transition); }
.logout-btn:hover { background: #fef2f2; color: var(--danger); }

.content { padding: 24px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; }

.card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; margin-bottom: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 600; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; }
.stat-card .stat-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 500; border: none; cursor: pointer; transition: var(--transition); font-family: 'Inter', sans-serif; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-primary); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th { background: var(--bg-light); padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 1px solid var(--border); }
table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); font-size: 13px; }
table tr:hover { background: var(--bg-light); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-success { background: #ecfdf5; color: #065f46; }
.badge-warning { background: #fffbeb; color: #92400e; }
.badge-danger { background: #fef2f2; color: #991b1b; }
.badge-info { background: #eff6ff; color: #1e40af; }
.badge-neutral { background: #f1f5f9; color: #475569; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.form-control { width: 100%; padding: 9px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 13px; font-family: 'Inter', sans-serif; color: var(--text-primary); background: var(--bg-white); transition: var(--transition); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,0.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-light); }
.login-card { width: 420px; background: var(--bg-white); border-radius: 12px; box-shadow: var(--shadow-md); overflow: hidden; }
.login-header { background: var(--primary); color: #fff; padding: 28px; text-align: center; }
.login-header h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.login-header p { font-size: 13px; color: rgba(255,255,255,0.6); }
.login-body { padding: 28px; }
.login-body .btn-primary { width: 100%; justify-content: center; padding: 10px; }
.login-footer { text-align: center; padding: 0 28px 24px; font-size: 13px; color: var(--text-muted); }
.login-footer a { color: var(--primary); font-weight: 500; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state i { font-size: 40px; margin-bottom: 12px; }

@media (max-width: 1024px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .login-card { width: 90%; }
}
