/* IDL Learn – IDL HQ (the Owner's console), customer billing, invoices, the renewal banner and the family sign-up.
 * HQ has its own look: a deep navy sidebar with a gold accent, quiet white panels, and classic invoice documents. */
.invdoc, .hq-auth, .bill-hero { --rp-navy: #0B1842; --rp-muted: #6B7280; --serif: 'Manrope', system-ui, sans-serif; }
:root { --hq-navy: #0F1F3A; --hq-navy-2: #18305A; --hq-gold: #E2B44B; --hq-ink: #111827; --hq-line: #E3E7EF; }

/* ---------- HQ shell ---------- */
body.is-hq { --bg: #F4F6FA; }
body.is-hq .side { background: linear-gradient(180deg, var(--hq-navy), #0B1830) !important; border-right: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.is-hq .side__brand, body.is-hq .side__name b { color: #fff; }
body.is-hq .side__name small { color: var(--hq-gold); letter-spacing: .06em; text-transform: uppercase; font-size: 11px; font-weight: 600; }
body.is-hq .side__mark { background: var(--hq-gold); color: var(--hq-navy); }
body.is-hq .side__h { color: rgba(255, 255, 255, .45); }
body.is-hq .side__link { color: rgba(255, 255, 255, .78); }
body.is-hq .side__link .mi { stroke: rgba(255, 255, 255, .6); }
body.is-hq .side__link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
body.is-hq .side__link.is-on { background: rgba(226, 180, 75, .14); color: #fff; box-shadow: inset 3px 0 0 var(--hq-gold); }
body.is-hq .side__link.is-on .mi { stroke: var(--hq-gold); }
body.is-hq .side__foot, body.is-hq .side__sec + .side__sec { border-color: rgba(255, 255, 255, .08); }
body.is-hq .side__link em { background: var(--hq-gold); color: var(--hq-navy); }
body.is-hq .bgfx { opacity: .35; }
.hq-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.hq-head .eyebrow { color: #A07A1F; letter-spacing: .14em; text-transform: uppercase; font-size: 11.5px; font-weight: 700; }
.hq-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 2px 0 4px; font-family: 'Manrope', system-ui, sans-serif; font-weight: 400; font-size: clamp(26px, 3vw, 34px); color: var(--hq-ink); }
.hq-head p { margin: 0; }
.hq .panel h2 { font-size: 17px; }

/* KPI tiles */
.hq-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.hq-kpis--sm { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.hq-kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--hq-line); border-radius: 12px; background: #fff; color: var(--hq-ink); box-shadow: var(--shadow); text-decoration: none !important; }
a.hq-kpi:hover { border-color: #C9D2E3; color: var(--hq-ink); box-shadow: var(--shadow-md); }
.hq-kpi span { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.hq-kpi b { font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hq-kpi small { color: var(--muted); font-size: 12.5px; }
.hq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hq-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hq-grid > .panel { margin: 0 0 16px; }
@media (max-width: 1100px) { .hq-grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .hq-grid, .hq-grid--3 { grid-template-columns: 1fr; } }
.hq-setup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 14px 18px; border: 1px solid #F1D99A; border-radius: 12px; background: linear-gradient(90deg, #FFFBEB, #fff); }
.hq-setup p { margin: 2px 0 0; }
.hq-setup__list { display: flex; flex-wrap: wrap; gap: 8px; }
.hq-setup__list a { padding: 6px 12px; border: 1px solid var(--hq-line); border-radius: 99px; background: #fff; color: var(--text); font-size: 13px; font-weight: 600; }
.hq-setup__list a.is-done { border-color: #ABEFC6; background: var(--ok-soft); color: #067647; }
.hq-chart { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding: 8px 0 22px; border-bottom: 1px solid var(--hq-line); }
.hq-chart > div { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.hq-chart i { display: block; width: 100%; max-width: 30px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--hq-navy-2), var(--hq-navy)); }
.hq-chart > div:last-child i { background: linear-gradient(180deg, #F0C766, var(--hq-gold)); }
.hq-chart span { position: absolute; bottom: -20px; color: var(--muted); font-size: 11px; }
.hq-list { margin: 0; padding: 0; list-style: none; }
.hq-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.hq-list li:last-child { border-bottom: 0; }
.hq-list a { display: flex; flex-direction: column; min-width: 0; color: var(--hq-ink); }
.hq-list a small { color: var(--muted); font-size: 12px; }
.hq-list__d { min-width: 74px; color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: right; }
.hq-feed { margin: 0; padding: 0; list-style: none; }
.hq-feed li { display: flex; flex-direction: column; gap: 2px; padding: 9px 0 9px 14px; border-left: 2px solid var(--hq-line); font-size: 14px; }
.hq-feed li small { color: var(--muted); font-size: 12px; }
.bad { color: var(--no) !important; } .warn { color: #B54708 !important; }

/* customers list */
.hq-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.hq-filter { padding: 6px 12px; border: 1px solid var(--hq-line); border-radius: 99px; background: #fff; color: var(--text); font-size: 13.5px; font-weight: 600; }
.hq-filter span { margin-left: 4px; color: var(--muted); font-weight: 500; }
.hq-filter:hover { color: var(--hq-ink); border-color: #C9D2E3; }
.hq-filter.is-on { border-color: var(--hq-navy); background: var(--hq-navy); color: #fff; } .hq-filter.is-on span { color: var(--hq-gold); }
.hq-search { margin-left: auto; min-width: 220px; height: 36px; padding: 0 12px; border: 1px solid #D0D5DD; border-radius: 8px; font: 500 14px var(--font); }
.hq-table .table td { vertical-align: middle; }
.hq-seat b { color: var(--hq-ink); }
.kind-tag { display: inline-block; padding: 1px 8px; border-radius: 4px; font: 700 10.5px/1.6 var(--font); letter-spacing: .08em; text-transform: uppercase; vertical-align: 2px; }
.kind-tag--school { background: #E8EEF9; color: #0B1842; } .kind-tag--family { background: #FDF2F8; color: #9D174D; }

/* licence and invoice status chips */
.lic-chip, .inv-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.lic-chip::before, .inv-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lic-chip--ok { background: var(--ok-soft); color: #067647; } .lic-chip--due { background: #FFFAEB; color: #B54708; } .lic-chip--trial { background: #EEF4FF; color: #163EC4; }
.lic-chip--grace { background: var(--brand-soft); color: var(--brand-dark); } .lic-chip--off { background: #F2F4F7; color: #344054; } .lic-chip--none { background: #F2F4F7; color: #667085; }
.inv-chip--open { background: #EEF4FF; color: #163EC4; } .inv-chip--overdue { background: var(--brand-soft); color: var(--brand-dark); } .inv-chip--paid { background: var(--ok-soft); color: #067647; } .inv-chip--void { background: #F2F4F7; color: #667085; }

/* customer page */
.hq-dl { display: grid; gap: 0; margin: 0; }
.hq-dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.hq-dl > div:last-child { border-bottom: 0; }
.hq-dl dt { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.hq-dl dd { margin: 0; color: var(--hq-ink); font-size: 14px; }
.hq-dl--review > div { grid-template-columns: 150px minmax(0, 1fr); }
.hq-person { display: flex; flex-direction: column; gap: 2px; margin: 0 0 12px; }
.hq-person b { font-size: 16px; color: var(--hq-ink); } .hq-person span { color: var(--muted); font-size: 13px; }
.bill-meter { display: block; height: 7px; margin-top: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bill-meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #12B76A, #039855); }
.bill-meter i.is-over { background: linear-gradient(90deg, #F79009, #D92D20); }
.bill-meter--sm { width: 90px; height: 5px; margin-top: 4px; }
.hq-code { display: block; padding: 10px 12px; border-radius: 8px; background: #0F172A; color: #E2E8F0; font-size: 13px; overflow-x: auto; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 700px) { .grid4 { grid-template-columns: 1fr 1fr; } }
.pct { display: flex; align-items: center; gap: 6px; } .pct input { width: 100%; }
.table--compact td { padding: 5px 8px; font-size: 13px; }

/* plan fields, term picker and the quote */
.term-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 4px 0 14px; }
.term-opt { position: relative; display: block; padding: 12px 14px; border: 1.5px solid var(--hq-line); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.term-opt input { position: absolute; opacity: 0; }
.term-opt span { display: flex; flex-direction: column; gap: 2px; }
.term-opt b { color: var(--hq-ink); font-size: 15px; } .term-opt em { color: var(--text); font-size: 13px; font-style: normal; font-weight: 600; } .term-opt small { color: #067647; font-size: 12px; font-weight: 600; }
.term-opt:hover { border-color: #C9D2E3; }
.term-opt:has(input:checked), .term-opt.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.term-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.quote { border: 1px solid var(--hq-line); border-radius: 12px; overflow: hidden; background: #fff; }
.quote__head { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: linear-gradient(135deg, var(--hq-navy), var(--hq-navy-2)); color: #fff; }
.quote__head span { color: rgba(255, 255, 255, .75); font-size: 13px; } .quote__head b { font-family: 'Manrope', system-ui, sans-serif; font-weight: 400; font-size: 28px; color: #fff; } .quote__head small { color: var(--hq-gold); font-size: 12.5px; }
.quote dl { margin: 0; padding: 10px 18px; }
.quote dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line-2); }
.quote dt { color: var(--text); } .quote dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; } .quote dd small { display: block; color: var(--muted); font-size: 11.5px; }
.quote .is-save dd, .quote .is-save dt { color: #067647; }
.quote .is-total { border-bottom: 0; padding-top: 10px; font-weight: 700; font-size: 15px; color: var(--hq-ink); }
.quote__eff { margin: 0; padding: 10px 18px 14px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 13px; }

/* onboarding wizard */
.wiz__steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: s; }
.wiz__steps li { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; background: #fff; border: 1px solid var(--hq-line); color: var(--muted); font-size: 13.5px; font-weight: 600; }
.wiz__steps li span { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--line-2); color: var(--muted); font-size: 12px; }
.wiz__steps li.is-on { border-color: var(--hq-navy); color: var(--hq-ink); } .wiz__steps li.is-on span { background: var(--hq-navy); color: #fff; }
.wiz__steps li.is-done span { background: #12B76A; color: #fff; }
.wiz__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.wiz__side { position: sticky; top: calc(var(--hdr, 60px) + 16px); }
.wiz__form { margin: 0; } .wiz__form h2 { margin-top: 0; } .wiz__form h3 { margin: 22px 0 10px; font-size: 15px; }
.wiz__nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); }
@media (max-width: 980px) { .wiz__grid { grid-template-columns: 1fr; } .wiz__side { position: static; } }
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kind-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1.5px solid var(--hq-line); border-radius: 12px; cursor: pointer; }
.kind-card input { position: absolute; opacity: 0; }
.kind-card.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.kind-card__i { font-size: 28px; } .kind-card b { color: var(--hq-ink); font-size: 16px; } .kind-card small { color: var(--muted); font-size: 13px; line-height: 1.45; }
@media (max-width: 640px) { .kind-pick { grid-template-columns: 1fr; } }
.wz-branch { margin-bottom: 10px; padding: 12px 14px; border: 1px solid var(--hq-line); border-radius: 10px; background: #FBFCFE; }
.wz-branch .field { margin-bottom: 8px; }
.wz-branch__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.wz-branch__row .checks__row { display: flex; gap: 14px; } .wz-branch__row label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin: 0; }
.wz-grades { flex: 1; min-width: 180px; height: 36px; padding: 0 10px; border: 1px solid #D0D5DD; border-radius: 8px; }
.wz-child { position: relative; align-items: end; }
.wz-child__rm { margin-bottom: 14px; }
.checks__row { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* payment methods */
.pm { margin: 10px 0; padding: 0; border: 0; } .pm legend { margin-bottom: 8px; color: var(--ink); font-weight: 500; font-size: 14px; }
.pm__opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-bottom: 10px; }
.pm__opt { position: relative; display: flex; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--hq-line); border-radius: 10px; cursor: pointer; }
.pm__opt input { margin-top: 3px; accent-color: var(--brand); }
.pm__opt span { display: flex; flex-direction: column; } .pm__opt b { color: var(--hq-ink); } .pm__opt small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.pm__opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* renewals board */
.rn-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .rn-board { grid-template-columns: 1fr 1fr; } } @media (max-width: 640px) { .rn-board { grid-template-columns: 1fr; } }
.rn-col { padding: 12px; border-radius: 12px; background: #EEF1F6; }
.rn-col header { display: grid; grid-template-columns: 1fr auto; margin-bottom: 10px; } .rn-col header span { padding: 0 8px; border-radius: 99px; background: #fff; font-weight: 700; font-size: 13px; } .rn-col header small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.rn-col--due header b { color: #B54708; } .rn-col--grace header b { color: #B42318; } .rn-col--readonly header b { color: #344054; } .rn-col--trial header b { color: #163EC4; }
.rn-card { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; padding: 12px; border-radius: 10px; background: #fff; color: var(--hq-ink); box-shadow: var(--shadow); }
.rn-card:hover { color: var(--hq-ink); box-shadow: var(--shadow-md); } .rn-card span { color: var(--text); font-size: 13px; } .rn-card small { color: var(--muted); font-size: 12px; } .rn-card em { color: #B42318; font-size: 12.5px; font-style: normal; font-weight: 700; }

/* gateways */
.gw__head { display: flex; justify-content: space-between; gap: 10px; } .gw__head h2 { margin: 0; }
.gw__state { align-self: flex-start; padding: 3px 10px; border-radius: 99px; background: #F2F4F7; color: #667085; font-size: 12px; font-weight: 700; white-space: nowrap; }
.gw__state.is-on { background: var(--ok-soft); color: #067647; }
.gw code { font-size: 12px; word-break: break-all; }
.hq-test-to { height: 40px; padding: 0 10px; border: 1px solid #D0D5DD; border-radius: 8px; min-width: 220px; }
.mail-frame { width: 100%; min-height: 640px; border: 1px solid var(--hq-line); border-radius: 12px; background: #fff; }
.mail-st { padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; } .mail-st--sent { background: var(--ok-soft); color: #067647; } .mail-st--failed { background: #FEF3F2; color: #B42318; } .mail-st--logged { background: #F2F4F7; color: #667085; }

/* HQ sign-in */
.hq-auth { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 16px; background: radial-gradient(60% 60% at 80% 10%, #1D3766 0, transparent 70%), linear-gradient(160deg, var(--hq-navy), #08111F); }
.hq-auth__card { width: 100%; max-width: 420px; padding: 34px; border-radius: 16px; background: #fff; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); }
.hq-auth__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 3px double var(--hq-navy); }
.hq-auth__brand .rp-org__mark { background: var(--hq-navy); }
.hq-auth__brand b { display: block; font-family: 'Manrope', system-ui, sans-serif; font-size: 19px; color: var(--hq-navy); } .hq-auth__brand small { color: #A07A1F; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.hq-auth h1 { margin: 0 0 4px; font-family: 'Manrope', system-ui, sans-serif; font-weight: 400; font-size: 26px; }
.hq-auth__alt { margin: 16px 0 0; text-align: center; } .hq-auth__foot { margin-top: 18px; color: rgba(255, 255, 255, .5); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
body:has(.hq-auth) .header, body:has(.hq-auth) .side, body:has(.hq-auth) .tabbar-wrap { display: none; }

/* ---------- themed subscription notice ---------- */
.licbar { --lic-accent: var(--brand, #163EC4); --lic-soft: var(--brand-soft, #EEF3FF); position: relative; display: flex; align-items: center; gap: 13px; min-height: 68px; padding: 10px clamp(18px, 2.6vw, 34px); border-top: 1px solid rgba(16, 24, 40, .045); border-bottom: 1px solid rgba(16, 24, 40, .07); background: var(--lic-soft); color: var(--ink, #101828); }
.licbar::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--lic-accent); }
.licbar__i { display: grid; flex: none; width: 38px; height: 38px; place-items: center; border: 1px solid color-mix(in srgb, var(--lic-accent) 13%, transparent); border-radius: 12px; background: color-mix(in srgb, #fff 76%, var(--lic-soft)); color: var(--lic-accent); }
.licbar__i svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.licbar__copy { display: grid; flex: 1; min-width: 0; gap: 3px; }
.licbar__heading { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; min-width: 0; }
.licbar__label { flex: none; padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--lic-accent) 15%, transparent); border-radius: 99px; background: color-mix(in srgb, #fff 74%, var(--lic-soft)); color: var(--lic-accent); font-size: 10px; font-weight: 800; letter-spacing: .075em; line-height: 1.35; text-transform: uppercase; }
.licbar__headline { color: var(--ink, #101828); font-size: 14px; font-weight: 650; line-height: 1.4; }
.licbar__headline b { color: var(--lic-accent); font-variant-numeric: tabular-nums; }
.licbar__detail { color: var(--muted, #667085); font-size: 12px; line-height: 1.4; }
.licbar__dot { padding: 0 4px; color: color-mix(in srgb, var(--lic-accent) 60%, #98A2B3); }
.licbar__btn { display: inline-flex; flex: none; align-items: center; justify-content: center; min-height: 40px; padding: 0 17px; border: 1px solid color-mix(in srgb, var(--lic-accent) 88%, #000); border-radius: 11px; background: var(--lic-accent); color: #fff; font: inherit; font-size: 13px; font-weight: 750; box-shadow: 0 3px 8px -5px color-mix(in srgb, var(--lic-accent) 85%, transparent); cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.licbar__btn:hover { color: #fff; filter: brightness(.96); box-shadow: 0 5px 12px -6px color-mix(in srgb, var(--lic-accent) 80%, transparent); transform: translateY(-1px); }
.licbar__btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--lic-accent) 25%, #fff); outline-offset: 2px; }
.licbar--info { background: color-mix(in srgb, var(--lic-accent) 4%, var(--tbg, #fff)); }
.licbar--warn, .licbar--bad { --lic-accent: var(--brand, #163EC4); --lic-soft: var(--brand-soft, #EEF3FF); background: color-mix(in srgb, var(--lic-accent) 7%, var(--tbg, #fff)); border-color: color-mix(in srgb, var(--lic-accent) 16%, transparent); }
.licbar--off { --lic-accent: #F2C66D; --lic-soft: #1F2937; border-color: #344054; background: #1F2937; color: #F9FAFB; }
.licbar--off .licbar__headline { color: #F9FAFB; } .licbar--off .licbar__detail { color: rgba(255, 255, 255, .72); }
.licbar--off .licbar__i, .licbar--off .licbar__label { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .08); color: var(--lic-accent); }
.licbar--off .licbar__btn { border-color: transparent; background: var(--lic-accent); color: #1F2937; box-shadow: none; }
@media (max-width: 620px) { .licbar { gap: 10px; padding: 10px 14px; } .licbar__i { width: 34px; height: 34px; border-radius: 10px; } .licbar__btn { min-height: 38px; padding: 0 12px; } .licbar__detail { font-size: 11px; } }

/* ---------- Billing page (account holder) ---------- */
.bill-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding: 24px 26px; border-radius: 14px; background: linear-gradient(135deg, var(--hq-navy), var(--hq-navy-2)); color: #fff; }
.bill-hero .eyebrow { color: var(--hq-gold); } .bill-hero h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0; color: #fff; font-family: 'Manrope', system-ui, sans-serif; font-weight: 400; } .bill-hero p { margin: 0; color: rgba(255, 255, 255, .85); } .bill-hero p b { color: #fff; }
.bill-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; } .bill-hero .btn:not(.btn--ghost) { background: var(--brand); color: #fff; } .bill-hero .btn:not(.btn--ghost):hover { background: var(--brand-dark); color: #fff; }
.bill-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.bill-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--hq-line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.bill-card > span { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.bill-card b { color: var(--hq-ink); font-size: 21px; font-variant-numeric: tabular-nums; } .bill-card b small { color: var(--muted); font-size: 13px; font-weight: 500; } .bill-card small { color: var(--muted); font-size: 12.5px; }
.bill-form .field { margin-bottom: 10px; }
.bill-fine { margin-top: 10px; }
.inv-table td { vertical-align: middle; }
.inv-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 14px; }
.bill-history__head { align-items: center; gap: 14px; }
.bill-history__head h2 { margin: 0; }
.bill-history__head p { margin: 4px 0 0; }
.bill-history__count { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border: 1px solid var(--brand-line, #DCE5FF); border-radius: 999px; background: var(--brand-soft, #F3F6FF); color: var(--brand-dark, #0E2CA0); font-size: 12px; font-weight: 700; white-space: nowrap; }
.bill-history__row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; min-width: 190px; }
.pay-table td { vertical-align: middle; }
.pay-table td:nth-child(4) { max-width: 230px; overflow-wrap: anywhere; }
.pay-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.pay-chip::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.pay-chip--paid { background: var(--ok-soft, #ECFDF3); color: #067647; }
.pay-chip--pending { background: var(--brand-soft, #EEF3FF); color: var(--brand-dark, #0E2CA0); }
.pay-chip--neutral { background: #F2F4F7; color: #475467; }
@media (max-width: 760px) { .bill-history__head { align-items: flex-start; } .bill-history__row-actions { min-width: 0; justify-content: flex-start; } }

/* renew terms */
.rn { display: grid; gap: 16px; }
.rn__current, .rn__scheduled { padding: 16px 18px; border: 1px solid var(--brand-line, #C9D6FB); border-radius: 14px; background: linear-gradient(135deg, #fff, var(--brand-soft, #EEF3FF)); }
.rn__current-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rn__current-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 10px; }
.rn__current-main b { color: var(--hq-ink); font-size: 19px; }
.rn__current-main > span, .rn__current > p, .rn__scheduled p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.rn__current > p { margin-top: 7px; }
.rn__scheduled { border-color: #DDE3FF; background: #F3F6FF; }
.rn__scheduled > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rn__scheduled > div b { color: var(--hq-ink); }
.rn__scheduled p { margin-top: 6px; }
.rn__scheduled .rn__cancel { margin-top: 10px; }
.rn__flag { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.rn__flag--current { background: var(--ok-soft, #ECFDF3); color: #067647; }
.rn__flag--scheduled { background: var(--brand-soft, #EEF3FF); color: var(--brand-dark, #0E2CA0); }
.rn__intro h3 { margin: 0 0 3px; color: var(--hq-ink); font-size: 16px; }
.rn__intro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.rn-consult { display: grid; gap: 14px; }
.rn-consult > p:first-child { margin: 0; padding: 14px 16px; border: 1px solid var(--brand-line, #C9D6FB); border-radius: 12px; background: var(--brand-soft, #EEF3FF); color: var(--text); line-height: 1.55; }
.rn-consult .field { margin: 0; }
.rn-consult textarea { min-height: 120px; resize: vertical; }
.rn-consult__context { margin: 0; padding: 12px 14px; border: 1px solid var(--hq-line); border-radius: 10px; background: #FAFBFF; color: var(--muted); font-size: 13px; }
.rn-consult .row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rn-consult .form-error { margin: 0; padding: 10px 12px; border: 1px solid var(--brand-line, #C9D6FB); border-radius: 10px; background: var(--brand-soft, #EEF3FF); color: var(--brand-dark, #0E2CA0); font-size: 13px; }
.rn-consult .btn:not(.btn--ghost) { background: var(--brand, #163EC4); color: #fff; }
.rn-consult .btn:not(.btn--ghost):hover { background: var(--brand-dark, #0E2CA0); }
.rn-consult .btn:disabled { opacity: .55; }
.rn__terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 10px 0; }
.rn__term { position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 14px; border: 1.5px solid var(--hq-line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.rn__term:hover { border-color: var(--brand-line, #C9D6FB); transform: translateY(-1px); }
.rn__term input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rn__term input:focus-visible + .rn__term-top { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.rn__term.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.rn__term.is-current { background: linear-gradient(180deg, #fff, #F8F9FF); }
.rn__term.is-current input { opacity: 0; }
.rn__term-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.rn__term-top b { color: var(--hq-ink); font-size: 16px; }
.rn__price { color: var(--hq-ink); font-weight: 700; } .rn__price small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.rn__save { align-self: flex-start; padding: 1px 8px; border-radius: 99px; background: var(--ok-soft); color: #067647; font-size: 12px; font-weight: 700; } .rn__save.is-none { background: var(--line-2); color: var(--muted); }
.rn__total { margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--text); }
.rn__total small { color: var(--muted); }
.rn__selection { margin: 0; padding: 10px 12px; border-radius: 10px; background: #F3F6FF; color: var(--brand-dark, #0E2CA0); font-size: 12.5px; line-height: 1.45; }
.rn .form-error, .rn-review .form-error { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--brand-line, #C9D6FB); border-radius: 10px; background: var(--brand-soft, #EEF3FF); color: var(--brand-dark, #0E2CA0); font-size: 13px; }
.rn .btn:not(.btn--ghost), .rn-review .btn:not(.btn--ghost) { background: var(--brand, #163EC4) !important; color: #fff !important; }
.rn .btn:not(.btn--ghost):hover, .rn-review .btn:not(.btn--ghost):hover { background: var(--brand-dark, #0E2CA0) !important; }
.rn .btn:disabled { background: var(--brand, #163EC4) !important; color: #fff !important; opacity: .48; }
.rn-review__compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--hq-line); border-radius: 14px; background: #FAFBFF; }
.rn-review__compare > div { display: grid; gap: 4px; min-width: 0; }
.rn-review__compare span:not(.rn-review__arrow) { color: var(--muted); font-size: 12px; }
.rn-review__compare b { color: var(--hq-ink); font-size: 17px; }
.rn-review__compare small { color: var(--muted); }
.rn-review__arrow { color: var(--brand); font-size: 22px; }
.rn-review__amount { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--brand-soft, #EEF3FF); }
.rn-review__amount span { color: var(--muted); font-size: 13px; }
.rn-review__amount b { color: var(--brand-dark, #0E2CA0); font-size: 22px; font-variant-numeric: tabular-nums; }
.rn-review > p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.rn-review__note { padding: 10px 12px; border-radius: 10px; background: #F3F6FF; color: var(--brand-dark, #0E2CA0) !important; }
@media (max-width: 620px) { .rn-review__compare { grid-template-columns: 1fr; } .rn-review__arrow { transform: rotate(90deg); justify-self: center; } }
.paym__amt { margin: 0 0 14px; font: 800 30px 'Manrope', system-ui, sans-serif; color: var(--hq-ink); } .paym__amt small { margin-left: 8px; color: var(--muted); font: 500 13px var(--font); }
.paym__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; } .paym__opts section { min-width: 0; padding: 14px; border: 1px solid var(--hq-line); border-radius: 12px; } .paym__opts h3 { margin: 0 0 10px; font-size: 16px; line-height: 1.35; }
.paym__opts--demo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.paym__opts--demo section { display: flex; min-height: 370px; flex-direction: column; padding: 20px; border-color: #E5E7EB; border-radius: 16px; background: linear-gradient(180deg, #FFFFFF, #F3F6FF); box-shadow: 0 3px 12px rgba(16, 24, 40, .035); }
.paym__schedule { margin: 0 0 16px; padding: 14px 16px; border: 1px solid #C7D7FE; border-radius: 12px; background: #F5F7FF; color: var(--hq-ink); }
.paym__schedule p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.paym__invoice { margin: -8px 0 14px; color: var(--muted); font-size: 13px; }
.paym__badge { display: inline-flex; align-self: flex-start; margin-bottom: 8px; padding: 5px 10px; border-radius: 99px; background: #EEF3FF; color: #0E2CA0; font-size: 10px; font-weight: 800; letter-spacing: .08em; line-height: 1.3; }
.paym__badge--alt { background: #ECFDF3; color: #027A48; }
.paym__testcard { display: flex; min-height: 150px; flex-direction: column; justify-content: space-between; gap: 8px; margin: 4px 0 14px; padding: 18px; border-radius: 14px; background: linear-gradient(135deg, #0E2CA0, #285CF0); color: #fff; box-shadow: 0 8px 18px rgba(14, 44, 160, .16); }
.paym__testcard b { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.paym__testcard strong { font-size: clamp(15px, 1.5vw, 18px); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.paym__testcard small { color: rgba(255, 255, 255, .82); }
.paym__card-note { min-height: 38px; margin: 0 0 16px; line-height: 1.55; }
.paym__mp-form { display: flex; flex: 1; flex-direction: column; gap: 12px; margin: 4px 0 0; }
.paym__opts--demo .field { width: 100%; margin: 0; }
.paym__opts--demo .field input { width: 100%; box-sizing: border-box; }
.paym__mp-msg { min-height: 42px; margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
#pm-test-card, #pm-mp-send, #pm-mp-approve, #pm-save-card, #pm-save-mp-confirm { display: inline-flex; width: 100%; min-height: 46px; align-items: center; justify-content: center; margin-top: auto; border: 1px solid #079455; border-radius: 11px; background: #079455; color: #fff; font-weight: 750; }
#pm-test-card:hover, #pm-mp-send:hover, #pm-mp-approve:hover, #pm-save-card:hover, #pm-save-mp-confirm:hover { border-color: #067647; background: #067647; color: #fff; }
.paym__approve { display: block; margin-top: 10px !important; }
.paym__demo-note { margin: 14px 0 0; padding: 11px 14px; border: 1px solid #ABEFC6; border-radius: 10px; background: #ECFDF3; color: #067647; font-size: 12px; line-height: 1.5; }
.paym .field { margin: 12px 0; }
@media (max-width: 760px) { .paym__opts { grid-template-columns: 1fr; } .paym__opts--demo section { min-height: 0; } .paym__card-note { min-height: 0; } }

/* over the licence prompt */
.over__nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.over__nums > div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; background: var(--line-2); } .over__nums b { font-size: 22px; color: var(--hq-ink); } .over__nums span { color: var(--muted); font-size: 12px; }
.over__nums .is-add { background: #EEF4FF; } .over__nums .is-over { background: #FFFAEB; } .over__nums .is-over b { color: #B54708; }
.over__rules { margin: 0 0 12px; padding-left: 18px; color: var(--text); font-size: 14px; } .over__rules li { margin-bottom: 4px; }
.over__agree { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 14px; padding: 10px 12px; border-radius: 8px; background: #FFFAEB; font-size: 14px; font-weight: 600; color: #93370D; } .over__agree input { margin-top: 3px; }
@media (max-width: 560px) { .over__nums { grid-template-columns: 1fr 1fr; } }

/* ---------- the invoice document ---------- */
.invdoc { position: relative; max-width: 860px; margin: 0 auto; padding: 44px 50px; border: 1px solid #D9DEE7; border-radius: 4px; background: #fff; color: #1F2937; box-shadow: 0 18px 40px -30px rgba(16, 24, 40, .35); font-size: 14px; }
.invdoc__head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 3px double #0B1842; }
.invdoc__head .rp-org__name small { display: block; color: #6B7280; font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.invdoc__title { text-align: right; } .invdoc__title h1 { margin: 0; font: 800 30px 'Manrope', system-ui, sans-serif; color: #111827; letter-spacing: .02em; text-transform: uppercase; } .invdoc__title b { font-family: ui-monospace, Consolas, monospace; font-size: 14px; color: #0B1842; }
.invdoc__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 22px 0; }
.invdoc__meta > div { display: flex; flex-direction: column; gap: 2px; } .invdoc__meta > div > span { color: #6B7280; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; } .invdoc__meta > div b { font-size: 16px; color: #111827; } .invdoc__meta small { color: #4B5563; font-size: 13px; }
.invdoc__meta dl { margin: 0; } .invdoc__meta dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid #ECEFF4; font-size: 13.5px; } .invdoc__meta dt { color: #6B7280; } .invdoc__meta dd { margin: 0; color: #111827; font-weight: 600; }
.invdoc__lines { width: 100%; border-collapse: collapse; border-top: 2px solid #0B1842; font-size: 13.5px; }
.invdoc__lines th { padding: 8px 10px; border-bottom: 1px solid #0B1842; color: #0B1842; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.invdoc__lines td { padding: 10px; border-bottom: 1px solid #ECEFF4; vertical-align: top; } .invdoc__lines td small { display: block; margin-top: 2px; color: #6B7280; font-size: 12px; }
.invdoc__lines .is-n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.invdoc__lines tr.is-disc td { color: #067647; }
.invdoc__totals { display: flex; justify-content: flex-end; margin-top: 8px; } .invdoc__totals dl { min-width: 300px; margin: 0; }
.invdoc__totals dl > div { display: flex; justify-content: space-between; padding: 6px 10px; font-variant-numeric: tabular-nums; } .invdoc__totals dt { color: #4B5563; } .invdoc__totals dd { margin: 0; }
.invdoc__totals .is-total { border-top: 1px solid #0B1842; font-weight: 700; font-size: 15.5px; color: #111827; }
.invdoc__pay { margin-top: 24px; padding: 14px 16px; border: 1px solid #ECEFF4; border-radius: 6px; background: #F8FAFC; } .invdoc__pay h3, .invdoc__paid h3 { margin: 0 0 8px; font: 700 11px var(--font); letter-spacing: .1em; text-transform: uppercase; color: #0B1842; }
.invdoc__ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; font-size: 13px; } .invdoc__ways p { margin: 2px 0 0; color: #4B5563; }
.invdoc__paid { margin-top: 18px; }
.invdoc__note { margin-top: 14px; color: #6B7280; font-size: 12.5px; font-style: italic; }
.invdoc__foot { margin-top: 28px; padding-top: 10px; border-top: 1px solid #D9DEE7; color: #9CA3AF; font-size: 11.5px; text-align: center; }
.invdoc__stamp { position: absolute; top: 120px; right: 50px; padding: 6px 16px; border: 3px solid currentColor; border-radius: 6px; font: 800 22px var(--font); letter-spacing: .14em; text-transform: uppercase; opacity: .85; transform: rotate(-8deg); }
.invdoc__stamp--paid { color: #079455; } .invdoc__stamp--overdue { color: var(--brand-dark, #0E2CA0); } .invdoc__stamp--void { color: #98A2B3; }
@media (max-width: 700px) { .invdoc { padding: 24px 18px; } .invdoc__meta, .invdoc__ways { grid-template-columns: 1fr; } .invdoc__stamp { top: 90px; right: 18px; font-size: 16px; } }
@media print {
    body.printing-inv > *:not(#app) { display: none !important; }
    body.printing-inv #app { margin: 0 !important; }
    body.printing-inv #app .page > *:not(.invdoc) { display: none !important; }
    body.printing-inv .wrap.page { max-width: none; padding: 0; }
    body.printing-inv .invdoc { max-width: none; border: 0; box-shadow: none; padding: 0; }
    body.printing-inv .invdoc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- plans page and family sign-up ---------- */
.plans-grid--2 { grid-template-columns: repeat(2, minmax(0, 420px)) !important; justify-content: center; }
@media (max-width: 860px) { .plans-grid--2 { grid-template-columns: 1fr !important; } }
.plan__terms { margin: 0 0 16px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.plan__terms li { display: grid; grid-template-columns: 1fr auto 80px; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; border-bottom: 1px solid var(--line-2); }
.plan__terms li:last-child { border-bottom: 0; } .plan__terms b { font-variant-numeric: tabular-nums; } .plan__terms em { color: #067647; font-size: 12px; font-style: normal; font-weight: 700; text-align: right; } .plan__terms em.is-none { color: var(--muted); font-weight: 500; }
.join--wide { max-width: 680px !important; text-align: left !important; } .join--wide > .brand__mark, .join--wide > .auth__school-kicker, .join--wide > h1 { display: block; text-align: center; margin-left: auto; margin-right: auto; } .join--wide > p.muted { text-align: center; }
.join--wide > .brand__mark { display: flex; align-items: center; justify-content: center; }
.join--wide h3 { margin: 20px 0 8px; font-size: 15px; } .join-kid { align-items: end; }
.join-sum { display: flex; flex-direction: column; gap: 2px; margin: 14px 0; padding: 12px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); font-size: 14px; } .join-sum b { font-size: 15px; }

/* HQ actions in navy and gold rather than the learning app's purple */
body.is-hq .btn:not(.btn--ghost):not(.btn--danger):not(.btn--amber):not(.btn--green), .hq-auth .btn { background: var(--hq-navy-2); color: #fff; }
body.is-hq .btn:not(.btn--ghost):not(.btn--danger):not(.btn--amber):not(.btn--green):hover, .hq-auth .btn:hover { background: var(--hq-navy); color: #fff; }
body.is-hq .tab.is-on { color: var(--hq-navy); border-color: var(--hq-gold); }
.hq-grid { align-items: start; }
body .bill-hero .btn:not(.btn--ghost):not(.btn--danger) { background: var(--brand); color: #fff; filter: none; }
.lic-chip, .inv-chip { font-family: var(--font); letter-spacing: 0; }
.slug-in { display: flex; align-items: center; border: 1px solid #D0D5DD; border-radius: var(--radius-sm, 8px); background: #fff; overflow: hidden; }
.slug-in em { padding: 0 4px 0 12px; color: var(--muted); font-size: 13px; font-style: normal; white-space: nowrap; }
.slug-in input { flex: 1; min-width: 60px; border: 0 !important; box-shadow: none !important; padding-left: 0 !important; font-weight: 700; }

/* ---------- school branches (school console) ---------- */
.br-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 18px; }
.br-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.br-card header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
.br-card h2 { margin: 0; font-size: 18px; } .br-card header small { color: var(--muted); font-size: 13px; }
.br-card__n { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; }
.br-card__n div { padding: 8px 10px; border-radius: 8px; background: var(--line-2); } .br-card__n dt { color: var(--muted); font-size: 11.5px; } .br-card__n dd { margin: 0; color: var(--ink); font-size: 18px; font-weight: 700; }
.lvl { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.lvl--super { background: #FFF4D6; color: #8A5A00; } .lvl--lead { background: #E8EEF9; color: #0B1842; } .lvl--branch { background: #EEF4FF; color: #163EC4; }
.up-branch { min-width: 280px; height: 40px; margin-top: 6px; padding: 0 10px; border: 1px solid #D0D5DD; border-radius: 8px; font: 500 14px var(--font); }

/* ---------- parent view: school life ---------- */
.pv-where { display: grid; grid-template-columns: 1fr 160px 1.4fr; gap: 1px; margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.pv-where > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: #fff; }
.pv-where span { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pv-where b { color: var(--ink); font-size: 15px; } .pv-where small { color: var(--muted); font-size: 12.5px; }
.pv-where__cls b + small { margin-bottom: 4px; }
@media (max-width: 760px) { .pv-where { grid-template-columns: 1fr; } }
.pv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pv-grid > section, .pv-grid > div > section { margin: 0 0 16px; }
@media (max-width: 900px) { .pv-grid { grid-template-columns: 1fr; } }
.pv-list { margin: 0; padding: 0; list-style: none; }
.pv-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.pv-list li:last-child { border-bottom: 0; }
.pv-list__i { font-size: 18px; text-align: center; } .pv-list b { color: var(--ink); } .pv-list small { display: block; color: var(--muted); font-size: 12.5px; }
.pv-place { font-size: 17px; white-space: nowrap; } .pv-place small { display: inline; font-weight: 500; }
/* linking parents in the person form */
.pg { margin: 6px 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #FBFCFE; }
.pg legend { padding: 0 6px; color: var(--ink); font-weight: 600; font-size: 14px; }
.pg__modes { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; font-size: 14px; } .pg__modes label { display: inline-flex; align-items: center; gap: 6px; }
.pg__find { width: 100%; height: 38px; margin-bottom: 6px; padding: 0 10px; border: 1px solid #D0D5DD; border-radius: 8px; font: 500 14px var(--font); }
.pg__existing select { width: 100%; padding: 4px; border: 1px solid #D0D5DD; border-radius: 8px; font: 500 14px var(--font); }
.pg__now { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.pg__chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--brand-line); border-radius: 10px; background: var(--brand-soft); }
.pg__chip span { display: flex; flex-direction: column; line-height: 1.2; } .pg__chip small { color: var(--muted); font-size: 12px; }
.pg__kids { max-height: 220px; } .pg__kids label { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; } .pg__kids small { color: var(--muted); }
.pg-quick { font-size: 13px; }

/* Teacher form – what they teach */
.tc__subs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 12px; } .tc__subs > span { margin-right: 4px; font-weight: 600; font-size: 13px; color: var(--ink-2, #475467); }
.chip-check { display: inline-flex; cursor: pointer; } .chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { padding: 5px 12px; border: 1px solid #D0D5DD; border-radius: 999px; background: #fff; font: 500 13px var(--font); color: #344054; transition: background .15s, border-color .15s; }
.chip-check input:checked + span { background: var(--brand, #1D4ED8); border-color: var(--brand, #1D4ED8); color: #fff; } .chip-check input:focus-visible + span { outline: 2px solid var(--brand, #1D4ED8); outline-offset: 2px; }
.tc__groups { display: grid; gap: 8px; max-height: 320px; overflow: auto; padding-right: 4px; }
.tc__g { border: 1px solid var(--line); border-radius: 10px; background: #fff; } .tc__g.is-other, .tc__g[hidden] { display: none; }
.tc__all { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #F8FAFC; border-radius: 10px 10px 0 0; font-size: 14px; cursor: pointer; } .tc__all small { color: #667085; }
.tc__cls { padding: 4px 12px 6px 32px; }
.tc__c { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 5px 0; font-size: 14px; } .tc__c + .tc__c { border-top: 1px dashed #EAECF0; }
.tc__c > label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; } .tc__c small { color: #667085; }
.tc__lead { font-size: 13px; color: #344054; } .tc__lead.is-off { opacity: .45; }
.tc-lead { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #ECFDF3; color: #067647; font-size: 11.5px; font-weight: 600; white-space: nowrap; }

/* registers: a name stays on one line; email and username share a cell */
.reg-table td:nth-child(2) { white-space: nowrap; }
.reg-who { display: flex; flex-direction: column; gap: 2px; } .reg-who code { width: max-content; font-size: 12px; color: #667085; }
/* classes register */
.table td select { height: 34px; max-width: 190px; padding: 0 28px 0 10px; border: 1px solid #D0D5DD; border-radius: 8px; background-color: #fff; font: 500 13.5px var(--font); color: #101828; }
.cls-level { white-space: nowrap; } .cls-subs small { display: block; }
.cls-subs div + div { margin-top: 6px; }

/* guided self-service registration and payment */
.checkout-form { width: min(940px, calc(100vw - 32px)); max-width: 940px !important; max-height: calc(100vh - 32px); overflow-y: auto; padding: clamp(22px, 4vw, 42px); border: 1px solid #E5E7EB; border-radius: 24px; box-shadow: 0 24px 70px rgba(20, 28, 55, .16); }
.checkout-form > h1 { margin: 10px 0; text-align: left; font-size: clamp(28px, 4vw, 38px); }
.checkout-form > .muted { margin: 0 0 22px; line-height: 1.65; }
.checkout-form h2 { margin: 26px 0 14px; padding-bottom: 9px; border-bottom: 1px solid #EAECF0; font-size: 18px; }
.checkout-form .field { min-width: 0; }
.checkout-passwords { margin: 4px 0 20px; padding: 16px 18px 13px; border: 1px solid #DCE5FF; border-radius: 16px; background: linear-gradient(135deg, #FAFBFF, #F3F6FF); }
.checkout-passwords .grid2 { gap: 12px 16px; }
.checkout-passwords .field { margin: 0; }
.checkout-passwords .password-control--field { margin: 0; }
.checkout-passwords__hint { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; color: #667085; font-size: 13px; line-height: 1.45; }
.checkout-passwords__hint svg { flex: 0 0 17px; width: 17px; height: 17px; margin-top: 1px; fill: none; stroke: #163EC4; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.checkout-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.checkout-steps span { padding: 8px 12px; border: 1px solid #E4E7EC; border-radius: 999px; background: #F8FAFC; color: #667085; font-size: 12px; font-weight: 700; }
.checkout-steps .is-active { border-color: #C9D6FB; background: #EEF3FF; color: #0E2CA0; }
.join-kid { padding: 14px 14px 0; border: 1px solid #EAECF0; border-radius: 14px; background: #FAFBFF; }
.checkout-branch { min-width: 0; margin: 0 0 12px; padding: 14px 14px 4px; border: 1px solid #E4E7EC; border-radius: 14px; }
.checkout-branch legend { padding: 0 8px; color: #344054; font-size: 14px; font-weight: 800; }
.checkout-branch [data-remove-branch] { margin-bottom: 10px; }
.term-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.term-opt { display: flex; gap: 10px; align-items: flex-start; min-width: 0; padding: 12px; border: 1px solid #E4E7EC; border-radius: 13px; background: #fff; cursor: pointer; }
.term-opt:has(input:checked) { border-color: #285CF0; background: #F3F6FF; box-shadow: 0 0 0 2px rgba(40, 92, 240, .1); }
.term-opt input, .pm__opt input { margin-top: 3px; accent-color: #163EC4; }
.term-opt span, .pm__opt span { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.term-opt em { color: #344054; font-size: 13px; font-style: normal; }
.term-opt small, .pm__opt small { color: #667085; font-size: 12px; line-height: 1.45; }
.pm__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.pm__opt { display: flex; gap: 10px; padding: 14px; border: 1px solid #E4E7EC; border-radius: 13px; background: #fff; cursor: pointer; }
.pm__opt:has(input:checked) { border-color: #285CF0; background: #F3F6FF; }
.checkout-mpesa[hidden] { display: none; }
.join-sum { gap: 5px; margin: 16px 0; padding: 16px; border: 1px solid #DDE3FF; border-radius: 14px; background: #F3F6FF; }
.join-sum b { font-size: 18px; }
.join-sum span, .join-sum small { color: #667085; line-height: 1.5; }
.checkout-terms { display: flex; gap: 9px; align-items: flex-start; margin: 18px 0; color: #475467; font-size: 13px; line-height: 1.5; }
.checkout-terms input { margin-top: 3px; accent-color: #163EC4; }
.checkout-note { margin: 14px 0; padding: 14px 16px; border: 1px solid #F5D7A8; border-radius: 12px; background: #FFFAEB; color: #7A4F0B; line-height: 1.55; }
.checkout-note p { margin: 4px 0 0; }
.checkout-form .form-error { margin: 14px 0; color: #B42318; }
.checkout-resume { margin-top: 10px; }
.checkout-state { min-height: 100px; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; color: #667085; }
.checkout-state--content { display: block; min-height: 0; text-align: left; }
.checkout-state--content > .checkout-success { text-align: center; }
.checkout-details h1 { margin: 4px 0 10px; }
.checkout-details > .muted { margin: 0 0 18px; line-height: 1.55; }
.checkout-details .checkout-steps { margin: 18px 0 22px; }
.checkout-detail-rows { display: grid; gap: 12px; }
.checkout-details .btn--block { margin-top: 16px; }
.checkout-review-list { display: grid; gap: 8px; margin: 16px 0 22px; padding: 0; list-style: none; text-align: left; }
.checkout-review-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 14px 16px; border: 1px solid #E4E7EC; border-radius: 12px; background: #FAFBFF; }
.checkout-review-list li span { color: #667085; }
.checkout-finish__actions { display: flex; justify-content: flex-end; gap: 10px; margin: 20px 0 0; }
.checkout-wait { padding: 20px; border-radius: 16px; background: #F8FAFC; text-align: center; }
.checkout-wait__amount { display: block; color: #101828; font-size: 30px; font-weight: 800; }
.checkout-wait .row-actions { justify-content: center; margin: 18px 0; }
.checkout-success { text-align: center; }
.checkout-success__mark { display: grid; width: 56px; height: 56px; place-items: center; margin: 0 auto 14px; border-radius: 50%; background: #DCFCE7; color: #15803D; font-size: 30px; font-weight: 800; }
.checkout-success > h1 { margin: 4px 0 10px; }
.checkout-success__lead { color: #475467; line-height: 1.6; }
.checkout-login { display: grid; gap: 7px; max-width: 460px; margin: 20px auto; padding: 18px; border: 1px solid #E4E7EC; border-radius: 16px; background: #FAFBFF; text-align: left; }
.checkout-login .btn { justify-self: start; margin-top: 8px; }
.checkout-note--ok { border-color: #ABEFC6; background: #ECFDF3; color: #067647; }
.checkout-invoice { margin: 18px 0; color: #475467; }
@media (max-width: 700px) {
    .checkout-form { width: calc(100vw - 20px); max-height: calc(100vh - 20px); padding: 20px; border-radius: 18px; }
    .checkout-form .grid2, .checkout-form .grid3, .term-pick, .pm__opts { grid-template-columns: 1fr; }
    .checkout-passwords { padding: 14px; }
    .checkout-finish__actions { flex-direction: column-reverse; }
}
