/* =============================================
   School ERM — Master Stylesheet
   Font: Plus Jakarta Sans
   Pages: Login · Scope · Dashboard
============================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

/* ═══════════════════════════════════════════
   1. CSS VARIABLES (Design Tokens)
═══════════════════════════════════════════ */
:root {
  /* Brand */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF4FF;

  /* Accent */
  --green: #22C55E;
  --green-bg: #F0FDF4;
  --red: #EF4444;
  --red-bg: #FFF5F5;
  --card-bg: #F9FAFB;

  /* Neutral */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Text */
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;

  /* Borders & Shadows */
  --border: #E5E7EB;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, .07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, .1);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, .08);

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 9999px;

  /* Layout */
  --sidebar-w: 220px;
  --topbar-h: 64px;

  /* Transition */
  --t: all 0.2s ease;
}

/* ═══════════════════════════════════════════
   2. RESET & BASE
═══════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--r-full);
}

/* ═══════════════════════════════════════════
   3. SHARED COMPONENTS
═══════════════════════════════════════════ */

/* -- Card -- */
.card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

/* -- Button -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--t);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .4);
}

.btn-outline {
  background: #fff;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-full {
  width: 100%;
  padding: 13px 18px;
  font-size: 15px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--r-sm);
}

.students-pagination {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
}

.students-pagination .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.students-pagination .pagination li {
  margin: 0;
}

.students-pagination .pagination li a,
.students-pagination .pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
  transition: var(--t);
}

.students-pagination .pagination li a:hover {
  background: #eef2ff;
  border-color: var(--primary);
  color: var(--primary);
}

.students-pagination .pagination li.active span,
.students-pagination .pagination li.active a {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.students-pagination .pagination li.disabled span,
.students-pagination .pagination li.disabled a {
  background: var(--gray-100);
  color: var(--gray-400);
  border-color: var(--border);
  cursor: default;
}

@media (max-width: 640px) {
  .students-pagination {
    justify-content: center;
  }
}

/* -- Badge -- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
}

.badge-success {
  background: #DCFCE7;
  color: #15803D;
}

.badge-warning {
  background: #FEF9C3;
  color: #A16207;
}

.badge-danger {
  background: #FEE2E2;
  color: #DC2626;
}

.badge-partial {
  background: #FFF7ED;
  color: #C2410C;
}

/* -- Avatar -- */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* -- Responsive helpers -- */
@media (max-width: 768px) {
  .hide-m {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .show-m {
    display: none !important;
  }
}


/* ═══════════════════════════════════════════
   4. LOGIN PAGE
═══════════════════════════════════════════ */
.pg-login {
  background: #fff;
  min-height: 100vh;
  overflow: hidden;
}

/* Layout */
.login-wrap {
  display: flex;
  min-height: 100vh;
}

/* Left panel */
.l-left {
  flex: 0 0 48%;
  background: linear-gradient(145deg, #2563EB 0%, #1D4ED8 55%, #1E40AF 100%);
  position: relative;
  overflow: hidden;
  display: flex;
}

.l-left__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px 48px;
  position: relative;
  z-index: 2;
}

/* Decorative circles */
.l-left::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  z-index: 1;
}

.l-left::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -60px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  z-index: 1;
}

/* Brand */
.l-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: auto;
}

.l-brand-logo {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, .18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.l-brand-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.3px;
}

/* Hero */
.l-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0 32px;
}

.l-hero h1 {
  font-size: clamp(26px, 3.5vw, 60px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -.5px;
  margin-bottom: 18px;
}

.l-hero h1 span {
  color: #4ADE80;
  display: block;
}

.l-hero p {
  font-size: 23px;
  color: rgba(255, 255, 255, .75);
  line-height: 1.7;
  max-width: 600px;
}

/* Blob dot */
.l-blob {
  width: 13px;
  height: 13px;
  background: #4ADE80;
  border-radius: 50%;
  margin: 14px 0 22px;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, .22);
  animation: blobPulse 2.5s ease-in-out infinite;
}

@keyframes blobPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.25);
  }
}

/* Stats */
.l-stats {
  display: flex;
  gap: 36px;
}

.l-stat__num {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}

.l-stat__label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, .5);
  letter-spacing: 1.5px;
  margin-top: 4px;
}

/* Right panel */
.l-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}

.l-form-wrap {
  width: 100%;
  max-width: 400px;
}

.l-form-icon {
  width: 62px;
  height: 62px;
  background: var(--gray-100);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.l-form-heading {
  margin-bottom: 30px;
}

.l-form-heading h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.4px;
  margin-bottom: 5px;
}

.l-form-heading p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Form */
.l-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.f-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.f-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.f-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.f-forgot {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  transition: var(--t);
}

.f-forgot:hover {
  color: var(--primary-dark);
}

.f-inp-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.f-inp-icon {
  position: absolute;
  left: 13px;
  color: var(--gray-400);
  pointer-events: none;
}

.f-inp {
  width: 100%;
  padding: 12px 44px;
  background: var(--gray-100);
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition: var(--t);
}

.f-inp::placeholder {
  color: var(--gray-400);
  font-weight: 400;
}

.f-inp:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.f-eye {
  position: absolute;
  right: 13px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  transition: var(--t);
}

.f-eye:hover {
  color: var(--gray-600);
}

/* Checkbox */
.f-check {
  margin: 2px 0;
}

.cb-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.cb-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cb-box {
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--gray-300);
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
  flex-shrink: 0;
}

.cb-input:checked~.cb-box {
  background: var(--primary);
  border-color: var(--primary);
}

.cb-input:checked~.cb-box::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.cb-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Login responsive */
@media (max-width: 860px) {
  .login-wrap {
    flex-direction: column;
  }

  .l-left {
    flex: 0 0 auto;
    min-height: 240px;
  }

  .l-left__inner {
    padding: 26px 28px;
  }

  .l-hero {
    padding: 20px 0;
  }

  .l-stats {
    gap: 22px;
  }
}

@media (max-width: 480px) {
  .l-left__inner {
    padding: 22px 18px;
  }

  .l-right {
    padding: 24px 16px 40px;
  }
}


/* ═══════════════════════════════════════════
   5. SCOPE PAGE
═══════════════════════════════════════════ */
.pg-scope {
  background: var(--gray-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.s-navbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 50;
}

.s-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.s-nav-logo {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s-nav-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.s-nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: var(--t);
  border: 1px solid transparent;
}

.nav-icon-btn:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

/* Admin chip */
.admin-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.admin-chip__info {
  text-align: right;
}

.admin-chip__name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-chip__role {
  display: block;
  font-size: 10.5px;
  color: var(--text-secondary);
}

.admin-chip__av {
  width: 35px;
  height: 35px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-chip__chevron {
  color: var(--gray-400);
  display: flex;
  align-items: center;
}

/* Main */
.s-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}

/* Card */
.s-card {
  width: 100%;
  max-width: 520px;
  padding: 34px 30px 26px;
}

.s-card-top {
  margin-bottom: 22px;
}

.s-card-top h1 {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.4px;
  margin-bottom: 5px;
}

.s-card-top p {
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Scope list */
.s-list {
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 22px;
}

.s-divider {
  height: 1px;
  background: var(--border);
}

.s-item {
  display: flex;
  align-items: center;
  padding: 15px 17px;
  background: #fff;
  cursor: pointer;
  gap: 12px;
  transition: background .15s;
  position: relative;
}

.s-item:hover {
  background: var(--gray-50);
}

.s-item.selected {
  background: #EEF2FF;
  border-left: 3px solid var(--primary);
}

.s-item.selected .s-item-name {
  color: var(--primary);
}

.s-item-info {
  flex: 1;
  min-width: 0;
}

.s-item-name {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.s-item-meta {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Hidden native radio */
.s-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Custom radio UI */
.s-radio-ui {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
  flex-shrink: 0;
}

.s-item.selected .s-radio-ui {
  background: var(--primary);
  border-color: var(--primary);
}

.s-check {
  display: none;
}

.s-item.selected .s-check {
  display: block;
}

/* Session */
.s-session {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .8px;
  margin-top: 14px;
}

/* Footer */
.s-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 13px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.s-footer-links {
  display: flex;
  gap: 18px;
}

.s-footer-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--t);
}

.s-footer-links a:hover {
  color: var(--primary);
}

.s-footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* Scope responsive */
@media (max-width: 600px) {
  .s-card {
    padding: 22px 16px 18px;
  }

  .s-navbar {
    padding: 0 16px;
  }

  .admin-chip__info {
    display: none;
  }

  .s-footer {
    flex-direction: column;
    text-align: center;
    gap: 7px;
  }

  .s-main {
    padding: 22px 12px;
  }
}


/* ═══════════════════════════════════════════
   6. DASHBOARD PAGE
═══════════════════════════════════════════ */
.pg-dashboard {
  background: #F4F5F7;
  overflow: hidden;
  height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
}

.sb-header {
  padding: 17px 15px 13px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sb-logo {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sb-brand-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.3px;
  line-height: 1.2;
}

.sb-brand-sub {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}

.sb-close {
  display: none;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--gray-500);
  transition: var(--t);
}

.sb-close:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

/* Sidebar nav */
.sb-nav {
  flex: 1;
  padding: 10px 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 2px;
}

.nav-section-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  padding: 9px 16px 5px;
}

.nav-list {
  padding: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--r-sm);
  margin: 1px 8px;
  transition: var(--t);
  position: relative;
}

.nav-item:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: var(--primary);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  color: var(--gray-400);
  flex-shrink: 0;
  transition: var(--t);
}

.nav-item:hover .nav-icon {
  color: var(--gray-600);
}

.sb-footer {
  border-top: 1px solid var(--border);
  padding: 10px 8px;
  flex-shrink: 0;
}

/* Overlay */
.sb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 190;
  backdrop-filter: blur(2px);
}

.sb-overlay.open {
  display: block;
}

/* ── Main Wrapper ── */
.main-wrap {
  margin-left: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .3s cubic-bezier(.4, 0, .2, 1);
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.3px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ── Dropdowns ── */
.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
  border: 1px solid var(--border);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s ease;
  z-index: 1010;
  padding: 6px 0;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background .15s;
  cursor: pointer;
  white-space: nowrap;
}

.dropdown-item:hover {
  background: var(--gray-50);
  color: var(--primary);
}

.dropdown-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* Existing Topbar Buttons */
.topbar-year {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--t);
  user-select: none;
  background: #fff;
}

.topbar-year:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

.topbar-admin {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-md);
  transition: var(--t);
}

.topbar-admin:hover {
  background: var(--gray-100);
}

.topbar-admin-info {
  text-align: right;
}

.topbar-admin-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-admin-role {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
}

.topbar-av {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hamburger {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--gray-600);
  transition: var(--t);
}

.hamburger:hover {
  background: var(--gray-100);
}

/* ── Page Content ── */
.page-content {
  flex: 1;
  padding: 26px 26px 80px;
  /* Increased bottom padding to 80px for better scrolling */
  overflow-y: auto;
  height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ── Greeting ── */
.greeting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.greeting-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.4px;
  margin-bottom: 7px;
}

.greeting-scope {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--primary-light);
  border-radius: var(--r-full);
  padding: 4px 12px;
}

.scope-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

.scope-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.greeting-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.stat-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.si-blue {
  background: #EFF4FF;
  color: #2563EB;
}

.si-green {
  background: #F0FDF4;
  color: #16A34A;
}

.si-indigo {
  background: #EEF2FF;
  color: #4F46E5;
}

.si-red {
  background: #FFF5F5;
  color: #DC2626;
}

.stat-up-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: #DCFCE7;
  color: #15803D;
}

.active-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}

.active-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  position: relative;
}

.active-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, .35);
  animation: ring 1.5s ease-in-out infinite;
}

@keyframes ring {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.cur-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.cur-btn {
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--t);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.cur-btn.on {
  background: var(--primary);
  color: #fff;
}

.priority-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
}

.stat-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
}

.sv-green {
  color: #16A34A;
}

.sv-red {
  color: var(--red);
}

/* ── Section Header ── */
.section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.3px;
}

.ghost-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  padding: 5px 10px;
  border-radius: var(--r-sm);
  transition: var(--t);
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
}

.ghost-btn:hover {
  background: var(--primary-light);
}

/* ── Quick Access ── */
.qa-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 13px;
}

.qa-item {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: var(--t);
  text-align: center;
}

.qa-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.qa-item.qa-green {
  background: #EDFFF5;
  border-color: #22C55E;
}

.qa-item.qa-green .qa-icon {
  color: #16A34A;
}

.qa-item.qa-blue {
  background: var(--primary);
  border-color: var(--primary);
}

.qa-item.qa-blue .qa-icon,
.qa-item.qa-blue .qa-label {
  color: #fff;
}

.qa-icon {
  color: var(--gray-500);
}

.qa-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

/* ── Fee Activity ── */
.fee-card {
  padding: 22px;
}

.fee-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.fee-hdr-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.fee-tabs {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.fee-tab {
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  transition: var(--t);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.fee-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.fee-tab.on {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Table */
.tbl-wrap {
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.fee-tbl {
  width: 100%;
  border-collapse: collapse;
}

.fee-tbl thead tr {
  background: var(--gray-50);
}

.fee-tbl th {
  padding: 10px 15px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .8px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.fee-tbl tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background .1s;
}

.fee-tbl tbody tr:last-child {
  border-bottom: none;
}

.fee-tbl tbody tr:hover {
  background: var(--gray-50);
}

.fee-tbl td {
  padding: 12px 15px;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
}

.stu-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.stu-name {
  font-weight: 600;
}

.more-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: var(--t);
}

.more-btn:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.view-all-row {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.view-all-btn {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .8px;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  transition: var(--t);
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
}

.view-all-btn:hover {
  background: var(--primary-light);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--gray-800);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  transform: translateY(70px);
  opacity: 0;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  z-index: 9999;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Generic Action Row ── */
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.section-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Data Tables (Reusable) ── */
.data-card {
  padding: 0;
  /* Let table flush to edges */
  /* overflow: hidden; */
}

.data-tbl1 {
  width: 100%;
  border-collapse: collapse;
}

.data-tbl1 thead tr {
  background: var(--gray-50);
  border-bottom: 2px solid var(--border);
}

.data-tbl1 th {
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .8px;
  text-align: left;
  white-space: nowrap;
}

.data-tbl1 th.text-right {
  text-align: right;
}

.data-tbl1 tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background .15s;
}

.data-tbl1 tbody tr:last-child {
  border-bottom: none;
}

.data-tbl1 tbody tr:hover {
  background: var(--gray-50);
}

.data-tbl1 td {
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-tbl1 td.text-right {
  text-align: right;
}

.data-tbl {
  width: 100%;
  border-collapse: collapse;
}

.data-tbl thead tr {
  background: var(--gray-50);
  border-bottom: 2px solid var(--border);
}

.data-tbl th {
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .8px;
  text-align: left;
  white-space: nowrap;
}

.data-tbl th.text-right {
  text-align: right;
}

.data-tbl tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background .15s;
}

.data-tbl tbody tr:last-child {
  border-bottom: none;
}

.data-tbl tbody tr:hover {
  background: var(--gray-50);
}

.data-tbl td {
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-tbl td.text-right {
  text-align: right;
}

.f-weight-600 {
  font-weight: 600;
}

/* Action Buttons in Tables */
.action-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: var(--t);
  background: transparent;
}

.icon-btn:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.icon-btn.icon-edit:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.icon-btn.icon-delete:hover {
  color: var(--red);
  background: var(--red-bg);
}

.text-btn {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  transition: var(--t);
  background: transparent;
}

.text-btn:hover {
  background: var(--gray-100);
}

.text-btn.btn-edit {
  color: var(--text-primary);
}

.text-btn.btn-delete {
  color: var(--red);
}

.text-btn.btn-delete:hover {
  background: var(--red-bg);
}

/* Roles Badges */
.roles-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.role-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--gray-100);
  color: var(--text-secondary);
}

.role-badge.role-super {
  background: #EEF2FF;
  color: #4F46E5;
}

.role-badge.role-accounting {
  background: #F0FDF4;
  color: #16A34A;
}

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .6);
  backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04);
  z-index: 910;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
}

.modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Slide Over Modal Variant (for Users) */
.modal.slide-over {
  top: 0;
  left: auto;
  right: 0;
  transform: translateX(100%);
  max-width: 420px;
  height: 100vh;
  border-radius: 0;
}

.modal.slide-over.open {
  transform: translateX(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  background: var(--gray-50);
  transition: var(--t);
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  flex: 1;
}

.custom-scroll {
  overflow-y: auto;
}

.custom-scroll::-webkit-scrollbar {
  width: 6px;
}

.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--gray-50);
}

/* Form Additions */
.req {
  color: var(--red);
}

.mt-3 {
  margin-top: 18px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}


/* ── Dashboard Responsive ── */
@media (max-width: 1280px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .qa-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sb-close {
    display: flex;
  }

  .main-wrap {
    margin-left: 0;
  }

  .page-content {
    padding: 18px 14px 40px;
    height: calc(100vh - var(--topbar-h));
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
  }

  .qa-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .topbar {
    padding: 0 14px;
  }

  .greeting-row {
    flex-direction: column;
  }

  .greeting-actions {
    width: 100%;
  }

  .greeting-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .fee-hdr {
    flex-direction: column;
  }

  .fee-tabs {
    width: 100%;
  }

  .fee-tab {
    flex: 1;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    gap: 9px;
  }

  .stat-value {
    font-size: 21px;
  }

  .topbar-year {
    display: none;
  }
}

/* ─── Sections (Slide Panel & Checkbox Grid) ─── */
.slide-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.slide-panel-overlay.open {
  opacity: 1;
  visibility: visible;
}

.slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 420px;
  max-width: 100vw;
  background: var(--card-bg, #fff);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.45);
  border-left: 1px solid var(--border);
}

.slide-panel.open {
  transform: translateX(0);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--hover-bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.panel-close:hover {
  background: var(--border);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.panel-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.panel-footer .btn {
  flex: 1;
  justify-content: center;
}

.chk-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  margin-top: 20px;
}

.chk-section-label:first-child {
  margin-top: 0;
}

.chk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 2px;
}

.chk-grid::-webkit-scrollbar {
  width: 4px;
}

.chk-grid::-webkit-scrollbar-track {
  background: transparent;
}

.chk-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.chk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
}

.chk-item:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.06);
}

.chk-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
}

.section-chk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.section-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.15s;
  user-select: none;
}

.section-badge:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.06);
}

.section-badge input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
}

.divider-thin {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ─── Students (DataTable & Badges) ─── */
.dataTables_wrapper {
  font-family: inherit;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  color: var(--text-secondary);
  font-size: 13px;
  padding: 12px 0;
}

.dataTables_wrapper .dataTables_filter {
  margin-bottom: 4px;
}

.dataTables_wrapper .dataTables_filter input {
  background: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  margin-left: 8px;
}

.dataTables_wrapper .dataTables_length select {
  background: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  padding: 5px 10px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
}

table.dataTable thead th {
  background: none !important;
  border-bottom: 1px solid var(--border) !important;
}

table.dataTable.no-footer {
  border-bottom: none !important;
}

table.dataTable tbody tr:hover {
  background: var(--hover-bg) !important;
}

.stu-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stu-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #A855F7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.stu-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.12);
  color: #16A34A;
}

.status-badge.inactive {
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
}

.action-links a {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}

.action-links a:hover {
  background: rgba(99, 102, 241, 0.1);
}

.action-links span {
  color: var(--border);
  margin: 0 1px;
}

.dt-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

/* ─── Import Students ─── */
.import-hero {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  padding: 36px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.import-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366F1;
  flex-shrink: 0;
}

.import-hero-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.import-hero-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 480px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-count .count-badge {
  background: rgba(99, 102, 241, 0.12);
  color: #6366F1;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.preview-section {
  margin-top: 28px;
  display: none;
}

.preview-section.visible {
  display: block;
}

.stu-name-cell {
  font-weight: 600;
  color: var(--text-primary);
}

.stu-father-cell {
  color: var(--text-secondary);
  font-size: 13px;
}

.import-final-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* ─── Legacy Setup (Sync Cards) ─── */
.sync-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.sync-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.sync-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sync-stat-icon.blue {
  background: rgba(99, 102, 241, 0.15);
  color: #6366F1;
}

.sync-stat-icon.green {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}

.sync-stat-icon.orange {
  background: rgba(249, 115, 22, 0.15);
  color: #F97316;
}

.sync-stat-icon.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #A855F7;
}

.sync-stat-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.sync-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.sync-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.sync-action-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.sync-action-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sync-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sync-action-icon.blue {
  background: rgba(99, 102, 241, 0.15);
  color: #6366F1;
}

.sync-action-icon.green {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}

.sync-action-icon.orange {
  background: rgba(249, 115, 22, 0.15);
  color: #F97316;
}

.sync-action-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.sync-action-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.sync-btn.blue {
  background: rgba(99, 102, 241, 0.12);
  color: #6366F1;
}

.sync-btn.blue:hover {
  background: rgba(99, 102, 241, 0.22);
}

.sync-btn.green {
  background: rgba(34, 197, 94, 0.12);
  color: #16A34A;
}

.sync-btn.green:hover {
  background: rgba(34, 197, 94, 0.22);
}

.sync-btn.orange {
  background: rgba(249, 115, 22, 0.12);
  color: #EA580C;
}

.sync-btn.orange:hover {
  background: rgba(249, 115, 22, 0.22);
}

.sync-btn.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
}

.sync-btn.danger:hover {
  background: rgba(239, 68, 68, 0.22);
}

.sync-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.section-label-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}



/* scroll bar */
.classes-table-wrap {
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}

.classes-table-wrap::-webkit-scrollbar {
  width: 8px;
}

.classes-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.classes-table-wrap .data-tbl thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--gray-50);
}

.classes-table-foot {
  padding: 2px 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  background: #fff;
}

@media (max-width: 768px) {
  .classes-table-wrap {
    max-height: calc(100vh - 330px);
  }
}