/* Brand-matched styling for the gate pages (landing, register, login, admin).
   Mirrors the palette and typography of the preserved tool so the registration
   wrapper feels like one product with the scan itself. */

:root {
  --rip-green: #15707b;
  --rip-green-dark: #0c3d44;
  --rip-orange: #f7941d;
  --rip-red: #cb4638;
  --rip-blue: #235b86;
  --bg: #f4fafb;
  --panel: #ffffff;
  --ink: #10242a;
  --muted: #566a70;
  --line: #d7e6e8;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(21, 112, 123, 0.08);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(247, 148, 29, 0.10), transparent 60%),
    radial-gradient(1000px 500px at -10% 110%, rgba(35, 91, 134, 0.10), transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--rip-green); }
a:hover { color: var(--rip-green-dark); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--rip-green); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header / brand mark (matches the tool header) */
.gate-header {
  display: flex; align-items: center; gap: 1rem;
  max-width: 1200px; margin: 0 auto; padding: 1.6rem 1.5rem 0;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.brand-mark img { width: auto; height: auto; max-height: 60px; max-width: 200px; display: block; }
.brand-mark .brand-dot { color: var(--rip-orange); margin: 0 1px; }
.brand-copy h1 { margin: 0; font-size: 1.35rem; color: var(--rip-green-dark); }
.brand-copy .eyebrow {
  margin: 0 0 .15rem; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .14em; color: var(--rip-green); font-weight: 700;
}

/* Layout */
.wrap { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.narrow { max-width: 640px; }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.6rem 1.7rem;
}
.panel + .panel { margin-top: 1.2rem; }

.hero {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.2rem; align-items: stretch;
}
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.hero-intro { margin-bottom: 1.2rem; }
.hero-intro h2 { margin-top: .3rem; }
.hero-intro .lead { margin-bottom: 0; }
.hero-cta { display: flex; flex-direction: column; justify-content: center; }

h2 { color: var(--rip-green-dark); margin-top: 0; }
.eyebrow { color: var(--rip-green); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; }
.lead { font-size: 1.05rem; color: var(--ink); }
.muted { color: var(--muted); }

/* Badges (mirrors the tool's badge-row) */
.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.badge {
  font-size: .72rem; font-weight: 700; padding: .28rem .6rem; border-radius: 999px;
  border: 1px solid transparent;
}
.badge.green { background: rgba(21,112,123,.10); color: var(--rip-green-dark); border-color: rgba(21,112,123,.25); }
.badge.amber { background: rgba(247,148,29,.12); color: #8a560a; border-color: rgba(247,148,29,.3); }
.badge.blue  { background: rgba(35,91,134,.10); color: var(--rip-blue); border-color: rgba(35,91,134,.25); }

/* Steps list */
.steps { list-style: none; padding: 0; margin: 1rem 0 0; counter-reset: step; }
.steps li { position: relative; padding: .5rem 0 .5rem 2.4rem; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: .55rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--rip-green); color: #fff; font-weight: 700; font-size: .85rem;
  display: grid; place-items: center;
}

/* Forms */
form .field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--rip-green-dark); }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; padding: .7rem .8rem; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--rip-green);
  box-shadow: 0 0 0 3px rgba(21,112,123,.15);
}
textarea { resize: vertical; min-height: 84px; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.checkbox input { width: auto; margin-top: .3rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font: inherit; font-weight: 700; border: 1px solid transparent;
  padding: .7rem 1.2rem; border-radius: 999px; text-decoration: none;
}
.btn.primary { background: var(--rip-green); color: #fff; }
.btn.primary:hover { background: var(--rip-green-dark); color: #fff; }
.btn.orange { background: var(--rip-orange); color: #3a2403; }
.btn.orange:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--rip-green); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--rip-green); }
.btn.danger { background: #fff; color: var(--rip-red); border-color: rgba(203,70,56,.4); }
.btn.danger:hover { background: rgba(203,70,56,.08); }
.btn.small { padding: .4rem .8rem; font-size: .85rem; }
.btn-row { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }

/* Alerts */
.alert { border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.alert.error { background: rgba(203,70,56,.07); border-color: rgba(203,70,56,.35); color: #7c2018; }
.alert.ok { background: rgba(21,112,123,.08); border-color: rgba(21,112,123,.3); color: var(--rip-green-dark); }
.alert.info { background: rgba(35,91,134,.07); border-color: rgba(35,91,134,.3); color: var(--rip-blue); }
.alert ul { margin: .4rem 0 0; padding-left: 1.1rem; }

/* Tables (admin) */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--rip-green-dark); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
table.data tr:hover td { background: rgba(21,112,123,.03); }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; }
.pill.pending { background: rgba(247,148,29,.15); color: #8a560a; }
.pill.approved { background: rgba(21,112,123,.12); color: var(--rip-green-dark); }
.pill.rejected { background: rgba(203,70,56,.12); color: var(--rip-red); }
.pill.suspended { background: rgba(91,107,99,.15); color: var(--muted); }

/* KPI cards (admin results) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.kpi .num { font-size: 1.9rem; font-weight: 800; color: var(--rip-green-dark); line-height: 1; }
.kpi .label { color: var(--muted); font-size: .82rem; margin-top: .3rem; }

/* Footer */
.gate-footer { max-width: 1080px; margin: 1rem auto 2.5rem; padding: 1rem 1.5rem; color: var(--muted); font-size: .85rem; }
.gate-footer a { color: var(--rip-green); }

/* Inline admin nav */
.admin-nav { display: flex; gap: .8rem; flex-wrap: wrap; margin: .4rem 0 1.2rem; }
.admin-nav a { font-weight: 600; }

/* School selector (registration) */
.field { position: relative; }
.school-results {
  position: absolute; left: 0; right: 0; z-index: 40;
  margin-top: .25rem; max-height: 280px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}
.school-item {
  display: flex; flex-direction: column; gap: .1rem;
  width: 100%; text-align: left; cursor: pointer;
  padding: .55rem .8rem; background: transparent; border: 0;
  border-bottom: 1px solid var(--line); font: inherit;
}
.school-item:last-child { border-bottom: 0; }
.school-item:hover, .school-item:focus { background: rgba(21,112,123,.06); outline: none; }
.school-naam { font-weight: 600; color: var(--rip-green-dark); }
.school-meta { font-size: .82rem; }
.school-empty { padding: .6rem .8rem; font-size: .88rem; }
.school-chosen { font-size: .85rem; }

/* Breakdown bars (admin dashboard) */
.bd { display: grid; gap: .45rem; margin: .3rem 0 .2rem; }
.bdrow { display: grid; grid-template-columns: 9rem 1fr 2.4rem; align-items: center; gap: .6rem; }
.bdlabel { font-size: .85rem; color: var(--rip-green-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdbar { background: rgba(21,112,123,.1); border-radius: 999px; height: 14px; overflow: hidden; }
.bdbar > span { display: block; height: 100%; background: var(--rip-green); border-radius: 999px; }
.bdn { font-size: .82rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.bd-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.bd-card h3 { font-size: .95rem; margin: 0 0 .7rem; color: var(--rip-green-dark); }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin: 1rem 0; }
