/* Student Data Verification — styles. Change the two brand colours below to match your college. */
:root {
  --brand: #0d5c3f;
  --brand-ink: #ffffff;
  --brand-soft: #e7f2ec;
  --accent: #c48a12;
  --ink: #17201b;
  --muted: #5c6b63;
  --line: #dbe3de;
  --bg: #f4f6f3;
  --card: #ffffff;
  --ok: #157347;
  --ok-soft: #e3f4ea;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --warn: #8a5a00;
  --warn-soft: #fff4dc;
  --info-soft: #eaf1fb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 20, .06), 0 4px 16px rgba(16, 24, 20, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
[hidden] { display: none !important; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 28px; padding-bottom: 40px; }

/* top bar */
.topbar { background: var(--brand); color: var(--brand-ink); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: none; }
.brand-logo { height: 44px; width: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { font-size: .82rem; opacity: .85; }
.theme-bare .brand, .theme-bare .brand-text { color: var(--ink); }
.whoami { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.whoami form { margin: 0; }
.adminnav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.adminnav a { color: rgba(255,255,255,.82); text-decoration: none; padding: 10px 14px; border-bottom: 3px solid transparent; white-space: nowrap; font-size: .93rem; }
.adminnav a:hover { color: #fff; }
.adminnav a.active { color: #fff; border-bottom-color: var(--accent); font-weight: 600; }
.pill { display: inline-block; min-width: 1.5em; padding: 0 .45em; border-radius: 99px; background: var(--accent); color: #fff; font-size: .78rem; font-weight: 700; text-align: center; }

/* hero */
.hero { padding: 8px 0 20px; max-width: 640px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .76rem; font-weight: 700; color: var(--accent); margin-bottom: .4em; }
.lead { font-size: 1.08rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.ok { color: var(--ok); } .bad { color: var(--bad); }
.mt { margin-top: 1.4em; }
.nowrap { white-space: nowrap; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px; align-items: start; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid2 > .card { margin-bottom: 0; }
@media (max-width: 820px) { .split, .grid2 { grid-template-columns: 1fr; } }

/* forms */
.field { margin: 0 0 18px; border: 0; padding: 0; }
label, legend { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=email], input[type=date], input[type=password], input[type=search], input[type=file], select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff; border: 1.5px solid #c3cec7; border-radius: 9px; padding: 11px 12px; min-height: 46px;
}
textarea { min-height: 90px; resize: vertical; font-family: var(--mono); font-size: .92rem; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 1px; border-color: var(--brand); }
.hint { font-size: .86rem; color: var(--muted); margin: 6px 0 0; }
.field-error { color: var(--bad); font-weight: 600; font-size: .9rem; margin: 8px 0 0; }
.radio, .check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.radio input, .check input { margin-top: .3em; }
.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .3em; text-align: center; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.seg { border: 0; padding: 0; margin: 0 0 18px; }
.seg legend { margin-bottom: 8px; }
.seg-opt { display: inline-flex; margin: 0 6px 6px 0; font-weight: 500; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { padding: 9px 14px; border: 1.5px solid #c3cec7; border-radius: 99px; background: #fff; }
.seg-opt input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.seg-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; padding: 10px 18px; min-height: 44px; border-radius: 9px; border: 1.5px solid #c3cec7; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-danger { background: #fff; border-color: #e3b4ae; color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.topbar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-sm { padding: 5px 11px; min-height: 34px; font-size: .88rem; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* notices */
.notice { border-radius: 10px; padding: 12px 16px; margin: 0 0 16px; border: 1px solid; }
.notice-error { background: var(--bad-soft); border-color: #f2c3bd; color: #7a1a12; }
.notice-success { background: var(--ok-soft); border-color: #b9e2c9; color: #0f5132; }
.notice-warning { background: var(--warn-soft); border-color: #f1d89b; color: #6b4600; }
.notice-info { background: var(--info-soft); border-color: #c8d9f0; color: #1d3f6e; }

/* steps aside */
.steps ol { list-style: none; counter-reset: s; padding: 0; margin: 0 0 16px; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 18px 52px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; }
.steps li strong { display: block; }
.steps li span { color: var(--muted); font-size: .94rem; }

/* review */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.page-head .lead { margin-bottom: 0; }
.head-action { flex: none; }
.list-card { padding: 0; overflow: hidden; }
.frow { border-bottom: 1px solid var(--line); padding: 14px 20px; transition: background .15s; }
.frow:last-child { border-bottom: 0; }
.frow.is-fixing { background: #fffaf0; box-shadow: inset 4px 0 0 var(--accent); }
.frow.has-error { background: var(--bad-soft); box-shadow: inset 4px 0 0 var(--bad); }
.fhead { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.fcol { display: flex; flex-direction: column; min-width: 0; }
.flabel { font-size: .82rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.fvalue { font-size: 1.08rem; font-weight: 600; overflow-wrap: anywhere; }
.empty { color: var(--muted); font-weight: 400; }
.fixtoggle { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: .92rem; margin: 0; padding: 8px 12px; border: 1.5px solid #c3cec7; border-radius: 99px; background: #fff; cursor: pointer; white-space: nowrap; flex: none; }
.fixtoggle input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.is-fixing .fixtoggle { border-color: var(--accent); background: #fff4dc; }
.locked { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.fedit { margin-top: 12px; max-width: 520px; }
.sublabel { font-size: .9rem; }
.other { margin-top: 10px; }
.submit-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.submit-card.has-error { border-color: var(--bad); }
.declare { display: flex; gap: 12px; font-weight: 500; align-items: flex-start; margin: 0; }
.declare input { width: 20px; height: 20px; margin-top: .2em; flex: none; accent-color: var(--brand); }
.change del { color: var(--bad); }
.change ins { color: var(--ok); text-decoration: none; font-weight: 600; }
@media (max-width: 600px) {
  .fhead { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-head { flex-direction: column; }
  .frow { padding: 14px 16px; }
}

/* done */
.done .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 2rem; display: grid; place-items: center; margin: 0 auto 12px; font-weight: 800; }
.receipt { display: inline-flex; flex-direction: column; gap: 2px; border: 2px dashed var(--brand); border-radius: 12px; padding: 14px 28px; margin: 6px 0 16px; background: var(--brand-soft); }
.receipt strong { font-family: var(--mono); font-size: 2rem; letter-spacing: .14em; color: var(--brand); }

/* auth pages */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-brand { margin-bottom: 18px; }
.auth-card { width: 100%; max-width: 420px; }

/* admin */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search input, .search select { width: auto; min-width: 180px; min-height: 42px; padding: 8px 10px; }
.tabs { display: flex; gap: 4px; background: #e6ebe7; padding: 4px; border-radius: 10px; }
.tabs a { padding: 7px 14px; border-radius: 7px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .93rem; }
.tabs a.active { background: #fff; box-shadow: var(--shadow); font-weight: 700; }
.bulkbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 16px; }
.bulkbar input[type=text] { flex: 1 1 220px; width: auto; min-height: 42px; padding: 8px 10px; }
.checkall { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfa; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num { text-align: right; font-weight: 700; }
.table .cb { width: 36px; }
.table .old { color: #8a2a20; }
.table .new { color: #0f5132; font-weight: 600; }
.table.kv th { width: 40%; text-transform: none; letter-spacing: 0; font-size: .9rem; background: transparent; }
.table tr.dim td { opacity: .5; }
.table tr.warnrow td { background: #fffaf0; }
.rowact { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.rowact input[type=text] { width: auto; flex: 1 1 160px; min-height: 34px; padding: 4px 8px; font-size: .9rem; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .76rem; font-weight: 700; background: #eef1ef; color: var(--muted); vertical-align: middle; }
.badge-ok, .badge-s-confirmed { background: var(--ok-soft); color: var(--ok); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-warn, .badge-pending, .badge-s-corrections_pending { background: var(--warn-soft); color: var(--warn); }
.badge-s-corrections_resolved { background: var(--info-soft); color: #1d3f6e; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.stat span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.stat strong { font-size: 1.7rem; line-height: 1.2; }
.stat em { font-style: normal; color: var(--muted); font-size: .85rem; }
.stat-link:hover { border-color: var(--brand); }
.stat-alert { border-color: var(--accent); background: #fffaf0; }
.stats-sm .stat strong { font-size: 1.35rem; }
.progress { height: 10px; background: #e3e9e5; border-radius: 99px; overflow: hidden; margin-bottom: 22px; }
.progress span { display: block; height: 100%; background: var(--brand); }
.activity { list-style: none; padding: 0; margin: 0; }
.activity li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.hist { border-bottom: 1px solid var(--line); padding: 10px 0; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 18px 0; }
.formrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 10px; }
.msglist { max-height: 340px; overflow: auto; font-size: .88rem; padding-left: 20px; }
.tight li { margin-bottom: 6px; }
.qr { margin: 12px 0; min-height: 10px; }
.qr img { width: 200px; height: 200px; image-rendering: pixelated; border: 8px solid #fff; }
.key { font-size: 1.05rem; letter-spacing: .06em; background: #f3f5f3; padding: 8px 12px; border-radius: 8px; display: inline-block; word-break: break-all; }
.footer { color: var(--muted); font-size: .88rem; padding-bottom: 32px; border-top: 1px solid var(--line); padding-top: 18px; }

/* progress widths (inline styles are blocked by the security policy) */
.w-0{width:0}.w-5{width:5%}.w-10{width:10%}.w-15{width:15%}.w-20{width:20%}.w-25{width:25%}.w-30{width:30%}.w-35{width:35%}.w-40{width:40%}.w-45{width:45%}.w-50{width:50%}.w-55{width:55%}.w-60{width:60%}.w-65{width:65%}.w-70{width:70%}.w-75{width:75%}.w-80{width:80%}.w-85{width:85%}.w-90{width:90%}.w-95{width:95%}.w-100{width:100%}

/* required / optional markers on the student form */
.opt, .req { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; }
.opt { background: #eef1ef; color: var(--muted); }
.req { background: var(--warn-soft); color: var(--warn); }
.needs { font-size: .88rem; font-weight: 700; color: var(--warn); background: var(--warn-soft); border: 1.5px solid #f1d89b; padding: 7px 12px; border-radius: 99px; white-space: nowrap; flex: none; }

/* Admin › Data fields */
.fieldlist { padding: 0; overflow: hidden; }
.fl-head, .fl-row { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(90px, 1fr)) minmax(70px, .7fr); gap: 10px; align-items: start; padding: 12px 16px; }
.fl-head { background: #fafbfa; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); }
.fl-row { border-bottom: 1px solid var(--line); }
.fl-row:last-child { border-bottom: 0; }
.fl-row.is-off { background: #f7f8f7; }
.fl-row.is-off .fl-main strong { color: var(--muted); text-decoration: line-through; }
.fl-main { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.fl-main > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.fl-move { display: flex; flex-direction: column; gap: 2px; }
.fl-move form, .fl-cell form { margin: 0; }
.fl-label { display: none; }
.btn-xs { padding: 0 7px; min-height: 22px; font-size: .7rem; border-radius: 6px; }
.btn-xs:disabled { opacity: .35; cursor: default; }
.switch { font: inherit; font-size: .85rem; font-weight: 700; min-width: 86px; padding: 6px 12px; border-radius: 99px; border: 1.5px solid; cursor: pointer; display: inline-block; text-align: center; }
.switch.on { background: var(--ok-soft); color: var(--ok); border-color: #b9e2c9; }
.switch.off { background: #fff; color: var(--muted); border-color: #c3cec7; }
.switch:hover:not(.locked) { border-color: var(--brand); }
.switch.locked { cursor: default; opacity: .75; }
.fl-edit details > summary { list-style: none; cursor: pointer; }
.fl-edit details > summary::-webkit-details-marker { display: none; }
.fl-edit details[open] { grid-column: 1 / -1; }
.fl-row:has(details[open]) { grid-template-columns: 1fr; }
.fl-row:has(details[open]) .fl-cell:not(.fl-edit) { display: none; }
.fl-form { margin-top: 12px; padding: 16px; background: #fafbfa; border: 1px solid var(--line); border-radius: 10px; max-width: 620px; }
.fl-form .check { margin-bottom: 8px; }
input[type=number] { width: 100%; font: inherit; border: 1.5px solid #c3cec7; border-radius: 9px; padding: 11px 12px; min-height: 46px; }
.addform textarea { font-family: var(--font); }
@media (max-width: 760px) {
  .fl-head { display: none; }
  .fl-row { grid-template-columns: 1fr 1fr 1fr; }
  .fl-main, .fl-edit { grid-column: 1 / -1; }
  .fl-label { display: block; font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
  .switch { min-width: 0; width: 100%; }
}

@media print { .topbar, .footer, form .btn, .head-action { display: none; } body { background: #fff; } .card { box-shadow: none; } }
