/* Extra styles for the registration form and admin, on top of the website's site.css. */

.app-wrap { max-width: var(--wide, 1200px); margin: 0 auto; padding: 0 var(--gutter, 20px) clamp(48px, 6vw, 80px); }
.app-wrap.narrow { max-width: 860px; }

/* Registration form */
.child-block { border: 1px solid rgba(29, 36, 85, .14); border-radius: 18px; padding: 20px 20px 4px; margin: 0 0 18px; position: relative; background: rgba(255, 255, 255, .55); }
.child-block legend { font: italic 500 22px var(--display, Georgia, serif); color: var(--navy, #1d2455); padding: 0 8px; }
.child-block .remove-child { position: absolute; top: 14px; right: 14px; }
.link-button { border: 0; background: none; color: var(--navy, #1d2455); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; padding: 0; }
.add-child { margin: 4px 0 24px; }
.declarations { border: 0; padding: 0; margin: 8px 0 18px; }
.declarations legend { font-weight: 600; margin-bottom: 10px; }
.declarations .consent-row { margin-bottom: 12px; }
.form-errors { background: #fdf0ee; border: 1px solid #c0392b; color: #7b2318; border-radius: 14px; padding: 14px 18px; margin-bottom: 22px; }
.form-errors ul { margin: 6px 0 0; padding-left: 20px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ref-box { font: 500 clamp(28px, 4vw, 40px) var(--display, Georgia, serif); color: var(--navy, #1d2455); letter-spacing: .02em; margin: 8px 0 16px; }
.policy-body h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 28px 0 8px; }
.policy-body p { max-width: 70ch; }

/* Admin */
.admin-bar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin: 0 0 20px; }
.admin-bar nav a { margin-right: 16px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar input[type=search] { flex: 1; min-width: 220px; }
.toolbar input, .toolbar select { width: auto; }
.data-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid rgba(29, 36, 85, .12); text-align: left; vertical-align: top; }
.data-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted, #666); }
.right { text-align: right; }
.data-table tbody tr:hover { background: rgba(189, 150, 84, .07); }
.table-wrap { overflow-x: auto; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: #eceef5; color: var(--navy, #1d2455); }
.status-new { background: #e3ecfb; } .status-contacted { background: #f6ecd8; } .status-admitted { background: #e2f3e7; color: #1d5b33; }
.status-declined { background: #eee; color: #555; } .status-withdrawn { background: #fbe6e3; color: #8a2a1d; }
.details { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0 0 8px; }
.details dt { font-weight: 600; } .details dd { margin: 0; }
.admin-section { margin-top: 28px; }
.admin-section h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 10px; }
.button.danger { background: #b03a2e; border-color: #b03a2e; color: #fff; }
.inline-form { display: inline; }
.notice-box { background: rgba(189, 150, 84, .12); border-radius: 14px; padding: 14px 18px; margin-bottom: 24px; }

/* Admission letter */
.letter { background: #fff; color: #1b1b1b; max-width: 760px; margin: 0 auto; padding: clamp(24px, 5vw, 56px); border-radius: 6px; box-shadow: 0 20px 50px -30px rgba(29, 36, 85, .4); font-size: 16px; line-height: 1.6; }
.letterhead { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--gold, #bd9654); padding-bottom: 14px; margin-bottom: 24px; }
.letterhead img { width: 56px; height: auto; }
.letterhead strong { display: block; font: 600 22px var(--display, Georgia, serif); color: var(--navy, #1d2455); }
.letterhead span { font-size: 12px; letter-spacing: .14em; color: #666; }
.letter table { border-collapse: collapse; margin: 12px 0 18px; min-width: 60%; }
.letter td, .letter th { border: 1px solid #ddd; padding: 8px 12px; }
.letter .right { text-align: right; }

@media (max-width: 640px) { .details { grid-template-columns: 1fr; } }
@media print {
  .site-header, .site-footer, .skip-link, .no-print, .motion-toggle { display: none !important; }
  body, main { background: #fff !important; }
  .app-wrap { padding: 0; max-width: none; }
  .letter { box-shadow: none; padding: 0; max-width: none; }
}

/* spacing fixes after visual review */
.admin-page .app-wrap { padding-top: clamp(28px, 4vw, 48px); }
.enquiry-panel form h3 { margin: 28px 0 14px; }
.enquiry-panel form > h3:first-child { margin-top: 18px; }

/* ---------- Registration: school / tuition switch, timetable, totals ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kind-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 22px; }
.kind-switch a { display: block; padding: 14px 16px; border: 2px solid rgba(29, 36, 85, .15); border-radius: 16px; text-decoration: none; color: var(--navy, #1d2455); background: #fff; }
.kind-switch a strong { display: block; font-size: 17px; }
.kind-switch a span { font-size: 13px; color: var(--muted, #666); }
.kind-switch a.active { border-color: var(--navy, #1d2455); background: var(--navy, #1d2455); color: #fff; }
.kind-switch a.active span { color: #d7dcf0; }
.kind-switch a:not(.active):hover { border-color: var(--gold, #bd9654); }
.field-label { display: block; font-weight: 600; margin-bottom: 4px; }
.session-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.session-row label { margin: 0; }
.session-row select, .session-row input[type=time] { width: auto; }
.session-row .grow { flex: 1; min-width: 160px; }
.session-row .grow input { width: 100%; }
.child-total { background: rgba(189, 150, 84, .12); border-radius: 12px; padding: 10px 14px; margin: 6px 0 14px; }
.child-total:empty { display: none; }
.grand-total { font-size: 18px; background: var(--navy, #1d2455); color: #fff; border-radius: 14px; padding: 14px 18px; margin: 0 0 22px; }
.grand-total .muted { color: #c9d0e3; font-size: 14px; }
.grand-total:empty { display: none; }

/* ---------- Staff area ---------- */
.admin-title { font-size: clamp(30px, 4vw, 44px); margin: 0 0 12px; }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--navy, #1d2455); font-weight: 600; }
.admin-nav a[aria-current] { background: var(--navy, #1d2455); color: #fff; }
.admin-nav a:not([aria-current]):hover { background: rgba(29, 36, 85, .08); }
.how-steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.how-steps li { background: #fff; border: 1px solid rgba(29, 36, 85, .12); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 20px; }
.stat-card { display: block; background: #fff; border: 2px solid transparent; border-radius: 18px; padding: 16px 18px; text-decoration: none; color: var(--navy, #1d2455); box-shadow: 0 10px 30px -24px rgba(29, 36, 85, .5); }
.stat-card:hover, .stat-card.active { border-color: var(--gold, #bd9654); }
.stat-n { display: block; font: 600 34px var(--display, Georgia, serif); line-height: 1.1; }
.stat-label { display: block; font-weight: 700; }
.stat-hint { display: block; font-size: 13px; color: var(--muted, #666); }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pill-tabs { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; border: 1px solid rgba(29, 36, 85, .12); }
.pill-tabs a { padding: 6px 16px; border-radius: 999px; text-decoration: none; color: var(--navy, #1d2455); font-weight: 600; }
.pill-tabs a[aria-current] { background: var(--navy, #1d2455); color: #fff; }
.reg-table td { vertical-align: middle; }
.kind { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #eef0f7; color: var(--navy, #1d2455); }
.kind-tuition { background: #f6ecd8; color: #6b4e1d; }
.empty-state { text-align: center; background: #fff; border-radius: 22px; padding: clamp(28px, 5vw, 56px); margin-top: 16px; }
.share-link code { background: #f4f1ea; padding: 6px 10px; border-radius: 8px; word-break: break-all; }
.detail-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; }
.contact-quick { display: flex; flex-direction: column; gap: 4px; text-align: right; font-weight: 600; }
.next-step { background: var(--navy, #1d2455); color: #fff; border-radius: 22px; padding: 22px 26px; margin: 16px 0 22px; }
.next-step h2 { color: #fff; margin: 0 0 6px; font-size: clamp(22px, 2.6vw, 30px); }
.next-step p { color: #dfe3f2; }
.next-step .button.outline { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .6); }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.action-row input[type=text] { flex: 1; min-width: 220px; }
.button.outline { background: transparent; color: var(--navy, #1d2455); border: 2px solid rgba(29, 36, 85, .35); box-shadow: none; }
.help { font-size: 14px; color: var(--muted, #666); margin: 6px 0; }
.help.warn { color: #8a4b0f; font-weight: 600; }
.flash { background: #e2f3e7; color: #1d5b33; border-radius: 14px; padding: 12px 16px; font-weight: 600; margin: 12px 0; }
.child-card { background: #fff; border-radius: 20px; padding: 18px 22px; margin-bottom: 14px; box-shadow: 0 10px 30px -26px rgba(29, 36, 85, .6); }
.child-card h3 { margin: 0 0 10px; font-size: 22px; }
.child-card h3 .muted { font-size: 15px; font-family: inherit; }
.sub-panel { border-top: 1px solid rgba(29, 36, 85, .1); margin-top: 12px; padding-top: 12px; }
.sub-panel h4 { margin: 0 0 6px; }
.data-table.compact td, .data-table.compact th { padding: 6px 10px; }
.note-form label { font-weight: 600; display: block; margin-top: 14px; }
.danger-zone { border: 1px solid rgba(176, 58, 46, .25); }
.not-found .action-row { margin-top: 14px; }

/* Payment details pop-up (shown until saved) */
.setup-dialog { position: fixed; inset: 0; margin: auto; z-index: 100; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  border: 0; border-radius: 24px; padding: 28px; box-shadow: 0 0 0 100vmax rgba(19, 26, 66, .55), 0 30px 80px -20px rgba(0, 0, 0, .5); background: #fffdf8; }
.setup-dialog h2 { margin: 6px 0 8px; }
.setup-dialog .field { margin-bottom: 14px; }
.setup-dialog label { display: block; font-weight: 600; margin-bottom: 4px; }
.setup-dialog input { width: 100%; }

@media (max-width: 640px) {
  .kind-switch { grid-template-columns: 1fr; }
  .contact-quick { text-align: left; }
  .reg-table th:nth-child(3), .reg-table td:nth-child(3) { display: none; }
}
.next-step .button:not(.gold):not(.outline) { background: #fff; color: var(--navy, #1d2455); }

/* ---------- Staff sign-in and accounts ---------- */
.auth-panel { max-width: 460px; margin: 0 auto; }
.auth-panel .field { margin-bottom: 14px; }
.auth-panel label { display: block; font-weight: 600; margin-bottom: 4px; }
.auth-panel input { width: 100%; }
.account-menu { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.temp-password { background: #fff7e6; border: 2px solid var(--gold, #bd9654); border-radius: 20px; padding: 18px 22px; margin: 10px 0 20px; }
.temp-password h2 { margin: 0 0 6px; font-size: clamp(22px, 2.4vw, 28px); }
.temp-value code { font-size: 22px; letter-spacing: .06em; background: #fff; padding: 6px 12px; border-radius: 10px; }

/* ---------- Signed documents ---------- */
.doc-list { list-style: none; padding: 0; margin: 10px 0 16px; }
.doc-list li { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(29, 36, 85, .1); }
.doc-list .action-row { margin: 0; }
.upload-form input[type=file] { width: 100%; padding: 10px; border: 2px dashed rgba(29, 36, 85, .25); border-radius: 12px; background: #fff; }
.signed-tag { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; color: #1d5b33; }

/* ---------- Phones: staff area built for one hand ---------- */
@media (max-width: 720px) {
  .admin-page .app-wrap { padding-left: 14px; padding-right: 14px; }
  .admin-title { font-size: 30px; }
  .admin-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .admin-bar, .admin-bar > * { min-width: 0; max-width: 100%; }
  .admin-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; width: 100%; }
  .admin-nav a { flex: 0 0 auto; padding: 10px 14px; }
  .account-menu { justify-content: space-between; }
  .how-steps { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .how-steps li { border-radius: 12px; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 12px 14px; }
  .stat-n { font-size: 28px; }
  .stat-hint { display: none; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-row .toolbar { width: 100%; }
  .filter-row .toolbar input[type=search] { min-width: 0; flex: 1; }
  .pill-tabs { display: flex; }
  .pill-tabs a { flex: 1; text-align: center; padding: 10px 6px; }

  /* tables become stacked cards */
  .cards-on-mobile thead { display: none; }
  .cards-on-mobile, .cards-on-mobile tbody, .cards-on-mobile tr, .cards-on-mobile td { display: block; width: 100%; }
  .cards-on-mobile tr { background: #fff; border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 10px 30px -24px rgba(29, 36, 85, .6); }
  .cards-on-mobile tbody tr:hover { background: #fff; }
  .cards-on-mobile td { border: 0; padding: 4px 0; text-align: left !important; }
  .cards-on-mobile td[data-label] { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; }
  .cards-on-mobile td[data-label]::before { content: attr(data-label); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #666); flex: 0 0 auto; }
  .cards-on-mobile td[data-label] > * { text-align: right; }
  .cards-on-mobile .cell-parent { font-size: 18px; padding-bottom: 6px; }
  .cards-on-mobile .cell-open { padding-top: 10px; }
  .cards-on-mobile .cell-open .button, .cards-on-mobile .cell-open form, .cards-on-mobile .cell-open form .button { width: 100%; display: block; margin-top: 6px; }
  .reg-table th:nth-child(3), .reg-table td:nth-child(3) { display: flex; }

  /* big, full-width buttons */
  .admin-page .action-row { flex-direction: column; align-items: stretch; }
  .admin-page .action-row > .button, .admin-page .action-row > form, .admin-page .action-row > form .button,
  .admin-page .action-row > a { width: 100%; text-align: center; justify-content: center; }
  .admin-page .button { min-height: 46px; }
  .admin-page input, .admin-page select { min-height: 46px; font-size: 16px; }
  .next-step { padding: 18px; border-radius: 18px; }
  .detail-head { flex-direction: column; }
  .contact-quick { text-align: left; }
  .child-card { padding: 14px 16px; }
  .doc-list li { flex-direction: column; align-items: stretch; }
  .temp-value code { display: block; text-align: center; margin-bottom: 8px; }
  .letter-actions .button { width: 100%; }
}


/* ---------- Waridi Online: lessons, classwork, portals ---------- */
.small { font-size: 14px; }
.warn-text { color: #8a4b0f; font-weight: 600; }
.stat-card.warn { border-color: #c0392b; }
.lesson-when { font-size: 14px; color: var(--muted, #666); margin-left: 6px; }
.lesson-when.live { color: #1d5b33; font-weight: 700; }
.live-pulse { box-shadow: 0 0 0 0 rgba(189, 150, 84, .7); animation: pulse 1.8s ease-out 40; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(189, 150, 84, 0); } 100% { box-shadow: 0 0 0 0 rgba(189, 150, 84, 0); } }
@media (prefers-reduced-motion: reduce) { .live-pulse { animation: none; } }
.today-lessons { margin: 10px 0 22px; }
.today-lessons h2 { font-size: clamp(22px, 2.6vw, 28px); }
.lesson-card { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: #fff; border-radius: 18px; padding: 14px 18px; margin-bottom: 10px; box-shadow: 0 10px 30px -26px rgba(29, 36, 85, .6); border-left: 5px solid var(--navy, #1d2455); }
.lesson-card.is-live { border-left-color: var(--gold, #bd9654); background: #fffaf0; }
.lesson-card.is-done { opacity: .6; }
.lesson-card .lesson-time { display: block; font-size: 14px; color: var(--muted, #666); }
.lesson-card strong { font-size: 18px; }
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(29, 36, 85, .1); }
.work-list li a { display: flex; flex-direction: column; text-decoration: none; color: var(--navy, #1d2455); min-width: 0; }
.work-status { white-space: nowrap; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; background: #eef0f7; color: var(--navy, #1d2455); }
.ws-todo { background: #e3ecfb; } .ws-turned-in { background: #f6ecd8; color: #6b4e1d; }
.ws-missing { background: #fbe6e3; color: #8a2a1d; } .ws-marked { background: #e2f3e7; color: #1d5b33; }
.mini-post { padding: 10px 0; border-bottom: 1px solid rgba(29, 36, 85, .08); }
.mini-post p { margin: 4px 0 0; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.class-card { background: #fff; border-radius: 20px; padding: 16px 18px; box-shadow: 0 10px 30px -26px rgba(29, 36, 85, .6); }
.class-card-title { display: flex; flex-direction: column; text-decoration: none; color: var(--navy, #1d2455); font-size: 18px; }
.class-hero { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; background: #fff; border-radius: 22px; padding: 20px 24px; margin-bottom: 16px; border-top: 6px solid var(--gold, #bd9654); }
.class-join { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.composer { margin: 12px 0 18px; }
.composer summary { cursor: pointer; list-style: none; }
.composer summary::-webkit-details-marker { display: none; }
.composer form { margin-top: 14px; }
.composer textarea, .note-form textarea { width: 100%; }
.kind-pick { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.kind-pick label, .choice-pills label { border: 2px solid rgba(29, 36, 85, .15); border-radius: 999px; padding: 8px 14px; cursor: pointer; background: #fff; }
.kind-pick label:has(input:checked), .choice-pills label:has(input:checked) { border-color: var(--navy, #1d2455); background: var(--navy, #1d2455); color: #fff; }
.kind-pick input, .choice-pills input { accent-color: var(--gold, #bd9654); }
.choice-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.assignment-only { display: none; }
.composer form:has(input[value="assignment"]:checked) .assignment-only { display: block; }
.stream .post { background: #fff; border-radius: 18px; padding: 16px 18px; margin-bottom: 12px; box-shadow: 0 10px 30px -26px rgba(29, 36, 85, .6); }
.post-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.post-head .post-title { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.post-icon { font-size: 22px; }
.post-body { white-space: pre-line; margin: 10px 0; }
.post-attach { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.file-chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid rgba(29, 36, 85, .2); border-radius: 12px; padding: 8px 12px; text-decoration: none; color: var(--navy, #1d2455); background: #f8f7f2; }
.feedback-box { background: #e2f3e7; border-radius: 14px; padding: 12px 16px; margin-top: 10px; }
.feedback-box p { margin: 4px 0; }
.check-list { display: grid; gap: 8px; }
.check-list.inline { display: flex; flex-wrap: wrap; gap: 14px; border: 0; padding: 0; margin: 10px 0; }
.check-list label { display: flex; gap: 8px; align-items: center; }
.role-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cred-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; align-items: center; }
.cred-list dt { font-weight: 600; } .cred-list dd { margin: 0; }
.cred-list code { font-size: 18px; background: #fff; padding: 4px 10px; border-radius: 8px; }
.doc-links { list-style: none; padding: 0; margin: 0; } .doc-links li { padding: 8px 0; }
.child-switch { margin-bottom: 10px; }
.fee-grid input { width: 100%; min-width: 110px; }
@media (max-width: 720px) {
  .class-join { align-items: stretch; width: 100%; }
  .class-join .button { width: 100%; text-align: center; }
  .lesson-card { flex-direction: column; align-items: stretch; }
  .lesson-card .button { width: 100%; text-align: center; }
  .work-list li { flex-direction: column; align-items: flex-start; }
  .cred-list { grid-template-columns: 1fr; }
  .fee-grid thead { display: none; }
  .fee-grid tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; }
  .fee-grid td:first-child, .fee-grid td:nth-child(2) { grid-column: span 1; }
}
