/* ============================================================
   GROW PREPARATORY SCHOOL — ADMIT CARD SYSTEM
   Premium Design System v1.0
   ============================================================ */

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

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Colors */
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --bg-dark: #0f172a;
  --bg-sidebar: #1e293b;
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #e2e8f0;
  --text-white: #ffffff;
  --border: #e2e8f0;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

@keyframes slideInRight {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes floatBubble {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-20px) scale(1.05); }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-fadeIn {
  animation: fadeIn 0.4s ease both;
}

.animate-scaleIn {
  animation: scaleIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ── App Layout ───────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--bg-sidebar);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.sidebar-header {
  padding: 28px 24px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.sidebar-header .school-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.6rem;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
}

.sidebar-header .school-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  background: linear-gradient(135deg, #c7d2fe, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.2px;
}

.sidebar-header .school-tagline {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.sidebar-nav .nav-section-title {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.3);
  padding: 12px 16px 8px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 2px;
  position: relative;
  overflow: hidden;
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.sidebar-nav a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(124, 58, 237, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-sm);
}

.sidebar-nav a:hover {
  color: var(--text-white);
  border-left-color: var(--accent-light);
  transform: translateX(2px);
}

.sidebar-nav a:hover::before {
  opacity: 1;
}

.sidebar-nav a .nav-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.sidebar-nav a .nav-text {
  position: relative;
  z-index: 1;
}

.sidebar-nav a .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  position: relative;
  z-index: 1;
}

.sidebar-nav a.active {
  color: var(--text-white);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.25), rgba(124, 58, 237, 0.15));
  border-left-color: var(--primary-light);
}

.sidebar-nav a.active .nav-icon {
  color: var(--primary-light);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.sidebar-footer .logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
}

.sidebar-footer .logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  margin-left: 280px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Bar ──────────────────────────────────────────────── */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-bar .page-title-bar {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.hamburger:hover {
  background: var(--bg-main);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  position: relative;
  transition: var(--transition);
}

.hamburger span::before,
.hamburger span::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger span::before { top: -7px; }
.hamburger span::after  { top: 7px; }

.top-bar .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar .user-info .user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.top-bar .user-info .user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.top-bar .user-info .user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ── Content Padding ──────────────────────────────────────── */
.content-area {
  padding: 28px 32px;
  flex: 1;
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
  margin-bottom: 28px;
  animation: fadeInUp 0.5s ease both;
}

.page-header h1 {
  font-size: 1.75rem;
  margin-bottom: 4px;
}

.page-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.page-header .breadcrumb a {
  color: var(--primary);
  font-weight: 500;
}

.page-header .breadcrumb a:hover {
  text-decoration: underline;
}

.page-header .breadcrumb .separator {
  color: var(--border);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(79, 70, 229, 0.08);
}

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

.card-header h3 {
  font-size: 1.1rem;
}

.card-body {
  /* content inside */
}

/* ── Stat Cards ───────────────────────────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 18px;
  border-left: 4px solid transparent;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  transform: translate(30px, -30px);
  opacity: 0.06;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card.primary   { border-left-color: var(--primary); }
.stat-card.primary::after   { background: var(--primary); }
.stat-card.success   { border-left-color: var(--success); }
.stat-card.success::after   { background: var(--success); }
.stat-card.warning   { border-left-color: var(--warning); }
.stat-card.warning::after   { background: var(--warning); }
.stat-card.danger    { border-left-color: var(--danger); }
.stat-card.danger::after    { background: var(--danger); }
.stat-card.info      { border-left-color: var(--info); }
.stat-card.info::after      { background: var(--info); }
.stat-card.accent    { border-left-color: var(--accent); }
.stat-card.accent::after    { background: var(--accent); }

.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-card.primary .stat-icon { background: rgba(79, 70, 229, 0.1); color: var(--primary); }
.stat-card.success .stat-icon { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-card.warning .stat-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-card.danger  .stat-icon { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.stat-card.info    .stat-icon { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.stat-card.accent  .stat-icon { background: rgba(124, 58, 237, 0.1); color: var(--accent); }

.stat-card .stat-info {
  flex: 1;
  min-width: 0;
}

.stat-card .stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn:active::after {
  opacity: 1;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
  transform: translateY(-1px);
}

.btn-info {
  background: linear-gradient(135deg, var(--info), #2563eb);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-info:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(79, 70, 229, 0.04);
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: var(--text-white);
}

.btn-outline-danger {
  background: transparent;
  border: 2px solid var(--danger);
  color: var(--danger);
}

.btn-outline-danger:hover {
  background: var(--danger);
  color: var(--text-white);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}

.btn-ghost:hover {
  background: var(--bg-main);
  color: var(--text-primary);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius);
}

.btn-block {
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Form Elements ────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: var(--transition);
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-control.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.form-control.is-invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.invalid-feedback {
  display: none;
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 4px;
  font-weight: 500;
}

.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── Data Table ───────────────────────────────────────────── */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table thead {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-sidebar));
}

.data-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(241, 245, 249, 0.5);
}

.data-table tbody tr:hover {
  background: rgba(79, 70, 229, 0.04);
}

.data-table tbody td {
  padding: 13px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table .actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-primary {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
}

.badge-success {
  background: var(--success-light);
  color: #065f46;
}

.badge-warning {
  background: var(--warning-light);
  color: #92400e;
}

.badge-danger {
  background: var(--danger-light);
  color: #991b1b;
}

.badge-info {
  background: var(--info-light);
  color: #1e40af;
}

.badge-accent {
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent);
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.88rem;
  font-weight: 500;
  border-left: 4px solid;
  animation: fadeInUp 0.4s ease both;
}

.alert-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1.5;
}

.alert-success {
  background: var(--success-light);
  color: #065f46;
  border-left-color: var(--success);
}

.alert-danger {
  background: var(--danger-light);
  color: #991b1b;
  border-left-color: var(--danger);
}

.alert-warning {
  background: var(--warning-light);
  color: #92400e;
  border-left-color: var(--warning);
}

.alert-info {
  background: var(--info-light);
  color: #1e40af;
  border-left-color: var(--info);
}

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

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

.modal-header h3 {
  font-size: 1.15rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

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

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  animation: fadeIn 0.5s ease both;
}

.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 360px;
  margin: 0 auto 20px;
  font-size: 0.9rem;
}

/* ── Loading Spinner ──────────────────────────────────────── */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Toast Notifications ──────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-xl);
  font-size: 0.88rem;
  font-weight: 500;
  min-width: 300px;
  max-width: 420px;
  pointer-events: all;
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
  border-left: 4px solid;
  position: relative;
  overflow: hidden;
}

.toast-success { border-left-color: var(--success); }
.toast-error   { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info    { border-left-color: var(--info); }

.toast .toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error   .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info    .toast-icon { color: var(--info); }

.toast .toast-message {
  flex: 1;
  color: var(--text-primary);
}

.toast .toast-close {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: var(--transition);
}

.toast .toast-close:hover {
  color: var(--text-primary);
}

.toast .toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 var(--radius) 0;
  animation: shrink 3s linear forwards;
}

.toast-success .toast-progress { background: var(--success); }
.toast-error   .toast-progress { background: var(--danger); }
.toast-warning .toast-progress { background: var(--warning); }
.toast-info    .toast-progress { background: var(--info); }

@keyframes shrink {
  from { width: 100%; }
  to   { width: 0%; }
}

.toast-exit {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
  to { opacity: 0; transform: translateX(40px); }
}

/* ── Search & Filters Bar ─────────────────────────────────── */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1rem;
}

.search-box input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

.pagination a:hover {
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
}

.pagination .active {
  background: var(--primary);
  color: var(--text-white);
}

/* ══════════════════════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #4c1d95 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Animated Background Shapes */
.login-page .bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
}

.login-page .bg-shape-1 {
  width: 500px;
  height: 500px;
  background: var(--primary-light);
  top: -150px;
  right: -100px;
  animation: floatBubble 8s ease-in-out infinite;
}

.login-page .bg-shape-2 {
  width: 350px;
  height: 350px;
  background: var(--accent);
  bottom: -100px;
  left: -80px;
  animation: floatBubble 10s ease-in-out infinite 2s;
}

.login-page .bg-shape-3 {
  width: 200px;
  height: 200px;
  background: var(--primary-light);
  top: 40%;
  left: 15%;
  animation: floatBubble 7s ease-in-out infinite 1s;
}

.login-page .bg-shape-4 {
  width: 150px;
  height: 150px;
  background: var(--accent-light);
  top: 20%;
  right: 20%;
  animation: floatBubble 9s ease-in-out infinite 3s;
}

/* Glassmorphism Login Card */
.login-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
  position: relative;
  z-index: 1;
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-header .login-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 2rem;
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.login-header h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  background: linear-gradient(135deg, #e0e7ff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.login-header p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.88rem;
}

/* Login Form */
.login-form .form-group {
  margin-bottom: 22px;
}

.login-form .form-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.login-form .form-control {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-white);
  padding: 13px 16px;
}

.login-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.login-form .form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.login-form .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 0.95rem;
  margin-top: 4px;
}

.login-form .form-footer {
  text-align: center;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.82rem;
}

.login-form .form-footer a {
  color: var(--primary-light);
  font-weight: 600;
}

.login-form .form-footer a:hover {
  text-decoration: underline;
}

/* Password toggle inside input */
.password-wrapper {
  position: relative;
}

.password-wrapper .toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.1rem;
  transition: var(--transition);
}

.password-wrapper .toggle-password:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.04);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease both;
}

.tab-content.active {
  display: block;
}

/* ── Tags / Chip ──────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-main);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

.chip .chip-close {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.chip .chip-close:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* ── Tooltip ──────────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  background: var(--bg-dark);
  color: var(--text-white);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .content-area {
    padding: 24px 20px;
  }

  .top-bar {
    padding: 0 20px;
  }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    z-index: 1000;
    animation: none;
  }

  .sidebar.active {
    transform: translateX(0);
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.3);
  }

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

  .hamburger {
    display: flex;
  }

  .top-bar {
    padding: 0 16px;
    height: 60px;
  }

  .content-area {
    padding: 20px 16px;
  }

  .stat-cards {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 18px;
  }

  .stat-card .stat-number {
    font-size: 1.35rem;
  }

  .page-header h1 {
    font-size: 1.35rem;
  }

  .card {
    padding: 18px;
    border-radius: var(--radius);
  }

  .data-table {
    font-size: 0.82rem;
  }

  .data-table thead th,
  .data-table tbody td {
    padding: 10px 12px;
  }

  .modal {
    max-width: 100%;
    margin: 16px;
    border-radius: var(--radius);
  }

  .modal-body {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    min-width: 100%;
  }

  .btn-group {
    width: 100%;
  }

  .btn-group .btn {
    flex: 1;
  }

  .toast-container {
    top: auto;
    bottom: 16px;
    right: 16px;
    left: 16px;
  }

  .toast {
    min-width: auto;
  }

  .login-card {
    padding: 32px 24px;
  }

  .login-header h1 {
    font-size: 1.35rem;
  }

  .top-bar .user-info .user-name,
  .top-bar .user-info .user-role {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .stat-cards {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 16px;
  }

  .page-header h1 {
    font-size: 1.2rem;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    padding: 10px 14px;
    font-size: 0.82rem;
  }

  .pagination a,
  .pagination span {
    width: 32px;
    height: 32px;
    font-size: 0.78rem;
  }
}

/* ══════════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════════ */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-left    { text-align: left; }

.text-primary   { color: var(--primary) !important; }
.text-success   { color: var(--success) !important; }
.text-danger    { color: var(--danger) !important; }
.text-warning   { color: var(--warning) !important; }
.text-info      { color: var(--info) !important; }
.text-muted     { color: var(--text-secondary) !important; }
.text-white     { color: var(--text-white) !important; }

.font-bold      { font-weight: 700; }
.font-semibold  { font-weight: 600; }
.font-medium    { font-weight: 500; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 1rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 1rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

.d-flex        { display: flex; }
.d-grid        { display: grid; }
.d-block       { display: block; }
.d-inline-flex { display: inline-flex; }

.flex-column   { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1; }

.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }

.align-center  { align-items: center; }
.align-start   { align-items: flex-start; }
.align-end     { align-items: flex-end; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.w-100 { width: 100%; }

.hidden  { display: none !important; }
.visible { display: block !important; }

.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }

.rounded    { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow     { box-shadow: var(--shadow); }
.shadow-lg  { box-shadow: var(--shadow-lg); }
.shadow-xl  { box-shadow: var(--shadow-xl); }

.no-print {
  /* Used with print media query — see admit-card.css */
}

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

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

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ── Selection ────────────────────────────────────────────── */
::selection {
  background: rgba(79, 70, 229, 0.2);
  color: var(--primary-dark);
}

/* ── Print Global ─────────────────────────────────────────── */
@media print {
  .sidebar,
  .sidebar-overlay,
  .top-bar,
  .no-print,
  .toast-container {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
  }

  body {
    background: #fff;
  }
}

/* ============================================================
   MISSING COMPONENT STYLES
   ============================================================ */

/* ── Stat Card Color Variants ─────────────────────────────── */
.stat-card-blue { border-left-color: var(--info) !important; }
.stat-card-blue::after { background: var(--info); }
.stat-card-blue .stat-icon { background: rgba(59, 130, 246, 0.1); color: var(--info); }

.stat-card-purple { border-left-color: var(--accent) !important; }
.stat-card-purple::after { background: var(--accent); }
.stat-card-purple .stat-icon { background: rgba(124, 58, 237, 0.1); color: var(--accent); }

.stat-card-green { border-left-color: var(--success) !important; }
.stat-card-green::after { background: var(--success); }
.stat-card-green .stat-icon { background: rgba(16, 185, 129, 0.1); color: var(--success); }

.stat-card-orange { border-left-color: var(--warning) !important; }
.stat-card-orange::after { background: var(--warning); }
.stat-card-orange .stat-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

/* ── School Logo in Sidebar ───────────────────────────────── */
.school-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.6rem;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
}

/* ── Logout Link ──────────────────────────────────────────── */
.logout-link:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
  border-left-color: var(--danger) !important;
}

/* ── Top Bar Sections ─────────────────────────────────────── */
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

/* ── User Info ─────────────────────────────────────────────── */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

/* ── Welcome Banner ───────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-lg);
  padding: 32px;
  color: white;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  animation: fadeInUp 0.5s ease both;
}

.welcome-banner .welcome-text h2 {
  color: white;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.welcome-banner .welcome-text p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.welcome-banner .welcome-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.welcome-banner .btn {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.welcome-banner .btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

/* ── Info Banner ──────────────────────────────────────────── */
.info-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(79, 70, 229, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.info-banner .info-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-banner p {
  color: var(--text-primary);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}

/* ── Class Grid (Dashboard) ───────────────────────────────── */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.class-card {
  background: var(--bg-main);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid transparent;
}

.class-card:hover {
  background: white;
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.class-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.class-count {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.class-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.class-link {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
}

.class-link:hover {
  text-decoration: underline;
}

/* ── Quick Actions ────────────────────────────────────────── */
.quick-actions {
  margin-top: 28px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.action-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid transparent;
  display: block;
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.action-card .action-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.action-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.action-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Exam Cards ───────────────────────────────────────────── */
.exam-card {
  background: var(--bg-main);
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}

.exam-card:hover {
  border-color: var(--primary-light);
}

.exam-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.exam-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.exam-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.exam-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.subject-section {
  border-top: 1px solid var(--border);
  padding: 20px;
  background: white;
}

.subject-form {
  margin-bottom: 16px;
}

.subject-form h5 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.subjects-table-container {
  margin-top: 12px;
}

/* ── Filter Bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Form Layouts ─────────────────────────────────────────── */
.form-grid {
  display: grid;
  gap: 20px;
}

.form-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.form-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-inline .form-label {
  margin-bottom: 0;
  white-space: nowrap;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.form-action {
  display: flex;
  align-items: flex-end;
}

.form-help {
  font-size: 0.8rem;
  margin-top: 6px;
}

.form-help a {
  color: var(--primary);
  font-weight: 600;
}

.form-help a:hover {
  text-decoration: underline;
}

.form-control-lg {
  padding: 14px 18px !important;
  font-size: 1rem !important;
}

.flex-grow {
  flex: 1;
  min-width: 200px;
}

/* ── Required & Validation ────────────────────────────────── */
.required {
  color: var(--danger);
}

.is-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* ── Card Title ───────────────────────────────────────────── */
.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Button Accent ────────────────────────────────────────── */
.btn-accent {
  background: linear-gradient(135deg, var(--accent), #9333ea);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.btn-accent:hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  transform: translateY(-1px);
}

/* ── Action Buttons Group ─────────────────────────────────── */
.action-btns {
  display: flex;
  gap: 6px;
}

/* ── Badge Colors ─────────────────────────────────────────── */
.badge-green {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
}

.badge-purple {
  background: rgba(124, 58, 237, 0.12) !important;
  color: var(--accent) !important;
}

/* ── Spinner Small ────────────────────────────────────────── */
.spinner-sm {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

/* ── Nav Icon & Text ──────────────────────────────────────── */
.nav-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-text {
  flex: 1;
}

/* ── Responsive Additions ─────────────────────────────────── */
@media (max-width: 768px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .welcome-banner {
    flex-direction: column;
    text-align: center;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-left,
  .filter-right {
    justify-content: center;
  }

  .exam-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .action-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .class-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .action-cards {
    grid-template-columns: 1fr;
  }

  .class-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-area {
    padding: 16px;
  }
}

/* -- Logo Image Class -- */
.school-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
  background: #fff;
  border-radius: 50%;
  padding: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
