@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================
   CSS Variables & Reset
   ============================ */
:root {
  --bg: #f5f0e8;
  --surface: rgba(245,235,220,0.75);
  --surface2: rgba(240,228,210,0.6);
  --border: rgba(180, 130, 80, 0.16);
  --border-light: rgba(180,130,80,0.1);
  --accent: #92400e;
  --accent-light: #b45309;
  --accent-glow: rgba(146, 64, 14, 0.15);
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --text: #1c1210;
  --text-muted: #92785e;
  --text-sub: #78614a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 4px 20px rgba(146,64,14,0.06), 0 1px 3px rgba(146,64,14,0.04);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

/* ============================
   Background Orbs
   ============================ */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-orbs::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180,130,80,0.06) 0%, transparent 70%);
  top: -200px; right: -100px;
  animation: orb-float 8s ease-in-out infinite;
}
.bg-orbs::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(146,64,14,0.04) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  animation: orb-float 10s ease-in-out infinite reverse;
}
@keyframes orb-float { 0%,100% { transform: translateY(0px); } 50% { transform: translateY(30px); } }

/* ============================
   Glass Card
   ============================ */
.glass {
  background: rgba(248, 240, 228, 0.8);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(146,64,14,0.04);
}
.glass-light {
  background: rgba(245, 235, 220, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

/* ============================
   Layout
   ============================ */
.page-wrapper { position: relative; z-index: 1; min-height: 100vh; }
.center-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.dashboard-layout { display: flex; min-height: 100vh; }

/* ============================
   Sidebar
   ============================ */
.sidebar {
  width: 260px; min-height: 100vh;
  background: rgba(248,240,228,0.9);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 0;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
}
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #92400e, #b45309);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.sidebar-title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.2; }
.sidebar-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-group-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 8px 10px; margin-top: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-sub); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: var(--transition); margin-bottom: 2px;
  text-decoration: none; border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(124,58,237,0.12); color: var(--accent-light); }
.nav-item.active { background: rgba(146,64,14,0.08); color: var(--accent-light); font-weight: 600; }
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-footer {
  padding: 16px; border-top: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 10px;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #92400e, #b45309);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-muted); text-transform: capitalize; }
.btn-logout {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 18px; padding: 4px; transition: var(--transition); border-radius: 6px; flex-shrink: 0;
}
.btn-logout:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

.main-content { margin-left: 260px; flex: 1; padding: 28px 32px; }

/* ============================
   Top Bar
   ============================ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.page-title { font-size: 22px; font-weight: 700; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.breadcrumb span { color: var(--accent-light); font-weight: 500; }

/* ============================
   Buttons
   ============================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: none; transition: var(--transition); text-decoration: none;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124,58,237,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,58,237,0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border-light); }
.btn-secondary:hover { background: rgba(124,58,237,0.1); border-color: var(--accent); color: var(--accent-light); }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-success { background: rgba(16,185,129,0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.btn-success:hover { background: rgba(16,185,129,0.25); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }
.btn-full { width: 100%; justify-content: center; padding: 13px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ============================
   Forms
   ============================ */
.form-group { margin-bottom: 18px; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-sub); margin-bottom: 6px; letter-spacing: 0.3px; text-transform: uppercase; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); color: var(--text); font-family: inherit;
  font-size: 14px; transition: var(--transition); outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); background: rgba(124,58,237,0.07);
  box-shadow: 0 0 0 3px rgba(146,64,14,0.06);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select option { background: var(--surface2); }
textarea { resize: vertical; min-height: 80px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap input { padding-left: 40px !important; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--text-muted); }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; display: none; }
.form-error.show { display: block; }

/* ============================
   Stats Cards
   ============================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-light);
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border); transform: translateY(-2px); }
.stat-value { font-size: 28px; font-weight: 800; background: linear-gradient(135deg, var(--accent-light), #fff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-icon { font-size: 28px; margin-bottom: 10px; }

/* ============================
   Tables
   ============================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-light); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th { padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border-light); }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(124,58,237,0.06); }
tbody td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }

/* ============================
   Badges
   ============================ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.badge-purple { background: rgba(146,64,14,0.08); color: var(--accent-light); }
.badge-green { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-orange { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-red { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-blue { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-gray { background: rgba(100,116,139,0.15); color: var(--text-muted); }

/* ============================
   Tabs
   ============================ */
.tab-bar { display: flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: var(--radius-sm); margin-bottom: 24px; border: 1px solid var(--border-light); flex-wrap: wrap; }
.tab-btn {
  flex: 1; padding: 9px 14px; border: none; background: none;
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  border-radius: 6px; cursor: pointer; transition: var(--transition);
  white-space: nowrap; min-width: fit-content;
}
.tab-btn.active { background: linear-gradient(135deg, var(--accent), #6d28d9); color: #fff; box-shadow: 0 2px 10px rgba(124,58,237,0.3); }
.tab-btn:hover:not(.active) { background: rgba(124,58,237,0.1); color: var(--accent-light); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

/* ============================
   Toast
   ============================ */
.toast-container { position: fixed; top: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); max-width: 360px;
  animation: slideInRight 0.3s ease, fadeOut 0.4s ease 3s forwards;
  font-size: 14px; font-weight: 500;
}
.toast-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.35); color: #34d399; }
.toast-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.35); color: #f87171; }
.toast-info { background: rgba(146,64,14,0.06); border: 1px solid rgba(124,58,237,0.35); color: var(--accent-light); }
.toast-assignment { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.45); color: #60a5fa; font-weight: 600; }
.toast-urgent { background: rgba(239,68,68,0.18); border: 1px solid rgba(239,68,68,0.55); color: #f87171; font-weight: 700; }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }

/* ============================
   Notification Badge (pulse)
   ============================ */
@keyframes notifPulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
  70%  { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(239,68,68,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.notif-badge-pulse { animation: notifPulse 1.4s ease-out infinite; }

/* ============================
   Modal
   ============================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(44,24,16,0.25);
  backdrop-filter: blur(4px); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; max-width: 520px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: scaleIn 0.25s ease;
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@keyframes scaleIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============================
   Likert Scale
   ============================ */
.likert-section { margin-bottom: 28px; }
.section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.section-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.section-title-text { font-size: 15px; font-weight: 700; }
.likert-question { margin-bottom: 16px; }
.question-text { font-size: 13.5px; color: var(--text-sub); margin-bottom: 10px; }
.likert-scale {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.likert-option { display: none; }
.likert-label {
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  border: 2px solid var(--border-light);
  background: rgba(255,255,255,0.03);
  color: var(--text-sub); transition: var(--transition);
}
.likert-label:hover { border-color: var(--accent); color: var(--accent-light); background: rgba(124,58,237,0.1); }
.likert-option:checked + .likert-label {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  border-color: var(--accent); color: #fff;
  box-shadow: 0 2px 10px rgba(124,58,237,0.4);
  transform: scale(1.05);
}
.likert-hint { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); margin-top: 4px; padding: 0 2px; }

/* ============================
   Login Page
   ============================ */
.login-card { width: 100%; max-width: 420px; }
.login-logo-ring {
  width: 70px; height: 70px; border-radius: 20px;
  background: linear-gradient(135deg, #92400e, #b45309);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; margin: 0 auto 20px;
  box-shadow: 0 0 40px rgba(124,58,237,0.4);
}
.login-card-body { padding: 36px; }
.login-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.login-sub { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }
.role-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 99px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

/* ============================
   Landing Page
   ============================ */
.landing-hero { text-align: center; margin-bottom: 60px; }
.hero-tag {
  display: inline-block; padding: 5px 16px; border-radius: 99px;
  background: rgba(146,64,14,0.06); border: 1px solid rgba(124,58,237,0.3);
  color: var(--accent-light); font-size: 12px; font-weight: 600;
  margin-bottom: 16px; letter-spacing: 0.5px;
}
.hero-title { font-size: 42px; font-weight: 800; line-height: 1.15; margin-bottom: 14px; }
.hero-title span { background: linear-gradient(135deg, var(--accent-light), #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-desc { color: var(--text-sub); font-size: 15px; max-width: 540px; margin: 0 auto; line-height: 1.7; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; max-width: 860px; margin: 0 auto; }
.role-card {
  padding: 32px 28px; border-radius: var(--radius);
  cursor: pointer; transition: var(--transition);
  text-align: center;
  background: rgba(248, 240, 228, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  text-decoration: none; display: block;
}
.role-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 12px 40px rgba(146,64,14,0.08); }
.role-card-icon {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.role-card-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.role-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.role-card-arrow { margin-top: 16px; font-size: 20px; color: var(--accent-light); display: block; transition: var(--transition); }
.role-card:hover .role-card-arrow { transform: translateX(4px); }

/* ============================
   Teacher Card (Student Dashboard)
   ============================ */
.teachers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.teacher-card {
  padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-light);
  transition: var(--transition);
}
.teacher-card:hover { border-color: var(--border); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.teacher-avatar-lg {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, #92400e, #b45309);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 14px;
}
.teacher-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.teacher-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.teacher-subject-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 99px;
  background: rgba(146,64,14,0.06); color: var(--accent-light);
  font-size: 11.5px; font-weight: 600; margin-bottom: 14px;
}

/* ============================
   Progress / Score Display
   ============================ */
.score-ring-wrap { text-align: center; }
.score-ring {
  width: 100px; height: 100px; border-radius: 50%;
  background: conic-gradient(var(--accent) var(--pct, 0%), rgba(255,255,255,0.06) 0%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
  box-shadow: 0 0 30px rgba(146,64,14,0.08);
}
.score-ring-inner {
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  flex-direction: column; font-size: 20px; font-weight: 800; color: var(--accent-light);
}
.score-ring-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.progress-bar-wrap { margin: 6px 0; }
.progress-bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-sub); margin-bottom: 4px; }
.progress-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.07); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-light)); transition: width 0.6s ease; }

/* ============================
   Chart Containers
   ============================ */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 24px; }
.chart-card { padding: 20px; background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius); }
.chart-title { font-size: 13px; font-weight: 700; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }
.chart-canvas-wrap { position: relative; max-height: 280px; }

/* ============================
   Empty State
   ============================ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--text-sub); }
.empty-desc { font-size: 13px; }

/* ============================
   Section Card
   ============================ */
.section-card { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.section-card-header { padding: 16px 20px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.section-card-body { padding: 20px; }
.section-card-title { font-size: 14px; font-weight: 700; }

/* ============================
   Toggle / Checkbox
   ============================ */
.toggle-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { display: none; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 11px;
  background: rgba(255,255,255,0.1); cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle-label { font-size: 13.5px; font-weight: 500; color: var(--text-sub); cursor: pointer; }

/* ============================
   Questionnaire Builder
   ============================ */
.q-section-block { border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; }
.q-section-block-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.q-item { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.q-item input { flex: 1; }

/* ============================
   Animations
   ============================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.animate-in { animation: slideUp 0.4s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ============================
   Responsive
   ============================ */
/* ============================
   Mobile Menu Toggle Button
   ============================ */
.mobile-menu-btn {
  display: none;
  position: fixed; top: 14px; left: 14px; z-index: 200;
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #92400e, #b45309);
  border: none; color: #fff; font-size: 22px; cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 15px rgba(146,64,14,0.2);
  transition: var(--transition);
}
.mobile-menu-btn:active { transform: scale(0.92); }
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.6);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.sidebar-overlay.show { display: block; }

/* ============================
   Responsive: Tablet (≤900px)
   ============================ */
@media (max-width: 900px) {
  .page-wrapper { z-index: auto; }
  .mobile-menu-btn { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    width: 270px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 30px rgba(0,0,0,0.5);
  }
  .main-content { margin-left: 0; padding: 20px 16px; padding-top: 68px; }
  .hero-title { font-size: 28px; }
  .charts-grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  table { font-size: 11px; }
  th, td { padding: 7px 6px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .page-title { font-size: 20px; }
  .page-subtitle { font-size: 12px; }
}

/* ============================
   Responsive: Mobile (≤600px)
   ============================ */
@media (max-width: 600px) {
  body { font-size: 14px; }
  .role-cards { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 12px 10px; }
  .stat-label { font-size: 11px; }
  .stat-value { font-size: 22px; }
  .tab-btn { font-size: 11px; padding: 8px 10px; }
  .main-content { padding: 16px 12px; padding-top: 64px; }
  .topbar { padding: 14px 0; }
  .page-title { font-size: 18px; }
  .page-subtitle { font-size: 11px; }
  .section-card { border-radius: 12px; }
  .section-card-body { padding: 14px; }
  .btn { font-size: 12px; padding: 8px 14px; }
  .btn-sm { font-size: 11px; padding: 6px 10px; }
  .chart-card { padding: 14px; }
  .chart-title { font-size: 13px; }
  .chart-canvas-wrap { min-height: 180px; }
  .hero-title { font-size: 22px; }
  .hero-desc { font-size: 13px; }
  .hero-tag { font-size: 11px; }
  .role-card { padding: 20px 16px; }
  .role-card-title { font-size: 16px; }
  .role-card-desc { font-size: 12px; }
  .landing-hero { padding: 0 8px; }
  .form-group label { font-size: 12px; }
  .form-group input, .form-group select, .form-group textarea { font-size: 13px; padding: 10px 12px; }
  .nav-item { font-size: 13px; padding: 10px 12px; }
  .modal-content { width: 95%; margin: 20px auto; padding: 20px; max-height: 90vh; overflow-y: auto; }
  .badge { font-size: 10px; padding: 2px 7px; }
  /* Mobile sidebar close when selecting */
  .sidebar .nav-item { padding: 11px 14px; }
  /* Better stat cards on mobile */
  .stat-card { padding: 14px 10px; }
  .stat-value { font-size: 20px; }
  .stat-icon { font-size: 22px; margin-bottom: 6px; }
  /* Better teacher cards */
  .teachers-grid { grid-template-columns: 1fr; gap: 14px; }
  .teacher-card { padding: 18px 16px; }
  /* Better section cards */
  .section-card-header { padding: 12px 14px; }
  .section-card-body { padding: 12px 14px; }
  /* Topbar spacing */
  .topbar { gap: 8px; }
  .page-title { font-size: 17px; }
  .breadcrumb { font-size: 11px; }
  /* Profile grids stack on mobile */
  [style*="grid-template-columns:auto 1fr"],
  [style*="grid-template-columns:240px 1fr"] { grid-template-columns: 1fr !important; }
  /* Charts grid single column */
  .charts-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ============================
   Responsive: Small Mobile (≤400px)
   ============================ */
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main-content { padding: 12px 8px; padding-top: 60px; }
  .section-card-body { padding: 10px; }
  .hero-title { font-size: 20px; }
  .cards { grid-template-columns: 1fr 1fr; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(146,64,14,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
