:root {
  --ink: #020e2b;
  --navy: #03243a;
  --navy-strong: #020e2b;
  --blue: #0a63e6;
  --blue-deep: #0646b3;
  --cyan: #2cb8f2;
  --cyan-soft: #bfe7fb;
  --bg: #eef3fa;
  --panel: #ffffff;
  --panel-soft: #f4f8fd;
  --text: #16243a;
  --muted: #5a6b82;
  --border: rgba(3, 36, 58, 0.12);
  --warn: #f38b23;
  --success: #1d9d66;
  --shadow: 0 28px 70px rgba(2, 14, 43, 0.22);
  --grid-line: rgba(44, 184, 242, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Montserrat', 'Inter', sans-serif;
  background:
    linear-gradient(rgba(44, 184, 242, 0.12) 1px, transparent 1px) 0 0 / 100% 96px,
    linear-gradient(90deg, rgba(44, 184, 242, 0.12) 1px, transparent 1px) 0 0 / 96px 100%,
    linear-gradient(160deg, #0a63e6 0%, #0646b3 45%, #020e2b 100%);
  background-attachment: fixed;
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  max-width: 1260px;
  margin: 32px auto;
  padding: 20px;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 26px;
  border-radius: 20px 20px 0 0;
  background: var(--ink);
  border-bottom: 3px solid var(--cyan);
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-logo {
  display: flex;
  align-items: center;
  width: 150px;
  min-width: 150px;
  height: 44px;
}

.brand-svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  padding-left: 18px;
  border-left: 2px solid var(--cyan);
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}

.eyebrow.accent,
.topbar .eyebrow {
  color: var(--cyan);
}

.brand-copy strong {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 600;
}

.status-badge {
  padding: 9px 16px;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  border: 1.5px solid var(--cyan);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  border-radius: 0 0 22px 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
}

/* ---------- Hero ---------- */
.hero-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  padding: 0;
  background: var(--ink);
  overflow: hidden;
}

.hero-photo {
  position: relative;
  height: 300px;
  background: var(--blue) url('assets/sab-students.jpg') center 22% / cover no-repeat;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 14, 43, 0) 45%, var(--ink) 100%),
    linear-gradient(135deg, rgba(10, 99, 230, 0.35), transparent 60%);
}

.hero-content,
.hero-stats {
  position: relative;
  z-index: 1;
  margin: 0 28px;
}

.hero-content {
  margin-top: -34px;
  margin-bottom: 28px;
}

.hero-logo {
  display: block;
  width: 210px;
  max-width: 70%;
  margin-bottom: 20px;
}

.hero-panel h1 {
  margin: 12px 0 14px;
  font-family: 'Anton', 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 3.4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.hero-panel h1 .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px #fff;
}

.lead {
  margin: 0;
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.7;
  max-width: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 26px;
  margin-bottom: 28px;
  border: 1.5px solid var(--grid-line);
}

.stat-card {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(160deg, rgba(10, 99, 230, 0.55), rgba(6, 70, 179, 0.25));
}

.stat-card + .stat-card {
  border-left: 1.5px solid var(--grid-line);
}

.stat-number {
  font-family: 'Anton', Impact, sans-serif;
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
  line-height: 1;
  color: #fff;
}

.stat-label {
  font-size: 0.7rem;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan-soft);
}

.hero-tagline {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 14px 28px;
  background: var(--blue-deep);
  border-top: 3px solid var(--cyan);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- Form panel ---------- */
.form-panel {
  padding: 36px 40px 30px;
  background: #fff;
}

.section-heading h2 {
  margin: 8px 0 22px;
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  color: var(--ink);
  line-height: 1.05;
}

.section-heading .eyebrow {
  color: var(--blue);
}

.progress-wrap {
  margin-bottom: 28px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(3, 36, 58, 0.09);
  overflow: hidden;
}

#progressFill {
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--cyan) 100%);
  transition: width 0.25s ease;
}

.form-step {
  display: none;
  gap: 20px;
}

.form-step.active {
  display: grid;
}

.form-step h3 {
  margin: 0 0 4px;
  padding-left: 12px;
  border-left: 4px solid var(--cyan);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
}

.field-row {
  display: grid;
  gap: 18px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field[hidden] {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--ink);
  font-weight: 600;
}

.field span {
  font-size: 0.94rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid rgba(3, 36, 58, 0.16);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field select {
  min-height: 52px;
}

.field select option {
  white-space: normal;
  padding: 10px 12px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 99, 230, 0.16);
}

.field textarea {
  resize: vertical;
  min-height: 125px;
}

.file-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 125px;
  border: 2px dashed rgba(10, 99, 230, 0.4);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.file-drop:hover,
.file-drop.dragover {
  border-color: var(--blue);
  background: rgba(44, 184, 242, 0.1);
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-drop-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.file-drop-copy strong {
  color: var(--blue-deep);
  font-size: 0.95rem;
}

.file-drop-copy span {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
}

.checkbox-list,
.radio-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

/* Short options (languages): smaller text, several per row. */
.checkbox-list.compact {
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 8px;
}

.checkbox-list.compact label {
  min-height: 0;
  padding: 9px 12px;
  gap: 10px;
  font-size: 0.85rem;
}

.checkbox-list.compact input {
  width: 16px;
  height: 16px;
}

@media (max-width: 520px) {
  .checkbox-list.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Video questions are long: one full-width option per row. */
#videoQuestionList {
  grid-template-columns: 1fr;
}

.checkbox-list label,
.radio-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1.5px solid rgba(3, 36, 58, 0.12);
  background: var(--panel-soft);
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.checkbox-list label:hover,
.radio-list label:hover,
.checkbox-list label:has(input:checked),
.radio-list label:has(input:checked) {
  border-color: var(--blue);
  background: rgba(10, 99, 230, 0.06);
}

.checkbox-list input,
.radio-list input {
  flex-shrink: 0;
  accent-color: var(--blue);
  width: 18px;
  height: 18px;
  margin: 0;
}

.checkbox-wrap {
  margin-top: 8px;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(44, 184, 242, 0.1);
  border: 1.5px solid rgba(44, 184, 242, 0.4);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  line-height: 1.6;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--blue);
}

.privacy-box,
.parent-box,
.country-box {
  border: 1.5px solid rgba(3, 36, 58, 0.12);
  border-left: 4px solid var(--blue);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 18px 20px;
}

.legal-copy {
  line-height: 1.7;
  color: var(--text);
}

.legal-copy strong {
  color: var(--ink);
}

.privacy-box h4 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.legal-copy a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.field-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.download-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 16px;
}

.download-list .btn {
  display: inline-flex;
  text-decoration: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  border: none;
  border-radius: 6px;
  padding: 14px 28px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
  box-shadow: 0 12px 22px rgba(10, 99, 230, 0.32);
}

.btn.secondary {
  background: transparent;
  border: 1.5px solid rgba(3, 36, 58, 0.25);
  color: var(--ink);
}

.hidden {
  display: none !important;
}

.confirmation-card,
.ineligible-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 34px 18px 18px;
  min-height: 320px;
  border-radius: 12px;
}

.confirmation-card {
  border: 1.5px solid rgba(44, 184, 242, 0.5);
  background: linear-gradient(180deg, rgba(44, 184, 242, 0.12), #fff);
}

.ineligible-card {
  border: 1.5px solid rgba(243, 139, 35, 0.3);
  background: linear-gradient(180deg, rgba(243, 139, 35, 0.08), #fff);
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 18px 32px rgba(10, 99, 230, 0.25);
}

.success-icon.warning {
  background: linear-gradient(135deg, #f38b23, #f1a64f);
  box-shadow: 0 18px 32px rgba(243, 139, 35, 0.2);
}

.confirmation-card h3,
.ineligible-card h3 {
  margin: 16px 0 10px;
  padding: 0;
  border: none;
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 2rem;
  color: var(--ink);
}

.confirmation-card p,
.ineligible-card p {
  max-width: 44ch;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    height: 240px;
  }

  .form-panel {
    padding: 26px 20px 22px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    padding: 14px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .brand-copy {
    display: none;
  }

  .hero-content,
  .hero-stats {
    margin-left: 18px;
    margin-right: 18px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .stat-card + .stat-card {
    border-left: none;
    border-top: 1.5px solid var(--grid-line);
  }

  .form-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .form-actions .btn {
    flex: 1 1 100%;
  }
}

.upload-status {
  margin: 18px 0 0;
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 0.9rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* Access-code page */
.access-page {
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.access-card {
  width: min(440px, 100%);
  background: var(--panel);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
  text-align: center;
}

.access-logo {
  width: 160px;
  max-width: 60%;
  margin-bottom: 12px;
}

.access-card h1 {
  margin: 6px 0 10px;
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  font-size: 2rem;
  color: var(--ink);
}

.access-intro {
  color: var(--muted);
  margin: 0 0 24px;
}

.access-intro.access-soon {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
}

.access-intro a {
  color: var(--blue-deep);
  font-weight: 600;
}

.access-form {
  display: grid;
  gap: 12px;
  text-align: left;
}

.admin-link {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-link a {
  color: var(--blue-deep);
  font-weight: 600;
}

.admin-link p {
  margin: 0 0 8px;
}

.admin-link .btn {
  margin-left: 8px;
  padding: 4px 10px;
  font-size: 0.8rem;
  vertical-align: middle;
}

.admin-qr {
  width: 128px;
  height: 128px;
  vertical-align: middle;
  background: #fff;
  border: 1px solid var(--line, #d9dee7);
  border-radius: 8px;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-image {
  flex: 1;
  min-height: 60px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line, #d9dee7);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.85rem;
  color: var(--muted);
}

.captcha-image svg {
  width: 100%;
  max-width: 180px;
  height: auto;
  display: block;
}

.captcha-refresh {
  flex: none;
  padding: 10px 14px;
  font-size: 1.2rem;
  line-height: 1;
}

.access-error {
  min-height: 1.2em;
  margin: 0;
  color: #c0392b;
  font-weight: 600;
  font-size: 0.88rem;
}

.session-timer {
  color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
}

.session-timer.urgent {
  color: var(--warn);
}

.time-notice {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-left: 4px solid var(--warn);
  border-radius: 6px;
  background: rgba(243, 139, 35, 0.1);
  color: var(--text);
  font-size: 0.88rem;
}

.time-notice p {
  margin: 6px 0 0;
}

.video-tips {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: rgba(10, 99, 230, 0.06);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.55;
}

.video-tips strong {
  color: var(--ink);
}

.video-tips ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.video-tips li + li {
  margin-top: 6px;
}

.video-tips b {
  color: var(--ink);
}

/* Admin page */
.admin-page {
  place-items: start center;
}

.admin-panel {
  width: min(1400px, 100%);
  background: var(--panel);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.admin-header h1 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 1.5rem;
}

.admin-header .eyebrow {
  color: var(--blue);
}

.admin-count,
.admin-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-note {
  margin-top: 14px;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 14px;
}

.admin-filters input,
.admin-filters select {
  flex: 1 1 200px;
  border: 1.5px solid rgba(3, 36, 58, 0.16);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  color: var(--text);
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.admin-table tbody tr:hover {
  background: rgba(10, 99, 230, 0.04);
}

.admin-table a,
.link-button {
  color: var(--blue);
  font-weight: 600;
}

.link-button {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: #c0392b;
  cursor: pointer;
}

.admin-empty {
  text-align: center;
  color: var(--muted);
  padding: 28px;
}

.admin-question {
  min-width: 320px;
  max-width: 420px;
}
