/* Admission portal (/apply/*): one guided journey in the school's own colours. Ported from EduKlass v5 (2026-11-22).
   Colours: --s-primary / --s-accent are set from the school theme (theme_primary / theme_accent) in views/admission/_ad_top.php.
   Light by default; follows the device's dark setting. No external assets. */

.ad {
  --ad-p: var(--s-primary, #1e3a8a);
  --ad-a: var(--s-accent, #f97316);
  --ad-ink: #0f172a;
  --ad-ink-2: #334155;
  --ad-mute: #5b6b80;
  --ad-line: #e3e8ef;
  --ad-line-2: #cfd8e3;
  --ad-bg: #f4f6fa;
  --ad-card: #ffffff;
  --ad-soft: color-mix(in srgb, var(--ad-p) 6%, #ffffff);
  --ad-ok: #15803d; --ad-ok-bg: #dcfce7;
  --ad-warn: #92400e; --ad-warn-bg: #fef3c7;
  --ad-bad: #b91c1c; --ad-bad-bg: #fee2e2;
  --ad-info: #1d4ed8; --ad-info-bg: #dbeafe;
  --ad-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .07);
  --ad-r: 16px;
  background: var(--ad-bg);
  color: var(--ad-ink);
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: 64px;
}
@media (prefers-color-scheme: dark) {
  .ad {
    --ad-ink: #e7ecf3; --ad-ink-2: #c8d1dd; --ad-mute: #9aa8ba;
    --ad-line: #263244; --ad-line-2: #34445a;
    --ad-bg: #0b1220; --ad-card: #121b2c;
    --ad-soft: color-mix(in srgb, var(--ad-p) 16%, #121b2c);
    --ad-ok: #86efac; --ad-ok-bg: rgba(22, 163, 74, .18);
    --ad-warn: #fcd34d; --ad-warn-bg: rgba(217, 119, 6, .18);
    --ad-bad: #fca5a5; --ad-bad-bg: rgba(220, 38, 38, .18);
    --ad-info: #93c5fd; --ad-info-bg: rgba(37, 99, 235, .2);
    --ad-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
.ad *, .ad *::before, .ad *::after { box-sizing: border-box; }
.ad-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.ad a { color: inherit; }
.ad :focus-visible { outline: 3px solid color-mix(in srgb, var(--ad-a) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
.ad .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* ---------- Hero ---------- */
.ad-hero { position: relative; overflow: hidden; color: #fff; padding: 34px 0 92px;
  background: radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--ad-a) 45%, transparent), transparent 60%),
              linear-gradient(135deg, var(--ad-p), color-mix(in srgb, var(--ad-p) 55%, #050a18)); }
.ad-hero::before { content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background-image: radial-gradient(#fff 1px, transparent 1.4px); background-size: 22px 22px; }
.ad-hero .ad-wrap { position: relative; }
.ad-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ad-brand-logo { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); color: var(--ad-p); font-weight: 800; }
.ad-brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.ad-brand-txt { min-width: 0; }
.ad-brand-txt b { display: block; font-size: .95rem; line-height: 1.2; }
.ad-brand-txt span { font-size: .8rem; opacity: .85; }
.ad-pill { display: inline-flex; align-items: center; gap: 6px; padding: .28rem .7rem; border-radius: 999px; font-size: .76rem; font-weight: 700; background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(4px); margin-left: auto; white-space: nowrap; }
.ad-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .3); }
.ad-pill.is-closed::before { background: #fca5a5; box-shadow: 0 0 0 3px rgba(252, 165, 165, .3); }
.ad-hero h1 { font-family: var(--s-head, inherit); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 1.15; margin: 0 0 .45rem; letter-spacing: -.01em; color: #fff; }
.ad-hero p { margin: 0; max-width: 640px; font-size: 1rem; opacity: .92; }

.ad-body { margin-top: -66px; position: relative; z-index: 1; }

/* ---------- Progress ---------- */
.ad-steps { background: var(--ad-card); border: 1px solid var(--ad-line); border-radius: var(--ad-r); box-shadow: var(--ad-shadow); padding: 14px 18px; margin-bottom: 18px; }
.ad-steps ol { display: flex; list-style: none; margin: 0; padding: 0; gap: 4px; }
.ad-steps li { flex: 1 1 0; display: flex; align-items: center; gap: 10px; min-width: 0; font-size: .84rem; font-weight: 600; color: var(--ad-mute); position: relative; }
.ad-steps li:not(:last-child)::after { content: ""; flex: 1 1 auto; height: 2px; min-width: 12px; border-radius: 2px; background: var(--ad-line); margin-right: 6px; }
.ad-steps li.is-done:not(:last-child)::after { background: var(--ad-ok); }
.ad-steps .ad-dot { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; background: var(--ad-bg); color: var(--ad-mute); border: 2px solid var(--ad-line); transition: all .25s; }
.ad-steps li.is-done .ad-dot { background: var(--ad-ok); border-color: var(--ad-ok); color: #fff; }
.ad-steps li.is-on { color: var(--ad-ink); }
.ad-steps li.is-on .ad-dot { background: var(--ad-a); border-color: var(--ad-a); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--ad-a) 22%, transparent); }
.ad-steps .ad-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-steps-m { display: none; }
@media (prefers-color-scheme: dark) { .ad-steps li.is-done .ad-dot { color: #052e16; } }

/* ---------- Layout + cards ---------- */
.ad-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ad-grid.is-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ad-stack { display: grid; gap: 18px; min-width: 0; }
.ad-card { background: var(--ad-card); border: 1px solid var(--ad-line); border-radius: var(--ad-r); box-shadow: var(--ad-shadow); padding: 24px; min-width: 0; }
.ad-card.is-narrow { max-width: 680px; margin: 0 auto; }
.ad-card h2 { font-family: var(--s-head, inherit); font-size: 1.22rem; font-weight: 800; margin: 0 0 4px; color: var(--ad-ink); letter-spacing: -.005em; }
.ad-card h3 { font-size: 1rem; font-weight: 800; margin: 0 0 8px; color: var(--ad-ink); }
.ad-card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.ad-card-head .ad-ico { flex: none; }
.ad-sub { color: var(--ad-mute); margin: 0; font-size: .92rem; }
.ad-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; background: color-mix(in srgb, var(--ad-p) 12%, transparent); color: var(--ad-p); }
.ad-ico.is-accent { background: color-mix(in srgb, var(--ad-a) 14%, transparent); color: var(--ad-a); }
@media (prefers-color-scheme: dark) { .ad-ico { color: color-mix(in srgb, var(--ad-p) 45%, #fff); } .ad-ico.is-accent { color: color-mix(in srgb, var(--ad-a) 70%, #fff); } }
.ad-sec { border-top: 1px solid var(--ad-line); padding-top: 18px; margin-top: 4px; }
.ad-sec-t { display: flex; align-items: center; gap: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; color: var(--ad-mute); margin: 0 0 12px; }
.ad-sec-t i { color: var(--ad-a); }
.ad-divider { border: 0; border-top: 1px solid var(--ad-line); margin: 18px 0; }
.ad-mini { font-size: .82rem; color: var(--ad-mute); margin: 0; }
.ad-link { color: var(--ad-p) !important; font-weight: 700; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 700; }
.ad-link:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { .ad-link { color: color-mix(in srgb, var(--ad-p) 40%, #fff) !important; } }

/* ---------- Fields ---------- */
.ad-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.ad-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.ad-row-3 .is-wide { grid-column: span 2; }
.ad-field { display: grid; gap: 6px; margin-bottom: 16px; align-content: start; }
.ad-field > label, .ad-label { font-weight: 700; font-size: .86rem; color: var(--ad-ink-2); }
.ad-field > label small, .ad-label small { font-weight: 500; color: var(--ad-mute); }
.ad-hint { font-size: .8rem; color: var(--ad-mute); margin: 0; }
.ad-input, .ad-select { width: 100%; min-height: 48px; padding: .7rem .9rem; border: 1.5px solid var(--ad-line-2); border-radius: 12px; font: inherit; font-size: 1rem; background: var(--ad-card); color: var(--ad-ink); transition: border-color .15s, box-shadow .15s, background .15s; }
.ad-input::placeholder { color: color-mix(in srgb, var(--ad-mute) 75%, transparent); }
.ad-input:hover, .ad-select:hover { border-color: color-mix(in srgb, var(--ad-p) 40%, var(--ad-line-2)); }
.ad-input:focus, .ad-select:focus { outline: none; border-color: var(--ad-p); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ad-p) 18%, transparent); }
.ad-input.is-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }
.ad-input.is-upper:not(:placeholder-shown) { text-transform: uppercase; }
.ad-field.is-invalid .ad-input, .ad-field.is-invalid .ad-select { border-color: var(--ad-bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ad-bad) 14%, transparent); }
.ad-field.is-valid .ad-input:not(:focus) { border-color: color-mix(in srgb, var(--ad-ok) 60%, var(--ad-line-2)); }
.ad-err { display: none; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--ad-bad); margin: 0; }
.ad-field.is-invalid .ad-err { display: flex; }
.ad-input-ico { position: relative; }
.ad-input-ico > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ad-mute); pointer-events: none; }
.ad-input-ico > .ad-input { padding-left: 40px; }

/* ---------- Buttons ---------- */
.ad-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: .75rem 1.4rem; border-radius: 12px; border: 0; cursor: pointer; text-decoration: none !important;
  background: var(--ad-a); color: #fff !important; font: inherit; font-weight: 800; font-size: .96rem; line-height: 1.2; transition: transform .15s, filter .15s, box-shadow .15s;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--ad-a) 30%, transparent); }
.ad-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.ad-btn:active { transform: translateY(0); }
.ad-btn.is-primary { background: var(--ad-p); box-shadow: 0 6px 16px color-mix(in srgb, var(--ad-p) 28%, transparent); }
.ad-btn.is-ghost { background: transparent; color: var(--ad-ink) !important; border: 1.5px solid var(--ad-line-2); box-shadow: none; }
.ad-btn.is-ghost:hover { border-color: var(--ad-p); filter: none; }
.ad-btn.is-danger { background: var(--ad-bad); box-shadow: none; }
.ad-btn.is-block { width: 100%; }
.ad-btn.is-sm { min-height: 38px; padding: .45rem .9rem; font-size: .85rem; border-radius: 10px; }
.ad-btn:disabled, .ad-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; filter: none; pointer-events: none; }
.ad-btn.is-loading { pointer-events: none; opacity: .85; }
.ad-btn.is-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: ad-spin .7s linear infinite; }
.ad-btn.is-loading > i { display: none; }
.ad-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ad-actions.is-end { justify-content: flex-end; }
.ad-actions.is-split { justify-content: space-between; }
@keyframes ad-spin { to { transform: rotate(360deg); } }

/* ---------- Alerts ---------- */
.ad-alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; font-size: .92rem; margin-bottom: 16px; border: 1px solid transparent; animation: ad-in .3s ease both; }
.ad-alert > i { margin-top: 3px; }
.ad-alert.is-error { background: var(--ad-bad-bg); color: var(--ad-bad); border-color: color-mix(in srgb, var(--ad-bad) 25%, transparent); }
.ad-alert.is-success { background: var(--ad-ok-bg); color: var(--ad-ok); border-color: color-mix(in srgb, var(--ad-ok) 25%, transparent); }
.ad-alert.is-info { background: var(--ad-info-bg); color: var(--ad-info); border-color: color-mix(in srgb, var(--ad-info) 25%, transparent); }
.ad-alert.is-warn { background: var(--ad-warn-bg); color: var(--ad-warn); border-color: color-mix(in srgb, var(--ad-warn) 25%, transparent); }
.ad-alert b { font-weight: 800; }

/* ---------- Choice cards ---------- */
.ad-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ad-choice label { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1.5px solid var(--ad-line-2); border-radius: 14px; cursor: pointer; background: var(--ad-card); transition: border-color .15s, background .15s, box-shadow .15s; }
.ad-choice label:hover { border-color: color-mix(in srgb, var(--ad-a) 60%, var(--ad-line-2)); }
.ad-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ad-choice .ad-tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ad-line-2); flex: none; display: grid; place-items: center; margin-top: 2px; transition: all .15s; }
.ad-choice label:has(input:checked) { border-color: var(--ad-a); background: color-mix(in srgb, var(--ad-a) 7%, var(--ad-card)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ad-a) 14%, transparent); }
.ad-choice label:has(input:checked) .ad-tick { border-color: var(--ad-a); background: var(--ad-a); }
.ad-choice label:has(input:checked) .ad-tick::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.ad-choice label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--ad-a) 70%, transparent); outline-offset: 2px; }
.ad-choice b { display: block; font-size: .96rem; color: var(--ad-ink); }
.ad-choice small { display: block; color: var(--ad-mute); font-size: .82rem; margin-top: 2px; }
.ad-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--ad-bg); border: 1px solid var(--ad-line); }
.ad-seg label { position: relative; }
.ad-seg input { position: absolute; opacity: 0; }
.ad-seg span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 9px; font-weight: 700; font-size: .9rem; color: var(--ad-mute); cursor: pointer; }
.ad-seg input:checked + span { background: var(--ad-card); color: var(--ad-ink); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.ad-seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--ad-a) 70%, transparent); }
.ad-field.is-invalid .ad-seg { border-color: var(--ad-bad); }

/* ---------- Landing ---------- */
.ad-door { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.ad-door .ad-ico { width: 52px; height: 52px; font-size: 1.3rem; border-radius: 14px; }
.ad-from { font-size: .85rem; color: var(--ad-mute); }
.ad-from b { color: var(--ad-ink); font-size: 1.15rem; }
.ad-how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: how; margin: 0; padding: 0; list-style: none; }
.ad-how li { counter-increment: how; padding: 16px; border-radius: 14px; background: var(--ad-soft); border: 1px solid var(--ad-line); }
.ad-how li::before { content: counter(how); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ad-p); color: #fff; font-weight: 800; font-size: .85rem; margin-bottom: 10px; }
.ad-how b { display: block; font-size: .92rem; margin-bottom: 2px; }
.ad-how span { font-size: .82rem; color: var(--ad-mute); }
.ad-where { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.ad-where div { border: 1px dashed var(--ad-line-2); border-radius: 12px; padding: 10px 12px; font-size: .8rem; color: var(--ad-mute); }
.ad-where code { display: block; color: var(--ad-ink); font-weight: 800; font-size: .92rem; letter-spacing: .06em; margin-top: 2px; background: none; padding: 0; }

/* ---------- Buy: levels ---------- */
.ad-levels { display: grid; gap: 12px; }
.ad-level { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px; border: 1.5px solid var(--ad-line); border-radius: 14px; background: var(--ad-card); transition: border-color .2s, background .2s, box-shadow .2s; }
.ad-level.is-picked { border-color: var(--ad-a); background: color-mix(in srgb, var(--ad-a) 6%, var(--ad-card)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ad-a) 12%, transparent); }
.ad-level.is-off { opacity: .7; }
.ad-level b { display: block; font-size: 1rem; }
.ad-level small { display: block; color: var(--ad-mute); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-price { font-weight: 800; color: var(--ad-p); font-size: .92rem; }
@media (prefers-color-scheme: dark) { .ad-price { color: color-mix(in srgb, var(--ad-p) 40%, #fff); } }
.ad-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ad-line-2); border-radius: 12px; overflow: hidden; background: var(--ad-card); }
.ad-qty button { width: 44px; height: 44px; border: 0; background: var(--ad-bg); font-size: 1.2rem; font-weight: 700; cursor: pointer; color: var(--ad-ink); }
.ad-qty button:hover { background: color-mix(in srgb, var(--ad-a) 14%, var(--ad-bg)); }
.ad-qty button:disabled { opacity: .35; cursor: not-allowed; }
.ad-qty input { width: 48px; height: 44px; border: 0; text-align: center; font: inherit; font-weight: 800; font-size: 1.05rem; background: transparent; color: var(--ad-ink); -moz-appearance: textfield; appearance: textfield; }
.ad-qty input::-webkit-outer-spin-button, .ad-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ad-bill { position: sticky; top: 90px; }
.ad-lines { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; font-size: .92rem; }
.ad-lines li { display: flex; justify-content: space-between; gap: 10px; animation: ad-in .25s ease both; }
.ad-lines li.is-empty { color: var(--ad-mute); justify-content: center; text-align: center; padding: 14px; border: 1.5px dashed var(--ad-line-2); border-radius: 12px; font-size: .85rem; }
.ad-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1.5px dashed var(--ad-line-2); padding-top: 12px; }
.ad-total b { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ad-gw { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.ad-gw label { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1.5px solid var(--ad-line-2); border-radius: 12px; cursor: pointer; font-weight: 700; font-size: .88rem; }
.ad-gw input { position: absolute; opacity: 0; }
.ad-gw label:has(input:checked) { border-color: var(--ad-a); background: color-mix(in srgb, var(--ad-a) 8%, var(--ad-card)); color: var(--ad-a); }
.ad-gw label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--ad-a) 70%, transparent); outline-offset: 2px; }
.ad-trust { display: grid; gap: 8px; margin-top: 14px; }
.ad-trust p { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--ad-mute); margin: 0; }
.ad-trust i { color: var(--ad-ok); margin-top: 3px; }
.ad-paybar { display: none; }

/* ---------- PIN ticket ---------- */
.ad-ticket { position: relative; border-radius: 18px; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--ad-p), color-mix(in srgb, var(--ad-p) 60%, #050a18)); padding: 22px; }
.ad-ticket::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: color-mix(in srgb, var(--ad-a) 55%, transparent); opacity: .5; }
.ad-ticket > * { position: relative; z-index: 1; }
.ad-ticket-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px dashed rgba(255, 255, 255, .25); }
.ad-ticket-row:last-child { border-bottom: 0; }
.ad-ticket-row span { flex: 1 0 100%; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; opacity: .8; font-weight: 700; }
.ad-ticket-row code { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(1.2rem, 4.2vw, 1.7rem); font-weight: 800; letter-spacing: .08em; color: #fff; background: none; padding: 0; word-break: break-all; }
.ad-ticket-row code.is-link { font-size: .92rem; letter-spacing: 0; font-weight: 600; }
.ad-copy { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .12); color: #fff; border-radius: 10px; min-height: 36px; padding: 0 12px; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.ad-copy:hover { background: rgba(255, 255, 255, .22); }
.ad-copy.is-done { background: #16a34a; border-color: #16a34a; }
.ad-ref { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--ad-soft); border: 1px dashed var(--ad-line-2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; font-size: 1.15rem; letter-spacing: .06em; }
.ad-ref .ad-copy { color: var(--ad-ink); border-color: var(--ad-line-2); background: var(--ad-card); font-family: inherit; letter-spacing: 0; }

/* ---------- Success / waiting ---------- */
.ad-hello { text-align: center; padding: 10px 0 6px; }
.ad-burst { position: relative; width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--ad-ok-bg); color: var(--ad-ok); font-size: 2.2rem; animation: ad-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.ad-burst::before, .ad-burst::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--ad-ok) 40%, transparent); animation: ad-ring 1.6s ease-out .2s both; }
.ad-burst::after { animation-delay: .5s; }
.ad-burst.is-wait { background: color-mix(in srgb, var(--ad-a) 14%, transparent); color: var(--ad-a); }
.ad-burst.is-wait::before, .ad-burst.is-wait::after { border-color: color-mix(in srgb, var(--ad-a) 40%, transparent); animation-iteration-count: infinite; }
.ad-hello h2 { font-size: 1.45rem; }
.ad-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ad-confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: ad-fall 2.6s ease-in forwards; }
@keyframes ad-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ad-ring { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes ad-fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(420px) rotate(540deg); } }
@keyframes ad-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ad-countdown { font-variant-numeric: tabular-nums; font-weight: 800; }
.ad-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ad-timeline li { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.ad-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--ad-line); }
.ad-timeline .ad-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; background: var(--ad-soft); color: var(--ad-p); border: 1.5px solid var(--ad-line); }
.ad-timeline li.is-done .ad-dot { background: var(--ad-ok); color: #fff; border-color: var(--ad-ok); }
.ad-timeline b { display: block; font-size: .92rem; }
.ad-timeline span { font-size: .84rem; color: var(--ad-mute); }

/* ---------- Seats + children ---------- */
.ad-meter { display: grid; gap: 12px; }
.ad-meter-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: .88rem; }
.ad-meter-row b { font-weight: 700; }
.ad-meter-row span { color: var(--ad-mute); font-weight: 700; font-variant-numeric: tabular-nums; }
.ad-bar { grid-column: 1 / -1; display: flex; gap: 4px; }
.ad-bar i { flex: 1; height: 8px; border-radius: 4px; background: var(--ad-line); }
.ad-bar i.is-on { background: var(--ad-ok); }
.ad-kids { display: grid; gap: 10px; }
.ad-kid { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1.5px solid var(--ad-line); border-radius: 14px; background: var(--ad-card); animation: ad-in .3s ease both; }
.ad-kid.is-editing { border-color: var(--ad-a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ad-a) 12%, transparent); }
.ad-av { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; font-weight: 800; background: color-mix(in srgb, var(--ad-a) 16%, var(--ad-card)); color: var(--ad-a); }
.ad-av img { width: 100%; height: 100%; object-fit: cover; }
.ad-kid b { display: block; font-size: .98rem; }
.ad-kid small { display: block; color: var(--ad-mute); font-size: .82rem; }
.ad-tag { display: inline-flex; align-items: center; gap: 5px; padding: .18rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 800; background: var(--ad-ok-bg); color: var(--ad-ok); margin-top: 4px; }
.ad-tag.is-wait { background: var(--ad-warn-bg); color: var(--ad-warn); }
.ad-tag.is-no { background: var(--ad-bad-bg); color: var(--ad-bad); }
.ad-tag.is-muted { background: var(--ad-bg); color: var(--ad-mute); }
.ad-kid-act { display: flex; gap: 6px; }
.ad-seat { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 1.5px dashed var(--ad-line-2); border-radius: 14px; color: var(--ad-mute); font: inherit; font-size: .9rem; background: transparent; text-align: left; text-decoration: none; transition: border-color .15s, color .15s, background .15s; }
a.ad-seat:hover { border-color: var(--ad-a); color: var(--ad-ink); background: color-mix(in srgb, var(--ad-a) 5%, transparent); }
.ad-seat .ad-av { background: var(--ad-bg); color: var(--ad-mute); font-size: 1.1rem; }
.ad-photo { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1.5px dashed var(--ad-line-2); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.ad-photo:hover, .ad-photo.is-over { border-color: var(--ad-a); background: color-mix(in srgb, var(--ad-a) 5%, transparent); }
.ad-photo .ad-av { width: 72px; height: 72px; border-radius: 16px; font-size: 1.4rem; background: var(--ad-bg); color: var(--ad-mute); }
.ad-photo input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ad-photo:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--ad-a) 70%, transparent); outline-offset: 2px; }
.ad-parent { display: flex; gap: 12px; align-items: center; }
.ad-parent .ad-av { background: color-mix(in srgb, var(--ad-p) 14%, var(--ad-card)); color: var(--ad-p); }
@media (prefers-color-scheme: dark) { .ad-parent .ad-av { color: color-mix(in srgb, var(--ad-p) 45%, #fff); } }
.ad-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.ad-dl div { min-width: 0; }
.ad-dl dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ad-mute); font-weight: 700; }
.ad-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ad-review { border: 1.5px solid var(--ad-line); border-radius: 14px; padding: 16px; display: grid; gap: 14px; }
.ad-review-h { display: flex; gap: 12px; align-items: center; }
.ad-review-h > div { min-width: 0; flex: 1; }
.ad-check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--ad-soft); border: 1.5px solid var(--ad-line); font-size: .92rem; cursor: pointer; }
.ad-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ad-a); flex: none; }
.ad-field.is-invalid .ad-check { border-color: var(--ad-bad); }

/* ---------- 6-digit code ---------- */
.ad-otp { display: flex; gap: 8px; }
.ad-otp input { width: 100%; max-width: 54px; height: 60px; text-align: center; font-size: 1.6rem; font-weight: 800; border: 1.5px solid var(--ad-line-2); border-radius: 12px; background: var(--ad-card); color: var(--ad-ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ad-otp input:focus { outline: none; border-color: var(--ad-a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ad-a) 20%, transparent); }
.ad-otp input.is-filled { border-color: var(--ad-p); background: var(--ad-soft); }
.ad-field.is-invalid .ad-otp input { border-color: var(--ad-bad); }

/* ---------- Status table ---------- */
.ad-status { display: grid; gap: 10px; }

/* ---------- Dialog ---------- */
.ad-dialog { border: 0; border-radius: 18px; padding: 0; max-width: 420px; width: calc(100% - 32px); background: var(--ad-card, #fff); color: var(--ad-ink, #0f172a); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.ad-dialog::backdrop { background: rgba(8, 12, 24, .55); backdrop-filter: blur(2px); }
.ad-dialog-in { padding: 22px; display: grid; gap: 14px; }
.ad-dialog h3 { margin: 0; font-size: 1.1rem; }
.ad-dialog p { margin: 0; color: var(--ad-mute, #5b6b80); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .ad-grid, .ad-grid.is-even { grid-template-columns: 1fr; }
  .ad-bill { position: static; }
  .ad-how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-paybar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--ad-card); border-top: 1px solid var(--ad-line); box-shadow: 0 -8px 24px rgba(15, 23, 42, .12); transform: translateY(110%); transition: transform .25s; }
  .ad-paybar.is-shown { transform: none; }
  .ad-paybar div { flex: 1; min-width: 0; }
  .ad-paybar small { display: block; color: var(--ad-mute); font-size: .75rem; }
  .ad-paybar b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
}
@media (max-width: 720px) {
  .ad-steps { padding: 12px 14px; }
  .ad-steps ol { display: none; }
  .ad-steps-m { display: block; }
  .ad-steps-m .ad-steps-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .78rem; color: var(--ad-mute); font-weight: 700; }
  .ad-steps-m .ad-steps-top b { color: var(--ad-ink); font-size: .95rem; }
  .ad-steps-m .ad-bar { margin-top: 10px; }
  .ad-steps-m .ad-bar i.is-on { background: var(--ad-a); }
  .ad-steps-m .ad-bar i.is-done { background: var(--ad-ok); }
  .ad-steps-m .ad-next { font-size: .78rem; color: var(--ad-mute); margin-top: 6px; }
}
@media (max-width: 640px) {
  .ad-wrap { padding: 0 14px; }
  .ad-hero { padding: 22px 0 84px; }
  .ad-hero p { font-size: .94rem; }
  .ad-pill { font-size: .7rem; }
  .ad-card { padding: 18px; border-radius: 14px; }
  .ad-row, .ad-row-3, .ad-choice, .ad-where { grid-template-columns: 1fr; }
  .ad-row-3 .is-wide { grid-column: auto; }
  .ad-how { grid-template-columns: 1fr; }
  .ad-level { grid-template-columns: 42px minmax(0, 1fr); gap: 12px; }
  .ad-level .ad-ico { width: 42px; height: 42px; }
  .ad-level .ad-qty { grid-column: 1 / -1; justify-self: stretch; display: grid; grid-template-columns: 52px 1fr 52px; }
  .ad-level .ad-qty input { width: 100%; }
  .ad-level .ad-qty button { width: 52px; }
  .ad-kid { grid-template-columns: 48px minmax(0, 1fr); }
  .ad-kid .ad-av { width: 48px; height: 48px; }
  .ad-kid-act { grid-column: 1 / -1; }
  .ad-kid-act > * { flex: 1; }
  .ad-kid-act .ad-btn { width: 100%; }
  .ad-actions > .ad-btn, .ad-actions > form, .ad-actions > form .ad-btn { width: 100%; }
  .ad-actions.is-split { flex-direction: column-reverse; }
  .ad-otp { gap: 6px; }
  .ad-otp input { height: 54px; font-size: 1.4rem; }
  .ad-ref { font-size: 1rem; flex-wrap: wrap; justify-content: center; }
  .ad-has-paybar { padding-bottom: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .ad *, .ad *::before, .ad *::after { animation: none !important; transition: none !important; }
}
@media print {
  header, footer, .s-header, .s-footer, .s-strip, .ad-steps, .ad-noprint, .ad-paybar, [class*="chat"] { display: none !important; }
  .ad { background: #fff; padding: 0; }
  .ad-hero { color: #000; background: none; padding: 0 0 12px; }
  .ad-hero h1, .ad-hero p { color: #000; }
  .ad-body { margin-top: 0; }
  .ad-card { box-shadow: none; border: 1px solid #ccc; }
  .ad-ticket { color: #000; background: #fff; border: 2px dashed #000; }
  .ad-ticket-row code { color: #000; }
}
.ad [hidden] { display: none !important; }
@media (max-width: 640px) { .ad-status .ad-tag { grid-column: 2; justify-self: start; margin-top: 0; } }
@media (max-width: 640px) {
  .ad-brand { margin-bottom: 12px; }
  .ad-brand-logo, .ad-brand-txt b { display: none; } /* the site header above already shows the school's logo and name */
  .ad-brand-txt span { font-weight: 700; font-size: .78rem; }
}
@media (min-width: 992px) { .ad-grid > aside.ad-stack, .ad-grid > aside.ad-card:not(.ad-bill) { position: sticky; top: 76px; } }
/* Lift the site's floating buttons above the phone pay bar while it shows. */
@media (max-width: 991.98px) {
  body.ad-paybar-on #sTop, body.ad-paybar-on #backTop { bottom: 96px !important; }
  body.ad-paybar-on #cbToggle { bottom: 92px !important; }
  body.ad-paybar-on #cbWindow { bottom: 168px !important; }
}

/* ---------- Printable admission slips, JAMB style (confirmation page, views/apply/_slip.php) ---------- */
.ad-status .ad-kid { grid-template-columns: 52px minmax(0, 1fr) auto auto; }
@media (max-width: 640px) { .ad-status .ad-kid { grid-template-columns: 48px minmax(0, 1fr); } .ad-status .ad-kid > .ad-btn { grid-column: 2; justify-self: start; } }
.ad-slips { display: none; }
@media print {
  @page { size: A4 portrait; margin: 8mm; }
  /* Print only the slips: hide every element that neither holds nor sits inside them. */
  body:has(.ad-slips) *:not(:has(.ad-slips)):not(.ad-slips):not(.ad-slips *) { display: none !important; }
  body:has(.ad-slips) *:has(.ad-slips) { margin: 0 !important; padding: 0 !important; background: #fff !important; box-shadow: none !important; border: 0 !important; position: static !important; transform: none !important; }
  body.ad-print-one .ad-slip-page:not(.is-only) { display: none !important; }
  .ad-slips { display: block !important; color: #111; font-size: 9.6pt; line-height: 1.35; }
  .ad-slips * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Slip layout (also used by the on-screen preview class .ad-slips.is-preview). */
.ad-slips.is-preview { display: block; background: #6b7280; padding: 24px 0; }
.ad-slips.is-preview .ad-slip-page { margin: 0 auto 24px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.ad-slip-page { position: relative; overflow: hidden; width: 194mm; height: 280mm; margin: 0 auto; padding: 6mm 8mm 5mm; background: #fff; color: #111; border: 1.6mm double var(--ad-p, #1e3a8a); display: flex; flex-direction: column; font-family: inherit; break-after: page; page-break-after: always; }
.ad-slip-page:last-child { break-after: auto; page-break-after: auto; }
.ad-slip-wm { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-32deg); font-size: 34pt; font-weight: 900; letter-spacing: .12em; color: var(--ad-p, #1e3a8a); opacity: .05; white-space: nowrap; pointer-events: none; }
.ad-slip-top { position: relative; display: grid; grid-template-columns: 21mm minmax(0, 1fr) 21mm; gap: 4mm; align-items: center; text-align: center; padding-bottom: 2.5mm; }
.ad-slip-crest { width: 21mm; height: 21mm; display: grid; place-items: center; }
.ad-slip-crest img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ad-slip-crest span { width: 20mm; height: 20mm; border-radius: 50%; display: grid; place-items: center; background: var(--ad-p, #1e3a8a); color: #fff; font-weight: 900; font-size: 20pt; border: 1mm solid color-mix(in srgb, var(--ad-a, #f97316) 80%, #fff); }
.ad-slip-school h1 { margin: 0; font-family: var(--s-head, inherit); font-size: 17pt; line-height: 1.1; letter-spacing: .02em; color: var(--ad-p, #1e3a8a); }
.ad-slip-school p { margin: 1mm 0 0; font-size: 8.4pt; color: #333; }
.ad-slip-school p.is-motto { font-style: italic; color: #555; }
.ad-slip-band { position: relative; display: flex; justify-content: space-between; gap: 4mm; padding: 2.2mm 4mm; background: var(--ad-p, #1e3a8a); color: #fff; font-weight: 800; letter-spacing: .1em; font-size: 10.5pt; border-bottom: 1.2mm solid var(--ad-a, #f97316); }
.ad-slip-main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 40mm; gap: 5mm; margin-top: 3mm; }
.ad-slip-rows { width: 100%; border-collapse: collapse; }
.ad-slip-rows th, .ad-slip-rows td { border: .25mm solid #b8c0cc; padding: 1.05mm 2.2mm; text-align: left; vertical-align: top; }
.ad-slip-rows th { width: 44mm; background: color-mix(in srgb, var(--ad-p, #1e3a8a) 7%, #fff); font-weight: 700; font-size: 8.4pt; text-transform: uppercase; letter-spacing: .03em; color: #222; }
.ad-slip-rows th span { color: #777; font-weight: 600; }
.ad-slip-rows td { font-weight: 600; overflow-wrap: anywhere; }
.ad-slip-rows td.is-mono { font-family: ui-monospace, Consolas, monospace; font-weight: 800; font-size: 10.5pt; letter-spacing: .04em; color: var(--ad-p, #1e3a8a); }
.ad-slip-side { display: flex; flex-direction: column; align-items: center; gap: 2.5mm; }
.ad-slip-photo { width: 33mm; height: 42mm; border: .5mm solid #333; display: grid; place-items: center; overflow: hidden; background: #f6f7f9; text-align: center; }
.ad-slip-photo img { width: 100%; height: 100%; object-fit: cover; }
.ad-slip-photo span { font-size: 7.5pt; color: #666; padding: 2mm; }
.ad-slip-cap { margin: 0; font-size: 7.8pt; color: #444; font-weight: 700; }
.ad-slip-qr { display: grid; justify-items: center; gap: 1mm; padding: 2mm; border: .25mm solid #b8c0cc; }
.ad-slip-qr img { width: 28mm; height: 28mm; }
.ad-slip-qr small { font-size: 7pt; color: #555; }
.ad-slip-crest.is-qr img { width: 22mm; height: 22mm; }
.ad-slip-bar { position: relative; display: flex; align-items: center; gap: 4mm; margin-top: 2.5mm; }
.ad-slip-bc { width: 78mm; height: 9mm; }
.ad-slip-bar span { font-family: ui-monospace, Consolas, monospace; font-weight: 800; letter-spacing: .08em; font-size: 10pt; }
.ad-slip-notes { position: relative; margin-top: 2.5mm; padding: 2mm 3mm; border: .25mm dashed #888; font-size: 8pt; }
.ad-slip-notes b { display: block; text-transform: uppercase; letter-spacing: .06em; font-size: 8.4pt; margin-bottom: 1mm; color: var(--ad-p, #1e3a8a); }
.ad-slip-notes ol { margin: 0; padding-left: 4.5mm; display: grid; gap: .8mm; }
.ad-slip-sign { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; margin-top: auto; padding-top: 3mm; font-size: 8pt; color: #333; align-items: end; }
.ad-slip-sign > div { display: flex; flex-direction: column; gap: 1.5mm; }
.ad-slip-sign .is-office { border: .25mm solid #b8c0cc; padding: 2.5mm; }
.ad-slip-sign .is-office b { font-size: 8pt; text-transform: uppercase; letter-spacing: .06em; }
.ad-slip-stamp { height: 11mm; border: .25mm dashed #aaa; display: grid; place-items: center; color: #999; }
.ad-slip-line { display: block; border-bottom: .3mm solid #333; height: 6mm; }
.ad-slip-foot { position: relative; display: flex; justify-content: space-between; gap: 4mm; margin-top: 2mm; padding-top: 1.2mm; border-top: .25mm solid #ccc; font-size: 7.4pt; color: #666; }
.ad-slip-crest.is-copy span { width: 21mm; height: auto; border-radius: 3mm; border: .5mm solid var(--ad-a, #f97316); background: #fff; color: var(--ad-a, #f97316); font-size: 7.5pt; letter-spacing: .12em; padding: 1.5mm 0; transform: rotate(-8deg); }

/* ---------- v4 additions: countdown, stepped application form ---------- */
.ad-count { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ad-count div { min-width: 64px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.14); text-align: center; }
.ad-count b { display: block; font-size: 1.4rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ad-count span { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.ad-count-cap { margin-top: 8px; font-size: .8rem; opacity: .85; }
.ad-panel { display: none; }
.ad-panel.is-on { display: block; animation: ad-in .25s ease both; }
.ad-textarea { min-height: 110px; resize: vertical; }
.ad-pinline { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; border-radius: 10px; background: var(--ad-soft); border: 1px dashed var(--ad-line-2); font-size: .82rem; color: var(--ad-mute); margin-bottom: 14px; }
.ad-pinline b { font-family: ui-monospace, Consolas, monospace; color: var(--ad-ink); letter-spacing: .06em; }
.ad-levelpick { display: grid; gap: 10px; }
.ad-levelpick label { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1.5px solid var(--ad-line); border-radius: 14px; cursor: pointer; background: var(--ad-card); }
.ad-levelpick input { position: absolute; opacity: 0; }
.ad-levelpick label:has(input:checked) { border-color: var(--ad-a); background: color-mix(in srgb, var(--ad-a) 6%, var(--ad-card)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ad-a) 12%, transparent); }
.ad-levelpick label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--ad-a) 70%, transparent); outline-offset: 2px; }
.ad-levelpick b { display: block; }
.ad-levelpick small { color: var(--ad-mute); font-size: .8rem; }
