:root {
  color-scheme: light;

 
  --navy-900: #101a2d;
  --navy-700: #1769d2;
  --navy-600: #0b78f0;
  --navy-100: #e8f1ff;
  --gold-500: #d5a546;
  --gold-100: #fff5df;

 
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e1e1e5;
  --focus: #0071e3;
  --on-brand: #ffffff;
  --link: var(--navy-700);
  --mark: #ffe9a8;

 
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.75rem;
  --fs-2xl: clamp(1.6rem, 3vw, 2.3rem);
  --font: "IBM Plex Sans Arabic", "Tahoma", system-ui, sans-serif;

 
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

 
  --r-sm: 12px;
  --r-md: 22px;
  --shadow: 0 2px 10px rgba(0, 0, 0, .045);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .09);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111114;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --line: #38383a;
  --navy-100: #172a43;
  --gold-100: #3a2f14;
  --link: #2997ff;
  --focus: #2997ff;
  --mark: #6b5710;
  --shadow: none;
  --shadow-pop: 0 6px 20px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111114;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --line: #38383a;
    --navy-100: #172a43;
    --gold-100: #3a2f14;
    --link: #2997ff;
    --focus: #2997ff;
    --mark: #6b5710;
    --shadow: none;
    --shadow-pop: 0 6px 20px rgba(0, 0, 0, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--fs-md); line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
input:not([type="checkbox"]):not([type="file"]), select, textarea { box-shadow: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
mark { padding: 0 2px; border-radius: 3px; background: var(--mark); color: inherit; }
.skip-link {
  position: absolute; inset-inline-start: var(--s4); top: -60px; z-index: 50;
  padding: var(--s2) var(--s4); background: var(--gold-500); color: #1b1300; border-radius: var(--r-sm);
}
.skip-link:focus { top: var(--s3); }


.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-top: 4px solid var(--gold-500);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: var(--s3) var(--s5);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
}
.brand { display: flex; align-items: center; gap: var(--s3); color: inherit; text-decoration: none; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; flex: none; }
.brand-copy { display: grid; line-height: 1.35; }
.brand-copy strong { font-size: var(--fs-lg); font-weight: 700; color: var(--navy-700); }
.brand-copy small { font-size: var(--fs-sm); color: var(--muted); }
.topbar-meta { font-size: var(--fs-sm); color: var(--muted); display: flex; gap: var(--s2); align-items: center; }
.topbar-meta b { font-weight: 600; color: var(--ink); }
.meta-divider { width: 1px; height: 16px; background: var(--line); }
.live-dot { display: none; }

main { max-width: 1120px; margin: 0 auto; padding: 0 var(--s5); }


.intro {
  margin-top: var(--s5);
  padding: var(--s7) var(--s6) var(--s8);
  background: linear-gradient(125deg, #111b2c 0%, #132b4b 55%, #0b4c86 100%);
  color: var(--on-brand);
  border-radius: 28px;
  border-inline-start: 6px solid var(--gold-500);
}
.intro-copy { max-width: 640px; }
h1 { margin: 0; font-size: var(--fs-2xl); line-height: 1.5; font-weight: 700; }
.intro-description { margin: var(--s3) 0 0; color: #c8d6ea; font-size: var(--fs-md); line-height: 1.9; }
.eyebrow, .intro-year, .intro-rules { display: none; }

.search-panel {
  position: relative;
  margin: calc(var(--s7) * -1) var(--s5) 0;
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
}
.search-label { display: block; margin-bottom: var(--s3); font-size: var(--fs-md); font-weight: 600; }
.search-row { display: flex; gap: var(--s3); }
.query-box {
  flex: 1; min-width: 0; height: 56px;
  display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s4);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .15s;
}
.query-box:hover { border-color: var(--muted); }
.query-box:focus-within { border-color: var(--navy-600); box-shadow: none; }
.query-box svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.query-box input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; font-size: var(--fs-md); }
.query-box input::placeholder { color: var(--muted); }
.clear-query {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.clear-query:hover { background: var(--line); color: var(--ink); }
.submit-search {
  min-width: 140px; padding: 0 var(--s5);
  display: flex; align-items: center; justify-content: center; gap: var(--s2);
  border: 0; border-radius: var(--r-sm);
  background: var(--navy-700); color: var(--on-brand);
  font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.submit-search:hover { background: var(--navy-600); }
.submit-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: scaleX(-1); }
.search-foot { display: flex; justify-content: space-between; margin-top: var(--s3); color: var(--muted); font-size: var(--fs-sm); }
kbd { padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); font-size: var(--fs-xs); font-family: inherit; }


.workspace { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s6); margin-top: var(--s6); align-items: start; }
.sidebar {
  position: sticky; top: 100px;
  padding: var(--s5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s4); }
.sidebar-heading h2 { margin: 0; font-size: var(--fs-md); font-weight: 700; }
.count-pill { min-width: 28px; padding: 0 var(--s2); text-align: center; border-radius: var(--r-sm); background: var(--navy-100); color: var(--navy-700); font-size: var(--fs-sm); font-weight: 600; }
@media (prefers-color-scheme: dark) { .count-pill { color: #cfe0f8; } }
.select-label { display: block; margin-bottom: var(--s2); font-size: var(--fs-sm); color: var(--muted); }
.select-wrap { position: relative; }
.select-wrap select {
  width: 100%; height: 46px; appearance: none;
  padding: 0 var(--s3) 0 40px;
  border: 2px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); font-size: var(--fs-sm); cursor: pointer;
}
.select-wrap select:hover { border-color: var(--muted); }
.select-wrap svg { position: absolute; left: 14px; top: 16px; width: 16px; height: 16px; pointer-events: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-rule { height: 1px; margin: var(--s5) 0 var(--s4); background: var(--line); }
.stat-list { display: grid; gap: var(--s2); }
.stat-row { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: var(--s3); padding: var(--s2) 0; }
.stat-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--gold-100); color: #8a6212; }
@media (prefers-color-scheme: dark) { .stat-icon { color: #f0c66a; } }
.stat-pages { background: var(--navy-100); color: var(--navy-700); }
@media (prefers-color-scheme: dark) { .stat-pages { color: #cfe0f8; } }
.stat-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stat-label { color: var(--muted); font-size: var(--fs-sm); }
.stat-row strong { font-size: var(--fs-lg); font-weight: 700; }
.privacy-note { display: flex; gap: var(--s2); align-items: center; margin: var(--s4) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); }


.results-area { min-width: 0; }
.results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s4); padding-bottom: var(--s3); border-bottom: 2px solid var(--navy-700); }
.section-kicker { display: none; }
.results-heading h2 { margin: 0; font-size: var(--fs-xl); line-height: 1.4; font-weight: 700; }
.results-count { margin: 0; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.results-count:empty { display: none; }
.results-list { display: grid; gap: var(--s3); }

.document-row {
  width: 100%; padding: var(--s4) var(--s5);
  display: flex; align-items: center; gap: var(--s4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  text-align: start; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.document-row:hover { border-color: var(--navy-600); box-shadow: var(--shadow-pop); }
.document-glyph { width: 44px; height: 44px; display: grid; place-items: center; flex: none; border-radius: var(--r-sm); background: var(--navy-100); color: var(--navy-700); }
@media (prefers-color-scheme: dark) { .document-glyph { color: #cfe0f8; } }
.document-glyph svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.document-name { min-width: 0; display: grid; gap: 2px; }
.document-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-md); font-weight: 600; }
.document-name small { color: var(--muted); font-size: var(--fs-sm); }
.document-arrow { width: 24px; height: 24px; margin-inline-start: auto; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .15s, transform .15s; }
.document-row:hover .document-arrow { stroke: var(--navy-700); transform: translateX(-4px); }

.student-card {
  overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  border-inline-start: 4px solid var(--gold-500);
  box-shadow: var(--shadow);
}
.student-card-header { padding: var(--s3) var(--s5); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.student-card-header h3 { margin: 0; font-size: var(--fs-lg); font-weight: 700; line-height: 1.6; color: var(--navy-700); overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) { .student-card-header h3 { color: #cfe0f8; } }
.student-card-labels { min-width: 0; max-width: 48%; display: grid; justify-items: end; gap: 4px; }
.student-course { padding: 2px var(--s3); border-radius: var(--r-sm); background: var(--gold-100); color: #7a5410; font-size: var(--fs-xs); font-weight: 700; text-align: center; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) { .student-course { color: #f0c66a; } }
.student-fields { padding: var(--s2) var(--s5) var(--s3); display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s6); }
.student-field { min-height: 48px; display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: var(--s3); border-bottom: 1px solid var(--line); }
.student-field > span { color: var(--muted); font-size: var(--fs-sm); }
.student-field > strong { font-size: var(--fs-md); font-weight: 500; overflow-wrap: anywhere; unicode-bidi: isolate; }
.student-field .field-number { font-weight: 700; color: var(--navy-700); }
.student-field .national-id {
  width: fit-content; direction: ltr; unicode-bidi: isolate;
  padding: 2px var(--s3); border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--fs-sm); letter-spacing: .05em;
}
.student-card-footer { padding: var(--s2) var(--s5); display: flex; align-items: center; gap: var(--s3); background: var(--surface-2); color: var(--muted); font-size: var(--fs-xs); }
.method-tag { padding: 1px var(--s2); border-radius: var(--r-sm); background: var(--gold-100); color: #7a5410; font-weight: 600; }
@media (prefers-color-scheme: dark) { .method-tag { color: #f0c66a; } }

.pagination { display: flex; align-items: center; justify-content: center; gap: var(--s4); margin: var(--s6) 0 var(--s2); color: var(--muted); font-size: var(--fs-sm); }
.page-button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--navy-700); cursor: pointer; }
@media (prefers-color-scheme: dark) { .page-button { color: #cfe0f8; } }
.page-button:hover:not(:disabled) { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.page-button:disabled { opacity: .4; cursor: default; }
.page-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.empty-state { min-height: 240px; padding: var(--s6); display: grid; place-items: center; align-content: center; text-align: center; border: 2px dashed var(--line); border-radius: var(--r-md); }
.empty-symbol { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--s3); border-radius: 50%; background: var(--navy-100); color: var(--navy-700); font-size: var(--fs-xl); }
.empty-state h3 { margin: 0 0 var(--s1); font-size: var(--fs-lg); font-weight: 700; }
.empty-state p { max-width: 380px; margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.9; }

footer {
  max-width: 1120px; margin: var(--s7) auto 0; padding: var(--s5);
  display: flex; justify-content: space-between; gap: var(--s3);
  border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm);
}
footer i { display: none; }
.site-footer {
  max-width: 1120px;
  margin: 72px auto 24px;
  padding: 0;
  display: block;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.site-footer-inner { padding: clamp(22px, 4vw, 36px); }
.site-footer-top { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(0, 1.3fr); align-items: center; gap: 28px; }
.site-footer-heading p { margin: 0 0 5px; color: var(--link); font-size: var(--fs-xs); font-weight: 700; }
.site-footer-heading h2 { margin: 0; font-size: clamp(1.2rem, 2.4vw, 1.55rem); letter-spacing: -.025em; }
.site-footer-heading > span { display: block; margin-top: 5px; color: var(--muted); font-size: var(--fs-xs); }
.site-footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.site-footer-card {
  min-width: 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .18s, background .18s;
}
.site-footer-card:hover {
  border-color: color-mix(in srgb, var(--link) 42%, var(--line));
  background: color-mix(in srgb, var(--navy-100) 24%, var(--surface));
}
.site-footer-logo {
  display: grid;
  width: 58px;
  height: 58px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.site-footer-logo img { display: block; width: 48px; height: 48px; object-fit: contain; }
.site-footer-card-copy { display: grid; min-width: 0; gap: 2px; }
.site-footer-card-copy strong { overflow: hidden; font-size: var(--fs-sm); text-overflow: ellipsis; white-space: nowrap; }
.site-footer-card-copy small { color: var(--muted); font-size: var(--fs-xs); }
.site-footer-external {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  margin-inline-start: auto;
  place-items: center;
  border-radius: 10px;
  background: var(--navy-100);
  color: var(--link);
  font-size: 1rem;
}
.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-xs);
}
.site-footer-credit { color: var(--ink); font-weight: 500; }
.site-footer-copyright { flex: none; }

@media (max-width: 720px) {
  .site-footer { margin: 48px 12px 16px; border-radius: 21px; }
  .site-footer-inner { padding: 21px 17px 16px; }
  .site-footer-top { grid-template-columns: 1fr; gap: 16px; }
  .site-footer-links { grid-template-columns: 1fr; gap: 9px; }
  .site-footer-card { min-height: 78px; padding: 10px 12px; }
  .site-footer-logo { width: 52px; height: 52px; border-radius: 13px; }
  .site-footer-logo img { width: 42px; height: 42px; }
  .site-footer-bottom { align-items: flex-start; flex-direction: column; gap: 5px; margin-top: 17px; padding-top: 13px; line-height: 1.8; }
}


@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; gap: var(--s5); }
  .sidebar { position: static; }
  .stat-list { grid-template-columns: 1fr 1fr; }
  .site-footer { margin-inline: 16px; }
}
@media (max-width: 720px) {
  .topbar-inner { padding: var(--s2) var(--s4); }
  .brand-logo { width: 44px; height: 44px; }
  .brand-copy strong { font-size: var(--fs-md); }
  .brand-copy small { font-size: var(--fs-xs); }
  .topbar-meta { display: none; }
  main { padding: 0 var(--s3); }
  .intro { padding: var(--s6) var(--s4) var(--s7); }
  .search-panel { margin: calc(var(--s6) * -1) var(--s2) 0; padding: var(--s4); }
  .search-foot .key-hint { display: none; }
  .student-fields { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .search-row { gap: var(--s2); }
  .query-box { height: 52px; padding: 0 var(--s3); }
  .submit-search { min-width: 0; padding: 0 var(--s4); }
  .submit-search span { display: none; }
  .stat-list { grid-template-columns: 1fr; }
  .student-card-header { flex-wrap: wrap; padding-inline: var(--s4); }
  .student-fields { padding-inline: var(--s4); }
  .student-field { grid-template-columns: 88px minmax(0, 1fr); gap: var(--s2); }
  footer { flex-direction: column; padding-inline: var(--s4); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}


.query-box input { text-align: right; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.query-box input::placeholder { letter-spacing: 0; }


.topbar {
  border-top: 0;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.topbar-inner, main, footer { max-width: 1180px; }
.topbar-inner { min-height: 76px; }
.brand-logo { padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.brand-copy strong { color: var(--ink); letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 22px; }
.topbar-meta { color: var(--muted); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #30c46c; }
.admin-link {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--link);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: background .18s, border-color .18s;
}
.admin-link:hover { background: var(--navy-100); border-color: transparent; }
.intro {
  min-height: 280px;
  margin-top: 36px;
  padding: 56px 52px 100px;
  border: 0;
  border-radius: 30px;
  background: linear-gradient(115deg, #17314f 0%, #234b72 100%);
  box-shadow: 0 10px 28px rgba(12, 40, 75, .12);
}
.intro-copy { max-width: 720px; }
.intro h1 { font-size: clamp(2rem, 4.4vw, 3.35rem); letter-spacing: -.045em; }
.intro-description { max-width: 650px; color: rgba(255,255,255,.76); font-size: 1.08rem; }
.search-panel {
  margin: -58px 36px 0;
  padding: 28px 32px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 26px rgba(20, 34, 55, .09);
}
.search-label { margin-bottom: 12px; font-size: 1.05rem; }
.query-box { height: 62px; border-width: 1px; border-radius: 15px; }
.query-box:focus-within { border-color: #0071e3; box-shadow: none; }
.submit-search {
  min-width: 148px;
  border-radius: 15px;
  background: #0071e3;
  font-size: 1rem;
  transition: background .2s, transform .2s;
}
.submit-search:hover { background: #0077ed; transform: translateY(-1px); }
.workspace { gap: 30px; margin-top: 40px; }
.sidebar { top: 100px; border-radius: 22px; box-shadow: var(--shadow); }
.results-heading { border-bottom: 1px solid var(--line); }
.section-kicker { display: block; margin: 0 0 2px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; }
.results-heading h2 { letter-spacing: -.025em; }
.student-card, .document-row { border-radius: 20px; box-shadow: var(--shadow); }
.student-card { border-inline-start-width: 3px; }
.student-card-header { min-height: 66px; padding-block: 14px; background: transparent; }
.student-card-header h3 { color: var(--ink); }
.student-fields { padding-block: 8px 16px; }
.student-field .field-number { color: var(--link); }
.student-card-footer { min-height: 42px; }
.empty-state { border: 1px dashed var(--line); border-radius: 22px; background: color-mix(in srgb, var(--surface) 74%, transparent); }
footer { margin-top: 64px; }
.verification-content { padding: 26px; text-align: center; }
.verification-content > p { margin: 0 0 20px; color: var(--muted); }
.verification-form { max-width: 390px; margin: 0 auto; display: grid; gap: 12px; }
.national-id-input, #admin-password {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: .12em;
}
.verification-form .submit-search { min-height: 52px; }
.verify-error { margin-top: 12px; color: #d93025; font-size: var(--fs-sm); }
.submit-search:disabled, .admin-button:disabled { opacity: .65; cursor: wait; }


.admin-page {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #edf2f8;
  --ink: #182336;
  --muted: #66758a;
  --line: #e2e8f0;
  --navy-100: #e8f1ff;
  --link: #1769d2;
  --focus: #0878ed;
  --shadow: 0 8px 24px rgba(22, 42, 72, .06);
  --shadow-pop: 0 14px 40px rgba(22, 42, 72, .11);
  min-height: 100vh;
  background: var(--bg);
}
.admin-session-pending { overflow: hidden; }
.admin-session-pending > :not(#admin-session-gate) { visibility: hidden; }
.admin-session-gate {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(40, 75, 113, .56), transparent 48%),
    linear-gradient(145deg, #10243b, #183650 58%, #10243b);
  color: #182b40;
  opacity: 1;
  transition: opacity .22s ease, visibility .22s ease;
}
.admin-session-pending .admin-session-gate { display: grid; }
.admin-session-gate[hidden] { display: none; }
.admin-session-gate::before,
.admin-session-gate::after {
  position: absolute;
  width: min(78vw, 560px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.admin-session-gate::after { width: min(61vw, 440px); }
.admin-session-gate-content {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 520px);
  justify-items: center;
  padding: clamp(30px, 6vw, 52px) 24px 38px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(4, 18, 32, .26);
  text-align: center;
  animation: admin-gate-arrive .22s cubic-bezier(.2, .8, .2, 1) both;
}
.admin-session-gate-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 6vw, 42px);
}
.admin-session-gate-institution {
  display: grid;
  justify-items: center;
  gap: 11px;
  color: #263a50;
  font-size: .86rem;
  font-weight: 600;
}
.admin-session-gate-logo {
  display: grid;
  width: 98px;
  height: 98px;
  place-items: center;
  border: 1px solid #e6eaf0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(18, 40, 65, .08);
}
.admin-session-gate-logo img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.admin-session-gate-divider {
  width: 1px;
  height: 78px;
  background: linear-gradient(transparent, #d7dee8 20%, #d7dee8 80%, transparent);
}
.admin-session-gate-university {
  margin: 28px 0 7px;
  color: #9a712b;
  font-size: .88rem;
  font-weight: 600;
}
.admin-session-gate h1 {
  margin: 0;
  color: #172b40;
  font-size: clamp(1.3rem, 4vw, 1.65rem);
  font-weight: 700;
}
.admin-session-gate-caption {
  margin: 8px 0 0;
  color: #66758a;
  font-size: .9rem;
}
.admin-session-gate-progress {
  width: 130px;
  height: 3px;
  margin-top: 27px;
  overflow: hidden;
  border-radius: 2px;
  background: #e8edf3;
}
.admin-session-gate-progress::after {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: #b48a43;
  content: "";
  animation: admin-gate-progress 1.8s ease-in-out infinite;
}
.admin-session-gate-leaving { visibility: hidden; opacity: 0; }
@keyframes admin-gate-progress {
  0% { transform: translateX(260%); }
  100% { transform: translateX(-260%); }
}
@keyframes admin-gate-arrive {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.admin-page .topbar { background: color-mix(in srgb, var(--surface) 92%, transparent); }
.admin-page .brand-copy strong { color: var(--ink); }
.admin-page .admin-link { white-space: nowrap; color: var(--link); }
.admin-main { max-width: 1240px; padding-bottom: 64px; }
.admin-heading {
  margin: 28px 0 22px;
  padding: clamp(30px, 5vw, 48px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
  background: linear-gradient(112deg, #142942 0%, #21496f 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(16, 36, 67, .1);
}
.admin-heading .eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: #f1d18a;
  font-size: var(--fs-sm);
  font-weight: 700;
}
.admin-heading h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -.045em; }
.admin-heading > p:last-child { max-width: 660px; margin: 9px 0 0; color: #d6e2f2; font-size: 1rem; }

#admin-workspace { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; gap: 22px; }
.admin-welcome {
  grid-column: 1 / -1;
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 2px;
  padding: 24px 28px;
  border: 1px solid color-mix(in srgb, var(--link) 16%, var(--line));
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 92%, var(--navy-100));
  box-shadow: var(--shadow);
}
.admin-welcome-icon {
  display: grid;
  width: 54px;
  height: 54px;
  flex: none;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--link) 24%, var(--line));
  border-radius: 18px;
  background: var(--navy-100);
  color: var(--link);
  font-size: 1.6rem;
  font-weight: 700;
}
.admin-welcome-copy { min-width: 0; }
.admin-welcome-copy p { margin: 0 0 2px; color: var(--muted); font-size: var(--fs-sm); }
.admin-welcome-copy h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.75rem); line-height: 1.5; }
.admin-welcome-copy h2 span { color: var(--link); overflow-wrap: anywhere; }
.admin-welcome-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: var(--fs-xs); }
.admin-panel {
  min-width: 0;
  margin-bottom: 22px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.admin-page .admin-panel:not(.login-panel) { box-shadow: var(--shadow); }
.admin-page .panel-heading { min-height: 58px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.admin-page .admin-stats > div { transition: border-color .18s, transform .18s; }
.admin-page .admin-stats > div:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--link) 30%, var(--line)); }
.login-panel { width: min(100%, 980px); margin: 0 auto 30px; }
.login-panel-modern {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: 0;
  overflow: hidden;
  padding: 0;
}
.login-intro {
  display: flex;
  min-height: 500px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(28px, 5vw, 54px);
  background: linear-gradient(145deg, #142942 0%, #21496f 100%);
  color: #fff;
}
.login-intro-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 19px;
  background: rgba(255, 255, 255, .1);
  color: #f1d18a;
  font-size: 1.7rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}
.login-intro-mark img { display: block; width: 46px; height: 46px; object-fit: contain; border-radius: 12px; background: #fff; }
.login-intro-kicker { margin: 0 0 12px; color: #f1d18a; font-size: var(--fs-sm); font-weight: 700; }
.login-intro h2 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.35; letter-spacing: -.04em; }
.login-intro > p:not(.login-intro-kicker) { max-width: 360px; margin: 14px 0 0; color: #d6e2f2; line-height: 1.9; }
.login-feature-list { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; color: #e1ebf8; font-size: var(--fs-xs); }
.login-feature-list li { display: flex; align-items: center; gap: 9px; }
.login-feature-list li span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: rgba(48, 164, 108, .22); color: #8ce0b1; font-weight: 700; }
.login-form-side { display: grid; align-content: center; padding: clamp(28px, 5vw, 58px); }
.login-title { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.login-title h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.025em; }
.login-title-icon { display: grid; width: 48px; height: 48px; flex: none; place-items: center; border-radius: 16px; background: var(--navy-100); color: var(--link); font-size: 1.45rem; font-weight: 700; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.panel-heading h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.02em; }
.section-kicker { margin: 0 0 3px; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.secure-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; background: rgba(48, 164, 108, .12); color: #218352; font-weight: 700; }
.upload-icon, .drop-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: var(--navy-100);
  color: var(--link);
  font-size: 1.4rem;
  font-weight: 600;
}
.login-form { width: 100%; max-width: 540px; }
.login-form > label { display: block; margin: 17px 0 8px; font-size: var(--fs-sm); font-weight: 600; }
.login-form > .remember-session {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 19px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface) 78%, var(--navy-100));
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.remember-session:has(input:checked) {
  border-color: color-mix(in srgb, var(--link) 45%, var(--line));
  background: color-mix(in srgb, var(--navy-100) 72%, var(--surface));
}
.remember-session:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 16%, transparent); }
.remember-session input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.remember-session-check {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: transparent;
  font-size: .85rem;
  transition: background .18s, border-color .18s, color .18s;
}
.remember-session input:checked + .remember-session-check { border-color: var(--link); background: var(--link); color: #fff; }
.remember-session input:focus-visible + .remember-session-check { outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent); outline-offset: 2px; }
.remember-session-copy { display: grid; gap: 4px; }
.remember-session-copy strong { color: var(--ink); font-size: var(--fs-sm); }
.remember-session-copy small { color: var(--muted); font-size: var(--fs-xs); font-weight: 400; line-height: 1.7; }
.admin-input-row { display: flex; gap: 10px; align-items: stretch; }
.login-field {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: none;
  transition: border-color .18s;
}
.login-field:focus-within { border-color: var(--focus); box-shadow: none; }
.login-field > span { color: var(--muted); font-weight: 600; }
.login-field input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: start;
  letter-spacing: normal;
}
.login-field input::placeholder { color: #8a96a8; }
.login-field #admin-password { height: 52px; padding: 0; border: 0; border-radius: 0; background: transparent; text-align: start; font: inherit; letter-spacing: normal; }
.login-field button { flex: none; padding: 6px 3px; border: 0; background: transparent; color: var(--link); font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.login-submit { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 23px; padding-inline: 18px; }
.login-error { margin: 14px 0 0; padding: 12px 14px; border: 1px solid rgba(217, 48, 37, .18); border-radius: 12px; background: rgba(217, 48, 37, .07); line-height: 1.7; }
.admin-button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0878ed, #005ecb);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(0, 102, 214, .18);
  transition: filter .2s, transform .2s, box-shadow .2s;
}
.admin-button:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 10px 20px rgba(0, 102, 214, .23); }
.admin-hint { margin: 10px 0 0; color: var(--muted); font-size: var(--fs-xs); }
.admin-error { color: #d93025 !important; }
.drop-zone {
  min-height: 205px;
  padding: 30px 18px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 9px;
  border: 1.5px dashed color-mix(in srgb, var(--link) 38%, var(--line));
  border-radius: 22px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--navy-100) 42%, var(--surface)), var(--surface));
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.drop-zone:hover, .drop-zone-active { border-color: var(--link); background: var(--navy-100); transform: translateY(-1px); }
.drop-zone > span:not(.drop-icon) { color: var(--muted); font-size: var(--fs-sm); }
.drop-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.drop-zone input:focus-visible + .selected-file { outline: 3px solid var(--focus); outline-offset: 4px; }
.drop-icon { width: 52px; height: 52px; margin-bottom: 6px; border-radius: 18px; font-size: 1.8rem; }
.selected-file { max-width: 100%; overflow-wrap: anywhere; }
.upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.upload-actions .admin-hint { margin: 0; }
.admin-status { margin: 16px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); color: var(--ink); }
.admin-status-success { background: rgba(48,164,108,.12); color: #218352; }
.admin-status-warning { background: rgba(213,165,70,.16); color: #8a6212; }
.admin-status-error { border: 1px solid rgba(217,48,37,.16); background: rgba(217,48,37,.08); color: #c52f27; }
.upload-progress { margin-top: 18px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--navy-100) 35%, var(--surface)); }
.upload-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; color: var(--ink); font-size: var(--fs-sm); font-weight: 600; }
.upload-progress-percent { color: var(--link); font-variant-numeric: tabular-nums; }
.upload-progress-track { position: relative; height: 9px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--line) 75%, var(--surface)); }
.upload-progress-bar { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0878ed, #35a2f7); transition: width .18s ease-out; }
.upload-progress-bar.upload-progress-indeterminate { position: absolute; width: 36%; animation: upload-progress-slide 1.2s ease-in-out infinite; }
.upload-progress-error .upload-progress-bar { background: #d93025; }
@keyframes upload-progress-slide {
  from { transform: translateX(-110%); }
  to { transform: translateX(310%); }
}
.admin-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.admin-stats > div { display: grid; gap: 2px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 17px; background: color-mix(in srgb, var(--navy-100) 35%, var(--surface)); }
.admin-stats > .admin-stat-skeleton {
  min-height: 77px;
  background: linear-gradient(100deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 48%, var(--surface)) 45%, var(--surface-2) 65%);
  background-size: 220% 100%;
  animation: documents-shimmer 1.5s ease-in-out infinite;
}
.admin-stats strong { font-size: 1.45rem; letter-spacing: -.03em; }
.admin-stats span { color: var(--muted); font-size: var(--fs-sm); }
.admin-document-list { display: grid; gap: 10px; }
.documents-loading, .documents-load-error {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--navy-100) 24%, var(--surface));
  color: var(--muted);
  font-size: var(--fs-sm);
}
.documents-loading-spinner {
  width: 18px;
  height: 18px;
  flex: none;
  border: 2px solid color-mix(in srgb, var(--link) 20%, transparent);
  border-top-color: var(--link);
  border-radius: 50%;
  animation: documents-spin .8s linear infinite;
}
.document-skeleton {
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}
.document-skeleton i, .document-skeleton span, .document-skeleton b {
  display: block;
  border-radius: 8px;
  background: linear-gradient(100deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 48%, var(--surface)) 45%, var(--surface-2) 65%);
  background-size: 220% 100%;
  animation: documents-shimmer 1.5s ease-in-out infinite;
}
.document-skeleton i { width: 42px; height: 42px; border-radius: 13px; }
.document-skeleton span { width: min(70%, 250px); height: 13px; }
.document-skeleton b { width: 74px; height: 26px; border-radius: 999px; }
.documents-load-error { justify-content: space-between; color: var(--ink); }
@keyframes documents-spin { to { transform: rotate(360deg); } }
@keyframes documents-shimmer { to { background-position: -220% 0; } }
.admin-document {
  min-width: 0;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(22, 42, 72, .035);
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}
.admin-document:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--link) 32%, var(--line));
  background: color-mix(in srgb, var(--navy-100) 22%, var(--surface));
  box-shadow: var(--shadow);
}
.file-badge {
  display: grid;
  width: 50px;
  min-height: 50px;
  place-items: center;
  padding: 6px;
  border: 1px solid rgba(217, 71, 63, .12);
  border-radius: 15px;
  background: #fff0ef;
  color: #d9473f;
  font-size: 10px;
  font-weight: 700;
}
.file-badge-spreadsheet { border-color: rgba(34, 137, 78, .16); background: #e9f7ee; color: #218352; }
.file-badge-json { border-color: rgba(112, 64, 168, .18); background: #f1eaff; color: #7040a8; }
.admin-document-copy { min-width: 0; display: grid; gap: 3px; }
.admin-document-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-document-copy span, .source-state { color: var(--muted); font-size: var(--fs-xs); }
.admin-document-copy .admin-document-uploader { color: var(--link); }
.source-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 7%, var(--surface));
  white-space: nowrap;
}
.source-state::before { width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; content: ""; }
.source-available { color: #218352; }
.status-queued { color: #9a741f; }
.status-processing { color: var(--link); }
.status-processing::before { animation: processing-pulse 1.2s ease-in-out infinite; }
.status-ready { color: #218352; }
.status-failed { color: #d93025; }
@keyframes processing-pulse { 50% { opacity: .25; } }
.admin-document-message { grid-column: 2 / -1; color: var(--muted); font-size: var(--fs-xs); }
.admin-document-actions { grid-column: 2 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.download-document, .delete-document, .text-button { flex: none; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: #d93025; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.download-document { color: var(--link); }
.download-document:hover { background: color-mix(in srgb, var(--link) 9%, transparent); }
.retry-document { flex: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--link); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.delete-document:hover, .text-button:hover { background: rgba(217,48,37,.09); }
.download-document:disabled, .delete-document:disabled, .retry-document:disabled { opacity: .5; cursor: wait; }
.text-button { color: var(--link); }
.admin-empty { padding: 28px 0; color: var(--muted); text-align: center; }
.document-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.document-pagination-summary, .document-pagination-page { color: var(--muted); font-size: var(--fs-xs); }
.document-pagination-actions { display: flex; align-items: center; gap: 10px; }
.pagination-button {
  min-height: 38px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--link);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.pagination-button:hover:not(:disabled) { border-color: var(--link); background: var(--navy-100); }
.pagination-button:disabled { opacity: .45; cursor: not-allowed; }
.admin-page .site-footer { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .admin-session-gate-content, .admin-session-gate-progress::after {
    animation: none;
  }
  .admin-session-gate { transition: none; }
  .documents-loading-spinner, .document-skeleton i, .document-skeleton span, .document-skeleton b, .admin-stat-skeleton {
    animation: none;
  }
}

@media (max-width: 480px) {
  .admin-session-gate { padding: 16px; }
  .admin-session-gate-content { padding: 30px 18px 32px; border-radius: 22px; }
  .admin-session-gate-logos { gap: 16px; }
  .admin-session-gate-logo { width: 80px; height: 80px; border-radius: 19px; }
  .admin-session-gate-logo img { width: 60px; height: 60px; }
  .admin-session-gate-institution { max-width: 125px; font-size: .76rem; }
  .admin-session-gate-divider { height: 64px; }
}

@media (max-width: 720px) {
  .topbar-inner { min-height: 64px; }
  .topbar-actions { gap: 10px; }
  .topbar-meta { display: none; }
  .intro { min-height: 240px; margin-top: 20px; padding: 36px 24px 86px; border-radius: 24px; }
  .search-panel { margin: -48px 10px 0; padding: 20px 16px; border-radius: 20px; }
  .workspace { margin-top: 30px; }
  .admin-heading { margin-top: 20px; padding: 34px 24px; border-radius: 24px; }
  .admin-heading h1 { font-size: clamp(2rem, 8vw, 2.7rem); }
  .admin-heading > p:last-child { font-size: .98rem; }
  .admin-panel { padding: 22px 18px; border-radius: 20px; }
  .login-panel { width: 100%; }
  .login-panel-modern { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .login-intro { min-height: 0; padding: 27px 24px; }
  .login-intro-mark { width: 50px; height: 50px; margin-bottom: 19px; border-radius: 15px; }
  .login-intro-mark img { width: 40px; height: 40px; }
  .login-intro h2 { font-size: 1.8rem; }
  .login-feature-list { gap: 9px; margin-top: 19px; }
  .login-form-side { padding: 28px 24px; }
  .panel-heading h2 { font-size: 1.2rem; }
  .admin-page .topbar-inner { gap: 8px; padding-inline: 12px; }
  .admin-page .brand { min-width: 0; gap: 8px; }
  .admin-page .brand-logo { width: 42px; height: 42px; }
  .admin-page .brand-copy { white-space: nowrap; }
  .admin-page .brand-copy strong { font-size: .98rem; }
  .admin-page .brand-copy small { font-size: .68rem; }
  .admin-page .admin-link { padding: 7px 10px; font-size: .76rem; }
  #admin-workspace { grid-template-columns: 1fr; gap: 0; }
  .admin-document { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; padding: 14px; }
  .file-badge { width: 42px; min-height: 42px; border-radius: 13px; }
  .source-state, .admin-document-message, .admin-document-actions { grid-column: 2; }
  .admin-document-actions { justify-content: flex-start; }
  .download-document, .delete-document, .retry-document { padding-inline: 8px; }
  .upload-actions { align-items: stretch; flex-direction: column; }
  .upload-actions .admin-button { width: 100%; }
  .document-pagination { align-items: flex-start; flex-direction: column; }
  .document-skeleton { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
  .document-skeleton i { width: 38px; height: 38px; }
  .document-skeleton b { display: none; }
  .documents-load-error { align-items: flex-start; flex-direction: column; }
}

.file-type-label {
  display: block;
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.file-type-select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.file-type-label { margin-top: 0; }
.file-type-select { margin-bottom: 16px; }

.theme-toggle {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background .18s, transform .18s;
}
.theme-toggle:hover { background: var(--surface-2); transform: rotate(-12deg); }
.admin-header-actions { display: flex; align-items: center; gap: 10px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .admin-page {
    color-scheme: dark;
    --bg: #111114;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --line: #38383a;
    --navy-100: #172a43;
    --link: #2997ff;
    --focus: #2997ff;
    --shadow: none;
    --shadow-pop: 0 6px 20px rgba(0, 0, 0, .5);
    background: var(--bg);
  }
}
:root[data-theme="dark"] .admin-page {
  color-scheme: dark;
  --bg: #111114;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --line: #38383a;
  --navy-100: #172a43;
  --link: #2997ff;
  --focus: #2997ff;
  --shadow: none;
  --shadow-pop: 0 6px 20px rgba(0, 0, 0, .5);
  background: var(--bg);
}
:root[data-theme="dark"] .admin-page .topbar { background: rgba(28, 28, 30, .94); }
:root[data-theme="dark"] .admin-page .admin-panel { box-shadow: 0 10px 34px rgba(0, 0, 0, .2); }
:root[data-theme="dark"] .admin-page .admin-stats > div { background: color-mix(in srgb, var(--navy-100) 35%, var(--surface)); }
:root[data-theme="dark"] .admin-page .file-badge { background: #3a2524; color: #ff9189; }
:root[data-theme="dark"] .admin-page .file-badge-spreadsheet { border-color: rgba(140, 224, 177, .2); background: #183b2b; color: #8ce0b1; }
:root[data-theme="dark"] .admin-page .file-badge-json { border-color: rgba(205, 168, 255, .24); background: #302344; color: #d0adff; }
:root[data-theme="dark"] .admin-page .admin-error { color: #ff8c83 !important; }
:root[data-theme="dark"] .admin-page .admin-status-error { color: #ff8c83; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .admin-page .file-badge-spreadsheet { border-color: rgba(140, 224, 177, .2); background: #183b2b; color: #8ce0b1; }
  :root:not([data-theme="light"]) .admin-page .file-badge-json { border-color: rgba(205, 168, 255, .24); background: #302344; color: #d0adff; }
}

@media (max-width: 480px) {
  .brand-copy small { max-width: 190px; }
  .admin-page .admin-link { padding: 7px 9px; font-size: .7rem; }
  .query-box { height: 54px; }
  .submit-search { min-width: 56px; }
  .submit-search span { display: inline; }
  .admin-input-row { flex-direction: column; }
  .admin-input-row .admin-button { width: 100%; }
  .admin-stats { gap: 7px; }
  .admin-stats > div { padding: 12px 8px; text-align: center; }
  .admin-heading { padding: 25px 18px; }
  .admin-heading .eyebrow { font-size: .75rem; }
  .login-form-side { padding: 24px 18px; }
}

@media (max-width: 720px) {
  .admin-header-actions { gap: 7px; }
  .theme-toggle { width: 38px; height: 38px; }
}

@media (max-width: 720px) {
  .topbar-inner { min-height: 64px; gap: 10px; padding-inline: 14px; }
  .brand { min-width: 0; gap: 9px; }
  .brand-logo { width: 42px; height: 42px; }
  .brand-copy { min-width: 0; }
  .brand-copy small { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions, .admin-header-actions { flex: none; gap: 8px; }
  .admin-page .admin-link { padding: 7px 10px; font-size: .76rem; }
  main { padding-inline: 14px; }
  .intro { min-height: 0; margin-top: 18px; padding: 30px 21px 78px; border-radius: 22px; }
  .intro h1 { font-size: clamp(1.65rem, 7vw, 2.3rem); }
  .intro-description { font-size: .96rem; line-height: 1.8; }
  .search-panel { margin: -54px 7px 0; padding: 17px 15px; border-radius: 19px; }
  .search-label { font-size: .96rem; }
  .search-row { gap: 8px; }
  .query-box { min-width: 0; height: 52px; padding-inline: 11px; gap: 8px; }
  .query-box input { min-width: 0; font-size: .9rem; }
  .submit-search { min-width: 52px; padding-inline: 13px; }
  .search-foot { gap: 8px; font-size: .78rem; }
  .search-foot .key-hint { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 19px; margin-top: 25px; }
  .sidebar { position: static; padding: 19px; border-radius: 19px; }
  .stat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
  .stat-row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; }
  .stat-row strong { font-size: 1.05rem; }
  .results-heading { align-items: center; gap: 9px; }
  .results-heading h2 { font-size: 1.35rem; }
  .results-count { white-space: normal; text-align: end; font-size: .78rem; }
  .student-card-header { align-items: flex-start; }
  .student-card-header h3 { min-width: 0; font-size: 1rem; }
  .student-field { min-height: 46px; }
  .admin-main { padding-inline: 14px; }
  .admin-heading { margin: 18px 0 20px; padding: 30px 22px; border-radius: 22px; }
  .admin-heading h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  #admin-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .admin-welcome { gap: 13px; padding: 18px; border-radius: 19px; }
  .admin-welcome-icon { width: 46px; height: 46px; border-radius: 15px; }
  .admin-panel { padding: 20px 17px; border-radius: 19px; }
  .login-panel-modern { padding: 0; }
  .login-intro { padding: 25px 22px; }
  .login-form-side { padding: 25px 21px; }
  .admin-document { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 9px; padding: 13px; }
  .admin-document-copy { min-width: 0; }
  .source-state, .admin-document-message, .admin-document-actions { grid-column: 2; white-space: normal; }
  .download-document, .delete-document, .retry-document { padding: 8px 10px; }
  .document-pagination-actions { width: 100%; justify-content: space-between; }
}

@media (max-width: 480px) {
  .topbar-inner { padding-inline: 10px; }
  .brand { gap: 7px; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-copy strong { font-size: .9rem; }
  .brand-copy small { max-width: 38vw; font-size: .65rem; }
  .topbar-actions, .admin-header-actions { gap: 6px; }
  .theme-toggle { width: 36px; height: 36px; }
  .admin-page .admin-link { padding: 6px 8px; font-size: .68rem; }
  main, .admin-main { padding-inline: 11px; }
  .intro { padding: 26px 17px 72px; }
  .intro h1 { font-size: clamp(1.55rem, 7.5vw, 2rem); }
  .search-panel { margin-inline: 3px; padding: 15px 12px; }
  .query-box { padding-inline: 9px; }
  .query-box input { font-size: .84rem; }
  .submit-search { min-width: 46px; padding-inline: 10px; }
  .search-foot { font-size: .72rem; }
  .sidebar { padding: 16px 14px; }
  .stat-list { column-gap: 8px; }
  .stat-icon { width: 28px; height: 28px; }
  .stat-label { font-size: .73rem; }
  .stat-row strong { font-size: .95rem; }
  .privacy-note { padding-top: 12px; }
  .results-heading h2 { font-size: 1.2rem; }
  .document-row { gap: 10px; padding: 13px; }
  .document-glyph { width: 38px; height: 38px; }
  .document-name strong { white-space: normal; overflow-wrap: anywhere; font-size: .92rem; }
  .document-name small { font-size: .76rem; }
  .student-card-header { padding-inline: 13px; }
  .student-fields { padding-inline: 13px; }
  .student-field { grid-template-columns: 78px minmax(0, 1fr); gap: 8px; }
  .student-field > span { font-size: .77rem; }
  .student-field > strong { font-size: .88rem; }
  footer { padding-inline: 12px; font-size: .78rem; }
  .admin-welcome { align-items: flex-start; padding: 15px; }
  .admin-welcome-copy small { line-height: 1.6; }
  .admin-heading { padding: 27px 18px; }
  .admin-panel { padding: 18px 14px; }
  .login-form-side { padding: 23px 17px; }
  .login-intro { padding: 23px 18px; }
  .login-form > .remember-session { padding: 12px; }
  .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-stats > div { min-width: 0; padding: 10px 5px; }
  .admin-stats strong { font-size: 1.1rem; }
  .admin-stats span { font-size: .72rem; }
  .upload-progress, .admin-status { overflow-wrap: anywhere; }
}
.admin-session-pending .admin-session-gate { display: grid; animation: gate-delay .35s steps(1) both; }
@keyframes gate-delay { from { opacity: 0; visibility: hidden; } to { opacity: 1; visibility: visible; } }