/* Parent theme: soft pastel, friendly minimal. Only used when a parent is signed in (<html data-role="parent">);
   staff, students and the sign-in screens keep the standard look.
   Off-white page, white 16px cards, periwinkle primary, pastel status tints with darker text (mint = present or
   paid, butter = due soon, rose = absent, lavender = events). Poppins headings, Inter body. One strong red,
   only for emergencies (urgent notices, severe allergies). Text colours were checked for WCAG AA on their tints. */

/* Poppins and Inter (SIL Open Font License 1.1), bundled so the app works offline. Hindi and other Indian
   scripts fall back to Baloo 2 and Mukta. */
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url(../assets/fonts/poppins-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url(../assets/fonts/poppins-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url(../assets/fonts/poppins-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url(../assets/fonts/poppins-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-weight: 700 900; font-display: swap; src: url(../assets/fonts/poppins-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-weight: 700 900; font-display: swap; src: url(../assets/fonts/poppins-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-weight: 100 400; font-display: swap; src: url(../assets/fonts/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 100 400; font-display: swap; src: url(../assets/fonts/inter-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(../assets/fonts/inter-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(../assets/fonts/inter-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(../assets/fonts/inter-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(../assets/fonts/inter-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-weight: 700 900; font-display: swap; src: url(../assets/fonts/inter-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 700 900; font-display: swap; src: url(../assets/fonts/inter-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- tokens ---------- */
:root[data-role="parent"] {
  /* soft-UI: raised and pressed-in shadows need a page a shade darker than the cards */
  --bg: #F3F4FA; --soft-bg: #F3F4FA;
  --raise: 6px 6px 14px rgba(150,160,190,.42), -6px -6px 14px #FFFFFF;
  --press: inset 3px 3px 7px rgba(150,160,190,.45), inset -3px -3px 7px #FFFFFF;
  --surface: #FFFFFF; --surface-2: #F5F4FA; --ink: #2B2D42; --ink-2: #646879; --line: #ECEAF2;
  /* periwinkle: fills use --brand (#7C9CF5) with navy text; links and icons use the deeper --brand-text */
  --brand: #7C9CF5; --brand-ink: #1B2559; --brand-soft: #E8EEFE; --brand-text: #4A68D0;
  --mari: #F4C95D; --mari-ink: #4A3600; --mari-soft: #FFF5D6;
  --ok: #1F7A55; --ok-soft: #DFF6EA;        /* mint: present, paid */
  --warn: #855F00; --warn-soft: #FFF3CC;    /* butter: due soon */
  --bad: #B03553; --bad-soft: #FDE6EC;      /* rose: absent, overdue */
  --info: #6A4FB8; --info-soft: #EFEAFD;    /* lavender: events */
  --alarm: #D7263D; --alarm-ink: #FFFFFF;   /* the one strong red: emergencies only */
  --hero-tile: rgba(255,255,255,.28); --hero-line: rgba(255,255,255,.35);
  --scrim: rgba(43,45,66,.35); --shadow: 0 12px 32px rgba(43,45,66,.12);
  --display: 'Poppins', 'Baloo 2', 'Mukta', system-ui, sans-serif;
  --body: 'Inter', 'Mukta', system-ui, 'Segoe UI', Roboto, sans-serif;
  --r-card: 16px; --r-hero: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-role="parent"]:not([data-theme="light"]) {
    --soft-bg: #20222D; --raise: 0 0 0 1px #333649; --press: inset 0 0 0 1px #333649;
    --bg: #17181F; --surface: #20222D; --surface-2: #2A2D3B; --ink: #ECEDF5; --ink-2: #A6AABD; --line: #333649;
    --brand: #8EA9F7; --brand-ink: #131A3D; --brand-soft: #283157; --brand-text: #A9BEFA;
    --mari: #F2CF73; --mari-ink: #2E2200; --mari-soft: #3A321C;
    --ok: #86DDB4; --ok-soft: #1C3A2E; --warn: #F0D27F; --warn-soft: #3A321C; --bad: #F4A3B6; --bad-soft: #3F2330;
    --info: #C2B1F7; --info-soft: #2E2747; --alarm: #F0475B; --alarm-ink: #FFFFFF;
    --hero-tile: rgba(0,0,0,.10); --hero-line: rgba(0,0,0,.14); --scrim: rgba(0,0,0,.6); --shadow: 0 12px 32px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-role="parent"][data-theme="dark"] {
  --soft-bg: #20222D; --raise: 0 0 0 1px #333649; --press: inset 0 0 0 1px #333649;
  --bg: #17181F; --surface: #20222D; --surface-2: #2A2D3B; --ink: #ECEDF5; --ink-2: #A6AABD; --line: #333649;
  --brand: #8EA9F7; --brand-ink: #131A3D; --brand-soft: #283157; --brand-text: #A9BEFA;
  --mari: #F2CF73; --mari-ink: #2E2200; --mari-soft: #3A321C;
  --ok: #86DDB4; --ok-soft: #1C3A2E; --warn: #F0D27F; --warn-soft: #3A321C; --bad: #F4A3B6; --bad-soft: #3F2330;
  --info: #C2B1F7; --info-soft: #2E2747; --alarm: #F0475B; --alarm-ink: #FFFFFF;
  --hero-tile: rgba(0,0,0,.10); --hero-line: rgba(0,0,0,.14); --scrim: rgba(0,0,0,.6); --shadow: 0 12px 32px rgba(0,0,0,.45);
  color-scheme: dark;
}

/* ---------- type ---------- */
[data-role="parent"] body { letter-spacing: -0.005em; }
[data-role="parent"] h1, [data-role="parent"] h2, [data-role="parent"] h3, [data-role="parent"] h4 { font-weight: 600; letter-spacing: -0.01em; }
[data-role="parent"] .top h1 { font-size: 1.3rem; }
[data-role="parent"] .card > h2, [data-role="parent"] .sec-title, [data-role="parent"] .card-h h2 { font-size: 1.05rem; }
[data-role="parent"] .hero h2 { font-size: 1.45rem; }

/* ---------- periwinkle as text and icons: the deeper shade, so it stays readable ---------- */
/* :where() adds no specificity, so tones like .ico.r or .chip.ok still win. */
:where([data-role="parent"]) a, :where([data-role="parent"]) .link, :where([data-role="parent"]) .linkish,
:where([data-role="parent"]) details summary, :where([data-role="parent"]) .bnav a[aria-current="page"],
:where([data-role="parent"]) .chip.brand, :where([data-role="parent"]) .ico, :where([data-role="parent"]) .avatar,
:where([data-role="parent"]) .av, :where([data-role="parent"]) .qa .ci, :where([data-role="parent"]) .pw button,
:where([data-role="parent"]) .thumb.add, :where([data-role="parent"]) .stop-track li.mine b, :where([data-role="parent"]) .uc .date,
:where([data-role="parent"]) .t2 .ti, :where([data-role="parent"]) .school-sw, :where([data-role="parent"]) .ac-code,
:where([data-role="parent"]) .ps-net { color: var(--brand-text); }
:where([data-role="parent"]) .thumb.add { border-color: var(--brand-text); }

/* ---------- cards: white, 16px, a whisper of shadow instead of heavy lines ---------- */
[data-role="parent"] .card, [data-role="parent"] .list { border-color: var(--line); box-shadow: 0 1px 2px rgba(43,45,66,.04), 0 4px 14px rgba(43,45,66,.04); }
[data-role="parent"] .btn { border-radius: 14px; font-weight: 600; }
[data-role="parent"] .btn.danger { background: var(--bad-soft); color: var(--bad); }
[data-role="parent"] .chip { font-weight: 600; }
[data-role="parent"] .bnav { background: color-mix(in srgb, var(--surface) 92%, transparent); }
[data-role="parent"] .bnav a[aria-current="page"] .pb { background: var(--brand-soft); }
[data-role="parent"] .bubble.me { color: var(--brand-ink); }
[data-role="parent"] .in:focus { border-color: var(--brand-text); }
[data-role="parent"] .banner { border-radius: 16px; }

/* ---------- events lavender, parent-teacher meetings periwinkle ---------- */
[data-role="parent"] .ico.ev { background: var(--info-soft); color: var(--info); }
[data-role="parent"] .ico.pt { background: var(--brand-soft); color: var(--brand-text); }
[data-role="parent"] .k-event { background: var(--info); }
[data-role="parent"] .k-ptm { background: var(--brand); }
:where([data-role="parent"]) .uc .date { background: var(--info-soft); color: var(--info); }   /* exams and holidays keep their tones */

/* ---------- emergencies: the only strong red ---------- */
[data-role="parent"] .ico.em { background: var(--alarm); color: var(--alarm-ink); }
[data-role="parent"] .chip.em { background: var(--alarm); color: var(--alarm-ink); }
[data-role="parent"] .banner.em { background: var(--alarm); color: var(--alarm-ink); }
[data-role="parent"] .banner.em > .i, [data-role="parent"] .banner.em b { color: var(--alarm-ink); }
[data-role="parent"] .notice.urgent { border: 2px solid var(--alarm); }

/* ---------- parent home: bento grid with soft-UI touches ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(4.4rem, auto); grid-auto-flow: row dense; gap: .75rem; margin: .2rem 0 .4rem; }
.bt { border-radius: 18px; padding: .7rem .75rem; display: flex; flex-direction: column; gap: .12rem; min-width: 0; text-align: left; font: inherit; color: var(--ink); border: 0; position: relative; }
button.bt { cursor: pointer; transition: transform .12s, box-shadow .15s; }
button.bt:focus-visible { outline: 2.5px solid var(--brand-text, var(--brand)); outline-offset: 3px; }
.bt.c1 { grid-column: span 1; } .bt.c2 { grid-column: span 2; } .bt.c4 { grid-column: span 4; } .bt.r2 { grid-row: span 2; }
/* soft (raised) tiles, and pressed-in wells; raised buttons press in when tapped */
.soft { background: var(--soft-bg, var(--surface)); box-shadow: var(--raise, none); }
button.soft:active { box-shadow: var(--press, none); }
.well { background: var(--soft-bg, var(--surface-2)); box-shadow: var(--press, none); }
/* pastel status tiles: flat, coloured by meaning */
.bt-tone { --t: var(--brand-text, var(--brand)); --t-soft: var(--brand-soft); background: var(--t-soft); color: var(--t); }
.bt-tone:active { transform: scale(.97); }
.bt.t-ok { --t: var(--ok); --t-soft: var(--ok-soft); } .bt.t-warn { --t: var(--warn); --t-soft: var(--warn-soft); }
.bt.t-bad { --t: var(--bad); --t-soft: var(--bad-soft); } .bt.t-info { --t: var(--info); --t-soft: var(--info-soft); }
.bt.t-muted { --t: var(--ink-2); --t-soft: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.bt.alert { box-shadow: inset 0 0 0 2px var(--bad); }
.bt-k { display: flex; align-items: center; gap: .3rem; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; min-width: 0; }
.bt-k span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bt-k .i { width: .95rem; height: .95rem; flex: none; }
.bt-big { font: 700 1.3rem/1.15 var(--display); margin-top: .15rem; overflow-wrap: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bt-big.l { font-size: 1.08rem; } .bt-big.xl { font-size: .95rem; overflow-wrap: anywhere; }
.bt.c1 .bt-big { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.bt-sub { font-size: .76rem; line-height: 1.3; opacity: .92; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bt.c1 { padding: .65rem .6rem; } .bt.c1 .bt-sub { -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.bt .t-pill { margin-top: auto; align-self: flex-start; max-width: 100%; padding: .12rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 700; background: var(--surface); color: var(--t, var(--ink-2)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt .t-pill.ok { color: var(--ok); } .bt .t-pill.warn { color: var(--warn); } .bt .t-pill.bad { color: var(--bad); } .bt .t-pill.info { color: var(--info); } .bt .t-pill.route { color: var(--ink-2); }
.bt .live { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); margin-left: .1rem; animation: blink 1.6s infinite; flex: none; }
/* the child's tile */
.bt-child { padding: .9rem; gap: .55rem; }
.bc-top { display: flex; gap: .7rem; align-items: center; } .bc-top .grow { min-width: 0; }
.bc-top h2 { font-size: 1.15rem; margin: 0; line-height: 1.2; } .bc-top small { color: var(--ink-2); font-size: .78rem; }
.bt-child .photo { width: 3.1rem; height: 3.1rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--brand-text, var(--brand)); overflow: hidden; flex: none; }
.bt-child .photo img { width: 100%; height: 100%; object-fit: cover; }
.bt-child .att-pill { box-shadow: var(--raise, none); }
.bc-note { margin: 0; font-size: .86rem; color: var(--ink-2); line-height: 1.4; }
.bc-bday { display: flex; gap: .55rem; align-items: center; margin: 0; padding: .5rem .7rem; border-radius: 12px; background: var(--info-soft); color: var(--info); font-size: .85rem; }
.bc-bday .i { width: 1.2rem; height: 1.2rem; flex: none; }
.bc-now { display: flex; align-items: center; gap: .6rem; border-radius: 14px; padding: .55rem .7rem; }
.bc-now .grow { min-width: 0; } .bc-now b { display: block; font-size: .9rem; } .bc-now small { color: var(--ink-2); font-size: .76rem; }
.bc-now .bc-r { white-space: nowrap; } .bc-now .bc-ic { color: var(--ink-2); display: grid; }
.bc-now .pulse { width: .6rem; height: .6rem; border-radius: 50%; background: var(--brand); flex: none; animation: blink 1.6s infinite; }
.bc-dh { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 0 0 .45rem; }
.bc-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.bp { display: inline-flex; align-items: center; gap: .3rem; padding: .28rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--surface); color: var(--ink-2); }
.bp .i { width: .9rem; height: .9rem; }
.bp.ok { background: var(--ok-soft); color: var(--ok); } .bp.warn { background: var(--warn-soft); color: var(--warn); } .bp.bad { background: var(--bad-soft); color: var(--bad); }
.bp.info { background: var(--info-soft); color: var(--info); } .bp.brand { background: var(--brand-soft); color: var(--brand-text, var(--brand)); }
/* attendance ring */
.bt-ring { align-items: center; justify-content: center; gap: .3rem; text-align: center; }
.ring2 { position: relative; width: 5.4rem; height: 5.4rem; }
.ring2 svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring2 .rt { fill: none; stroke: var(--line); stroke-width: 11; }
.ring2 .rv { fill: none; stroke-width: 11; stroke-linecap: round; stroke: var(--brand); }
.ring2 .rv.ok { stroke: #3FAF7F; } .ring2 .rv.warn { stroke: var(--mari); } .ring2 .rv.bad { stroke: var(--bad); }
.ring2 b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 1.2rem var(--display); }
.bt-ring .bt-sub { color: var(--ink-2); } .bt-ring .t-pill { margin-top: .1rem; align-self: center; background: var(--ok-soft); }
/* today's periods */
.bt-strip { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); gap: .4rem; }
.bt-strip .bt-k { color: var(--ink-2); }
/* shortcuts */
.bt-short { align-items: center; justify-content: center; gap: .3rem; font-size: .74rem; font-weight: 600; color: var(--ink-2); text-align: center; padding: .55rem .3rem; }
.bs-ic { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; position: relative; color: var(--brand-text, var(--brand)); }
.bs-ic .i { width: 1.2rem; height: 1.2rem; }
.bs-ic.bad { color: var(--bad); } .bs-ic.info { color: var(--info); } .bs-ic.ok { color: var(--ok); }
.bs-badge { position: absolute; top: -.25rem; right: -.45rem; min-width: 1.05rem; height: 1.05rem; display: grid; place-items: center; padding: 0 .25rem; border-radius: 999px; background: var(--bad); color: #fff; font-size: .62rem; font-style: normal; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .bc-now .pulse, .bt .live { animation: none; } button.bt { transition: none; } }
.bt.c1 .bt-k .i { display: none; }
.bt-line { display: flex; align-items: center; margin: auto 0 .5rem; padding-top: .5rem; }
.bt-line i { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; opacity: .35; flex: none; }
.bt-line em { flex: 1; height: 2px; background: currentColor; opacity: .25; }
.bt-line i.done, .bt-line em.done { opacity: .85; }
.bt-line i.me { width: .8rem; height: .8rem; opacity: 1; box-shadow: 0 0 0 3px var(--surface); }
.bt-line i.bus { width: .7rem; height: .7rem; opacity: 1; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.bt-line + .t-pill { margin-top: 0; }
.bc-top .grow, .bc-now .grow { flex: 1; }
