/* ============================================================
   Sumedh Institute of Technology - Online Exam System
   Indian Flag Color Theme: Saffron | White | Green | Navy Blue
   ============================================================ */

:root {
  --saffron:     #FF9933;
  --saffron-dark:#E07000;
  --saffron-light:#FFF0DC;
  --india-green: #138808;
  --green-dark:  #0A5C06;
  --green-light: #E8F5E9;
  --navy:        #000080;
  --navy-light:  #E8E8FF;
  --white:       #FFFFFF;
  --off-white:   #F9F8F5;
  --chakra-blue: #06038D;
  --text-dark:   #1A1A2E;
  --text-muted:  #6C757D;
  --border:      #E0E0E0;
  --shadow:      0 2px 20px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 30px rgba(0,0,0,0.12);
  --radius:      12px;
  --radius-sm:   8px;
}

* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--saffron); border-radius: 3px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-sit {
  background: linear-gradient(135deg, var(--navy) 0%, #1a1a6e 50%, var(--navy) 100%);
  padding: 10px 0;
  border-bottom: 3px solid var(--saffron);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.navbar-sit .navbar-brand, .navbar-sit .nav-link { color: var(--white) !important; }
.navbar-sit .nav-link:hover { color: var(--saffron) !important; }

.sit-logo {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--saffron), var(--india-green));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px;
  color: white;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.logo-s { color: var(--saffron-light); }
.logo-i { color: #fff; }
.logo-t { color: #90EE90; }

.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--saffron), var(--india-green));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: 14px;
}

.notif-dropdown { min-width: 300px; max-height: 350px; overflow-y: auto; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.page-wrapper {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 70px);
}

.sidebar-sit {
  width: 260px;
  min-height: 100%;
  background: linear-gradient(180deg, var(--navy) 0%, #0a0a5a 100%);
  color: white;
  flex-shrink: 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
}

.sidebar-header {
  padding: 20px 20px 15px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--saffron);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-transform: uppercase;
}

.sidebar-nav {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: rgba(255,153,51,0.15);
  color: var(--saffron);
  border-left-color: var(--saffron);
}
.sidebar-nav li a.active { font-weight: 600; }
.sidebar-nav li a i { width: 18px; font-size: 15px; }
.sidebar-nav li a.text-danger { color: #ff6b6b !important; }
.sidebar-nav li a.text-danger:hover { background: rgba(255,0,0,0.1); border-left-color: #ff6b6b; }

.nav-section {
  padding: 12px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
}

.main-content {
  flex: 1;
  padding: 25px;
  overflow-x: hidden;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, #1a1a6e 40%, var(--india-green) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--saffron) 33%, white 33%, white 66%, var(--india-green) 66%);
}

.login-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,128,0.3);
  overflow: hidden;
  width: 100%;
  max-width: 900px;
  display: flex;
  min-height: 560px;
}

.login-banner {
  background: linear-gradient(160deg, var(--saffron) 0%, #FF6B00 50%, var(--navy) 100%);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 30px;
  color: white;
  position: relative;
  overflow: hidden;
}
.login-banner::after {
  content: '';
  position: absolute;
  bottom: -50px; right: -50px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.login-banner .logo-big {
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 900;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.3);
}
.login-banner h2 { font-weight: 800; margin-bottom: 8px; text-align: center; }
.login-banner p { opacity: 0.85; text-align: center; font-size: 14px; }

.login-form-side {
  flex: 1;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.role-tabs { display: flex; gap: 8px; margin-bottom: 25px; }
.role-tab {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  color: var(--text-muted);
}
.role-tab:hover { border-color: var(--saffron); color: var(--saffron); }
.role-tab.active { background: var(--saffron); border-color: var(--saffron); color: white; }
.role-tab.admin-tab.active { background: var(--navy); border-color: var(--navy); }
.role-tab.teacher-tab.active { background: var(--india-green); border-color: var(--india-green); }

.form-floating .form-control {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}
.form-floating .form-control:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(255,153,51,0.15);
}

.btn-login {
  background: linear-gradient(135deg, var(--saffron), var(--saffron-dark));
  border: none;
  color: white;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  width: 100%;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,153,51,0.4); color: white; }
.btn-login.admin { background: linear-gradient(135deg, var(--navy), var(--chakra-blue)); }
.btn-login.teacher { background: linear-gradient(135deg, var(--india-green), var(--green-dark)); }

/* ============================================================
   DASHBOARD CARDS
   ============================================================ */
.stat-card {
  border-radius: var(--radius);
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.stat-card .stat-icon {
  width: 54px; height: 54px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.stat-card .stat-number { font-size: 36px; font-weight: 800; line-height: 1; }
.stat-card .stat-label { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.stat-card .stat-sub { font-size: 12px; opacity: 0.7; margin-top: 8px; }

.card-saffron { background: linear-gradient(135deg, var(--saffron), #FF6B00); }
.card-green   { background: linear-gradient(135deg, var(--india-green), var(--green-dark)); }
.card-navy    { background: linear-gradient(135deg, var(--navy), var(--chakra-blue)); }
.card-purple  { background: linear-gradient(135deg, #7B2FBE, #4A0080); }
.card-teal    { background: linear-gradient(135deg, #00897B, #004D40); }
.card-red     { background: linear-gradient(135deg, #E53935, #B71C1C); }

/* Panel Cards */
.panel-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.panel-card .panel-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--off-white);
}
.panel-card .panel-header h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.panel-card .panel-body { padding: 24px; }

/* ============================================================
   EXAM CARDS
   ============================================================ */
.exam-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.25s;
  overflow: hidden;
}
.exam-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--saffron);
}
.exam-card .exam-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-assessment  { background: var(--navy-light);   color: var(--navy); }
.badge-competition { background: var(--saffron-light); color: var(--saffron-dark); }
.badge-practice    { background: var(--green-light);   color: var(--green-dark); }
.badge-mock        { background: #f3e5f5;              color: #7B2FBE; }

.exam-meta span {
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   EXAM TAKING INTERFACE
   ============================================================ */
.exam-wrapper {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.question-panel {
  flex: 1;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.question-header {
  background: linear-gradient(135deg, var(--navy), #1a1a6e);
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timer-box {
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 20px;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.2);
}
.timer-box.warning { background: rgba(255,153,51,0.3); color: var(--saffron); }
.timer-box.danger  { background: rgba(255,0,0,0.3);    color: #ff6b6b; animation: pulse 1s infinite; }

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

.question-body { padding: 30px; }
.question-text { font-size: 17px; font-weight: 600; line-height: 1.6; margin-bottom: 24px; }
.question-number { color: var(--saffron); font-weight: 700; }

/* Options */
.option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}
.option-item:hover { border-color: var(--saffron); background: var(--saffron-light); }
.option-item.selected { border-color: var(--saffron); background: var(--saffron-light); }
.option-item.correct { border-color: var(--india-green); background: var(--green-light); }
.option-item.wrong   { border-color: #E53935; background: #FFEBEE; }
.option-label {
  width: 30px; height: 30px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
  transition: all 0.2s;
}
.option-item.selected .option-label { background: var(--saffron); border-color: var(--saffron); color: white; }
.option-item.correct  .option-label { background: var(--india-green); border-color: var(--india-green); color: white; }
.option-item.wrong    .option-label { background: #E53935; border-color: #E53935; color: white; }

/* Fill blank */
.fill-blank-input {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  width: 100%;
  transition: border-color 0.2s;
}
.fill-blank-input:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(255,153,51,0.15); }

/* Sidebar palette */
.question-palette {
  width: 240px;
  flex-shrink: 0;
}
.palette-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky;
  top: 90px;
}
.palette-header {
  background: linear-gradient(135deg, var(--saffron), #FF6B00);
  color: white;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 14px;
}
.palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 16px;
}
.palette-btn {
  width: 36px; height: 36px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--border);
  color: var(--text-dark);
}
.palette-btn:hover   { transform: scale(1.1); }
.palette-btn.current { background: var(--saffron); color: white; }
.palette-btn.answered  { background: var(--india-green); color: white; }
.palette-btn.flagged   { background: var(--saffron-dark); color: white; }
.palette-btn.not-visited { background: var(--navy-light); }

.palette-legend { padding: 0 16px 16px; }
.legend-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 6px;
}
.legend-dot {
  width: 14px; height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-saffron {
  background: linear-gradient(135deg, var(--saffron), var(--saffron-dark));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-saffron:hover { box-shadow: 0 4px 15px rgba(255,153,51,0.4); transform: translateY(-1px); color: white; }

.btn-green {
  background: linear-gradient(135deg, var(--india-green), var(--green-dark));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-green:hover { box-shadow: 0 4px 15px rgba(19,136,8,0.4); transform: translateY(-1px); color: white; }

.btn-navy {
  background: linear-gradient(135deg, var(--navy), var(--chakra-blue));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-navy:hover { box-shadow: 0 4px 15px rgba(0,0,128,0.4); transform: translateY(-1px); color: white; }

/* ============================================================
   MARKSHEET
   ============================================================ */
.marksheet-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}
.marksheet-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--saffron) 33%, white 33%, white 66%, var(--india-green) 66%);
}
.marksheet-wrapper::after {
  content: 'SUMEDH INSTITUTE OF TECHNOLOGY';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-size: 60px;
  font-weight: 900;
  color: rgba(0,0,128,0.04);
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 2px;
}
.marksheet-header {
  text-align: center;
  border-bottom: 2px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 24px;
}
.marksheet-header h3 { color: var(--navy); font-weight: 800; }
.marksheet-score {
  font-size: 64px;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, var(--saffron), var(--india-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.grade-badge {
  display: inline-block;
  padding: 8px 28px;
  border-radius: 30px;
  font-size: 28px;
  font-weight: 900;
  margin: 10px 0;
}
.grade-A  { background: var(--green-light);   color: var(--india-green); }
.grade-B  { background: var(--navy-light);     color: var(--navy); }
.grade-C  { background: var(--saffron-light);  color: var(--saffron-dark); }
.grade-F  { background: #FFEBEE;               color: #E53935; }
.pass-stamp {
  border: 3px solid var(--india-green);
  color: var(--india-green);
  border-radius: 8px;
  padding: 4px 14px;
  font-weight: 800;
  display: inline-block;
  transform: rotate(-5deg);
  font-size: 14px;
  letter-spacing: 2px;
}
.fail-stamp {
  border: 3px solid #E53935;
  color: #E53935;
  border-radius: 8px;
  padding: 4px 14px;
  font-weight: 800;
  display: inline-block;
  transform: rotate(-5deg);
  font-size: 14px;
  letter-spacing: 2px;
}

/* ============================================================
   LEADERBOARD
   ============================================================ */
.leaderboard-row { transition: background 0.2s; }
.leaderboard-row:hover { background: var(--saffron-light); }
.rank-badge {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.rank-1 { background: linear-gradient(135deg, #FFD700, #FFA500); color: white; }
.rank-2 { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); color: white; }
.rank-3 { background: linear-gradient(135deg, #CD7F32, #8B4513); color: white; }
.rank-other { background: var(--border); color: var(--text-dark); }

/* ============================================================
   TABLES
   ============================================================ */
.table-sit thead {
  background: linear-gradient(135deg, var(--navy), #1a1a6e);
  color: white;
}
.table-sit thead th { border: none; padding: 14px 16px; font-size: 13px; font-weight: 600; }
.table-sit tbody tr { transition: background 0.15s; }
.table-sit tbody tr:hover { background: var(--saffron-light); }
.table-sit td { padding: 12px 16px; vertical-align: middle; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-control:focus, .form-select:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(255,153,51,0.15);
}
.form-label { font-weight: 600; font-size: 14px; color: var(--text-dark); }
.form-section {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--saffron);
  display: flex; align-items: center; gap: 8px;
}

/* ============================================================
   BADGES & STATUS
   ============================================================ */
.badge-active   { background: var(--green-light);   color: var(--india-green); padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-inactive { background: #FFF3E0; color: #E65100; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-draft    { background: var(--navy-light);   color: var(--navy);       padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }

/* Progress */
.progress-sit .progress-bar { background: linear-gradient(90deg, var(--saffron), var(--india-green)); border-radius: 10px; }
.progress-sit { border-radius: 10px; background: var(--border); height: 10px; }

/* ============================================================
   QUESTION TYPES UI
   ============================================================ */
.q-type-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.q-type-tab {
  padding: 8px 18px;
  border: 2px solid var(--border);
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  color: var(--text-muted);
}
.q-type-tab:hover { border-color: var(--saffron); color: var(--saffron); }
.q-type-tab.active { background: var(--saffron); border-color: var(--saffron); color: white; }

/* Matching pairs */
.match-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.match-pair input { flex: 1; }

/* ============================================================
   GEMINI AI PANEL
   ============================================================ */
.gemini-panel {
  background: linear-gradient(135deg, #1a1a6e, var(--navy));
  border-radius: var(--radius);
  padding: 28px;
  color: white;
  position: relative;
  overflow: hidden;
}
.gemini-panel::before {
  content: '✦';
  position: absolute;
  right: 20px; top: 10px;
  font-size: 80px;
  opacity: 0.05;
}
.gemini-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.1);
  border-radius: 25px;
  margin-top: 12px;
}
.gemini-dot {
  width: 8px; height: 8px;
  background: var(--saffron);
  border-radius: 50%;
  animation: gemini-pulse 1.2s infinite;
}
.gemini-dot:nth-child(2) { animation-delay: 0.2s; }
.gemini-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes gemini-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-sit {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  margin-top: auto;
}
.footer-sit a { color: var(--saffron); text-decoration: none; }
.footer-sit a:hover { text-decoration: underline; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
  .sidebar-sit {
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    z-index: 1040;
    transform: translateX(-100%);
  }
  .sidebar-sit.open { transform: translateX(0); }
  .main-content { padding: 16px; }
  .exam-wrapper { flex-direction: column; }
  .question-palette { width: 100%; }
  .palette-card { position: static; }
  .login-card { flex-direction: column; }
  .login-banner { padding: 30px 20px; }
  .login-form-side { padding: 30px 24px; }
}

@media (max-width: 576px) {
  .stat-card .stat-number { font-size: 28px; }
  .marksheet-score { font-size: 48px; }
  .marksheet-wrapper { padding: 24px 16px; }
  .question-body { padding: 20px; }
  .palette-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-saffron { color: var(--saffron) !important; }
.text-india-green { color: var(--india-green) !important; }
.text-navy { color: var(--navy) !important; }
.bg-saffron-light { background: var(--saffron-light) !important; }
.bg-green-light { background: var(--green-light) !important; }
.bg-navy-light { background: var(--navy-light) !important; }
.border-saffron { border-color: var(--saffron) !important; }
.shadow-sit { box-shadow: var(--shadow); }
.rounded-sit { border-radius: var(--radius); }
.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}
.page-subtitle { color: var(--text-muted); font-size: 14px; }

/* Sidebar toggle button (mobile) */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px; right: 20px;
  width: 50px; height: 50px;
  background: var(--saffron);
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 20px;
  z-index: 1050;
  box-shadow: 0 4px 15px rgba(255,153,51,0.5);
}
@media (max-width: 992px) { .sidebar-toggle { display: flex; align-items: center; justify-content: center; } }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1035;
}
.sidebar-overlay.open { display: block; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* DataTables overrides */
.dataTables_wrapper .dataTables_filter input { border: 2px solid var(--border); border-radius: 8px; padding: 6px 12px; }
.dataTables_wrapper .dataTables_filter input:focus { outline: none; border-color: var(--saffron); }
.dataTables_wrapper .dataTables_length select { border: 2px solid var(--border); border-radius: 8px; padding: 4px 8px; }
.page-item.active .page-link { background: var(--saffron); border-color: var(--saffron); }
.page-link { color: var(--navy); }
