:root {
  --brand-primary: #4338CA;
  --brand-primary-light: #EEF2FF;
  --brand-d: #E4572E;
  --brand-i: #F2B705;
  --brand-s: #2E933C;
  --brand-c: #2274A5;
  --surface: #F7F8FC;
  --surface-card: #FFFFFF;
  --border-soft: #E7E9F3;
  --text-main: #1E1B39;
  --text-muted: #6B7080;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-soft: 0 4px 24px rgba(24, 24, 60, 0.06);
}

* { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

body { background: var(--surface); color: var(--text-main); }

.app-topbar {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 2px 12px rgba(20,20,50,0.03);
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-primary), #7C3AED);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.role-badge {
  background: var(--brand-primary-light); color: var(--brand-primary);
  font-size: 0.7rem; padding: 6px 10px; border-radius: 999px; font-weight: 700;
}

.app-shell { display: flex; min-height: calc(100vh - 62px); }
.app-sidebar {
  width: 260px; background: var(--surface-card); border-right: 1px solid var(--border-soft);
  padding: 20px 14px; flex-shrink: 0;
}
.app-content { flex: 1; min-width: 0; }
.nav-section {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); font-weight: 700; margin: 18px 10px 8px;
}
.nav-section:first-child { margin-top: 4px; }
.app-sidebar .nav-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md);
  color: var(--text-main); font-weight: 600; font-size: 0.9rem; margin-bottom: 2px;
}
.app-sidebar .nav-link i { font-size: 1.05rem; color: var(--text-muted); }
.app-sidebar .nav-link:hover { background: var(--brand-primary-light); color: var(--brand-primary); }
.app-sidebar .nav-link:hover i { color: var(--brand-primary); }
.app-sidebar .nav-link.active { background: var(--brand-primary); color: #fff; }
.app-sidebar .nav-link.active i { color: #fff; }

.card, .stat-card, .disc-card {
  background: var(--surface-card); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
}
.card-header { background: transparent; border-bottom: 1px solid var(--border-soft); font-weight: 700; }

.stat-card { padding: 20px; }
.stat-card .stat-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.stat-card .stat-value { font-size: 1.7rem; font-weight: 800; }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.82rem; font-weight: 600; }

.badge-d { background: var(--brand-d); color: #fff; }
.badge-i { background: var(--brand-i); color: #1E1B39; }
.badge-s { background: var(--brand-s); color: #fff; }
.badge-c { background: var(--brand-c); color: #fff; }

.btn-primary { background: var(--brand-primary); border-color: var(--brand-primary); }
.btn-primary:hover { background: #362DA8; border-color: #362DA8; }

.table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); border-bottom-width: 1px; }
.table td, .table th { vertical-align: middle; }

.avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: var(--shadow-soft); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #4338CA 0%, #7C3AED 100%); }
.login-card { background: #fff; border-radius: 20px; box-shadow: 0 20px 60px rgba(20,20,60,0.3); overflow: hidden; max-width: 920px; width: 100%; }
.login-side { background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.15), transparent 60%), linear-gradient(160deg, #4338CA, #312080); color: #fff; padding: 48px; }

.question-timer { font-variant-numeric: tabular-nums; font-weight: 800; }
.likert-option { cursor: pointer; }
.likert-option input { display: none; }
.likert-option .likert-circle {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 6px;
  transition: all .15s ease;
}
.likert-option input:checked + .likert-circle { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; transform: scale(1.08); }

.app-footer { color: var(--text-muted); font-size: 0.85rem; }

@media (max-width: 991px) {
  .app-sidebar { position: fixed; left: -280px; top: 62px; bottom: 0; z-index: 1040; transition: left .2s ease; }
  .app-sidebar.show { left: 0; box-shadow: 0 0 30px rgba(0,0,0,.2); }
}
