/* Quad A Exam Portal — front-end Academy panel at /exams/admin/.
   Ported from the original exams/admin.html inline stylesheet. Fidelity
   matters: this is a platform port, not a redesign. The only deliberate
   additions are 44px minimum tap targets and the mobile safeguards. */

@font-face { font-family: 'Zona Pro'; src: url('../fonts/ZonaPro-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/GothamMedium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/GothamBook.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fira Sans'; src: url('../fonts/FiraSans-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fira Sans'; src: url('../fonts/FiraSans-Light.otf') format('opentype'); font-weight: 300; font-display: swap; }

:root {
  --black: #050505; --panel: #0b0b0b; --line: rgba(255,255,255,0.10);
  --white: #ffffff; --mist: rgba(255,255,255,0.72); --dim: rgba(255,255,255,0.45);
  --orange: #ff8b00;
  --display: 'Zona Pro', 'Gotham', sans-serif;
  --ui: 'Gotham', 'Fira Sans', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body.qep-adminpanel {
  background: var(--black); color: var(--white);
  font-family: 'Fira Sans', sans-serif; font-weight: 400; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* the page never scrolls sideways — wide tables scroll inside their own box */
}
::selection { background: var(--orange); color: #000; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 80px; }

/* top bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 22px 0; border-bottom: 1px solid var(--line); margin-bottom: 44px;
}
.bar .right { display: flex; align-items: center; gap: 10px; }
.mark { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: 0.14em; color: inherit; text-decoration: none; }
.mark img { height: 64px; width: auto; display: block; }
.mark span { color: var(--orange); }
@media (max-width: 560px) { .mark img { height: 50px; } }
.home-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto;
  min-height: 44px;
  font-family: var(--ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange); text-decoration: none; border: 1px solid rgba(255,139,0,0.5);
  padding: 8px 14px; transition: background .2s, color .2s;
}
.home-btn svg { display: block; }
.home-btn:hover { background: var(--orange); color: #000; }
@media (max-width: 480px) { .home-btn span { display: none; } .home-btn { padding: 8px 12px; } }
.signout-form { margin: 0; }
.ghost-btn {
  min-height: 44px; background: none; border: 1px solid var(--line); color: var(--mist);
  font-family: var(--ui); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 14px; cursor: pointer; transition: border-color .2s, color .2s;
}
.ghost-btn:hover { border-color: var(--orange); color: var(--orange); }

.kicker { font-family: var(--ui); font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 4.5vw, 40px); margin-bottom: 10px; }
.lede { color: var(--mist); font-size: 14.5px; line-height: 1.7; max-width: 600px; }

/* password sign-in */
.login { max-width: 420px; margin: 6vh auto 0; }
.login-logo { display: block; margin: 0 auto 26px; height: 165px; width: auto; }
@media (max-width: 560px) { .login-logo { height: 120px; } }
.card { background: var(--panel); border: 1px solid var(--line); padding: 34px 30px; margin-top: 26px; }
label { display: block; font-family: var(--ui); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
input {
  width: 100%; min-height: 44px; background: #101010; border: 1px solid var(--line); color: #fff;
  font-family: inherit; font-size: 15px; padding: 13px 14px; outline: none; border-radius: 0;
}
input:focus { border-color: var(--orange); }
.btn {
  width: 100%; min-height: 48px; margin-top: 24px; background: var(--orange); border: none; color: #000;
  font-family: var(--ui); font-weight: 500; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 14px; cursor: pointer; transition: filter .2s;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { filter: grayscale(1) brightness(0.6); cursor: wait; }
.err { display: none; margin-top: 14px; font-size: 13px; color: #ff6a6a; line-height: 1.5; }
.err.is-shown { display: block; }
.hint { margin-top: 22px; font-size: 12px; color: var(--dim); line-height: 1.6; }
.hint a { color: var(--orange); text-decoration: underline; }

/* toolbar */
.tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 34px 0 8px; }
.tools button, .toollink {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  background: none; border: 1px solid var(--line); color: var(--mist);
  font-family: var(--ui); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 10px 16px; cursor: pointer; transition: border-color .2s, color .2s;
}
.tools button:hover, .toollink:hover { border-color: var(--orange); color: var(--orange); }
.tools button:disabled { opacity: .5; cursor: wait; }

/* cohort cards */
.cohorts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; margin-top: 26px; }
.co { background: var(--panel); border: 1px solid var(--line); padding: 26px 28px; overflow-x: auto; }
.co h3 { font-family: var(--ui); font-weight: 500; font-size: 16px; letter-spacing: 0.06em; margin-bottom: 4px; }
.co .sub { font-size: 12px; color: var(--dim); margin-bottom: 16px; line-height: 1.6; }
@media (max-width: 900px) { .cohorts { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { font-family: var(--ui); font-weight: 500; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--mist); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 4px; }
th:last-child, td:last-child { padding-right: 4px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap th:first-child, .tablewrap td:first-child { padding-left: 18px; }
.tablewrap th:last-child, .tablewrap td:last-child { padding-right: 18px; }
td .pct { color: var(--orange); }
.barline { height: 4px; background: rgba(255,255,255,0.08); margin-top: 4px; }
.barline i { display: block; height: 100%; background: var(--orange); }

/* week unlock toggles */
.unlocks { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px; }
.unlocks button {
  min-height: 44px; background: none; border: 1px solid var(--line); color: var(--dim);
  font-family: var(--ui); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 12px; cursor: pointer; transition: border-color .2s, color .2s;
}
.unlocks button.on { border-color: var(--orange); color: var(--orange); }
.unlocks button:disabled { opacity: .5; cursor: wait; }

/* retake requests */
.retakes { margin-top: 44px; }
.retakes h2 { font-family: var(--ui); font-weight: 500; font-size: 18px; letter-spacing: 0.05em; margin-bottom: 6px; }
.retakes .sub2 { font-size: 12.5px; color: var(--dim); margin-bottom: 16px; line-height: 1.6; }
.rt { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); padding: 14px 18px; margin-bottom: 10px; font-size: 13px; }
.rt .who { flex: 1; min-width: 200px; color: var(--mist); line-height: 1.6; }
.rt .who b { color: #fff; font-weight: 500; }
.rt button { min-height: 44px; font-family: var(--ui); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; padding: 9px 16px; cursor: pointer; background: none; }
.rt .grant { border: 1px solid rgba(255,139,0,0.6); color: var(--orange); }
.rt .grant:hover { background: var(--orange); color: #000; }
.rt .deny { border: 1px solid var(--line); color: var(--dim); }
.rt .deny:hover { border-color: #ff6a6a; color: #ff6a6a; }
.rt button:disabled { opacity: .5; cursor: wait; }

/* flat student x exam table */
.detail { margin-top: 44px; }
.detail h2 { font-family: var(--ui); font-weight: 500; font-size: 18px; letter-spacing: 0.05em; margin-bottom: 16px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); background: var(--panel); max-width: 100%; }
.tablewrap table { min-width: 1020px; }

@media (max-width: 560px) {
  .wrap { padding: 0 14px 60px; }
  .bar { flex-wrap: wrap; margin-bottom: 30px; }
  .cohorts { grid-template-columns: 1fr; }
  .co { padding: 22px 16px; }
  .card { padding: 28px 20px; }
  .rt { padding: 14px; }
  .rt button { flex: 1 1 auto; }
  .tools button, .toollink { flex: 1 1 auto; }
}
