/* ═══════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
  --primary: #2563EB;
  --primary-light: #EFF6FF;
  --primary-dark: #1D4ED8;
  --secondary: #0F172A;
  --success: #10B981;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --info: #6366F1;
  --info-light: #EEF2FF;

  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --transition: all .2s cubic-bezier(.4,0,.2,1);
  --transition-slow: all .35s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg: #0B1120;
  --surface: #131E2F;
  --surface-2: #1A2740;
  --border: #1E3050;
  --border-light: #1A2740;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #475569;
  --primary-light: #1E3050;
  --success-light: #0D2B1D;
  --warning-light: #2A1E0A;
  --danger-light: #2A0E0E;
  --info-light: #1A1E3C;
  --shadow: 0 1px 3px rgba(0,0,0,.4),0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.4),0 2px 4px -1px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.4),0 4px 6px -2px rgba(0,0,0,.2);
}

/* ═══════════════════════════════════════════════
   BASE RESET
═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
input, select, textarea, button { font-family: var(--font-body); }

/* ═══════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════ */
#login-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}
.login-left {
  flex: 1;
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 40%, #0891B2 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  top: -150px; left: -150px;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  bottom: -100px; right: -80px;
}
.login-illustration {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}
.login-illustration .brand-logo {
  width: 72px; height: 72px;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 28px;
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255,255,255,.3);
  font-size: 32px;
}
.login-illustration h2 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.login-illustration p {
  font-size: 1rem;
  opacity: .8;
  max-width: 340px;
  line-height: 1.7;
}
.login-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
}
.login-stat {
  text-align: center;
  color: white;
}
.login-stat .num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  display: block;
}
.login-stat .lbl {
  font-size: .8rem;
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.login-right {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
  background: var(--surface);
}
.login-form-wrap { width: 100%; }
.login-form-wrap .top-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 40px;
}
.login-form-wrap .top-brand .ico {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px;
}
.login-form-wrap .top-brand span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.login-form-wrap h3 {
  font-size: 1.75rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.login-form-wrap .subtitle {
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-size: .9rem;
}
.form-label {
  font-weight: 600;
  font-size: .82rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.form-control, .form-select {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: .9rem;
  transition: var(--transition);
  font-family: var(--font-body);
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  color: var(--text-primary);
}
.form-control::placeholder { color: var(--text-muted); }
.input-group-text {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}
.input-group .form-control { border-left: none; }
.input-group .input-group-text { border-right: none; border-radius: var(--radius) 0 0 var(--radius); }
.input-group .form-control { border-radius: 0 var(--radius) var(--radius) 0; }
.btn-primary-custom {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  font-family: var(--font-display);
  letter-spacing: .02em;
}
.btn-primary-custom:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary-custom:active { transform: translateY(0); }

/* ═══════════════════════════════════════════════
   APP LAYOUT
═══════════════════════════════════════════════ */
#app-layout { display: none; min-height: 100vh; }
#app-layout.active { display: flex; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition-slow);
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 17px;
  flex-shrink: 0;
}
.sidebar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition-slow);
}
.sidebar.collapsed .sidebar-brand { opacity: 0; width: 0; }
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}
.nav-section-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  padding: 12px 10px 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition);
}
.sidebar.collapsed .nav-section-label { opacity: 0; }
.nav-item-sidebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
  white-space: nowrap;
  position: relative;
}
.nav-item-sidebar:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}
.nav-item-sidebar.active {
  background: var(--primary-light);
  color: var(--primary);
}
.nav-item-sidebar .nav-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 15px;
  flex-shrink: 0;
  transition: var(--transition);
}
.nav-item-sidebar.active .nav-icon { color: var(--primary); }
.nav-item-sidebar .nav-label {
  font-size: .875rem;
  font-weight: 500;
  overflow: hidden;
  transition: var(--transition-slow);
}
.sidebar.collapsed .nav-label { opacity: 0; width: 0; overflow: hidden; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  transition: var(--transition-slow);
}
.sidebar.collapsed .nav-badge { opacity: 0; }
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-user:hover { background: var(--surface-2); }
.sidebar-user .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: .85rem;
}
.sidebar-user .user-info { overflow: hidden; transition: var(--transition-slow); }
.sidebar-user .user-name { font-weight: 600; font-size: .85rem; white-space: nowrap; }
.sidebar-user .user-role { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.sidebar.collapsed .user-info { opacity: 0; width: 0; }

/* TOPBAR */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 99;
  transition: var(--transition-slow);
}
.topbar.collapsed { left: var(--sidebar-collapsed); }
.topbar-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  transition: var(--transition);
  font-size: 16px;
  flex-shrink: 0;
}
.topbar-toggle:hover { background: var(--surface-2); color: var(--text-primary); }
.topbar-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  padding: 8px 14px 8px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: .875rem;
  transition: var(--transition);
  font-family: var(--font-body);
}
.topbar-search input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search .search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 14px;
}
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  background: transparent;
  border: 1.5px solid var(--border);
  transition: var(--transition);
  position: relative;
  font-size: 15px;
}
.topbar-btn:hover { background: var(--surface-2); color: var(--text-primary); border-color: transparent; }
.topbar-btn .badge-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--surface);
}
.theme-toggle-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--text-secondary);
  transition: var(--transition);
}
.theme-toggle-btn:hover { background: var(--surface-2); color: var(--text-primary); }
.topbar-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: transparent;
  transition: var(--transition);
}
.topbar-profile:hover { background: var(--surface-2); }
.topbar-profile .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: .75rem;
}
.topbar-profile .name { font-size: .82rem; font-weight: 600; color: var(--text-primary); }

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  flex: 1;
  min-height: calc(100vh - var(--topbar-height));
  transition: var(--transition-slow);
  padding: 28px;
}
.main-content.collapsed { margin-left: var(--sidebar-collapsed); }

/* ═══════════════════════════════════════════════
   PAGES (hidden by default)
═══════════════════════════════════════════════ */
.page { display: none; animation: fadeInUp .3s ease; }
.page.active { display: block; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* PAGE HEADER */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-title { font-size: 1.65rem; font-weight: 800; color: var(--text-primary); line-height: 1.2; }
.page-subtitle { font-size: .875rem; color: var(--text-secondary); margin-top: 4px; font-weight: 400; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-title-custom {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}
.card-subtitle-custom {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* STAT CARDS */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: default;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.amber { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.purple { background: var(--info-light); color: var(--info); }
.stat-body { flex: 1; min-width: 0; }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-label { font-size: .8rem; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }
.stat-trend { display: flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; margin-top: 8px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn { border-radius: var(--radius); font-family: var(--font-body); font-weight: 600; font-size: .85rem; transition: var(--transition); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: white; transform: translateY(-1px); }
.btn-light { background: var(--surface-2); border-color: var(--border); color: var(--text-primary); }
.btn-light:hover { background: var(--border); }
.btn-success-custom { background: var(--success); border: none; color: white; }
.btn-success-custom:hover { background: #0DA870; color: white; transform: translateY(-1px); }
.btn-danger-custom { background: var(--danger); border: none; color: white; }
.btn-danger-custom:hover { background: #DC2626; color: white; transform: translateY(-1px); }

/* ═══════════════════════════════════════════════
   TABLE
═══════════════════════════════════════════════ */
.table-custom { width: 100%; border-collapse: collapse; }
.table-custom th {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
.table-custom th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.table-custom th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.table-custom td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: .875rem;
  vertical-align: middle;
}
.table-custom tr:last-child td { border-bottom: none; }
.table-custom tbody tr { transition: var(--transition); }
.table-custom tbody tr:hover { background: var(--surface-2); }
.student-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: .8rem;
  flex-shrink: 0;
}

/* BADGES */
.badge-custom {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 700;
  display: inline-block;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-gray { background: var(--surface-2); color: var(--text-secondary); }

/* ═══════════════════════════════════════════════
   ACTION BUTTONS (table)
═══════════════════════════════════════════════ */
.action-btn {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.action-btn.view { background: var(--primary-light); color: var(--primary); }
.action-btn.view:hover { background: var(--primary); color: white; }
.action-btn.edit { background: var(--warning-light); color: var(--warning); }
.action-btn.edit:hover { background: var(--warning); color: white; }
.action-btn.delete { background: var(--danger-light); color: var(--danger); }
.action-btn.delete:hover { background: var(--danger); color: white; }
.action-btn.print { background: var(--success-light); color: var(--success); }
.action-btn.print:hover { background: var(--success); color: white; }

/* ═══════════════════════════════════════════════
   PROGRESS BARS
═══════════════════════════════════════════════ */
.progress-custom {
  height: 7px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

/* ═══════════════════════════════════════════════
   ACTIVITY FEED
═══════════════════════════════════════════════ */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.activity-body .activity-title { font-weight: 600; font-size: .875rem; }
.activity-body .activity-time { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════
   ANNOUNCEMENT CARDS
═══════════════════════════════════════════════ */
.announcement-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  border-left: 4px solid var(--primary);
}
.announcement-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.announcement-card.warning { border-left-color: var(--warning); }
.announcement-card.success { border-left-color: var(--success); }
.announcement-card.danger { border-left-color: var(--danger); }
.announcement-card.info { border-left-color: var(--info); }
.ann-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.ann-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.ann-desc { font-size: .875rem; color: var(--text-secondary); line-height: 1.7; }

/* ═══════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  padding: 20px;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-xl);
  transform: scale(.95) translateY(10px);
  transition: var(--transition-slow);
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 1.2rem; font-weight: 800; }
.modal-close { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--surface-2); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 14px; transition: var(--transition); }
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* TOAST */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 99999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-xl);
  min-width: 280px;
  animation: toastIn .3s ease;
  pointer-events: all;
}
.toast-item.success .toast-icon { color: var(--success); }
.toast-item.error .toast-icon { color: var(--danger); }
.toast-item.info .toast-icon { color: var(--primary); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-text { font-size: .875rem; font-weight: 500; flex: 1; color: var(--text-primary); }
.toast-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 12px; padding: 0; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(20px); }
}

/* SKELETON LOADER */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════
   RESULTS ENTRY FORM
═══════════════════════════════════════════════ */
.grade-preview {
  background: var(--primary-light);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}
.grade-preview .grade-letter {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.grade-preview .grade-percent { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); }
.grade-preview .grade-label { font-size: .8rem; color: var(--text-muted); margin-top: 6px; }
.marks-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.marks-field label { font-size: .78rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 6px; }
.marks-field .weight { font-size: .7rem; color: var(--text-muted); margin-left: 4px; font-weight: 400; }

/* ═══════════════════════════════════════════════
   REPORT CARD
═══════════════════════════════════════════════ */
.report-card-paper {
  background: white;
  max-width: 920px;
  margin: 0 auto 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.report-card-page + .report-card-page { margin-top: 24px; }
.report-download-bar {
  max-width: 920px;
  margin: 0 auto 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.report-download-bar strong {
  display: block;
  font-size: .88rem;
  color: var(--text-primary);
}
.report-download-bar span {
  display: block;
  margin-top: 2px;
  font-size: .74rem;
  color: var(--text-muted);
}
.report-header-band {
  background: linear-gradient(135deg,#123B7A,#1D4ED8 58%,#0891B2);
  padding: 20px 28px;
  color: white;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 4px solid #F59E0B;
}
.report-school-logo {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; border: 2px solid rgba(255,255,255,.4);
  flex-shrink: 0;
}
.report-school-info h2 { font-size: 1.2rem; font-weight: 800; margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.report-school-info p { opacity: .88; font-size: .78rem; margin: 3px 0 0; }
.report-body { padding: 18px 26px 22px; }
.report-student-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid #E2E8F0;
}
.report-student-info-compact {
  grid-template-columns: 1.5fr .9fr .85fr .85fr .65fr;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px 9px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
}
.report-student-photo {
  width: 80px; height: 80px;
  border-radius: var(--radius-lg);
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 2rem; font-weight: 700;
  border: 3px solid #E2E8F0;
}
.report-field { margin-bottom: 4px; }
.report-field .lbl { font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; color: #64748B; font-weight: 700; line-height: 1.15; }
.report-field .val { font-weight: 700; font-size: .78rem; color: #0F172A; line-height: 1.25; }
.report-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; border: 1px solid #CBD5E1; }
.report-table th { background: #123B7A; color: white; padding: 6px 8px; font-size: .66rem; text-align: left; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; border-right: 1px solid rgba(255,255,255,.2); }
.report-table td { padding: 5px 8px; border-bottom: 1px solid #E2E8F0; border-right: 1px solid #E2E8F0; font-size: .72rem; line-height: 1.28; }
.report-table tr:nth-child(even) td { background: #F8FAFC; }
.report-summary {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 5px;
  margin: 8px 0;
}
.report-summary-card {
  background: #F8FAFC;
  border-radius: 6px;
  padding: 4px 5px;
  text-align: center;
  border: 1px solid #CBD5E1;
  min-width: 0;
}
.report-summary-card .num { font-family: var(--font-display); font-size: .82rem; font-weight: 800; color: var(--primary); line-height: 1; }
.report-summary-card .lbl { font-size: .5rem; color: #475569; font-weight: 600; margin-top: 0; line-height: 1.12; }
.report-card-paper .report-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
.report-remarks { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 8px; padding: 9px; margin-top: 9px; }
.report-remarks .lbl { font-weight: 700; font-size: .68rem; color: #92400E; margin-bottom: 4px; }
.report-remarks p { font-size: .72rem; color: #78350F; line-height: 1.4; margin: 0; }
.report-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 20px; }
.sig-line { border-top: 1.5px solid #CBD5E1; padding-top: 8px; text-align: center; }
.sig-line .sig-label { font-size: .75rem; color: #64748B; font-weight: 600; }

.report-batch-cover {
  max-width: 920px;
  margin: 0 auto 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}
.batch-cover-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  color: white;
  background: linear-gradient(135deg,#123B7A,#1D4ED8 58%,#0891B2);
  border-radius: 10px;
  border-bottom: 4px solid #F59E0B;
}
.batch-cover-head h2 {
  margin: 0;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.batch-cover-head p { margin: 3px 0; font-size: .84rem; opacity: .9; }
.batch-cover-head span { font-size: .74rem; opacity: .78; }
.batch-kpi-row {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
  margin: 14px 0;
}
.batch-kpi {
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background: #F8FAFC;
  padding: 8px;
  text-align: center;
}
.batch-kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #1D4ED8;
  line-height: 1;
}
.batch-kpi span {
  display: block;
  margin-top: 3px;
  color: #475569;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.batch-list-title {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 800;
  margin: 8px 0 6px;
  color: #0F172A;
}
.batch-performance-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #CBD5E1;
}
.batch-performance-table th {
  background: #123B7A;
  color: white;
  text-align: left;
  padding: 6px 7px;
  font-size: .63rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.batch-performance-table td {
  padding: 5px 7px;
  border-top: 1px solid #E2E8F0;
  border-right: 1px solid #E2E8F0;
  font-size: .68rem;
  line-height: 1.25;
}
.batch-performance-table tr:nth-child(even) td { background: #F8FAFC; }

.report-form-paper {
  max-width: 820px;
  min-height: 1120px;
  background:
    linear-gradient(90deg, #0F766E 0 7px, transparent 7px),
    #FFFFFF;
  border: 1px solid #D7DEE8;
  border-radius: 4px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .11);
  padding: 26px;
  color: #101828;
  font-family: "DM Sans", Arial, Helvetica, sans-serif;
}
.report-form-inner {
  min-height: 1070px;
  border: 1px solid #E4E7EC;
  padding: 22px 26px;
  position: relative;
}
.report-form-inner::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid #EEF2F6;
  pointer-events: none;
}
.official-report-header {
  border: 1px solid #D0D5DD;
  border-left: 5px solid #0F766E;
  background: linear-gradient(135deg, #F8FAFC 0%, #FFFFFF 60%, #ECFDF5 100%);
  min-height: 130px;
  display: grid;
  grid-template-columns: 86px 1fr 178px 74px;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  position: relative;
  z-index: 1;
}
.official-school-title {
  text-align: left;
  font-size: .74rem;
  line-height: 1.35;
  font-weight: 800;
  color: #0F766E;
  text-transform: uppercase;
  letter-spacing: .13em;
}
.official-school-title strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 800;
  color: #101828;
  text-transform: none;
  letter-spacing: 0;
}
.official-school-title small {
  display: block;
  margin-top: 6px;
  color: #667085;
  font-size: .74rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: .02em;
}
.official-school-contact {
  font-size: .76rem;
  line-height: 1.5;
  font-weight: 600;
  color: #475467;
  border-left: 1px solid #E4E7EC;
  padding-left: 14px;
}
.official-logo {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  border: 1px solid #A7F3D0;
  background: #ECFDF5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #0F766E;
}
.official-logo i { font-size: 1.45rem; }
.official-logo span {
  margin-top: 4px;
  font-size: .42rem;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .04em;
}
.official-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.official-logo-right {
  width: 70px;
  height: 74px;
  justify-self: end;
  background: #FFFFFF;
  border-color: transparent;
  color: #344054;
  font-size: 1.9rem;
  overflow: hidden;
  border-radius: 0;
}
.official-coat img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.official-student-grid {
  display: grid;
  grid-template-columns: 1.25fr .8fr 1fr;
  column-gap: 18px;
  margin: 18px 0 12px;
  padding: 12px 14px;
  border: 1px solid #E4E7EC;
  background: #FCFCFD;
  font-size: .78rem;
  line-height: 1.35;
  position: relative;
  z-index: 1;
}
.official-student-grid p {
  margin: 0 0 5px;
}
.official-student-grid span {
  display: inline-block;
  min-width: 86px;
  color: #667085;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.official-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
}
.official-summary-strip div {
  border: 1px solid #D0D5DD;
  border-top: 3px solid #0F766E;
  background: #FFFFFF;
  padding: 8px 10px;
}
.official-summary-strip span {
  display: block;
  color: #667085;
  font-size: .58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.official-summary-strip strong {
  display: block;
  margin-top: 2px;
  color: #101828;
  font-size: .96rem;
  line-height: 1.15;
}
.official-report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid #D0D5DD;
  font-size: .72rem;
  line-height: 1.25;
  position: relative;
  z-index: 1;
}
.official-report-table th,
.official-report-table td {
  border: 1px solid #E4E7EC;
  padding: 6px 7px;
  text-align: left;
  vertical-align: middle;
  color: #101828;
  background: #fff;
  font-weight: 600;
}
.official-report-table th {
  background: #F2F4F7;
  color: #344054;
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.official-report-table th:nth-child(1),
.official-report-table td:nth-child(1) { width: 12.5%; }
.official-report-table th:nth-child(2),
.official-report-table td:nth-child(2),
.official-report-table th:nth-child(3),
.official-report-table td:nth-child(3),
.official-report-table th:nth-child(4),
.official-report-table td:nth-child(4),
.official-report-table th:nth-child(5),
.official-report-table td:nth-child(5),
.official-report-table th:nth-child(6),
.official-report-table td:nth-child(6),
.official-report-table th:nth-child(7),
.official-report-table td:nth-child(7) { width: 12.5%; }
.official-report-table th:nth-child(8),
.official-report-table td:nth-child(8) { width: 13%; }
.official-report-footer {
  margin: 16px 0 0;
  border-top: 2px solid #0F766E;
  padding-top: 10px;
  font-size: .8rem;
  line-height: 1.45;
  position: relative;
  z-index: 1;
}
.official-report-footer p {
  margin: 0 0 5px;
}
.official-report-footer span {
  color: #475467;
  font-weight: 800;
}

/* ═══════════════════════════════════════════════
   STUDENT PROFILE
═══════════════════════════════════════════════ */
.profile-hero {
  background: linear-gradient(135deg, #1D4ED8, #0891B2);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: white;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 800;
  border: 3px solid rgba(255,255,255,.4);
  flex-shrink: 0;
}
.profile-info h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.profile-info p { opacity: .8; font-size: .875rem; margin: 0; }
.profile-badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.profile-badge {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  font-size: .75rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════
   ANALYTICS
═══════════════════════════════════════════════ */
.analytics-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
}
.analytics-kpi .kpi-val {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.analytics-kpi .kpi-lbl { font-size: .8rem; color: var(--text-secondary); margin-top: 6px; font-weight: 500; }
.analytics-kpi .kpi-trend { font-size: .78rem; font-weight: 700; margin-top: 6px; }
.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }

/* ═══════════════════════════════════════════════
   CHARTS WRAPPER
═══════════════════════════════════════════════ */
.chart-wrap { position: relative; }
.chart-wrap canvas { max-width: 100%; }

/* ═══════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════ */
.pagination-custom {
  display: flex; align-items: center; gap: 4px;
}
.page-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem;
  font-weight: 600;
  transition: var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ═══════════════════════════════════════════════
   PORTAL CARDS
═══════════════════════════════════════════════ */
.portal-subject-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  border-top: 3px solid var(--primary);
  transition: var(--transition);
}
.portal-subject-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.portal-subject-card.green { border-top-color: var(--success); }
.portal-subject-card.amber { border-top-color: var(--warning); }
.portal-subject-card.purple { border-top-color: var(--info); }
.portal-subject-card.red { border-top-color: var(--danger); }

/* ═══════════════════════════════════════════════
   SEARCH + FILTER BAR
═══════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar .search-wrap { position: relative; flex: 1; min-width: 200px; }
.filter-bar .search-wrap input { width: 100%; }
.filter-bar .search-wrap .si { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; }
.filter-bar .search-wrap input { padding-left: 34px; }

/* ═══════════════════════════════════════════════
   LOADING SCREEN
═══════════════════════════════════════════════ */
#loading-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity .4s;
}
#loading-screen.hidden { opacity: 0; pointer-events: none; }
.loader-logo { width: 64px; height: 64px; background: var(--primary); border-radius: var(--radius-xl); display: flex; align-items: center; justify-content: center; font-size: 30px; color: white; margin-bottom: 24px; }
.loader-bar { width: 200px; height: 4px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.loader-fill { height: 100%; background: var(--primary); border-radius: var(--radius-full); animation: loaderAnim 1.6s ease-in-out infinite; }
@keyframes loaderAnim { 0%{width:0%} 60%{width:80%} 80%{width:90%} 100%{width:100%} }
.loader-text { font-size: .875rem; color: var(--text-secondary); margin-top: 14px; }

/* ═══════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: .5; }
.empty-state h4 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: .875rem; }

/* ═══════════════════════════════════════════════
   CLASSES & SUBJECTS
═══════════════════════════════════════════════ */
.class-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: var(--transition);
  border-top: 3px solid var(--primary);
  cursor: pointer;
}
.class-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.class-card.green { border-top-color: var(--success); }
.class-card.amber { border-top-color: var(--warning); }
.class-card.purple { border-top-color: var(--info); }
.class-card.red { border-top-color: var(--danger); }
.class-card.cyan { border-top-color: #0891B2; }
.class-card .cc-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.class-card .cc-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; }
.class-card .cc-meta { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.class-card .cc-subjects { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.subject-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: default;
  transition: var(--transition);
}
.subject-chip:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.subject-chip.selected { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.subject-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}
.subject-row:last-child { border-bottom: none; }
.subject-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.checkbox-custom {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.checkbox-custom.checked { background: var(--primary); border-color: var(--primary); color: white; font-size: 11px; }
.checkbox-custom:hover { border-color: var(--primary); }

/* ═══════════════════════════════════════════════
   SEND RESULTS MODAL
═══════════════════════════════════════════════ */
.send-method-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.send-method-card:hover { border-color: var(--primary); background: var(--primary-light); }
.send-method-card.selected { border-color: var(--primary); background: var(--primary-light); }
.send-method-card .icon { font-size: 2rem; margin-bottom: 8px; }
.send-method-card .label { font-weight: 700; font-size: .85rem; }
.send-method-card .desc { font-size: .72rem; color: var(--text-muted); margin-top: 3px; }

/* ═══════════════════════════════════════════════
   CALENDAR
═══════════════════════════════════════════════ */
.cal-wrap { user-select: none; }
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.cal-nav-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 13px;
  transition: var(--transition);
}
.cal-nav-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.cal-month-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.cal-day-label {
  text-align: center; padding: 8px 0;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
}
.cal-day {
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 6px 4px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  min-height: 54px;
}
.cal-day:hover { background: var(--surface-2); }
.cal-day.today { background: var(--primary-light); }
.cal-day.today .cal-day-num { color: var(--primary); font-weight: 800; }
.cal-day.selected { background: var(--primary); }
.cal-day.selected .cal-day-num { color: white; }
.cal-day.other-month .cal-day-num { color: var(--text-muted); }
.cal-day.has-event::after {
  content: '';
  position: absolute; bottom: 5px;
  width: 5px; height: 5px;
  border-radius: 50%; background: var(--primary);
}
.cal-day.has-event.event-holiday::after { background: var(--danger); }
.cal-day.has-event.event-term::after { background: var(--success); }
.cal-day.has-event.event-sports::after { background: var(--warning); }
.cal-day-num { font-size: .82rem; font-weight: 600; }
.event-dot-row { display: flex; gap: 2px; margin-top: 2px; flex-wrap: wrap; justify-content: center; }
.event-dot { width: 5px; height: 5px; border-radius: 50%; }
.cal-event-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border-light);
}
.cal-event-item:last-child { border-bottom: none; }
.cal-event-color { width: 4px; border-radius: 2px; align-self: stretch; flex-shrink: 0; min-height: 40px; }
.cal-event-title { font-weight: 700; font-size: .875rem; }
.cal-event-meta { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.cal-event-desc { font-size: .8rem; color: var(--text-secondary); margin-top: 4px; }
.event-type-badge {
  display: inline-block; padding: 2px 8px;
  border-radius: var(--radius-full); font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}

/* ═══════════════════════════════════════════════
   BLOG / NEWS
═══════════════════════════════════════════════ */
.public-nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(14px, 3vw, 32px);
  height: 64px;
  display: grid;
  grid-template-columns: minmax(240px,1fr) auto minmax(240px,1fr);
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.public-nav-center {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  min-width: 248px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.pub-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: calc(var(--radius) - 2px);
  transition: var(--transition);
  line-height: 1;
}
.pub-nav-link:hover {
  color: var(--primary);
  background: var(--surface);
}
.pub-nav-link.active {
  color: white;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}
.public-nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-img {
  height: 160px;
  background: linear-gradient(135deg,#1D4ED8,#0891B2);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(255,255,255,.5);
  position: relative; overflow: hidden;
}
.blog-img .blog-cat-overlay {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
  color: white; font-size: .7rem; font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-full);
  text-transform: uppercase; letter-spacing: .05em;
}
.blog-body { padding: 16px; }
.blog-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.blog-meta .dot { width: 3px; height: 3px; background: var(--text-muted); border-radius: 50%; }
.blog-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); line-height: 1.35; }
.blog-title:hover { color: var(--primary); }
.blog-excerpt { font-size: .82rem; color: var(--text-secondary); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-light); }
.blog-author { display: flex; align-items: center; gap: 8px; }
.blog-author-av { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: white; font-size: .65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.blog-author-name { font-size: .75rem; font-weight: 600; color: var(--text-secondary); }
.blog-read-time { font-size: .72rem; color: var(--text-muted); }

/* Single post */
.post-hero {
  background: linear-gradient(135deg, #1D4ED8, #0891B2);
  border-radius: var(--radius-lg);
  padding: 40px;
  color: white;
  margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.post-hero::before {
  content: ''; position: absolute;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.05);
  border-radius: 50%; right: -60px; top: -80px;
}
.post-hero-cat {
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.3);
  color: white; font-size: .72rem; font-weight: 700;
  padding: 3px 12px; border-radius: var(--radius-full);
  text-transform: uppercase; letter-spacing: .06em;
  display: inline-block; margin-bottom: 14px;
}
.post-hero h1 { font-size: 1.8rem; font-weight: 800; line-height: 1.25; margin-bottom: 14px; }
.post-hero-meta { display: flex; align-items: center; gap: 16px; opacity: .85; font-size: .82rem; flex-wrap: wrap; }
.post-content { font-size: .95rem; line-height: 1.85; color: var(--text-secondary); }
.post-content p { margin-bottom: 16px; }
.post-content h3 { font-family: var(--font-display); color: var(--text-primary); margin: 24px 0 12px; font-size: 1.15rem; }
.post-content a { color: var(--primary); font-weight: 700; text-decoration: none; }
.post-content a:hover { text-decoration: underline; }
.post-content img,
.post-content video,
.post-content iframe {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}
.post-content iframe { aspect-ratio: 16 / 9; min-height: 260px; }
.post-content figure { margin: 18px 0; }
.post-content figcaption { margin-top: 6px; font-size: .78rem; color: var(--text-muted); text-align: center; }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-primary);
  margin: 20px 0;
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface-2);
}
.editor-toolbar + textarea {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Blog admin list */
.blog-admin-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border-light);
}
.blog-admin-row:last-child { border-bottom: none; }
.blog-admin-thumb {
  width: 56px; height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg,#1D4ED8,#0891B2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: rgba(255,255,255,.6); flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   STUDY MATERIALS
═══════════════════════════════════════════════ */
.material-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  transition: var(--transition);
}
.material-card:hover { box-shadow: var(--shadow-md); }
.material-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.material-icon.pdf { background: #FEF2F2; color: #EF4444; }
.material-icon.doc { background: #EFF6FF; color: #2563EB; }
.material-icon.ppt { background: #FFF7ED; color: #F97316; }
.material-icon.img { background: #ECFDF5; color: #10B981; }
.material-icon.zip { background: #F5F3FF; color: #8B5CF6; }
.material-body { flex: 1; min-width: 0; }
.material-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.material-meta { font-size: .75rem; color: var(--text-muted); margin-top: 3px; }
.material-actions { display: flex; gap: 6px; flex-shrink: 0; }
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.upload-area .up-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-area h5 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }
.upload-area p { font-size: .82rem; }
.file-type-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.ftype-tab {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  color: var(--text-secondary);
}
.ftype-tab:hover, .ftype-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.sparkline-wrap { display:flex; align-items:flex-end; gap:2px; height:24px; margin-top:8px; }
.spark-bar { flex:1; border-radius:2px 2px 0 0; opacity:.65; transition:opacity .15s; min-width:3px; }
.spark-bar:hover { opacity:1; }

/* ═══════════════════════════════════════════════
   UPLOAD ZONE
═══════════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.upload-zone:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.upload-zone .icon { font-size: 2rem; margin-bottom: 10px; }

/* ═══════════════════════════════════════════════
   TOOLTIP
═══════════════════════════════════════════════ */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--secondary); color: white;
  font-size: .72rem; font-weight: 600;
  padding: 4px 8px; border-radius: var(--radius-sm);
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .15s; z-index: 9999;
}
[data-tip]:hover::after { opacity: 1; }

/* ═══════════════════════════════════════════════
   NOTIFICATION DROPDOWN
═══════════════════════════════════════════════ */
.notif-wrap { position: relative; }
.notif-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 300px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); z-index: 9998;
  display: none; animation: fadeInUp .2s ease;
}
.notif-dropdown.open { display: block; }
.notif-hd { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.notif-hd strong { font-size: .9rem; }
.notif-hd a { font-size: .75rem; color: var(--primary); font-weight: 600; }
.notif-item { display: flex; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border-light); cursor: pointer; transition: var(--transition); }
.notif-item:hover { background: var(--surface-2); }
.notif-item:last-child { border-bottom: none; }
.ndot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 5px; flex-shrink: 0; }
.ndot.r { background: var(--border); }
.ntext { font-size: .82rem; font-weight: 500; color: var(--text-primary); }
.ntime { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════
   WELCOME BANNER
═══════════════════════════════════════════════ */
.welcome-banner {
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 55%, #0891B2 100%);
  border-radius: var(--radius-lg); padding: 20px 24px;
  color: white; display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.welcome-banner::before {
  content: ''; position: absolute;
  width: 200px; height: 200px; background: rgba(255,255,255,.06);
  border-radius: 50%; right: -40px; top: -60px;
}
.wb-text h3 { font-size: 1.1rem; font-weight: 800; margin: 0 0 3px; }
.wb-text p { margin: 0; opacity: .8; font-size: .82rem; }

/* ═══════════════════════════════════════════════
   MOBILE OVERLAY
═══════════════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 992px) {
  :root { --sidebar-width: var(--sidebar-collapsed); }
  .sidebar { transform: translateX(-100%); width: 260px; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-overlay { display: block; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sidebar-overlay.open { opacity: 1; pointer-events: all; }
  .topbar { left: 0 !important; }
  .main-content { margin-left: 0 !important; }
  .marks-row { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-right { width: 100%; }
  .report-student-info { grid-template-columns: 1fr; }
  .report-summary { grid-template-columns: 1fr 1fr; }
  .welcome-banner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .welcome-banner .wb-action { width: 100%; }
  .welcome-banner .wb-action button { width: 100%; }
  .profile-hero { flex-direction: column; }
  .post-hero h1 { font-size: 1.3rem; }
}
@media (max-width: 768px) {
  .public-nav {
    grid-template-columns: 1fr auto;
    padding: 0 14px;
  }
  .public-nav-actions .btn { padding-left: 10px; padding-right: 10px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-actions { width: 100%; flex-wrap: wrap; }
  .page-actions .btn, .page-actions .form-select { font-size: .78rem; padding: 6px 10px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .search-wrap { min-width: unset; }
  .filter-bar .form-select { width: 100% !important; }
  .modal-box { padding: 20px; margin: 0; max-width: 100% !important; border-radius: var(--radius-lg); }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-box { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .send-method-card .icon { font-size: 1.5rem; }
  .send-method-card .desc { display: none; }
  .ranking-filter-bar { flex-direction: column; }
  .ranking-filter-bar .form-select { width: 100% !important; }
  .report-table { font-size: .75rem; }
  .report-table th, .report-table td { padding: 6px 8px; }
  .report-header-band { flex-direction: column; gap: 12px; padding: 20px; }
  .report-body { padding: 16px; }
  .blog-admin-row { flex-wrap: wrap; gap: 8px; }
  .material-card { flex-wrap: wrap; }
  .class-card .cc-subjects { display: none; }
  .cal-day { min-height: 38px; padding: 4px 2px; }
  .cal-day-num { font-size: .72rem; }
  .notif-dropdown { width: 280px; right: -60px; }
}
@media (max-width: 576px) {
  .main-content { padding: 12px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 1.4rem; }
  .topbar-search { display: none; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-profile .name { display: none; }
  .report-summary { grid-template-columns: 1fr; }
  .report-signatures { grid-template-columns: 1fr; gap: 16px; }
  .report-summary-card .num { font-size: 1.3rem; }
  .profile-hero { padding: 18px; }
  .profile-hero .profile-info h2 { font-size: 1.2rem; }
  .profile-badges { flex-wrap: wrap; gap: 5px; }
  .post-hero { padding: 20px; }
  .post-hero h1 { font-size: 1.1rem; }
  .blog-img { height: 120px; }
  .analytics-kpi .kpi-val { font-size: 1.6rem; }
  .welcome-banner { padding: 16px; }
  .welcome-banner .wb-text h3 { font-size: .95rem; }
  .file-type-tabs { gap: 4px; }
  .ftype-tab { padding: 4px 10px; font-size: .72rem; }
  .cal-day { min-height: 32px; }
  .cal-day-num { font-size: .65rem; }
  .event-dot { width: 4px; height: 4px; }
  .table-custom th { font-size: .65rem; padding: 8px 8px; }
  .table-custom td { padding: 9px 8px; font-size: .82rem; }
  .action-btn { width: 26px; height: 26px; font-size: 11px; }
  .badge-custom { font-size: .65rem; padding: 2px 7px; }
  .card { padding: 14px; }
  .card-title-custom { font-size: .9rem; }
  .page-title { font-size: 1.3rem; }
  .notif-dropdown { width: calc(100vw - 24px); right: -100px; }
  .notif-wrap { position: static; }
  .topbar-actions { position: relative; }
  .notif-dropdown { right: 0; }
  /* report card horizontal scroll on mobile */
  .report-card-paper { overflow-x: auto; }
  .report-table-wrap { min-width: 600px; }
  /* hide less important table columns on mobile */
  .hide-mobile { display: none !important; }
}

/* Toast mobile fix */
@media (max-width: 576px) {
  .toast-container {
    bottom: 12px;
    right: 12px;
    left: 12px;
    align-items: stretch;
  }
  .toast-item {
    min-width: unset;
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════
   DARK MODE CHART DEFAULTS
═══════════════════════════════════════════════ */
[data-theme="dark"] .report-card-paper { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .report-header-band { /* stays blue */ }
[data-theme="dark"] .report-table th { background: #1D4ED8; }
[data-theme="dark"] .report-table td { color: #E2E8F0; border-bottom-color: var(--border); }
[data-theme="dark"] .report-table tr:nth-child(even) td { background: var(--surface-2); }
[data-theme="dark"] .report-field .lbl { color: var(--text-muted); }
[data-theme="dark"] .report-field .val { color: var(--text-primary); }
[data-theme="dark"] .report-student-info { border-bottom-color: var(--border); }
[data-theme="dark"] .report-remarks { background: #2A1E0A; border-color: #92400E; }
[data-theme="dark"] .report-remarks .lbl { color: var(--warning); }
[data-theme="dark"] .report-remarks p { color: #FDE68A; }
[data-theme="dark"] .report-summary-card { background: var(--primary-light); border-color: var(--border); }
[data-theme="dark"] .sig-line { border-top-color: var(--border); }
[data-theme="dark"] .sig-line .sig-label { color: var(--text-muted); }
.report-card-paper .report-summary { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }

@media print {
  @page { size: A4; margin: 8mm; }
  body { background: white !important; }
  .report-card-paper {
    max-width: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  .report-form-paper {
    width: 194mm !important;
    min-height: 281mm !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 7mm !important;
    border: .35mm solid #D0D5DD !important;
    background: linear-gradient(90deg, #0F766E 0 2mm, transparent 2mm), #FFFFFF !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .report-form-inner {
    min-height: 265mm !important;
    border: .3mm solid #E4E7EC !important;
    padding: 5mm 6mm !important;
  }
  .report-form-inner::before {
    inset: 3mm !important;
    border-color: #EEF2F6 !important;
  }
  .official-report-header {
    border: .3mm solid #D0D5DD !important;
    border-left: 1.4mm solid #0F766E !important;
    background: #F8FAFC !important;
    min-height: 32mm !important;
    padding: 3mm 5mm !important;
    grid-template-columns: 22mm 1fr 42mm 18mm !important;
  }
  .official-logo {
    width: 18mm !important;
    height: 18mm !important;
    border-radius: 1.5mm !important;
    border-color: #A7F3D0 !important;
    background: #ECFDF5 !important;
  }
  .official-logo-right {
    width: 18mm !important;
    height: 20mm !important;
    background: #FFFFFF !important;
    border-color: transparent !important;
    border-radius: 0 !important;
  }
  .official-school-title { font-size: 8pt !important; }
  .official-school-title strong { font-size: 15pt !important; }
  .official-school-title small { font-size: 8pt !important; }
  .official-school-contact { font-size: 8pt !important; }
  .official-student-grid {
    font-size: 9pt !important;
    margin: 5mm 0 3mm !important;
    padding: 3mm !important;
    column-gap: 5mm !important;
  }
  .official-student-grid span { font-size: 7pt !important; }
  .official-summary-strip {
    gap: 2mm !important;
    margin-bottom: 3mm !important;
  }
  .official-summary-strip div {
    padding: 2mm !important;
    border-top: .8mm solid #0F766E !important;
  }
  .official-summary-strip span { font-size: 6.5pt !important; }
  .official-summary-strip strong { font-size: 10pt !important; }
  .official-report-table {
    font-size: 8pt !important;
    border-color: #D0D5DD !important;
  }
  .official-report-table th,
  .official-report-table td {
    padding: 1.45mm 1.2mm !important;
    border: .25mm solid #E4E7EC !important;
  }
  .official-report-table th {
    background: #F2F4F7 !important;
    color: #344054 !important;
    font-size: 7pt !important;
  }
  .official-report-footer {
    font-size: 9pt !important;
    margin-top: 5mm !important;
    border-top: .6mm solid #0F766E !important;
  }
  .report-batch-cover {
    max-width: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .batch-cover-head {
    padding: 14px 18px !important;
    border-radius: 0 !important;
  }
  .batch-kpi-row {
    gap: 6px !important;
    margin: 10px 0 !important;
  }
  .batch-kpi {
    padding: 6px !important;
    border-radius: 5px !important;
  }
  .batch-kpi strong { font-size: .9rem !important; }
  .batch-kpi span { font-size: .52rem !important; }
  .batch-performance-table th {
    padding: 5px 6px !important;
    font-size: .58rem !important;
  }
  .batch-performance-table td {
    padding: 4px 6px !important;
    font-size: .62rem !important;
  }
  .report-card-page {
    break-after: page;
    page-break-after: always;
  }
  .report-card-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  .report-header-band {
    padding: 14px 18px !important;
    gap: 12px !important;
  }
  .report-school-logo {
    width: 46px !important;
    height: 46px !important;
    font-size: 20px !important;
  }
  .report-school-info h2 { font-size: 1.05rem !important; }
  .report-school-info p { font-size: .72rem !important; margin-top: 2px !important; }
  .report-body { padding: 14px 18px !important; }
  .report-student-info,
  .report-student-info-compact {
    grid-template-columns: 1.6fr 1fr 1fr .9fr .7fr !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
    padding-bottom: 8px !important;
  }
  .report-field { margin-bottom: 3px !important; }
  .report-field .lbl { font-size: .56rem !important; letter-spacing: .04em !important; }
  .report-field .val { font-size: .72rem !important; }
  .report-table {
    margin-bottom: 10px !important;
    page-break-inside: avoid;
  }
  .report-table th {
    padding: 5px 7px !important;
    font-size: .62rem !important;
  }
  .report-table td {
    padding: 5px 7px !important;
    font-size: .66rem !important;
  }
  .report-summary {
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
    gap: 5px !important;
    margin: 8px 0 6px !important;
  }
  .report-summary-card {
    padding: 4px 5px !important;
    border-radius: 6px !important;
  }
  .report-summary-card .num { font-size: .82rem !important; }
  .report-summary-card .lbl { font-size: .5rem !important; }
  .report-remarks {
    padding: 8px !important;
    margin-top: 8px !important;
  }
  .report-remarks .lbl { font-size: .62rem !important; margin-bottom: 3px !important; }
  .report-remarks p { font-size: .66rem !important; line-height: 1.35 !important; }
  .report-signatures {
    gap: 16px !important;
    margin-top: 18px !important;
    page-break-inside: avoid;
  }
  .sig-line { padding-top: 5px !important; }
  .sig-line .sig-label { font-size: .62rem !important; }
}

/* ═══════════════════════════════════════════════
   UTILITY — Standalone avatar (for lists/tables)
═══════════════════════════════════════════════ */
.avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700;
  flex-shrink: 0;
  user-select: none;
  font-family: var(--font-display);
}
