/* =========================================================
   ExamDesk 4.0 - single responsive stylesheet (indigo / navy theme)
   Breakpoints: 1100px, 900px, 720px, 560px, 400px
   ========================================================= */

:root {
  --brand: #3936d1;
  --brand-hover: #2b28b0;
  --brand-soft: #eeedfe;
  --brand-ink: #3936d1;
  --accent: #6d5dfc;
  --navy: #0e1040;
  --navy-2: #171a5c;
  --hero-grad: linear-gradient(135deg, #f4f3ff 0%, #eef4ff 55%, #fdf2ff 100%);
  --bg: #f7f7fc;
  --surface: #ffffff;
  --surface-2: #f8f8fd;
  --border: #e4e4f1;
  --border-strong: #d1d1e6;
  --ink: #14163a;
  --ink-2: #33365c;
  --muted: #5f6283;
  --muted-2: #8b8eab;
  --green: #138a5e;
  --green-soft: #e3f6ee;
  --red: #cf3a4c;
  --red-soft: #fdecef;
  --orange: #b4690e;
  --orange-soft: #fff3df;
  --blue: #2f6bd8;
  --blue-soft: #e9f0ff;
  --gray-soft: #efeff7;
  --shadow-sm: 0 1px 2px rgba(20, 22, 58, .05);
  --shadow: 0 10px 30px rgba(57, 54, 209, .08);
  --shadow-lg: 0 24px 60px rgba(20, 22, 58, .18);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-head: "Poppins", "Inter", system-ui, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --brand: #8f8cff;
  --brand-hover: #a7a5ff;
  --brand-soft: #23225a;
  --brand-ink: #b3b1ff;
  --accent: #a598ff;
  --hero-grad: linear-gradient(135deg, #12143f 0%, #0f1533 60%, #1a1240 100%);
  --bg: #0b0c26;
  --surface: #13153a;
  --surface-2: #181a45;
  --border: #272a5c;
  --border-strong: #353970;
  --ink: #eceefc;
  --ink-2: #c8cbe8;
  --muted: #9a9dc2;
  --muted-2: #6f729a;
  --green: #4fd19b;
  --green-soft: #12342a;
  --red: #f57f8e;
  --red-soft: #3a1a2a;
  --orange: #f2b264;
  --orange-soft: #3a2a14;
  --blue: #8db0ff;
  --blue-soft: #1b2650;
  --gray-soft: #20234f;
  --shadow-sm: none;
  --shadow: 0 10px 30px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- Reset & base [Chaitanya Pandey] ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.1rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: var(--gray-soft); padding: 1px 6px; border-radius: 5px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.bi { line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Layout [Chaitanya Pandey] ---------- */
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.page { padding: 34px 0 56px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stack { display: grid; gap: 22px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; }
.grid-2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head p { color: var(--muted); font-size: .85rem; }
.card-link { font-size: .85rem; font-weight: 600; color: var(--brand-ink); display: inline-flex; align-items: center; gap: 4px; }
.card-link:hover { text-decoration: underline; }

/* ---------- Buttons [Chaitanya Pandey] ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: .9rem; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
[data-theme="dark"] .btn-primary { color: #0b0c26; }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 25%, transparent); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--ink-2); }
.btn-outline:hover:not(:disabled) { background: var(--surface-2); border-color: var(--muted-2); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--gray-soft); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(.93); }
.btn-warning { background: var(--orange-soft); color: var(--orange); border-color: color-mix(in srgb, var(--orange) 30%, transparent); }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .82rem; }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; flex: none;
  display: inline-grid; place-items: center; position: relative;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  font-size: 1.05rem; transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.sm { width: 34px; height: 34px; font-size: .92rem; border-radius: 8px; }
.icon-btn.danger { color: var(--red); }
.icon-btn.danger:hover { background: var(--red-soft); }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Badges [Chaitanya Pandey] ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  background: var(--gray-soft); color: var(--muted);
}
.badge-live { background: var(--red-soft); color: var(--red); }
.badge-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.badge-upcoming { background: var(--blue-soft); color: var(--blue); }
.badge-completed, .badge-passed, .badge-active { background: var(--green-soft); color: var(--green); }
.badge-failed, .badge-blocked, .badge-high { background: var(--red-soft); color: var(--red); }
.badge-draft, .badge-normal { background: var(--gray-soft); color: var(--muted); }
.badge-review { background: var(--orange-soft); color: var(--orange); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Forms [Dev Singh Chauhan] ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .76rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 13px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.input-icon { position: relative; }
.input-icon > .bi:first-child { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.input-icon > input:not([type=checkbox]):not([type=radio]) { padding-left: 38px; }
.input-icon .input-action { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 8px; color: var(--muted); display: grid; place-items: center; }
.input-icon .input-action:hover { background: var(--gray-soft); }
.input-icon:has(.input-action) > input:not([type=checkbox]):not([type=radio]) { padding-right: 46px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-2); cursor: pointer; }
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch-row small { display: block; color: var(--muted); font-size: .8rem; }
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 99px; transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.form-alert { display: none; padding: 10px 13px; border-radius: var(--radius-sm); font-size: .86rem; border: 1px solid transparent; }
.form-alert.show { display: block; }
.form-alert.error { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.form-alert.success { background: var(--green-soft); color: var(--green); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.strength { display: flex; align-items: center; gap: 10px; min-height: 18px; }
.strength-bar { flex: 1; max-width: 140px; height: 6px; border-radius: 9px; background: var(--gray-soft); overflow: hidden; }
.strength-bar span { display: block; height: 100%; border-radius: 9px; transition: width .2s; }
.strength-bar.weak span { background: var(--red); }
.strength-bar.medium span { background: var(--orange); }
.strength-bar.strong span { background: var(--green); }
.strength-label { font-size: .76rem; font-weight: 600; }
.strength-label.weak { color: var(--red); }
.strength-label.medium { color: var(--orange); }
.strength-label.strong { color: var(--green); }
fieldset { border: 0; }
legend { font-weight: 600; font-size: .84rem; margin-bottom: 8px; color: var(--ink-2); }

/* ---------- Brand [Dev Singh Chauhan] ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--ink); letter-spacing: -.03em; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.05rem; }
[data-theme="dark"] .brand-mark { color: #0b0c26; }
.brand-dot { color: var(--accent); }

/* ---------- App header [Dev Sharma] ---------- */
.app-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.app-header-inner { width: min(1200px, 100% - 40px); margin-inline: auto; height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.app-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; height: 100%; }
.app-nav a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 9px; font-size: .88rem; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.app-nav a:hover { color: var(--ink); background: var(--gray-soft); }
.app-nav a.active { color: var(--brand-ink); background: var(--brand-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; }
.popover-wrap { position: relative; }
.popover { position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 60; animation: pop .15s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
.popover-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.notif-panel { width: min(360px, calc(100vw - 24px)); }
.notif-items { max-height: 380px; overflow-y: auto; }
.notif-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: .86rem; }
.notif-item:last-child { border-bottom: 0; }
.notif-item > .bi { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.notif-item.live > .bi { background: var(--red-soft); color: var(--red); }
.notif-item.unread { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.notif-item p { color: var(--ink-2); font-size: .82rem; margin-top: 2px; }
.notif-item small { color: var(--muted); font-size: .74rem; display: block; margin-top: 2px; }
.notif-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: .88rem; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 12px; border: 1px solid transparent; text-align: left; }
.user-btn:hover { background: var(--gray-soft); }
.avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: .8rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-meta strong { font-size: .86rem; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { font-size: .74rem; color: var(--muted); }
.user-btn > .bi { color: var(--muted); font-size: .8rem; }
.user-menu { width: 240px; padding: 6px; }
.user-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: grid; }
.user-menu-head small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }
.user-menu a, .user-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: .88rem; color: var(--ink-2); }
.user-menu a:hover, .user-menu button:hover { background: var(--gray-soft); }
.user-menu button { color: var(--red); }

.server-down { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 20px; background: var(--red-soft); color: var(--red); font-size: .88rem; border-bottom: 1px solid color-mix(in srgb, var(--red) 25%, transparent); position: relative; z-index: 50; }
.server-down span { flex: 1; min-width: 220px; }

.app-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 20px max(20px, calc((100% - 1200px) / 2)); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; font-size: .82rem; color: var(--muted); }
.app-footer strong { color: var(--brand-ink); font-family: var(--font-head); }

/* ---------- Stats [Dev Sharma] ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); min-width: 0; }
.stat-icon { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; line-height: 1; }
.stat-icon.brand { background: var(--brand-soft); color: var(--brand-ink); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.orange { background: var(--orange-soft); color: var(--orange); }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.stat-card > div > span { display: block; font-size: .8rem; color: var(--muted); }
.stat-card > div > strong { display: block; font-family: var(--font-head); font-size: 1.6rem; line-height: 1.2; }
.stat-card > div > small { font-size: .74rem; color: var(--muted-2); }

/* ---------- Hero / welcome [Devang Kumar] ---------- */
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.welcome h1 { margin: 4px 0; }
.welcome p { color: var(--muted); max-width: 620px; }

/* ---------- Exam cards (student) [Devang Kumar] ---------- */
.exam-list { display: grid; gap: 14px; }
.exam-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.exam-card.highlight { border-color: color-mix(in srgb, var(--red) 35%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 8%, transparent), var(--shadow-sm); }
.exam-code { width: 58px; height: 58px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-family: var(--font-head); font-size: .82rem; text-align: center; line-height: 1.1; padding: 4px; word-break: break-all; }
.exam-card h3 { margin: 6px 0 3px; }
.exam-card p { color: var(--muted); font-size: .88rem; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }

.list { display: grid; }
.list-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); border-radius: 10px; }
.list-item strong { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item small { color: var(--muted); font-size: .78rem; }
.list-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-size: .72rem; font-weight: 800; }
.score-pill { font-weight: 700; font-family: var(--font-head); font-size: .98rem; }
.score-pill.pass { color: var(--green); }
.score-pill.fail { color: var(--red); }

.announcement { padding: 14px 0; border-bottom: 1px solid var(--border); }
.announcement:last-child { border-bottom: 0; }
.announcement-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.announcement h3 { font-size: .95rem; }
.announcement p { color: var(--ink-2); font-size: .88rem; margin-top: 4px; }
.announcement small { color: var(--muted); font-size: .76rem; }

.empty { padding: 34px 18px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); font-size: .9rem; }
.empty .bi { font-size: 1.8rem; display: block; margin-bottom: 8px; color: var(--muted-2); }
.empty .btn { margin-top: 14px; }

.skeleton { border-radius: 10px; background: linear-gradient(90deg, var(--gray-soft) 25%, var(--surface-2) 50%, var(--gray-soft) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; min-height: 64px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Tables (stack into cards on phones) [Dev Sharma] ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 13px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--ink-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table td strong { color: var(--ink); display: block; }
.table td small { color: var(--muted); font-size: .77rem; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table .num { text-align: right; white-space: nowrap; }
.table-empty td { text-align: center; color: var(--muted); padding: 30px 10px !important; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .avatar { width: 34px; height: 34px; font-size: .72rem; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .search { flex: 1 1 220px; max-width: 340px; }
.toolbar select { width: auto; min-width: 150px; }
.toolbar .spacer { flex: 1; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: .84rem; color: var(--muted); }
.page-buttons { display: flex; align-items: center; gap: 8px; }

/* ---------- Tabs (examiner) [Chaitanya Pandey] ---------- */
.tab-panel { animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Modal dialogs [Chaitanya Pandey] ---------- */
dialog.modal { margin: auto; max-width: calc(100% - 24px); width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 32px); border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); padding: 0; overflow: hidden; }
dialog.modal[open] { display: flex; flex-direction: column; animation: pop .18s ease-out; }
dialog.modal.modal-sm { width: min(420px, calc(100% - 24px)); }
dialog.modal.modal-lg { width: min(860px, calc(100% - 24px)); }
dialog.modal::backdrop { background: rgba(10, 18, 34, .5); backdrop-filter: blur(2px); }
dialog.modal > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head p { color: var(--muted); font-size: .84rem; }
.modal-body { padding: 22px; overflow-y: auto; display: grid; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.confirm-body { text-align: center; justify-items: center; gap: 8px; }
.confirm-body p { color: var(--muted); font-size: .9rem; }
.confirm-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: var(--brand-soft); color: var(--brand-ink); margin-bottom: 4px; }
.confirm-icon.danger { background: var(--red-soft); color: var(--red); }

/* ---------- Toasts [Chaitanya Pandey] ---------- */
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: grid; gap: 10px; width: min(360px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; background: #1d2a44; color: #fff; box-shadow: var(--shadow-lg); font-size: .88rem; animation: pop .2s ease-out; transition: opacity .3s, transform .3s; }
.toast .bi { margin-top: 3px; }
.toast-success .bi { color: #6ee0ac; }
.toast-error { background: #a8323d; }
.toast-info .bi { color: #9ab8ff; }
.toast.hide { opacity: 0; transform: translateY(8px); }

/* =========================================================
   Auth pages  [Dev Sharma]
   ========================================================= */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-visual { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 48px clamp(28px, 6vw, 80px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-visual::after { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(124,156,240,.35), transparent 65%); }
.auth-visual .brand { color: #fff; }
.auth-visual .brand-mark { background: #fff; color: var(--navy); }
.auth-visual h1 { color: #fff; font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem); max-width: 460px; }
.auth-visual p { color: #bcc9e4; max-width: 440px; margin-top: 14px; }
.auth-points { display: grid; gap: 12px; margin-top: 28px; position: relative; z-index: 1; }
.auth-points li { list-style: none; display: flex; gap: 10px; align-items: center; color: #dce4f5; font-size: .92rem; }
.auth-points .bi { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.auth-logo { width: 220px; opacity: .95; position: relative; z-index: 1; }
.auth-main { display: grid; place-items: center; padding: 40px 20px; background: var(--bg); }
.auth-card { width: min(440px, 100%); }
.auth-card .brand { display: none; margin-bottom: 26px; }
.auth-card h2 { font-size: 1.6rem; }
.auth-card .lead { color: var(--muted); margin: 4px 0 24px; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--gray-soft); border-radius: 12px; }
.role-switch label { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px; border-radius: 9px; font-weight: 600; font-size: .88rem; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.role-switch input { position: absolute; opacity: 0; pointer-events: none; }
.role-switch label:has(input:checked) { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-sm); }
.role-switch label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.form-inline { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.link { color: var(--brand-ink); font-weight: 600; font-size: .86rem; }
.link:hover { text-decoration: underline; }
.auth-switch { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 20px; }
.demo-box { margin-top: 22px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 12px; font-size: .82rem; color: var(--muted); display: grid; gap: 8px; }
.demo-box strong { color: var(--ink-2); }
.demo-box .demo-fill { display: flex; gap: 8px; flex-wrap: wrap; }
.auth-theme { position: fixed; top: 16px; right: 16px; z-index: 5; }

/* =========================================================
   Landing page  [Dev Sharma]
   ========================================================= */
.landing-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.landing-nav { width: min(1200px, 100% - 40px); margin-inline: auto; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.landing-nav nav { display: flex; align-items: center; gap: 6px; }
.landing-nav nav a:not(.btn) { padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .92rem; color: var(--ink-2); }
.landing-nav nav a:not(.btn):hover { color: var(--brand-ink); }
.hero-wrap { background: var(--hero-grad); position: relative; overflow: hidden; }
.hero-wrap::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -160px; top: -200px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); }
.hero { position: relative; width: min(1200px, 100% - 40px); margin: 0 auto; padding: 70px 0 80px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 3.6rem); letter-spacing: -.035em; line-height: 1.12; margin: 18px 0; font-weight: 700; }
.hero h1 span { background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.05rem; color: var(--muted); max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-actions .btn { min-height: 50px; padding: 12px 26px; font-size: .95rem; border-radius: 12px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--brand-ink); font-weight: 600; font-size: .78rem; box-shadow: var(--shadow-sm); }
.hero-visual { position: relative; }
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.mock-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: .8rem; color: var(--muted); }
.mock-dots { display: flex; gap: 6px; }
.mock-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.mock-body { padding: 24px; display: grid; gap: 14px; }
.mock-q { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.mock-opt { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border: 1px solid var(--border); border-radius: 11px; font-size: .9rem; }
.mock-opt b { width: 28px; height: 28px; border-radius: 8px; background: var(--gray-soft); display: grid; place-items: center; font-size: .78rem; }
.mock-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.mock-opt.on b { background: var(--brand); color: #fff; }
.mock-foot { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--muted); }
.mock-timer { color: var(--red); font-weight: 700; background: var(--red-soft); padding: 4px 10px; border-radius: 8px; }
.float-card { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; gap: 10px; align-items: center; font-size: .82rem; }
.float-card > .bi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 1rem; flex: none; }
.float-card.one { left: -28px; bottom: 36px; }
.float-card.two { right: -18px; top: -18px; }
.float-card.two > .bi { background: var(--red-soft); color: var(--red); }
.float-card strong { display: block; font-size: .86rem; }
.float-card small { color: var(--muted); }
.trust { width: min(1200px, 100% - 40px); margin: 0 auto; padding: 34px 0; text-align: center; }
.trust p { color: var(--muted); font-weight: 500; margin-bottom: 18px; }
.trust p strong { color: var(--brand-ink); }
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 36px; }
.trust-row span { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; color: var(--muted-2); font-size: 1rem; }
.section { width: min(1200px, 100% - 40px); margin: 0 auto; padding: 70px 0; }
.section-intro { max-width: 640px; margin: 0 auto 38px; text-align: center; }
.section-intro h2 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem); margin-top: 10px; }
.section-intro p { color: var(--muted); margin-top: 10px; }
.platform { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.platform-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 30px; }
.platform-tabs button { padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .86rem; color: var(--muted); border: 1px solid transparent; }
.platform-tabs button[aria-selected="true"] { color: var(--brand-ink); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.platform-visual { background: var(--hero-grad); border-radius: 22px; padding: 30px; min-height: 280px; display: grid; place-items: center; border: 1px solid var(--border); text-align: center; }
.platform-visual > .bi { font-size: 5rem; color: var(--brand); display: block; }
.platform-visual p { color: var(--muted); margin-top: 10px; max-width: 320px; }
.platform-list { display: grid; gap: 20px; }
.platform-item { display: grid; grid-template-columns: 46px 1fr; gap: 14px; }
.platform-item > .bi { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-size: 1.2rem; }
.platform-item p { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.role-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; transition: transform .2s, box-shadow .2s; }
.role-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.role-card > .bi { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--accent)); }
.role-card h3 { margin: 18px 0 8px; }
.role-card ul { list-style: none; display: grid; gap: 7px; color: var(--muted); font-size: .88rem; }
.role-card li::before { content: "\2713"; color: var(--green); font-weight: 700; margin-right: 8px; }
.band { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; width: 600px; height: 600px; border-radius: 50%; right: -200px; top: -260px; background: radial-gradient(circle, rgba(109, 93, 252, .45), transparent 65%); }
.band-inner { position: relative; z-index: 1; width: min(1200px, 100% - 40px); margin: 0 auto; padding: 64px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.band h2 { color: #fff; font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem); }
.band p { color: #b9bce6; margin-top: 10px; }
.band .eyebrow { color: #a8a5ff; }
.band-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.band-stats div { border-left: 2px solid rgba(255, 255, 255, .18); padding-left: 16px; }
.band-stats strong { display: block; font-family: var(--font-head); font-size: 2rem; color: #fff; }
.band-stats span { color: #b9bce6; font-size: .86rem; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.step { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--accent); }
.step h3 { margin: 8px 0 6px; }
.step p { color: var(--muted); font-size: .9rem; }
.cta { width: min(1200px, 100% - 40px); margin: 0 auto 70px; padding: 48px; border-radius: 24px; background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 60%, #3a2f9e 100%); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta h2 { color: #fff; font-size: 1.7rem; }
.cta p { color: #c4c6ee; margin-top: 6px; }
.cta .btn-light { background: #fff; color: var(--navy); }
.site-footer { background: var(--navy); color: #b9bce6; }
.site-footer-inner { width: min(1200px, 100% - 40px); margin: 0 auto; padding: 48px 0 24px; display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 30px; }
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { background: #fff; color: var(--navy); }
.site-footer p { margin-top: 12px; font-size: .9rem; max-width: 320px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; font-size: .88rem; }
.site-footer a:hover { color: #fff; }
.site-footer-bottom { width: min(1200px, 100% - 40px); margin: 0 auto; padding: 18px 0 26px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .82rem; }

/* =========================================================
   Exam page  [Devang Kumar]
   ========================================================= */
.exam-body { background: var(--bg); }
.exam-bar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--border); }
.exam-bar-inner { width: min(1240px, 100% - 32px); margin-inline: auto; min-height: 70px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; }
.exam-heading { min-width: 0; text-align: center; }
.exam-heading strong { display: block; font-family: var(--font-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exam-heading small { color: var(--muted); font-size: .8rem; }
.timer { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); }
.timer .bi { font-size: 1.2rem; }
.timer small { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .1em; opacity: .8; }
.timer strong { font-family: var(--font-head); font-size: 1.25rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.timer.warn { background: var(--orange-soft); color: var(--orange); }
.timer.danger { background: var(--red-soft); color: var(--red); animation: pulse 1s infinite; }
.exam-progress { height: 4px; background: var(--gray-soft); }
.exam-progress span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s; }
.exam-layout { width: min(1240px, 100% - 32px); margin: 26px auto 50px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.question-card { padding: clamp(20px, 3vw, 34px); }
.question-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; font-size: .84rem; color: var(--muted); }
.question-text { font-size: clamp(1.08rem, 1rem + .5vw, 1.3rem); line-height: 1.55; margin-bottom: 24px; font-weight: 600; }
.options { display: grid; gap: 12px; }
.option { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; background: var(--surface); text-align: left; width: 100%; }
.option:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.option.selected { border-color: var(--brand); background: var(--brand-soft); }
.option-letter { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--gray-soft); display: grid; place-items: center; font-weight: 700; font-size: .84rem; color: var(--muted); }
.option.selected .option-letter { background: var(--brand); color: #fff; }
[data-theme="dark"] .option.selected .option-letter { color: #0b0c26; }
.option-text { font-weight: 500; }
.question-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); }
.question-actions .spacer { flex: 1; }
.kbd-hint { margin-top: 14px; font-size: .78rem; color: var(--muted); }
kbd { font-family: inherit; font-size: .74rem; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }
.palette { position: sticky; top: 96px; }
.palette-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.p-btn { aspect-ratio: 1; max-height: 46px; border-radius: 10px; background: var(--gray-soft); color: var(--muted); font-weight: 700; font-size: .84rem; border: 2px solid transparent; position: relative; }
.p-btn.answered { background: var(--brand); color: #fff; }
[data-theme="dark"] .p-btn.answered { color: #0b0c26; }
.p-btn.review { background: var(--orange-soft); color: var(--orange); }
.p-btn.answered.review { background: var(--brand); color: #fff; }
[data-theme="dark"] .p-btn.answered.review { color: #0b0c26; }
.p-btn.answered.review::after { content: ""; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.p-btn.current { border-color: var(--ink); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: .78rem; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--gray-soft); }
.legend i.answered { background: var(--brand); }
.legend i.review { background: var(--orange); }
.legend i.current { background: transparent; border: 2px solid var(--ink); }
.palette-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; text-align: center; }
.palette-stats div { padding: 10px 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.palette-stats strong { display: block; font-family: var(--font-head); font-size: 1.15rem; }
.palette-stats small { font-size: .72rem; color: var(--muted); }
.save-state { font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 10px; justify-content: center; }
.instructions-list { padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: .9rem; }

/* =========================================================
   Result page  [Devang Kumar]
   ========================================================= */
.score-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 30px; border-radius: 20px; background: var(--navy); color: #fff; }
.score-hero h2 { color: #fff; font-size: 1.4rem; margin: 8px 0 4px; }
.score-hero p { color: #bcc9e4; font-size: .9rem; }
.ring { --value: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#7fe0b3 calc(var(--value) * 1%), rgba(255,255,255,.12) 0); position: relative; }
.ring.fail { background: conic-gradient(#ff9aa4 calc(var(--value) * 1%), rgba(255,255,255,.12) 0); }
.ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--navy); }
.ring div { position: relative; text-align: center; }
.ring strong { display: block; font-family: var(--font-head); font-size: 1.8rem; line-height: 1; }
.ring small { color: #bcc9e4; font-size: .74rem; }
.score-total { text-align: right; }
.score-total strong { display: block; font-family: var(--font-head); font-size: 2.2rem; line-height: 1; }
.score-total span { color: #bcc9e4; font-size: .84rem; }
.chart { display: grid; gap: 16px; }
.chart-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 44px; gap: 12px; align-items: center; font-size: .86rem; }
.chart-track { height: 14px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; }
.chart-fill { height: 100%; border-radius: 99px; transform-origin: left; animation: grow .7s ease-out both; }
.chart-fill.correct { background: var(--green); }
.chart-fill.wrong { background: var(--red); }
.chart-fill.skipped { background: var(--muted-2); }
.chart-fill.brand { background: var(--accent); }
.chart-row strong { text-align: right; }
@keyframes grow { from { transform: scaleX(0); } }
.review-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.review-row:last-child { border-bottom: 0; }
.review-num { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: .84rem; background: var(--gray-soft); color: var(--muted); }
.review-row.correct .review-num { background: var(--green-soft); color: var(--green); }
.review-row.wrong .review-num { background: var(--red-soft); color: var(--red); }
.review-row strong { display: block; margin-bottom: 8px; }
.review-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.review-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: .84rem; border: 1px solid var(--border); color: var(--ink-2); }
.review-opt.is-correct { border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-soft); color: var(--green); font-weight: 600; }
.review-opt.is-wrong { border-color: color-mix(in srgb, var(--red) 45%, transparent); background: var(--red-soft); color: var(--red); font-weight: 600; }
.review-marks { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.review-row.correct .review-marks { color: var(--green); }
.review-row.wrong .review-marks { color: var(--red); }
.review-row.skipped .review-marks { color: var(--muted); }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border-strong); font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-theme="dark"] .chip.active { color: #0b0c26; }

/* =========================================================
   Examiner: questions & bars  [Chaitanya Pandey]
   ========================================================= */
.question-list { display: grid; gap: 10px; }
.q-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.q-item .review-num { width: 34px; height: 34px; }
.q-item p { font-weight: 600; margin-bottom: 8px; }
.q-item ol { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; font-size: .84rem; color: var(--muted); }
.q-item li.correct { color: var(--green); font-weight: 600; }
.q-item .actions { display: flex; gap: 6px; align-items: flex-start; }
.option-inputs { display: grid; gap: 10px; }
.option-input { display: grid; grid-template-columns: auto 30px minmax(0, 1fr); align-items: center; gap: 10px; }
.option-input b { width: 30px; height: 30px; border-radius: 8px; background: var(--gray-soft); display: grid; place-items: center; font-size: .82rem; color: var(--muted); }
.option-input:has(input[type=radio]:checked) b { background: var(--green); color: #fff; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.detail-grid div { padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.detail-grid small { display: block; color: var(--muted); font-size: .74rem; }
.detail-grid strong { font-family: var(--font-head); font-size: 1.1rem; }
.activity-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .86rem; }
.activity-item:last-child { border-bottom: 0; }
.activity-item > .bi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gray-soft); color: var(--muted); }
.activity-item small { display: block; color: var(--muted); font-size: .76rem; }
.summary-list { display: grid; gap: 12px; }
.summary-list div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.summary-list span { color: var(--muted); font-size: .86rem; }
.summary-list strong { font-family: var(--font-head); font-size: 1.15rem; }
.profile-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.danger-zone { border-color: color-mix(in srgb, var(--red) 35%, var(--border)); }
.danger-zone h2 { color: var(--red); }

/* =========================================================
   Written answers & proctoring (exam page)  [Devang Kumar]
   ========================================================= */
.qtype { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--brand-soft); color: var(--brand-ink); }
.qtype.text { background: var(--orange-soft); color: var(--orange); }
.answer-box { width: 100%; min-height: 200px !important; font-size: .98rem; line-height: 1.6; }
.answer-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.proctor-strip { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); margin-top: 12px; justify-content: center; }
.proctor-strip .bi { color: var(--green); }
.proctor-strip.warn .bi { color: var(--red); }
.written-answer { margin-top: 8px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem; white-space: pre-wrap; color: var(--ink-2); }
.model-answer { margin-top: 8px; padding: 10px 14px; border-radius: 10px; background: var(--green-soft); color: var(--green); font-size: .86rem; white-space: pre-wrap; }
.feedback-note { margin-top: 8px; font-size: .84rem; color: var(--brand-ink); }

/* =========================================================
   Examiner grading  [Chaitanya Pandey]
   ========================================================= */
.grade-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--surface); display: grid; gap: 10px; }
.grade-card + .grade-card { margin-top: 12px; }
.grade-inputs { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; align-items: end; }
.marks-input { display: flex; align-items: center; gap: 8px; }
.marks-input input { max-width: 90px; text-align: center; font-weight: 700; }
.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; background: var(--gray-soft); border-radius: 12px; }
.seg label { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: .86rem; color: var(--muted); cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-sm); }

/* =========================================================
   Invigilator live monitor  [Dev Sharma]
   ========================================================= */
.monitor-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 600; color: var(--green); }
.live-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
.monitor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.monitor-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: grid; gap: 12px; }
.monitor-card.alert { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 10%, transparent); }
.monitor-card.done { opacity: .75; }
.monitor-head { display: flex; align-items: center; gap: 10px; }
.monitor-head div { min-width: 0; flex: 1; }
.monitor-head strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-head small { color: var(--muted); font-size: .78rem; }
.mini-progress { height: 8px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; }
.mini-progress span { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s; }
.monitor-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.monitor-stats div { background: var(--surface-2); border-radius: 10px; padding: 7px 4px; }
.monitor-stats strong { display: block; font-family: var(--font-head); font-size: 1rem; }
.monitor-stats small { font-size: .7rem; color: var(--muted); }
.monitor-stats .bad strong { color: var(--red); }
.monitor-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.monitor-actions .btn { flex: 1; }
.feed-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .86rem; }
.feed-item:last-child { border-bottom: 0; }
.feed-item > .bi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.feed-item small { color: var(--muted); display: block; font-size: .76rem; }

/* Role badges (admin staff table) [Dev Singh Chauhan] */
.badge-admin { background: #f1e8ff; color: #7a3fd1; }
.badge-examiner { background: var(--brand-soft); color: var(--brand-ink); }
.badge-invigilator { background: var(--blue-soft); color: var(--blue); }
.badge-student { background: var(--gray-soft); color: var(--muted); }
[data-theme="dark"] .badge-admin { background: #2d1f52; color: #cbb0ff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: .74rem; padding: 2px 9px; border-radius: 99px; background: var(--gray-soft); color: var(--ink-2); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* =========================================================
   Responsive  [everyone - add rules under your own section]
   ========================================================= */
@media (max-width: 1100px) {
  .app-header-inner { gap: 16px; }
  .app-nav a { padding: 0 10px; }
  .user-meta { display: none; }
  .user-btn > .bi { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .app-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h); height: auto;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 16px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    display: none;
  }
  .app-nav.open { display: flex; animation: pop .15s ease-out; }
  .app-nav a { height: 46px; padding: 0 14px; }
  .header-actions { margin-left: auto; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-2.even { grid-template-columns: minmax(0, 1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-card .brand { display: inline-flex; }
  .hero { grid-template-columns: 1fr; padding-top: 30px; gap: 40px; }
  .mock { transform: none; max-width: 560px; }
  .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform, .band-inner { grid-template-columns: 1fr; }
  .site-footer-inner { grid-template-columns: 1fr 1fr; }
  .float-card.one { left: 10px; }
  .float-card.two { right: 10px; }
  .exam-layout { grid-template-columns: 1fr; }
  .palette { position: static; }
  .palette-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .score-hero { grid-template-columns: auto minmax(0, 1fr); }
  .score-total { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  /* Tables turn into stacked cards */
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { border: 1px solid var(--border); border-radius: 12px; padding: 6px 12px; margin-bottom: 10px; background: var(--surface); }
  .table-stack tbody tr:hover td { background: transparent; }
  .table-stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); text-align: right; }
  .table-stack td:last-child { border-bottom: 0; }
  .table-stack td::before { content: attr(data-label); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; flex: none; }
  .table-stack td[data-label=""]::before { display: none; }
  .table-stack td.cell-main { display: block; text-align: left; }
  .table-stack td.cell-main::before { display: none; }
  .table-stack .actions { justify-content: flex-end; width: 100%; }
  .table-stack .table-empty td { display: block; text-align: center; }
  .table-stack .table-empty td::before { display: none; }
  .table-wrap { overflow: visible; margin: 0; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .exam-card { grid-template-columns: 50px minmax(0, 1fr); padding: 16px; }
  .exam-code { width: 50px; height: 50px; font-size: .74rem; }
  .exam-card > .btn, .exam-card > .card-actions { grid-column: 1 / -1; width: 100%; }
  .steps, .role-grid { grid-template-columns: 1fr; }
  .grade-inputs, .check-grid { grid-template-columns: 1fr; }
  .cta { padding: 30px 24px; }
  .palette-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .review-options, .q-item ol { grid-template-columns: 1fr; }
  .toolbar .search { max-width: none; }
  .toolbar select { flex: 1 1 140px; }
  .modal-body { padding: 18px; }
  .modal-head, .modal-foot { padding: 14px 18px; }
}

@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .container, .app-header-inner { width: calc(100% - 28px); }
  .page { padding: 24px 0 40px; }
  .card { padding: 16px; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .stat-icon { width: 38px; height: 38px; font-size: 1.05rem; }
  .stat-card > div > strong { font-size: 1.35rem; }
  .brand-name { display: none; }
  .landing-nav .brand-name { display: inline; }
  .landing-nav nav a:not(.btn) { display: none; }
  .band-stats { grid-template-columns: 1fr 1fr; }
  .site-footer-inner { grid-template-columns: 1fr; }
  .float-card { display: none; }
  .hero { padding: 40px 0 50px; }
  .seg { grid-auto-flow: row; width: 100%; }
  .exam-bar-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; width: calc(100% - 24px); }
  .exam-bar .brand { display: none; }
  .exam-heading { text-align: left; }
  .exam-layout { width: calc(100% - 24px); margin-top: 16px; }
  .question-actions .btn { flex: 1 1 calc(50% - 10px); }
  .question-actions .spacer { display: none; }
  .palette-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kbd-hint { display: none; }
  .score-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 24px 18px; }
  .score-total { justify-content: center; }
  .chart-row { grid-template-columns: 84px minmax(0, 1fr) 34px; gap: 8px; }
  .review-row { grid-template-columns: 30px minmax(0, 1fr); }
  .review-num { width: 30px; height: 30px; }
  .review-marks { grid-column: 2; }
  .q-item { grid-template-columns: 1fr; }
  .q-item .review-num { display: none; }
  dialog.modal, dialog.modal.modal-lg { width: 100%; max-width: 100%; max-height: 100dvh; border-radius: 18px 18px 0 0; margin: auto 0 0; }
  dialog.modal.modal-sm { width: calc(100% - 24px); border-radius: 18px; margin: auto; }
  .modal-foot .btn { flex: 1; }
  .toast-region { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .palette-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .header-actions { gap: 4px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .option { padding: 12px; gap: 10px; }
}

@media print {
  .app-header, .app-footer, .no-print, .toast-region { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
