/* ============================================================================
   Al-baraka Academy — Parent Portal stylesheet (light)
   ----------------------------------------------------------------------------
   One file, three pages: parent-portal.html (the family's screens),
   parent-login.html (phone + SMS code) and portal-dev.html (local only).

   The portal screens are the design the school approved, rule for rule: the
   same tokens, cards, gradients, bottom bar, sheets and toasts. Nothing here
   invents a look. The additions are the states that real data needs and a
   static mock never showed — a skeleton while the family loads, an empty list,
   a failed request, an offline banner, a partially paid month and a day the
   teacher has not marked yet. They are styled in the same voice, not a new one.

   The `.p-*` block at the bottom is the login and dev-tools clothing. It keeps
   the class names those two pages already use and re-cuts them in this design's
   tokens, so the family signs in looking like the app they land in. The old
   dark theme is gone, not overridden.

   Layout rule the whole file obeys: a phone is 360-412px wide and the design is
   built for it, so every label has to survive 360px. Text never sets a width;
   colour, weight and one uppercase 12px label do.
   ========================================================================== */

:root{
  --blue:#1e4fd8; --navy:#0f2a7a; --sky:#e9f1ff; --green:#19a35a; --orange:#f59a1f;
  --red:#e5324b; --purple:#7a4bd8; --ink:#16255e; --muted:#5d6b95; --card:#ffffffee;
  --shadow:0 6px 20px rgba(30,79,216,.12); --nav-h:68px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
/* `hidden` must win. Several rules below set display on the very elements the
   scripts hide (.p-form is a grid, .p-card a block), and an author-level
   display beats the browser's own [hidden]{display:none} — which left the
   login showing the phone and code forms at once with the menu already open. */
[hidden]{display:none !important}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans Ethiopic","Nyala",Roboto,"Helvetica Neue",Arial,sans-serif;
  color:var(--ink); background:#dfeaff; -webkit-font-smoothing:antialiased;
  overscroll-behavior-y:none;
}
.app{
  position:relative; max-width:480px; margin:0 auto; min-height:100vh; min-height:100dvh;
  background:
    radial-gradient(420px 260px at -10% 105%, #f9a640 0%, rgba(249,166,64,0) 60%),
    radial-gradient(380px 260px at 115% 100%, #3a7bf0 0%, rgba(58,123,240,0) 60%),
    radial-gradient(420px 260px at 110% -5%, rgba(255,184,77,.55) 0%, rgba(255,184,77,0) 60%),
    linear-gradient(180deg,#eef4ff 0%,#e3edff 100%);
  overflow:hidden;
}
@media(min-width:520px){
  body{padding:20px 0;background:linear-gradient(135deg,#cfe0ff,#f6e3c6)}
  .app{border-radius:34px;box-shadow:0 20px 60px rgba(15,42,122,.28);min-height:calc(100dvh - 40px);height:calc(100dvh - 40px);max-height:920px}
}
.screen{display:none;height:100%;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:calc(env(safe-area-inset-top) + 14px) 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px)}
@media(min-width:520px){.app{height:calc(100dvh - 40px)}.screen{padding-top:18px}}
.screen.active{display:block;animation:fade .25s ease}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.app{display:flex;flex-direction:column}
.screens{flex:1;min-height:0;position:relative}
.screens .screen{position:absolute;inset:0}

/* top bar */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.logo{width:48px;height:48px;border-radius:50%;background:#fff;display:grid;place-items:center;box-shadow:var(--shadow);flex:none;overflow:hidden}
.logo img{width:100%;height:100%;object-fit:contain}
.top-actions{display:flex;align-items:center;gap:8px}
.langs{display:flex;background:#fff;border-radius:999px;padding:3px;box-shadow:var(--shadow)}
.langs button{border:0;background:transparent;font:600 12px inherit;font-family:inherit;color:var(--muted);padding:6px 9px;border-radius:999px;cursor:pointer;white-space:nowrap}
.langs button.on{background:var(--blue);color:#fff}
.icon-btn{position:relative;width:38px;height:38px;border-radius:50%;border:0;background:#fff;box-shadow:var(--shadow);display:grid;place-items:center;color:var(--blue);cursor:pointer}
.badge{position:absolute;top:-3px;right:-3px;background:#ff4757;color:#fff;font:700 10px/1 inherit;width:17px;height:17px;border-radius:50%;display:grid;place-items:center;border:2px solid #fff}

.hello{display:flex;gap:12px;align-items:center;margin:4px 0 14px}
.hello h1{margin:0;font-size:21px;color:var(--blue);font-weight:800;line-height:1.15}
.hello h1 span{color:var(--navy)}
.hello p{margin:3px 0 0;font-size:13.5px;color:var(--muted);line-height:1.25}

.card{background:var(--card);border-radius:20px;box-shadow:var(--shadow);border:1px solid #ffffffaa;backdrop-filter:blur(6px)}
.summary{padding:14px 14px 14px;margin-bottom:14px;border:1.5px solid #cddcff}
.summary h2{margin:0 0 6px;font-size:15px;color:var(--navy);display:flex;align-items:center;gap:8px;font-weight:800}
.summary h2 small{font-weight:500;color:var(--muted);font-size:14px}
.outstanding{display:flex;justify-content:space-between;align-items:center;margin:6px 0 12px}
.outstanding b{font-size:18px;color:var(--navy)}
.outstanding .amt{font-size:22px;font-weight:800;color:var(--red)}
.btn-row{display:flex;gap:10px}
.btn{flex:1;border:0;border-radius:12px;padding:12px 8px;color:#fff;font:700 13.5px inherit;font-family:inherit;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;box-shadow:0 4px 10px rgba(0,0,0,.15);transition:transform .1s}
.btn:active{transform:scale(.97)}
.btn.green{background:linear-gradient(180deg,#2bbd74,#17a058)}
.btn.orange{background:linear-gradient(180deg,#ffb23d,#f58a12)}

.switcher{padding:12px 10px 8px;margin-bottom:14px}
.switcher h3{margin:0 0 8px 6px;font-size:12.5px;color:var(--blue);display:flex;align-items:center;gap:6px;letter-spacing:.2px}
.switch-row{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.kid{border:1.5px solid transparent;background:transparent;border-radius:16px;padding:7px 2px;display:flex;flex-direction:column;align-items:center;gap:4px;cursor:pointer;font-family:inherit;color:var(--ink);font-size:12px;line-height:1.15;text-align:center;transition:.15s}
.kid.sel{border-color:var(--blue);background:#eaf1ffcc;box-shadow:0 0 0 3px #1e4fd822}
.kid span{color:var(--muted);font-size:11px}

.child-card{display:block;width:100%;text-align:left;font-family:inherit;color:inherit;background:#fff;border-radius:16px;margin-bottom:10px;padding:11px 12px;box-shadow:var(--shadow);border:1px solid #e2eaff;border-left:5px solid var(--blue);cursor:pointer;position:relative;transition:transform .12s}
.child-card:active{transform:scale(.99)}
.child-card.orange{border-left-color:var(--orange);background:linear-gradient(90deg,#fff6ea,#fff)}
.child-card.green{border-left-color:var(--green);background:linear-gradient(90deg,#eafaf1,#fff)}
.child-card.blue{background:linear-gradient(90deg,#eef4ff,#fff)}
.child-head{display:flex;align-items:center;gap:10px;margin-bottom:5px}
.child-head b{font-size:14.5px;color:var(--navy);font-weight:800}
.child-card .chev{position:absolute;right:12px;top:14px;color:var(--blue)}
.row{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted);margin:3px 0 0 0;padding-left:2px}
.row .lbl{min-width:112px}
.row .v{color:var(--ink);font-weight:600;display:flex;align-items:center;gap:6px}
.dot{width:13px;height:13px;border-radius:50%;display:inline-block}
.dot.g{background:#27b768}.dot.r{background:#ef4455}.dot.y{background:#f5b323}
.dot.n{background:#c9d5ef}
.coin{width:17px;height:17px;border-radius:50%;display:grid;place-items:center;color:#fff;font:800 10px inherit}
.coin.o{background:#f59a1f}.coin.r{background:#ef4455}.coin.g{background:#27b768}
.small{font-size:10.5px;color:var(--muted);font-weight:500}

/* nav */
.nav{position:absolute;left:0;right:0;bottom:0;height:calc(var(--nav-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#ffffffee;backdrop-filter:blur(14px);display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid #e1e9ff;z-index:20;border-radius:22px 22px 0 0;box-shadow:0 -6px 20px rgba(30,79,216,.1)}
.nav button{border:0;background:transparent;font-family:inherit;color:#6b7aa8;font-size:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer;position:relative}
.nav button.on{color:var(--blue);font-weight:700}
.nav button.on::after{content:"";position:absolute;bottom:4px;width:44px;height:3px;background:var(--blue);border-radius:3px}
.nav button .nb{position:absolute;top:8px;right:calc(50% - 20px)}
@media(min-width:520px){.nav{border-radius:0 0 34px 34px}}

/* sub pages */
.back{display:flex;align-items:center;gap:6px;border:0;background:none;color:var(--blue);font:500 16px inherit;font-family:inherit;padding:2px 0;margin-bottom:12px;cursor:pointer}
.profile{display:flex;gap:12px;align-items:center;margin-bottom:14px}
.profile h2{margin:0;font-size:19px;color:var(--blue);font-weight:800}
.profile h2 span{color:var(--navy)}
.profile p{margin:3px 0 0;font-size:13.5px;color:var(--muted)}
.acct{overflow:hidden;margin-bottom:16px;border:1.5px solid #cddcff}
.acct-head{background:linear-gradient(90deg,#1e63e9,#4d9bff);color:#fff;padding:10px 14px;font-weight:800;font-size:14.5px;display:flex;align-items:center;gap:10px}
.acct-head i{width:30px;height:30px;border-radius:9px;background:#f58a12;display:grid;place-items:center;font-style:normal}
.acct-body{padding:10px 16px 12px}
.acct-body div{display:flex;justify-content:space-between;font-size:15px;padding:4px 0;color:var(--ink)}
.acct-body b{color:var(--navy);font-weight:800}
.sec{font-size:14px;font-weight:800;color:var(--blue);margin:6px 2px 8px;letter-spacing:.3px;text-transform:uppercase}
.fee{display:flex;align-items:center;gap:11px;padding:10px 12px;margin-bottom:8px;background:#fff;border-radius:14px;box-shadow:var(--shadow);border:1px solid #e5ecff}
.fee .ic{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;color:#fff;flex:none}
/* The label and the amount each get a fixed share of the row. Without the
   basis the right column sized itself to its content, and a long translated
   tag ("La bixiyay", "Kaffaalame") squeezed the month name until
   "(Diseembar)" no longer fit and was cut off. The tag wraps under the amount
   instead — see .fee .rt b{flex-wrap:wrap}. */
.fee .mid{flex:1 1 58%;min-width:0}
.fee .mid b{display:block;font-size:14.5px;color:var(--navy);overflow-wrap:break-word}
.fee .mid small{font-size:11px;color:var(--muted)}
.fee .rt{text-align:right;flex:0 1 42%;min-width:0}
.fee .rt b{display:flex;align-items:center;justify-content:flex-end;gap:6px;font-size:13px;color:var(--navy);flex-wrap:wrap}
.fee .rt small{font-size:11px;color:var(--muted)}
.tag{font-size:10px;font-weight:800;padding:3px 8px;border-radius:7px;color:#fff;letter-spacing:.3px;white-space:nowrap}
.tag.paid{background:#1fb86d}.tag.unpaid{background:#ef3f55}.tag.upcoming{background:#2d7bf3}
/* a waived month, deliberately not the green of a paid one */
.tag.free{background:#6b3fd4}
.tag.partial{background:#e08a12}
.tag.none{background:#8d9dc4}
.receipt{display:flex;align-items:center;gap:11px;padding:10px 12px;margin-bottom:8px;background:#fff;border-radius:14px;box-shadow:var(--shadow);border:1px solid #e5ecff}
.receipt .ic{width:36px;height:36px;border-radius:10px;background:#e3edff;color:var(--blue);display:grid;place-items:center}
.receipt .mid{flex:1;min-width:0}.receipt b{display:block;font-size:14px;color:var(--navy);overflow-wrap:break-word}.receipt small{color:var(--muted);font-size:12px}
.receipt button{border:0;background:none;color:var(--blue);cursor:pointer;padding:6px;flex:none}
.receipt.void b{color:var(--muted);text-decoration:line-through}
.paybar{width:100%;margin-top:6px;padding:12px;border-radius:12px;border:1.5px solid var(--blue);background:#fff;color:var(--blue);font:700 13.5px inherit;font-family:inherit;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;box-shadow:var(--shadow)}
.paybar.solid{background:linear-gradient(180deg,#2d6cf0,#1e4fd8);color:#fff;border-color:transparent}

/* results */
.chips{display:flex;gap:8px;margin-top:6px;flex-wrap:wrap}
.chip{border:0;font-family:inherit;font-size:12.5px;font-weight:600;padding:7px 11px;border-radius:12px;display:flex;align-items:center;gap:6px;cursor:pointer;background:#dff5e9;color:#128a4b}
.chip.b{background:#e0ebff;color:var(--blue)}
.chip.on{box-shadow:0 0 0 2px currentColor inset}
.report{overflow:hidden;margin:14px 0 14px;border:1.5px solid #ffd9a1}
.report-head{display:flex;align-items:center;gap:10px;padding:10px 12px;background:linear-gradient(90deg,#ffedd0,#fff);font-weight:800;color:var(--navy);font-size:14px}
.trophy{width:44px;height:44px;border-radius:12px;background:linear-gradient(180deg,#ffb23d,#f58a12);color:#fff;display:grid;place-items:center;flex:none}
.pdf{margin-left:auto;border:0;background:linear-gradient(180deg,#ffa22b,#f57c0c);color:#fff;font:700 12px inherit;font-family:inherit;padding:8px 11px;border-radius:9px;display:flex;align-items:center;gap:5px;cursor:pointer}
.subj{display:flex;justify-content:space-between;padding:13px 16px;font-size:15.5px;border-bottom:1px solid #e9eef9;color:var(--ink)}
.subj:last-of-type{border-bottom:0}
.subj b{font-weight:500}
.subj small{display:block;font-size:11px;color:var(--muted);font-weight:500;margin-top:2px}
.subj .srt{text-align:right;white-space:nowrap}
.avg{margin:8px 12px 12px;padding:11px 12px;background:#e3edff;border-radius:12px;display:flex;align-items:center;gap:8px;color:var(--blue);font-weight:600;font-size:14.5px}
.avg b{color:var(--navy)}
.term2{padding:12px;display:flex;gap:12px;align-items:center;border:1.5px solid #bfeedb;background:linear-gradient(90deg,#e4f8ef,#f4fffa)}
.term2 .hg{width:48px;height:48px;border-radius:12px;background:linear-gradient(180deg,#2bbd74,#128a4b);color:#fff;display:grid;place-items:center;flex:none}
.term2 h4{margin:0 0 4px;font-size:15px;color:var(--navy)}
.term2 p{margin:0;font-size:12.5px;color:#12795a;display:flex;align-items:center;gap:7px}
.spin{width:16px;height:16px;border:2.5px dotted #19a87a;border-radius:50%;animation:spin 1.2s linear infinite;flex:none}
@keyframes spin{to{transform:rotate(360deg)}}

/* attendance */
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}
.stat{padding:12px 6px;text-align:center;border-radius:14px;background:#fff;box-shadow:var(--shadow)}
.stat b{display:block;font-size:22px}.stat small{font-size:11.5px;color:var(--muted)}
.cal{padding:12px;margin-bottom:10px}
.cal h4{margin:0 0 8px;color:var(--navy);font-size:14px}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;text-align:center}
.cal-grid .h{font-size:10.5px;color:var(--muted);font-weight:700}
.cal-grid .d{aspect-ratio:1;display:grid;place-items:center;border-radius:9px;font-size:12px;color:var(--ink);background:#f2f6ff}
.cal-grid .d.p{background:#d6f5e4;color:#0f7d44;font-weight:700}
.cal-grid .d.a{background:#ffdce1;color:#c61e38;font-weight:700}
.cal-grid .d.l{background:#fff0c8;color:#9a6a00;font-weight:700}
.cal-grid .d.w{background:transparent;color:#a3aed0}
.cal-grid .d.f{background:transparent;color:#b6bfdc}
.cal-grid .d.n{background:#eef1f9;color:#7d8ab0}
.cal-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.cal-nav h4{margin:0;font-size:14px}
.cal-nav button{width:32px;height:32px;border-radius:10px;border:1px solid #dbe5ff;background:#fff;color:var(--blue);display:grid;place-items:center;cursor:pointer;flex:none}
.cal-nav button[disabled]{opacity:.35;cursor:default}
.legend{display:flex;gap:12px;margin-top:10px;font-size:11.5px;color:var(--muted);flex-wrap:wrap}
.legend span{display:flex;align-items:center;gap:5px}

/* notices from the school office — read only, one bubble per notice */
.news-box{display:flex;flex-direction:column;gap:9px;margin:12px 0}
.msg{max-width:82%;padding:10px 12px;border-radius:16px;font-size:14px;line-height:1.35;box-shadow:var(--shadow)}
.msg.in{background:#fff;border-bottom-left-radius:4px;align-self:flex-start}
.msg b{display:block;color:var(--navy);font-size:14.5px;margin-bottom:2px}
.msg p{margin:0;color:var(--ink);white-space:pre-line;overflow-wrap:break-word}
.msg small{display:block;opacity:.65;font-size:10.5px;margin-top:3px}

/* sheet / toast */
.overlay{position:absolute;inset:0;background:rgba(10,25,70,.45);z-index:50;display:none;align-items:flex-end;backdrop-filter:blur(2px)}
.overlay.show{display:flex;animation:fadeo .2s}
@keyframes fadeo{from{opacity:0}to{opacity:1}}
.sheet{width:100%;background:#fff;border-radius:26px 26px 0 0;padding:18px 18px calc(22px + env(safe-area-inset-bottom));max-height:86%;overflow:auto;animation:up .28s cubic-bezier(.2,.8,.2,1)}
@media(min-width:520px){.sheet{border-radius:26px}}
@keyframes up{from{transform:translateY(100%)}to{transform:none}}
.sheet .grab{width:42px;height:4px;border-radius:4px;background:#d5def5;margin:-6px auto 12px}
.sheet h3{margin:0 0 4px;color:var(--navy);font-size:18px}
.sheet p.sub{margin:0 0 14px;color:var(--muted);font-size:13.5px;line-height:1.4}
.sheet .btn-row{margin-top:14px}
.btn.ghost{background:#eef3ff;color:var(--blue);box-shadow:none}
.app-ic{width:60px;height:60px;border-radius:16px;background:linear-gradient(135deg,#1e4fd8,#4d9bff);display:grid;place-items:center;margin-bottom:10px;box-shadow:var(--shadow)}
.steps{margin:0 0 4px;padding:0;list-style:none;counter-reset:s}
.steps li{counter-increment:s;display:flex;gap:10px;align-items:flex-start;font-size:14px;margin:9px 0;color:var(--ink);line-height:1.35}
.steps li::before{content:counter(s);flex:none;width:24px;height:24px;border-radius:50%;background:var(--blue);color:#fff;font-weight:800;font-size:12px;display:grid;place-items:center}
.opt{display:flex;align-items:center;gap:12px;padding:12px;border:1.5px solid #dbe5ff;border-radius:14px;margin-bottom:8px;cursor:pointer;font-weight:700;color:var(--navy)}
.opt.sel{border-color:var(--blue);background:#eef4ff}
.opt i{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;color:#fff;font-style:normal;font-size:13px}
.led{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #edf1fb;font-size:14.5px}
.led:last-of-type{border:0}
.led b{color:var(--navy)}
.note{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid #edf1fb;font-size:13.5px;line-height:1.35}
.note:last-child{border:0}
.note i{flex:none;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:#fff;font-style:normal}
.note .mid{flex:1;min-width:0}
.note b{display:block;color:var(--navy);font-size:14px}
.note small{display:block;color:var(--muted);font-size:11.5px;margin-top:2px;overflow-wrap:break-word}
.note.unread{background:#f3f8ff;margin:0 -10px;padding:10px;border-radius:12px}
.note .seen{flex:none;align-self:center;width:9px;height:9px;border-radius:50%;background:var(--blue)}
.note button{border:0;background:none;color:var(--blue);cursor:pointer;padding:4px;flex:none;align-self:center}
.note p{margin:2px 0 0;color:var(--ink);white-space:pre-line;overflow-wrap:break-word}
.toast{position:absolute;left:50%;bottom:calc(var(--nav-h) + 20px);transform:translate(-50%,20px);background:#10226b;color:#fff;padding:11px 16px;border-radius:12px;font-size:13.5px;opacity:0;pointer-events:none;transition:.25s;z-index:80;max-width:88%;text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
.lang-opt{display:flex;gap:8px;margin-top:6px;flex-wrap:wrap}
.lang-opt button{flex:1 1 45%;padding:12px 6px;border-radius:12px;border:1.5px solid #dbe5ff;background:#fff;font:700 14px inherit;font-family:inherit;color:var(--navy);cursor:pointer}
.lang-opt button.on{background:var(--blue);color:#fff;border-color:var(--blue)}

/* ── what a static mock never had: the states real data produces ─────────── */

/* A real photograph, cut to the same circle as the drawn fallback. */
.av{border-radius:50%;overflow:hidden;flex:none;border:2.5px solid #fff;box-shadow:0 2px 8px rgba(30,79,216,.25);background:#e3edff;display:grid;place-items:center}
.av img{width:100%;height:100%;object-fit:cover;display:block}

/* While the family's records load: the shape of the card that is coming. */
.skel{border-radius:16px;background:linear-gradient(90deg,#e6eeff 25%,#f6f9ff 37%,#e6eeff 63%);background-size:400% 100%;animation:sk 1.3s ease-in-out infinite;margin-bottom:12px}
.skel.t{height:48px;border-radius:24px}
.skel.h{height:66px}
.skel.c{height:96px}
.skel.s{height:150px}
.skel.l{height:14px;max-width:70%;border-radius:8px}
@keyframes sk{from{background-position:100% 50%}to{background-position:0 50%}}

/* Nothing to show, or no way to show it: one card, never a blank screen. */
.state{padding:22px 16px;text-align:center;border:1.5px dashed #cddcff;background:#ffffffcc;border-radius:20px;box-shadow:var(--shadow);margin-bottom:14px}
.state h3{margin:0 0 6px;font-size:16px;color:var(--navy)}
.state p{margin:0;font-size:13.5px;color:var(--muted);line-height:1.4;overflow-wrap:break-word}
.state .btn-row{margin-top:14px}
.state .spin{margin:0 auto 10px;border-color:#b9cdf5;animation:none}
.state .ic{margin:0 auto 10px;width:48px;height:48px;border-radius:14px;background:#e3edff;color:var(--blue);display:grid;place-items:center}

/* The screen a parent keeps open on a bus: last data, honestly labelled. */
.offbar{display:flex;align-items:center;gap:8px;margin:0 0 12px;padding:9px 12px;border-radius:14px;background:#fff4de;border:1.5px solid #ffdca3;color:#8a5a00;font-size:12px;line-height:1.3;font-weight:600}
.offbar b{font-weight:800}
.offbar .dot{width:10px;height:10px;flex:none;background:#e0a12b}

.foot{margin:18px 2px 0;font-size:11px;color:var(--muted);line-height:1.5;text-align:center;overflow-wrap:break-word}
.foot b{color:var(--navy);font-weight:700}

/* The family's own sheet sections keep the card rhythm of the screens. */
.sheet .sec{margin-top:16px}
.sheet .led.sub{font-size:13px;color:var(--muted)}
.sheet .msg{max-width:100%;box-shadow:none;background:#f4f8ff;font-size:13.5px}

@media(max-width:350px){
  .langs button{padding:6px 6px;font-size:11px}
  .hello h1{font-size:18px}
  .row .lbl{min-width:98px}
  .fee .mid b{font-size:13.5px}
  .subj{font-size:14.5px;padding:11px 12px}
  .nav button{font-size:10.5px}
}
@media(prefers-reduced-motion:reduce){
  .screen.active,.overlay.show,.sheet{animation:none}
  .skel{animation:none}
  .spin{animation:none}
  *{transition:none !important}
}

/* ============================================================================
   Sign-in and dev-tools clothing — same tokens, different page.
   parent-login.html and portal-dev.html already carry these class names; the
   OTP flow, the labels and the order of the fields are unchanged, only the
   colour is. --p-* names are the ones portal-dev.html reads inline.
   ========================================================================== */
:root{
  --p-text:var(--ink); --p-muted:var(--muted); --p-accent:var(--blue);
  --p-good:#17a058; --p-bad:var(--red); --p-warn:#c07900;
  --p-line:#dbe5ff; --p-surface:#ffffff; --p-surface-2:#f2f6ff;
}
.p-stage{
  max-width:480px;margin:0 auto;min-height:100vh;min-height:100dvh;padding:16px 16px 40px;
  background:
    radial-gradient(420px 260px at -10% 105%, #f9a640 0%, rgba(249,166,64,0) 60%),
    radial-gradient(380px 260px at 115% 100%, #3a7bf0 0%, rgba(58,123,240,0) 60%),
    linear-gradient(180deg,#eef4ff 0%,#e3edff 100%);
}
@media(min-width:520px){.p-stage{border-radius:34px;box-shadow:0 20px 60px rgba(15,42,122,.28);margin:20px auto;min-height:calc(100dvh - 40px)}}
.p-head{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.p-brand{width:46px;height:46px;border-radius:50%;background:#fff;box-shadow:var(--shadow);display:grid;place-items:center;color:var(--blue);font-weight:800;font-size:15px;flex:none;overflow:hidden}
.p-brand img{width:100%;height:100%;object-fit:contain}
.p-head-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.p-head-t strong{color:var(--navy);font-size:15px}
.p-head-t span{color:var(--muted);font-size:12px;line-height:1.35;overflow-wrap:break-word}
.p-head-btn{border:1px solid var(--p-line);background:#fff;color:var(--blue);border-radius:999px;padding:7px 11px;font:600 12px inherit;font-family:inherit;cursor:pointer;flex:none}
.p-main{display:grid;gap:12px}
.p-hero h1{margin:0;font-size:21px;color:var(--blue);font-weight:800;line-height:1.2}
.p-hero p{margin:5px 0 0;font-size:13.5px;color:var(--muted);line-height:1.45}
.p-card{background:var(--card);border:1px solid #ffffffaa;border-radius:18px;box-shadow:var(--shadow);padding:14px;color:inherit;font-family:inherit;text-align:start;width:100%;display:block}
button.p-card{cursor:pointer}
button.p-card[aria-current="true"]{border-color:var(--blue);background:#eaf1ff}
.p-form{display:grid;gap:10px}
.p-field{display:grid;gap:5px}
.p-field label{font-size:12px;font-weight:700;color:var(--muted);letter-spacing:.2px;text-transform:uppercase}
.p-field input{border:1.5px solid var(--p-line);border-radius:14px;padding:13px 14px;font-size:16px;font-family:inherit;background:#fff;color:var(--ink);outline:none;min-width:0}
.p-field input:focus{border-color:var(--blue);box-shadow:0 0 0 3px #1e4fd822}
.p-code input{letter-spacing:.45em;font-weight:800;text-align:center;font-size:22px}
.p-btn{border:0;border-radius:12px;padding:13px 12px;background:linear-gradient(180deg,#2d6cf0,#1e4fd8);color:#fff;font:700 14px inherit;font-family:inherit;cursor:pointer;box-shadow:0 4px 10px rgba(30,79,216,.25)}
.p-btn.line{background:#fff;color:var(--blue);border:1.5px solid var(--p-line);box-shadow:none}
.p-btn[disabled]{opacity:.55;cursor:default}
.p-btn-row{display:flex;gap:10px}
.p-btn-row .p-btn{flex:1}
.p-alert{border-radius:14px;padding:12px 14px;font-size:13.5px;line-height:1.4;background:#e3edff;color:var(--navy);border:1.5px solid #cddcff;overflow-wrap:break-word}
.p-alert.bad{background:#ffe9ee;border-color:#ffc4cf;color:#a71d31}
.p-alert.good{background:#e3f7ec;border-color:#b6e6c9;color:#12683d}
.p-alert.warn{background:#fff4de;border-color:#ffdca3;color:#8a5a00}
.p-note{font-size:12.5px;color:var(--muted);line-height:1.45;margin:0;overflow-wrap:break-word}
.p-chips{display:flex;gap:8px;flex-wrap:wrap}
.p-chip{border:1px solid var(--p-line);background:#fff;color:var(--navy);border-radius:999px;padding:7px 12px;font-size:12.5px;font-family:inherit;display:flex;align-items:center;gap:6px}
.p-chip[aria-current="page"]{border-color:var(--blue);color:var(--blue);font-weight:700;background:#eaf1ff}

/* Password field with a show/hide eye. The button sits inside the input's box;
   the input reserves room on the trailing side so a long password never runs
   under it. On a right-to-left page the padding and the button flip together. */
.p-pw{position:relative}
.p-pw input{padding-inline-end:48px}
.p-eye{position:absolute;inset-inline-end:6px;top:50%;transform:translateY(-50%);
  border:0;background:none;color:var(--muted);cursor:pointer;padding:8px;line-height:0;border-radius:10px}
.p-eye:focus{outline:none;color:var(--blue);box-shadow:0 0 0 3px #1e4fd822}
.p-eye svg{display:block;width:20px;height:20px}

/* Remember-me: a real checkbox, not a styled div, so the keyboard and a screen
   reader both reach it. The whole row is clickable. */
.p-remember{display:flex;align-items:flex-start;gap:9px;font-size:13px;color:var(--p-text);line-height:1.4;cursor:pointer;margin:0}
.p-remember input{margin:1px 0 0;flex:none;width:18px;height:18px;accent-color:var(--blue)}

/* The two entry points below the sign-in button: forgot, and first time. Plain
   text buttons — they switch the form in place, they are not a second action. */
.p-links{display:flex;flex-direction:column;gap:6px;align-items:center;margin-top:2px}
.p-links button{border:0;background:none;color:var(--blue);font:600 13px inherit;font-family:inherit;cursor:pointer;padding:4px;text-decoration:underline;text-underline-offset:3px}
.p-links button:hover{color:var(--navy)}

/* A live policy line under the password box on the set-up screen. Quiet until a
   rule is broken, then it names which one without touching the typed value. */
.p-hint{font-size:12px;color:var(--muted);line-height:1.4;margin:0;overflow-wrap:break-word}
.p-hint.bad{color:var(--p-bad)}
.p-hint.good{color:var(--p-good)}

/* Shown only when the page detects it is running inside a messaging app's
   built-in browser, where an SMS deep link or a cookie often will not behave.
   Advisory, dismissible, never blocks the form. */
.p-browser{display:flex;gap:10px;align-items:flex-start;border-radius:14px;padding:12px 13px;
  background:#fff4de;border:1.5px solid #ffdca3;color:#8a5a00;font-size:12.5px;line-height:1.4}
.p-browser[hidden]{display:none}
.p-browser .p-browser-ic{flex:none;line-height:0;margin-top:1px}
.p-browser .p-browser-ic svg{width:18px;height:18px;display:block}
.p-browser b{display:block;font-size:12.5px;margin-bottom:2px}
.p-browser .p-browser-body{flex:1;min-width:0;overflow-wrap:break-word}
.p-browser button{flex:none;border:1px solid #e3b866;background:#fff;color:#8a5a00;border-radius:999px;padding:5px 10px;font:600 11.5px inherit;font-family:inherit;cursor:pointer}
