@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Karla:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #16241C;
  --chalkboard: #1E7A4C;
  --chalkboard-deep: #145C39;
  --sun: #F5A623;
  --sun-deep: #DB901A;
  --sky: #0E7C86;
  --sky-deep: #0B6169;
  --coral: #E0524F;
  --coral-deep: #C43F3C;
  --paper: #F7F5EF;
  --card: #FFFFFF;
  --cherry: #C4433D;
  --line: #E3E0D4;
  --rule: rgba(19,36,27,0.1);
  --moss: #1E9A5E;
  --font-display: 'Baloo 2', ui-rounded, 'Segoe UI', sans-serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 0.4em; color: var(--chalkboard); }
a { color: var(--sky-deep); }
button { font-family: var(--font-body); cursor: pointer; }
img, svg { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------------- Landing page ---------------- */

.landing { overflow-x: hidden; }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, var(--chalkboard) 0%, var(--sky-deep) 100%); /* shows while hero.jpg loads, or if it's missing */
}
.hero-photo {
  position: absolute;
  top: -10%; left: 0; right: 0; height: 120%; /* extra height so parallax movement never reveals an edge */
  background-image: url('images/hero.jpg');
  background-size: cover;
  background-position: center;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(29,43,34,0.45) 0%, rgba(29,43,34,0.72) 100%);
}
.hero-scene { position: absolute; inset: 0; pointer-events: none; }
.hero-scene .kite {
  position: absolute; top: 12%; left: 10%; width: 52px; height: 52px; opacity: 0.9;
}

.hero-crest-bg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1; pointer-events: none;
}
.hero-crest-bg img {
  width: clamp(280px, 50vw, 420px); height: auto;
  opacity: 0.12;
  filter: brightness(1.8) grayscale(0.3);
}
.hero-content {
  position: relative; z-index: 2; text-align: center; max-width: 640px; padding: 0 24px;
}
.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; margin-bottom: 18px;
  color: #fff;
}
.hero-content p.lead {
  font-size: 1.2rem; color: #F1F0E8; margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 0.85rem; text-align: center; z-index: 2;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

.section { padding: 80px 24px; max-width: 1040px; margin: 0 auto; }
.section h2 { font-size: 2rem; text-align: center; margin-bottom: 12px; }
.section p.section-lead { text-align: center; color: var(--chalkboard); max-width: 560px; margin: 0 auto 44px; font-size: 1.05rem; }

.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 900px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tile-grid { grid-template-columns: 1fr; } }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 22px; text-align: left;
}
.tile .module-icon { width: 50px; height: 50px; border-radius: 13px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.tile .module-icon svg { width: 26px; height: 26px; }
.tile.c-green .module-icon { background: var(--chalkboard); }
.tile.c-gold .module-icon { background: var(--sun); }
.tile.c-sky .module-icon { background: var(--sky); }
.tile.c-coral .module-icon { background: var(--coral); }
.tile h3 { font-size: 1.15rem; margin-bottom: 8px; }
.tile p { margin: 0; color: var(--ink); font-size: 0.94rem; }

/* Dark alternating section: a few plain, confident statements about the system */
.dark-band { background: var(--ink); color: #fff; padding: 76px 24px; }
.dark-band-inner { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 800px) { .dark-band-inner { grid-template-columns: 1fr; } }
.dark-band h2 { color: #fff; font-size: 2rem; text-align: left; }
.dark-band p.dark-lead { color: #C9E4D2; font-size: 1.05rem; margin-bottom: 0; }
.dark-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dark-stat { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 16px; padding: 20px; }
.dark-stat .module-icon-sm { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.dark-stat .module-icon-sm svg { width: 20px; height: 20px; }
.dark-stat h3 { color: #fff; font-size: 1rem; margin-bottom: 4px; }
.dark-stat p { color: #B9D2C0; font-size: 0.86rem; margin: 0; }

/* Problem, then solution: two columns, light band between hero and tiles */
.problem-section { background: var(--card); padding: 84px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.problem-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 800px) { .problem-grid { grid-template-columns: 1fr; gap: 40px; } }
.problem-section .eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--coral-deep); margin-bottom: 10px;
}
.solution-side .eyebrow { color: var(--chalkboard-deep); }
.problem-section h2 { text-align: left; font-size: 1.6rem; }
.problem-list { list-style: none; margin: 18px 0 0; padding: 0; }
.problem-list li {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line); color: var(--ink); font-size: 0.98rem;
}
.problem-list li:last-child { border-bottom: none; }
.x-mark {
  flex: none; width: 22px; height: 22px; border-radius: 50%; background: rgba(224,82,79,0.14);
  color: var(--coral-deep); font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.checklist { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.checklist-item {
  display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600;
  font-size: 1.02rem; color: var(--chalkboard-deep);
}
.check-mark {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--chalkboard);
  color: #fff; font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* Real product screenshots, not mockups */
.preview-band { padding: 84px 24px; text-align: center; }
.preview-band h2 { margin-bottom: 10px; }
.preview-grid {
  max-width: 1100px; margin: 40px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
  align-items: start;
}
@media (max-width: 860px) { .preview-grid { grid-template-columns: 1fr; max-width: 560px; } }
.preview-shot {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(22,36,28,0.16); background: var(--card); text-align: left;
}
.preview-shot img { display: block; width: 100%; }
.preview-shot .preview-label {
  display: block; padding: 12px 16px; font-family: var(--font-display); font-weight: 600;
  font-size: 0.92rem; color: var(--chalkboard-deep); border-top: 1px solid var(--line);
}

/* Pull-quote in the school's own voice */
.quote-section { padding: 70px 24px; text-align: center; background: var(--card); }
.quote-section blockquote { max-width: 720px; margin: 0 auto; }
.quote-section .quote-mark { width: 34px; height: 34px; color: var(--sun); margin-bottom: 14px; }
.quote-section p {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--chalkboard-deep); line-height: 1.4; margin: 0 0 16px;
}
.quote-section cite { font-style: normal; color: var(--ink); opacity: 0.7; font-size: 0.95rem; }

.cta-band {
  background: var(--chalkboard); color: #fff; border-radius: 28px;
  max-width: 1040px; margin: 0 auto 90px; padding: 56px 40px; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #CFE0D6; max-width: 480px; margin: 0 auto 26px; }

footer.site-footer { text-align: center; padding: 30px 24px 50px; color: var(--chalkboard); font-size: 0.9rem; }

/* Reveal-on-scroll (used once, deliberately, on the About tiles) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  border: none; border-radius: 999px; padding: 13px 28px; font-size: 1rem;
  background: var(--sun); color: var(--chalkboard-deep); text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--sun-deep); transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0,0,0,0.08); text-decoration: none; }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.secondary { background: transparent; color: var(--chalkboard); border: 2px solid var(--chalkboard); }
.btn.secondary:hover { background: var(--chalkboard); color: #fff; }
.btn.small { padding: 8px 18px; font-size: 0.88rem; }
.btn.danger { background: var(--cherry); color: #fff; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ---------------- Login ---------------- */

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #BFE3E8 0%, var(--paper) 100%); padding: 24px;
}
.login-card {
  background: var(--card); border-radius: 24px; padding: 44px 40px; width: 380px;
  border: 2px solid var(--line); box-shadow: 0 18px 0 rgba(47,69,56,0.06);
}
.login-logo { display: block; width: 72px; height: auto; margin: 0 auto 16px; }
.login-card h1 { font-size: 1.6rem; margin-bottom: 4px; text-align: center; }
.login-card p.sub { color: var(--chalkboard); font-size: 0.95rem; margin-bottom: 26px; text-align: center; }
.login-card .btn { width: 100%; text-align: center; margin-top: 8px; }
.login-back { display: block; text-align: center; margin-top: 18px; font-size: 0.9rem; }

/* ---------------- Forms (shared) ---------------- */

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.9rem; color: var(--chalkboard); margin-bottom: 6px; font-weight: 600; }
.checkbox-label { display: inline-flex !important; align-items: center; gap: 6px; cursor: pointer; font-weight: 500; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--chalkboard); cursor: pointer; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 2px solid var(--line); border-radius: 12px;
  font-family: var(--font-body); font-size: 0.97rem; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sky); }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }

.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 0.92rem; }
.alert.error { background: #F7DEDC; color: var(--cherry); border: 2px solid #ECB6B1; }
.alert.info { background: #DCEEF0; color: var(--sky-deep); border: 2px solid #B9DDE1; }

/* ---------------- App shell (post-login) ---------------- */

.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: 240px; flex-shrink: 0; background: var(--chalkboard); color: #EFF4EF;
  padding: 26px 0; display: flex; flex-direction: column;
}
.app-sidebar .brand { font-family: var(--font-display); font-size: 1.3rem; padding: 0 22px 20px; color: #fff; display: flex; align-items: center; gap: 12px; }
.app-sidebar .brand-logo { width: 38px; height: auto; flex: none; }
.app-sidebar .brand small { display: block; font-family: var(--font-body); font-size: 0.72rem; color: #A9C1AE; margin-top: 4px; font-weight: 400; }
.app-sidebar nav { flex: 1; }
.app-sidebar nav a {
  display: block; padding: 11px 22px; color: #D3E2D6; text-decoration: none;
  border-left: 4px solid transparent; font-size: 0.95rem; cursor: pointer;
}
.app-sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.app-sidebar nav a.active { color: #fff; border-left-color: var(--sun); background: rgba(255,255,255,0.08); }
.app-sidebar .user-box { padding: 16px 22px 0; border-top: 1px solid rgba(255,255,255,0.14); margin-top: 14px; padding-top: 16px; }
.app-sidebar .user-box .name { color: #fff; font-size: 0.92rem; font-weight: 600; }
.app-sidebar .user-box .role { color: #A9C1AE; font-size: 0.78rem; margin-bottom: 10px; text-transform: capitalize; }
.app-sidebar .user-box button { background: none; border: 1px solid rgba(255,255,255,0.3); color: #D3E2D6; padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; width: 100%; }

.app-main { flex: 1; padding: 36px 44px; max-width: 1120px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-head p.subtitle { color: var(--chalkboard); margin: 4px 0 0; }

.panel { background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 24px 26px; margin-bottom: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .app-main { padding: 26px 20px; } }

.stat { border: 2px solid var(--line); border-left: 6px solid var(--sky); background: var(--card); border-radius: 14px; padding: 16px 18px; }
.stat.warn { border-left-color: var(--sun); }
.stat.danger { border-left-color: var(--cherry); }
.stat .figure { font-family: var(--font-display); font-size: 1.7rem; color: var(--chalkboard); }
.stat .label { color: var(--ink); font-size: 0.82rem; margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
thead th { text-align: left; font-weight: 700; color: var(--chalkboard); border-bottom: 3px solid var(--line); padding: 9px 10px; font-size: 0.82rem; }
tbody td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #FBF8F0; }
td.amount, th.amount { text-align: right; font-variant-numeric: tabular-nums; }
td.right { text-align: right; }

.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }
.badge.confirmed, .badge.active { background: #DCEEE0; color: var(--chalkboard-deep); }
.badge.pending { background: #FBEBC7; color: #9C6C0F; }
.badge.failed, .badge.archived { background: #F7DEDC; color: var(--cherry); }

.filter-bar { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; align-items: end; }
.filter-bar .field { margin-bottom: 0; min-width: 170px; }
.empty-state { text-align: center; padding: 44px 20px; color: var(--chalkboard); }
.muted { color: #5A6B60; }

.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Floating contact button (WhatsApp / phone) ---------------- */
/* Lives outside #app, shown only on the public marketing pages, and only
   when the school has actually configured a number. */
.contact-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.contact-fab.hidden { display: none; }
.contact-fab-btn {
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: var(--chalkboard); color: #fff; box-shadow: 0 10px 30px rgba(22,36,28,0.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.contact-fab-btn:hover { background: var(--chalkboard-deep); transform: scale(1.06); }
.contact-fab-menu {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.contact-fab.open .contact-fab-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.contact-fab-option {
  display: flex; align-items: center; gap: 10px; background: var(--card);
  color: var(--ink); text-decoration: none; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(22,36,28,0.14);
  font-size: 0.9rem; font-weight: 600; white-space: nowrap;
}
.contact-fab-option.whatsapp { color: #1E7A4C; }
.contact-fab-option.call { color: var(--sky-deep); }
.contact-fab-option svg { flex: none; }

/* =====================================================================
   LIQUID GLASS LANDING PAGE
   Frosted, see-through panels floating over a slowly moving field of the
   school's colours. Scoped to .lg so the staff/parent screens are untouched.
   ===================================================================== */

.lg {
  --glass-bg: rgba(255,255,255,0.10);
  --glass-bg-strong: rgba(255,255,255,0.16);
  --glass-edge: rgba(255,255,255,0.28);
  --glass-blur: 22px;
  --text: #F4F8F5;
  --text-soft: rgba(236,246,240,0.78);
  --deep: #0B2A1F;
  position: relative; min-height: 100vh; overflow-x: clip;
  color: var(--text); background: var(--deep);
  font-family: 'Plus Jakarta Sans', var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.lg h1, .lg h2, .lg h3 { font-family: 'Plus Jakarta Sans', var(--font-display); color: #fff; letter-spacing: -0.025em; }
.lg a { color: inherit; text-decoration: none; }

/* ---------- the "liquid": moving colour behind everything ---------- */
.lg-liquid {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, #145C39 0%, transparent 60%),
    linear-gradient(180deg, #0E3A2A 0%, var(--deep) 55%, #081F17 100%);
}
.lg-liquid .blob {
  position: absolute; border-radius: 50%; opacity: 0.85;
  width: 62vmax; height: 62vmax; will-change: transform;
  translate: 0 calc(var(--scroll, 0px) * -0.08);
}
.blob.b1 { background: radial-gradient(circle, #1E9A5E 0%, rgba(30,154,94,0) 65%); top: -22vmax; left: -18vmax; animation: drift1 26s ease-in-out infinite alternate; }
.blob.b2 { background: radial-gradient(circle, #F5A623 0%, rgba(245,166,35,0) 62%); top: 8vmax; right: -26vmax; opacity: 0.55; animation: drift2 32s ease-in-out infinite alternate; }
.blob.b3 { background: radial-gradient(circle, #0E9AA6 0%, rgba(14,154,166,0) 64%); bottom: -30vmax; left: 10vmax; animation: drift3 28s ease-in-out infinite alternate; }
.blob.b4 { background: radial-gradient(circle, #E0524F 0%, rgba(224,82,79,0) 60%); top: 40%; left: -24vmax; width: 44vmax; height: 44vmax; opacity: 0.4; animation: drift2 36s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(18vmax, 14vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, 12vmax) scale(0.9); } }
@keyframes drift3 { to { transform: translate(12vmax, -18vmax) scale(1.2); } }
.lg-photo { /* drop a photo at portal/images/hero.jpg and it shows through, tinted */
  position: absolute; inset: 0; background: url('images/hero.jpg') center/cover no-repeat;
  opacity: 0.22; mix-blend-mode: luminosity;
}
.lg-grain {
  position: absolute; inset: 0; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.lg > *:not(.lg-liquid) { position: relative; z-index: 1; }

/* ---------- glass material ---------- */
.lg .glass, .lg .glass-btn, .lg .glass-on-dark {
  position: relative; isolation: isolate;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  box-shadow:
    inset 0 1px 0.5px rgba(255,255,255,0.45),
    inset 0 -1px 0.5px rgba(255,255,255,0.08),
    0 1px 2px rgba(0,0,0,0.12),
    0 18px 40px -12px rgba(0,0,0,0.35);
}
/* gradient rim, brighter at the top-left like light hitting a lens */
.lg .glass::after, .lg .glass-btn::after, .lg .glass-on-dark::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.08) 40%, rgba(255,255,255,0.04) 60%, rgba(255,255,255,0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* specular highlight that follows the pointer */
.lg .glass::before, .lg .glass-btn::before, .lg .glass-on-dark::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 20%) var(--my, 0%), rgba(255,255,255,0.18), transparent 45%);
  transition: opacity .3s ease;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lg .glass, .lg .glass-btn, .lg .glass-on-dark { background: rgba(22,64,46,0.88); }
}

/* ---------- buttons ---------- */
.glass-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: 700 1rem/1 'Plus Jakarta Sans', var(--font-body); color: #fff;
  transition: transform .25s cubic-bezier(.2,.8,.2,1.2), background .2s ease;
}
.glass-btn svg { width: 20px; height: 20px; color: currentColor; }
.glass-btn:hover { background: var(--glass-bg-strong); transform: translateY(-2px) scale(1.02); }
.glass-btn:active { transform: scale(0.97); }
.glass-btn.primary { background: linear-gradient(180deg, rgba(255,196,84,0.95), rgba(245,166,35,0.92)); color: #1F2A10; }
.glass-btn.primary:hover { background: linear-gradient(180deg, #FFC857, #F5A623); }
.glass-btn.small { padding: 10px 18px; font-size: 0.9rem; }
.lg :focus-visible { outline: 3px solid #FFD27A; outline-offset: 3px; }

/* ---------- floating nav pill ---------- */
.lg-nav {
  position: sticky !important; top: 14px; z-index: 20 !important;
  width: min(1080px, calc(100% - 28px)); margin: 14px auto 0;
  display: flex; align-items: center; gap: 18px;
  padding: 8px 8px 8px 16px; border-radius: 999px;
  transition: background .3s ease;
}
.lg-nav.scrolled { background: rgba(14,48,35,0.55); }
.lg-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; white-space: nowrap; }
.lg-brand img { width: 32px; height: 32px; object-fit: contain; }
.lg-links { display: flex; gap: 4px; margin-left: auto; }
.lg-links a { padding: 8px 14px; border-radius: 999px; font-size: 0.92rem; font-weight: 600; color: var(--text-soft); transition: background .2s, color .2s; }
.lg-links a:hover { background: rgba(255,255,255,0.12); color: #fff; }
@media (max-width: 720px) { .lg-links { display: none; } .lg-nav .glass-btn { margin-left: auto; } }

/* ---------- hero ---------- */
.lg-hero {
  min-height: calc(100vh - 70px); min-height: calc(100svh - 70px);
  width: min(1080px, 100%); margin: 0 auto; padding: 48px 24px 90px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  font-size: 0.86rem; font-weight: 700; letter-spacing: 0.02em; margin-bottom: 22px;
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: #FFC857; box-shadow: 0 0 0 4px rgba(255,200,87,0.25); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255,200,87,0); } }
.lg-hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: 0.98; font-weight: 800; margin: 0 0 22px;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,0.7));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lg-hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-soft); max-width: 30em; margin: 0 0 32px; line-height: 1.6; }
.lg-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.lg-actions.center { justify-content: center; }

.lg-stack { display: flex; flex-direction: column; gap: 12px; perspective: 1000px; }
.lg-clock { border-radius: 28px; padding: 18px 24px; text-align: center; margin-bottom: 6px; }
.lg-clock .t { font-size: 3.4rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.lg-clock .d { color: var(--text-soft); font-weight: 600; margin-top: 6px; }
.notif {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 22px;
  animation: notifIn .9s cubic-bezier(.2,.9,.25,1.15) both; animation-delay: calc(.35s + var(--i) * .22s);
}
.notif:nth-child(3) { margin-left: 18px; }
.notif:nth-child(4) { margin-left: 36px; }
@keyframes notifIn { from { opacity: 0; transform: translateY(24px) scale(0.94); } }
.n-icon { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,0.35); }
.n-icon svg { width: 22px; height: 22px; }
.n-app { font-size: 0.74rem; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.n-title { font-weight: 700; margin-top: 2px; }
.n-body { font-size: 0.9rem; color: var(--text-soft); line-height: 1.4; }

.lg-cue { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border-radius: 14px; border: 2px solid rgba(255,255,255,0.5); }
.lg-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
.lg-hero { position: relative; }

@media (max-width: 860px) {
  .lg-hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; gap: 36px; }
  .lg-hero .lead { margin-left: auto; margin-right: auto; }
  .lg-actions { justify-content: center; }
  .lg-stack { max-width: 420px; margin: 0 auto; width: 100%; text-align: left; }
  .notif:nth-child(3), .notif:nth-child(4) { margin-left: 0; }
  .lg-cue { display: none; }
}

/* ---------- sections ---------- */
.lg-section { width: min(1080px, 100%); margin: 0 auto; padding: 70px 20px; scroll-margin-top: 80px; }
.lg-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.lg-head h2, .lg-split-copy h2, .lg-dark h2, .lg-cta h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.08; font-weight: 800; margin: 0 0 14px; }
.lg-head p, .lg-split-copy p, .lg-dark p, .lg-cta p { color: var(--text-soft); font-size: 1.08rem; margin: 0; }
.lg .eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em;
  color: #FFC857; margin-bottom: 12px;
}

/* bento grid */
.lg-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento { border-radius: 28px; padding: 26px; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.bento:hover { transform: translateY(-4px); }
.bento.big { grid-row: span 2; display: flex; flex-direction: column; }
.bento h3 { font-size: 1.2rem; margin: 0 0 8px; }
.bento p { color: var(--text-soft); margin: 0; font-size: 0.97rem; line-height: 1.55; }
.b-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 8px 20px -6px var(--c);
}
.b-icon svg { width: 25px; height: 25px; }
.b-icon.sm { width: 38px; height: 38px; border-radius: 11px; margin-bottom: 12px; }
.b-icon.sm svg { width: 20px; height: 20px; }
.mini-list { margin-top: auto; padding-top: 22px; display: grid; gap: 8px; }
.mini-list div { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,0.08); font-size: 0.92rem; }
.mini-list b { margin-left: auto; font-weight: 700; }
.mini-list .dot, .dot { width: 8px; height: 8px; border-radius: 50%; }
.meter { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.14); overflow: hidden; margin-top: 18px; }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3FC98A, #FFC857); }
@media (max-width: 860px) { .lg-bento { grid-template-columns: 1fr 1fr; } .bento.big { grid-column: span 2; grid-row: auto; } }
@media (max-width: 560px) { .lg-bento { grid-template-columns: 1fr; } .bento.big { grid-column: auto; } }

/* parents split + phone */
.lg-split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.lg-split-copy .glass-btn { margin-top: 26px; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.ticks li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; background: rgba(63,201,138,0.25); color: #7BE3B1; }
.phone-frame {
  position: relative; width: 290px; max-width: 100%; aspect-ratio: 9 / 19; margin: 0 auto;
  border-radius: 48px; padding: 12px; background: linear-gradient(145deg, #3a4a42, #111a15);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.6), inset 0 0 0 2px rgba(255,255,255,0.12);
  transform: rotate(-4deg);
}
.phone-island { position: absolute; top: 22px; left: 50%; translate: -50% 0; width: 88px; height: 26px; border-radius: 20px; background: #000; z-index: 2; }
.phone-screen {
  height: 100%; border-radius: 38px; overflow: hidden; padding: 58px 14px 14px; display: flex; flex-direction: column; gap: 10px;
  background: radial-gradient(90% 60% at 20% 10%, #1E9A5E, transparent 70%), radial-gradient(80% 60% at 90% 80%, #F5A623, transparent 70%), #0E3A2A;
}
.ps-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.1rem; margin-bottom: 4px; }
.ps-head img { width: 24px; height: 24px; object-fit: contain; }
.ps-card { border-radius: 20px; padding: 12px 14px; }
.ps-card .meter { margin: 10px 0 6px; height: 6px; }
.ps-card.tint { background: rgba(224,82,79,0.25); }
.ps-name { font-weight: 700; }
.ps-sub { font-size: 0.78rem; color: var(--text-soft); }
@media (max-width: 860px) { .lg-split { grid-template-columns: 1fr; gap: 44px; text-align: center; } .ticks { justify-items: center; } }

/* dark staff panel */
.lg-dark {
  border-radius: 36px; padding: 44px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center;
  background: linear-gradient(160deg, rgba(8,28,20,0.72), rgba(8,28,20,0.5));
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 30px 60px -20px rgba(0,0,0,0.5);
}
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role { border-radius: 22px; padding: 18px; }
.role h3 { font-size: 1rem; margin: 0 0 2px; }
.role p { font-size: 0.86rem !important; }
@media (max-width: 860px) { .lg-dark { grid-template-columns: 1fr; padding: 28px 22px; } }
@media (max-width: 420px) { .role-grid { grid-template-columns: 1fr; } }

/* screenshots */
.lg-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.shot { margin: 0; border-radius: 22px; padding: 8px; overflow: hidden; }
.shot img { display: block; width: 100%; border-radius: 15px; }
.shot figcaption { padding: 12px 8px 6px; font-weight: 700; font-size: 0.92rem; }
@media (max-width: 860px) { .lg-shots { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

/* quote + CTA + footer */
.lg-quote { margin: 0; border-radius: 36px; padding: 52px 32px; text-align: center; }
.lg-quote .quote-mark { width: 38px; height: 38px; color: #FFC857; }
.lg-quote p { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.03em; margin: 12px 0; }
.lg-quote cite { font-style: normal; color: var(--text-soft); }
.lg-cta { border-radius: 36px; padding: 56px 28px; text-align: center; }
.lg-cta p { margin-bottom: 26px; }
.lg-footer { text-align: center; padding: 30px 20px 60px; color: var(--text-soft); font-size: 0.9rem; display: grid; gap: 6px; justify-items: center; }
.lg-footer img { width: 40px; height: 40px; object-fit: contain; opacity: 0.9; }
.muted-light { opacity: 0.6; }

/* reveal on scroll */
.lg .reveal { opacity: 0; transform: translateY(26px) scale(0.98); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.lg .reveal.is-visible { opacity: 1; transform: none; }

/* phones: lighter blur and still colour field = smooth scrolling on cheaper devices */
@media (max-width: 720px) {
  .lg { --glass-blur: 14px; }
  .lg-liquid .blob { animation: none; }
  .lg-section { padding: 52px 16px; }
  .lg-hero { padding: 32px 16px 60px; }
  .bento, .lg-quote, .lg-cta { border-radius: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-liquid .blob, .chip-dot, .lg-cue span { animation: none !important; }
  .lg .reveal { opacity: 1; transform: none; }
}
.lg-shots { align-items: start; }
.phone-screen { text-align: left; }

/* =====================================================================
   LIQUID GLASS: LOGIN PAGES (staff + parent)
   ===================================================================== */
.login-wrap {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60vmax 60vmax at 0% 0%, rgba(30,154,94,0.9), transparent 60%),
    radial-gradient(50vmax 50vmax at 100% 30%, rgba(245,166,35,0.55), transparent 60%),
    radial-gradient(60vmax 60vmax at 40% 110%, rgba(14,154,166,0.8), transparent 60%),
    #0B2A1F;
  font-family: 'Plus Jakarta Sans', var(--font-body);
}
.login-wrap::before, .login-wrap::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  width: 50vmax; height: 50vmax; will-change: transform;
}
.login-wrap::before { background: radial-gradient(circle, rgba(30,154,94,0.8), transparent 65%); top: -20vmax; left: -15vmax; animation: drift1 24s ease-in-out infinite alternate; }
.login-wrap::after { background: radial-gradient(circle, rgba(224,82,79,0.4), transparent 62%); bottom: -22vmax; right: -18vmax; animation: drift2 30s ease-in-out infinite alternate; }
.login-card {
  position: relative; width: min(400px, 100%); border: 0; border-radius: 32px; padding: 40px 34px;
  color: #F4F8F5;
  background: rgba(255,255,255,0.11);
  -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%);
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,0.5), inset 0 0 0 1px rgba(255,255,255,0.18), 0 30px 70px -20px rgba(0,0,0,0.55);
}
.login-card h1 { color: #fff; font-family: 'Plus Jakarta Sans', var(--font-display); font-weight: 800; letter-spacing: -0.025em; }
.login-card p.sub { color: rgba(236,246,240,0.78); }
.login-card .field label { color: rgba(236,246,240,0.85); font-weight: 600; }
.login-card .field input {
  background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.22); border-radius: 14px; padding: 13px 15px;
}
.login-card .field input::placeholder { color: rgba(255,255,255,0.45); }
.login-card .field input:focus { border-color: #FFC857; box-shadow: 0 0 0 4px rgba(255,200,87,0.22); background: rgba(255,255,255,0.16); }
.login-card .btn {
  background: linear-gradient(180deg, #FFC857, #F5A623); color: #1F2A10; font-family: 'Plus Jakarta Sans', var(--font-display); font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 10px 24px -8px rgba(245,166,35,0.7);
}
.login-card .btn:hover { background: linear-gradient(180deg, #FFD27A, #F5A623); }
.login-back { color: rgba(236,246,240,0.8) !important; }
.login-back:hover { color: #fff !important; }
.login-card .alert.error { background: rgba(224,82,79,0.22); color: #FFD9D7; border: 1px solid rgba(255,160,155,0.4); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .login-card { background: rgba(22,64,46,0.9); } }

/* =====================================================================
   LIQUID GLASS: SIGNED-IN SCREENS (staff + parent)
   Light-mode glass: bright frosted panels keep tables easy to read.
   ===================================================================== */
.app-shell {
  --g-ink: #13241B;
  --g-soft: #52645A;
  --g-panel: rgba(255,255,255,0.72);
  --g-edge: rgba(255,255,255,0.85);
  position: relative; isolation: isolate; gap: 0;
  font-family: 'Plus Jakarta Sans', var(--font-body);
  color: var(--g-ink);
}
.app-shell::before { /* soft colour wash behind everything, fixed so it doesn't cost anything on scroll */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55vmax 45vmax at 8% 0%, rgba(63,201,138,0.38), transparent 62%),
    radial-gradient(45vmax 40vmax at 100% 15%, rgba(255,200,87,0.40), transparent 60%),
    radial-gradient(55vmax 45vmax at 70% 105%, rgba(14,154,166,0.30), transparent 62%),
    radial-gradient(35vmax 30vmax at 0% 90%, rgba(224,82,79,0.16), transparent 60%),
    #EEF3EE;
}
.app-shell h1, .app-shell h2, .app-shell h3 { font-family: 'Plus Jakarta Sans', var(--font-display); letter-spacing: -0.02em; color: #0F3D2C; }
.app-shell h1 { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.app-shell h2 { font-weight: 700; font-size: 1.15rem; }

/* floating glass sidebar */
.app-sidebar {
  position: sticky; top: 14px; align-self: flex-start;
  height: calc(100vh - 28px); margin: 14px 0 14px 14px; width: 244px;
  border-radius: 28px; padding: 22px 12px 16px; overflow-y: auto;
  background: linear-gradient(170deg, rgba(20,92,57,0.86), rgba(11,42,31,0.88));
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,0.35), inset 0 0 0 1px rgba(255,255,255,0.1), 0 24px 50px -18px rgba(11,42,31,0.55);
}
.app-sidebar .brand { padding: 0 10px 18px; font-family: 'Plus Jakarta Sans', var(--font-display); font-weight: 800; font-size: 1.08rem; letter-spacing: -0.01em; }
.app-sidebar .brand-logo { width: 34px; }
.app-sidebar .brand small { color: rgba(220,238,228,0.65); font-family: 'Plus Jakarta Sans', var(--font-body); }
.app-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.app-sidebar nav a {
  border-left: 0; border-radius: 14px; padding: 10px 14px; font-weight: 600; font-size: 0.93rem;
  color: rgba(226,240,232,0.8); position: relative; transition: background .2s, color .2s;
}
.app-sidebar nav a:hover { background: rgba(255,255,255,0.09); color: #fff; }
.app-sidebar nav a.active {
  color: #0F3D2C; background: rgba(255,255,255,0.9);
  box-shadow: inset 0 1px 0 #fff, 0 6px 16px -6px rgba(0,0,0,0.35);
}
.app-sidebar nav a.active::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #F5A623; }
.app-sidebar .user-box { margin: 14px 4px 0; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,0.12); }
.app-sidebar .user-box button { border-radius: 12px; padding: 8px 14px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); color: #E7F2EB; transition: background .2s; }
.app-sidebar .user-box button:hover { background: rgba(255,255,255,0.16); }
.app-sidebar .user-box .user-link { display: block; margin: -4px 0 10px; font-size: 0.8rem; color: #BFD6C5; text-decoration: underline; }
.app-sidebar .user-box .user-link:hover { color: #fff; }

.app-main { padding: 34px 38px 60px; min-width: 0; }
.page-head p.subtitle { color: var(--g-soft); }

/* frosted panels */
.app-shell .panel, .app-shell .stat {
  position: relative;
  background: var(--g-panel);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--g-edge); border-radius: 24px;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(19,36,27,0.04), 0 14px 34px -16px rgba(19,36,27,0.22);
}
.app-shell .panel { padding: 24px 26px; overflow-x: auto; }
.app-shell .stat { padding: 18px 20px 18px 24px; border-left: 1px solid var(--g-edge); overflow: hidden; }
.app-shell .stat::before { content: ""; position: absolute; left: 10px; top: 16px; bottom: 16px; width: 4px; border-radius: 4px; background: #0E9AA6; }
.app-shell .stat.warn::before { background: #F5A623; }
.app-shell .stat.danger::before { background: #E0524F; }
.app-shell .stat .figure { font-family: 'Plus Jakarta Sans', var(--font-display); font-weight: 800; font-size: 1.75rem; letter-spacing: -0.03em; color: #0F3D2C; }
.app-shell .stat .label { color: var(--g-soft); font-weight: 600; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .app-shell .panel, .app-shell .stat { background: rgba(255,255,255,0.95); }
  .app-sidebar { background: #145C39; }
}

/* tables stay crisp */
.app-shell table { font-size: 0.92rem; }
.app-shell thead th { color: var(--g-soft); border-bottom: 1px solid rgba(19,36,27,0.1); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; }
.app-shell tbody td { border-bottom: 1px solid rgba(19,36,27,0.06); }
.app-shell tbody tr:hover { background: rgba(255,255,255,0.7); }
.app-shell tbody tr:last-child td { border-bottom: 0; }

/* inputs */
.app-shell .field label { color: var(--g-soft); font-weight: 600; font-size: 0.85rem; }
.app-shell .field input, .app-shell .field select, .app-shell .field textarea {
  background: rgba(255,255,255,0.85); border: 1px solid rgba(19,36,27,0.12); border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(19,36,27,0.05); transition: border-color .15s, box-shadow .15s;
}
.app-shell .field input:focus, .app-shell .field select:focus, .app-shell .field textarea:focus {
  border-color: #1E9A5E; box-shadow: 0 0 0 4px rgba(30,154,94,0.16); background: #fff;
}

/* buttons */
.app-shell .btn {
  font-family: 'Plus Jakarta Sans', var(--font-display); font-weight: 700; letter-spacing: -0.005em;
  background: linear-gradient(180deg, #FFC857, #F5A623); color: #2A2208;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 8px 18px -8px rgba(219,144,26,0.8);
}
.app-shell .btn:hover { background: linear-gradient(180deg, #FFD27A, #F5A623); box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 10px 22px -8px rgba(219,144,26,0.9); }
.app-shell .btn.secondary { background: rgba(255,255,255,0.7); color: #145C39; border: 1px solid rgba(20,92,57,0.22); box-shadow: inset 0 1px 0 #fff; }
.app-shell .btn.secondary:hover { background: #fff; color: #0F3D2C; }
.app-shell .btn.danger { background: linear-gradient(180deg, #E86663, #C43F3C); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.3); }
.app-shell .badge { font-weight: 700; letter-spacing: 0.01em; }
.app-shell .alert { border-radius: 16px; }
.app-shell a { color: #0B6169; }
.app-shell .empty-state { color: var(--g-soft); }

/* ---------- phones & tablets: sidebar becomes a glass top bar ---------- */
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .app-sidebar {
    position: sticky; top: 8px; z-index: 30; align-self: stretch;
    width: auto; height: auto; margin: 8px 8px 0; padding: 10px 10px 8px; border-radius: 22px; overflow: visible;
    display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 8px;
  }
  .app-sidebar .brand { padding: 0 4px; font-size: 0.98rem; }
  .app-sidebar .brand-logo { width: 28px; }
  .app-sidebar .brand small { display: none; }
  .app-sidebar nav {
    grid-column: 1 / -1; grid-row: 2; flex-direction: row; gap: 6px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    margin: 0 -10px; padding: 2px 10px;
    -webkit-mask: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
            mask: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  }
  .app-sidebar nav::-webkit-scrollbar { display: none; }
  .app-sidebar nav a { white-space: nowrap; padding: 8px 14px; font-size: 0.88rem; scroll-snap-align: start; background: rgba(255,255,255,0.07); }
  .app-sidebar nav a.active::after { display: none; }
  .app-sidebar .user-box { grid-column: 2; grid-row: 1; margin: 0; padding: 0; border: 0; }
  .app-sidebar .user-box .name, .app-sidebar .user-box .role { display: none; }
  .app-sidebar .user-box button { width: auto; padding: 7px 14px; }
  .app-main { padding: 22px 12px 50px; }
  .app-shell .panel { padding: 18px 16px; border-radius: 20px; }
  .field-row { flex-direction: column; gap: 0; }
}

/* Immunization record: one row per vaccine with a tick box and date */
.imm-grid { display: grid; gap: 6px; margin: 6px 0 4px; }
.imm-head, .imm-row { display: grid; grid-template-columns: minmax(110px, 1fr) 56px minmax(150px, 1.2fr); align-items: center; gap: 12px; }
.imm-head { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; padding: 0 12px; }
.imm-head span:nth-child(2) { text-align: center; }
.imm-row { padding: 6px 12px; border-radius: 12px; background: rgba(19,36,27,0.035); }
.imm-row:has(.imm-check:checked) { background: rgba(30,154,94,0.09); }
.imm-name { font-weight: 600; font-size: 0.93rem; margin: 0; cursor: pointer; }
.imm-check { width: 20px; height: 20px; justify-self: center; accent-color: #1E7A4C; cursor: pointer; }
.imm-date { width: 100%; padding: 8px 10px; border: 1px solid rgba(19,36,27,0.14); border-radius: 10px; font: inherit; font-size: 0.9rem; background: #fff; color: inherit; }
.imm-date:focus { outline: none; border-color: #1E9A5E; box-shadow: 0 0 0 3px rgba(30,154,94,0.16); }
@media (max-width: 520px) {
  .imm-head { display: none; }
  .imm-row { grid-template-columns: 1fr 40px; row-gap: 6px; }
  .imm-date { grid-column: 1 / -1; }
}

/* Parent fee payment */
.meter-bar { margin: 10px 0 4px; height: 10px; border-radius: 99px; background: rgba(19,36,27,0.08); overflow: hidden; }
.meter-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1E9A5E, #3FC98A); }
.pay-box { margin-top: 16px; padding: 18px; border-radius: 18px; background: linear-gradient(160deg, rgba(255,200,87,0.16), rgba(30,154,94,0.08)); border: 1px solid rgba(245,166,35,0.3); }
.pay-box h3 { margin: 0 0 12px; font-size: 1.05rem; }
.pay-btn { width: 100%; text-align: center; padding: 15px 20px; font-size: 1.02rem; }
.pay-note { font-size: 0.82rem; margin: 10px 0 0; line-height: 1.45; }

.alert.success { background: #DCF3E4; color: #145C39; border: 2px solid #A9DDBB; }

/* SMS */
.sms-opt { margin: 4px 0 16px; padding: 12px 14px; border-radius: 14px; background: rgba(30,154,94,0.07); border: 1px solid rgba(30,154,94,0.18); }
.sms-opt.off { background: rgba(19,36,27,0.04); border-color: rgba(19,36,27,0.08); }
.sms-opt .muted { font-size: 0.82rem; margin: 4px 0 0 26px; }
.sms-preview { margin-top: 6px; }
.sms-preview p { margin: 0 0 8px; }
.sms-bubble { max-width: 420px; margin: 10px 0 14px; padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: #E9EEF0; color: #13241B; font-size: 0.9rem; line-height: 1.45; }

/* Practice (demo) site banner */
.demo-banner { position: sticky; top: 0; z-index: 1000; background: #b3261e; color: #fff; text-align: center;
  font-weight: 700; font-size: .9rem; padding: 7px 12px; letter-spacing: .02em; }
