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

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #1a237e;
  --primary-light: #3949ab;
  --accent: #ff6f00;
  --accent-light: #ffa726;
  --success: #2e7d32;
  --success-light: #66bb6a;
  --danger: #c62828;
  --danger-light: #ef5350;
  --warning: #f57f17;
  --info: #0277bd;
  --white: #ffffff;
  --bg: #f0f4ff;
  --bg2: #e8eeff;
  --card: #ffffff;
  --text: #1a1a2e;
  --text2: #4a4a6a;
  --border: #dce3f5;
  --shadow: 0 4px 24px rgba(26,35,126,0.10);
  --shadow2: 0 8px 40px rgba(26,35,126,0.16);
  --radius: 16px;
  --radius-sm: 8px;
  --sidebar-w: 260px;
  --header-h: 68px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 99px; }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a237e 0%, #283593 40%, #1565c0 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  top: -200px; right: -150px;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: rgba(255,111,0,0.12);
  border-radius: 50%;
  bottom: -100px; left: -100px;
}
.login-container {
  display: flex;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.28);
  width: 900px;
  max-width: 96vw;
  z-index: 1;
  animation: slideUp 0.7s cubic-bezier(.22,1,.36,1) both;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-left {
  flex: 1.1;
  background: linear-gradient(160deg, #1a237e 0%, #3949ab 60%, #ff6f00 140%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  color: white;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  bottom: -80px; right: -80px;
}
.school-logo {
  width: 90px; height: 90px;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
  margin-bottom: 24px;
  border: 3px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.login-left h1 {
  font-family: 'Nunito', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.login-left p {
  font-size: 0.92rem;
  opacity: 0.82;
  text-align: center;
  line-height: 1.6;
}
.login-badges {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.badge {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.login-right {
  flex: 1;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-right h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}
.login-right p.sub {
  font-size: 0.88rem;
  color: var(--text2);
  margin-bottom: 28px;
}
.role-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
  margin-bottom: 24px;
}
.role-tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text2);
  transition: all 0.25s;
}
.role-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 12px rgba(26,35,126,0.25);
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(57,73,171,0.1);
  background: white;
}
.btn {
  padding: 13px 28px;
  border: none;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 700;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  box-shadow: 0 4px 18px rgba(26,35,126,0.25);
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 14px;
  margin-top: 4px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26,35,126,0.35);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: white;
  box-shadow: 0 4px 18px rgba(255,111,0,0.25);
}
.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
  color: white;
}
.btn-danger { background: var(--danger-light); color: white; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text2);
}
.btn-sm { padding: 7px 16px; font-size: 0.8rem; border-radius: 7px; }

/* ===== DASHBOARD LAYOUT ===== */
.dashboard {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #1a237e 0%, #283593 60%, #1565c0 100%);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.brand-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  border: 1px solid rgba(255,255,255,0.25);
}
.brand-text h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  color: white;
  line-height: 1.1;
}
.brand-text span {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  margin: 12px 12px 0;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
}
.user-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.35);
}
.avatar-admin { background: linear-gradient(135deg, #ff6f00, #ffa726); }
.avatar-teacher { background: linear-gradient(135deg, #2e7d32, #66bb6a); }
.avatar-student { background: linear-gradient(135deg, #0277bd, #4fc3f7); }
.user-info h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.user-info span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  text-transform: capitalize;
}
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  padding: 12px 10px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.nav-item .icon { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-item.active {
  background: rgba(255,255,255,0.18);
  color: white;
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(239,83,80,0.18);
  color: #ffcdd2;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
}
.logout-btn:hover { background: rgba(239,83,80,0.32); color: white; }

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  height: var(--header-h);
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(26,35,126,0.07);
}
.topbar-left h1 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}
.topbar-left p {
  font-size: 0.78rem;
  color: var(--text2);
  margin-top: 1px;
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text2);
  position: relative;
}
.topbar-btn:hover { background: var(--bg2); color: var(--primary); }
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 16px; height: 16px;
  background: var(--accent);
  border-radius: 50%;
  font-size: 0.6rem;
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  border: 2px solid white;
}
.page-content { padding: 28px; flex: 1; }

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeIn 0.5s both;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow2); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.stat-icon.blue { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }
.stat-icon.orange { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }
.stat-icon.green { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); }
.stat-icon.purple { background: linear-gradient(135deg, #f3e5f5, #e1bee7); }
.stat-icon.red { background: linear-gradient(135deg, #ffebee, #ffcdd2); }
.stat-info h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}
.stat-info p {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 3px;
  font-weight: 500;
}

/* ===== CARDS ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: fadeIn 0.5s both;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-body { padding: 22px; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
thead tr {
  background: linear-gradient(90deg, #f0f4ff, #e8eeff);
}
thead th {
  padding: 13px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 2px solid var(--border);
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
tbody tr:hover { background: var(--bg); }
tbody tr:last-child { border-bottom: none; }
td {
  padding: 13px 16px;
  color: var(--text);
  vertical-align: middle;
}

/* ===== STATUS BADGES ===== */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 700;
}
.status::before { content: '●'; font-size: 8px; }
.status-present { background: #e8f5e9; color: #2e7d32; }
.status-absent { background: #ffebee; color: #c62828; }
.status-late { background: #fff3e0; color: #e65100; }
.status-pass { background: #e8f5e9; color: #2e7d32; }
.status-fail { background: #ffebee; color: #c62828; }
.status-good { background: #e3f2fd; color: #0277bd; }

/* ===== GRID 2 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

/* ===== SUBJECT CARDS ===== */
.subject-card {
  border-radius: 14px;
  padding: 22px;
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}
.subject-card:hover { transform: scale(1.02); }
.subject-card::after {
  content: '';
  position: absolute;
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  bottom: -30px; right: -20px;
}
.subject-math { background: linear-gradient(135deg, #1a237e, #3949ab); }
.subject-science { background: linear-gradient(135deg, #1b5e20, #388e3c); }
.subject-english { background: linear-gradient(135deg, #b71c1c, #e53935); }
.subject-hindi { background: linear-gradient(135deg, #e65100, #f57c00); }
.subject-marathi { background: linear-gradient(135deg, #4a148c, #7b1fa2); }
.subject-card .icon { font-size: 32px; margin-bottom: 10px; }
.subject-card h4 { font-family: 'Nunito', sans-serif; font-size: 1.1rem; font-weight: 800; }
.subject-card .marks {
  font-size: 1.8rem;
  font-weight: 900;
  font-family: 'Nunito', sans-serif;
  margin: 6px 0;
}
.subject-card .grade { font-size: 0.82rem; opacity: 0.85; }

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 1s ease;
}
.fill-blue { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.fill-green { background: linear-gradient(90deg, var(--success), var(--success-light)); }
.fill-orange { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }

/* ===== ATTENDANCE CIRCLE ===== */
.att-circle {
  width: 100px; height: 100px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: 'Nunito', sans-serif;
  border: 7px solid;
  margin: 0 auto;
}
.att-circle.high { border-color: var(--success-light); color: var(--success); }
.att-circle.medium { border-color: var(--accent-light); color: var(--accent); }
.att-circle.low { border-color: var(--danger-light); color: var(--danger); }
.att-circle .pct { font-size: 1.5rem; font-weight: 900; }
.att-circle .lbl { font-size: 0.65rem; font-weight: 600; opacity: 0.7; }

/* ===== SYLLABUS ===== */
.syllabus-class-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.class-tab {
  padding: 9px 20px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: white;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
}
.class-tab:hover { border-color: var(--primary-light); color: var(--primary); }
.class-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(26,35,126,0.25);
}
.syllabus-subject {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}
.syllabus-subj-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}
.syllabus-subj-header:hover { background: var(--bg); }
.subj-color {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.syllabus-subj-header h4 { font-weight: 700; font-size: 0.92rem; flex: 1; }
.syllabus-subj-header .chev { font-size: 18px; color: var(--text2); transition: transform 0.2s; }
.syllabus-subj-header.open .chev { transform: rotate(180deg); }
.syllabus-body {
  padding: 0 18px 16px;
  display: none;
}
.syllabus-body.open { display: block; }
.syllabus-body ul { display: flex; flex-direction: column; gap: 7px; padding-top: 10px; }
.syllabus-body li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--text2);
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
}
.syllabus-body li::before { content: '▸'; color: var(--primary-light); flex-shrink: 0; }
.topic-status {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 99px;
}
.ts-done { background: #e8f5e9; color: #2e7d32; }
.ts-upcoming { background: #fff3e0; color: #e65100; }
.ts-ongoing { background: #e3f2fd; color: #0277bd; }

/* ===== FORM SECTION ===== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-section { margin-bottom: 22px; }
.form-section h4 {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* ===== NOTICE/ANNOUNCE ===== */
.notice {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg);
  border-left: 4px solid var(--primary-light);
  margin-bottom: 10px;
  transition: background 0.2s;
}
.notice:hover { background: var(--bg2); }
.notice-icon { font-size: 22px; flex-shrink: 0; }
.notice-content h5 { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.notice-content p { font-size: 0.8rem; color: var(--text2); margin-top: 3px; line-height: 1.5; }
.notice-date { font-size: 0.72rem; color: var(--text2); margin-top: 5px; }

/* ===== ATTENDANCE MARK ===== */
.att-mark-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg);
  margin-bottom: 8px;
}
.att-mark-row:hover { background: var(--bg2); }
.att-roll { 
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
  flex-shrink: 0;
}
.att-name { flex: 1; font-size: 0.88rem; font-weight: 600; }
.att-btns { display: flex; gap: 6px; }
.att-btn {
  padding: 6px 14px;
  border-radius: 7px;
  border: 2px solid;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.att-btn-p { border-color: var(--success-light); color: var(--success); background: white; }
.att-btn-p.selected, .att-btn-p:hover { background: var(--success); color: white; border-color: var(--success); }
.att-btn-a { border-color: var(--danger-light); color: var(--danger); background: white; }
.att-btn-a.selected, .att-btn-a:hover { background: var(--danger); color: white; border-color: var(--danger); }
.att-btn-l { border-color: var(--accent-light); color: var(--accent); background: white; }
.att-btn-l.selected, .att-btn-l:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text2);
  margin-bottom: 20px;
}
.breadcrumb span { color: var(--primary); font-weight: 600; }
.breadcrumb .sep { color: var(--border); }

/* ===== CHIP ===== */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  gap: 4px;
}
.chip-blue { background: #e3f2fd; color: #0277bd; }
.chip-green { background: #e8f5e9; color: #2e7d32; }
.chip-orange { background: #fff3e0; color: #e65100; }
.chip-purple { background: #f3e5f5; color: #7b1fa2; }

/* ===== WELCOME BANNER ===== */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #3949ab 50%, #1565c0 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.5s both;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  width: 250px; height: 250px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  right: -60px; top: -80px;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  width: 140px; height: 140px;
  background: rgba(255,111,0,0.15);
  border-radius: 50%;
  right: 120px; bottom: -50px;
}
.welcome-text h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
}
.welcome-text p { font-size: 0.88rem; opacity: 0.8; margin-top: 5px; }
.welcome-banner .big-icon { font-size: 64px; opacity: 0.25; z-index: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .login-container { flex-direction: column; width: 96vw; }
  .login-left { padding: 30px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
}

/* ===== PAGE TRANSITIONS ===== */
.page-section { display: none; animation: fadeIn 0.35s both; }
.page-section.active { display: block; }

/* ===== OVERLAY ===== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.overlay.open { display: block; }

/* ===== RESULT CHART BAR ===== */
.result-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.result-bar-row .subj { width: 90px; font-size: 0.82rem; font-weight: 600; color: var(--text2); flex-shrink: 0; }
.result-bar-row .bar-track { flex: 1; height: 10px; background: var(--border); border-radius: 99px; overflow: hidden; }
.result-bar-row .bar-fill { height: 100%; border-radius: 99px; }
.result-bar-row .score { width: 44px; text-align: right; font-size: 0.82rem; font-weight: 700; color: var(--primary); }

/* ===== TEACHER CARD ===== */
.teacher-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.teacher-card:hover { box-shadow: var(--shadow2); transform: translateY(-3px); }
.teacher-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  flex-shrink: 0;
  border: 3px solid rgba(57,73,171,0.2);
}
.teacher-info h4 { font-size: 0.93rem; font-weight: 700; }
.teacher-info p { font-size: 0.78rem; color: var(--text2); margin-top: 2px; }
.teacher-info .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }

/* ===== TIMETABLE ===== */
.timetable { font-size: 0.82rem; }
.timetable th { font-size: 0.75rem; padding: 10px 12px; }
.timetable td { padding: 10px 12px; font-size: 0.82rem; }
.period-cell {
  border-radius: 7px;
  padding: 6px 10px;
  font-weight: 600;
  white-space: nowrap;
}
