:root {
  --ink: #23291b; --muted: #676d5f; --line: #ebe4e7; --bg: #fbf8f7; --card: #fff;
  /* from the Vrindhavan logo: olive lettering, lotus pink, leaf green */
  --brand: #33421c; --brand2: #4a6128; --leaf: #5a9a32; --pink: #e6147e; --pink2: #b80f64; --pinkbg: #fde8f2; --greenbg: #eef6e8;
  --p: #1e8a4c; --pbg: #e7f6ed; --a: #c62828; --abg: #fdecec; --l: #b26a00; --lbg: #fff4e0;
  --wa: #1fa855; --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; -webkit-text-size-adjust: 100%; }
body { padding-bottom: env(safe-area-inset-bottom); }
#app { max-width: 960px; margin: 0 auto; min-height: 100vh; }
.boot, .loading { padding: 40px; text-align: center; color: var(--muted); }
h1, h2, h3, h4 { margin: 0 0 6px; line-height: 1.2; }
h2 { font-size: 1.3rem; } h3 { font-size: 1.08rem; } h4 { font-size: 1rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .okc { color: var(--p); } .errc { color: var(--a); }
.row { display: flex; align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .gap { gap: 8px; } .grow { flex: 1; }
.stack > * + * { margin-top: 8px; }

/* buttons & inputs */
.btn { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.danger { color: var(--a); border-color: #f3c4c4; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; min-height: 34px; font-size: .88rem; }
.btn.big { min-height: 54px; font-size: 1.05rem; }
.btn.block { display: flex; width: 100%; }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn:disabled { opacity: .5; }
.link { background: none; border: 0; color: var(--brand2); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.iconbtn { border: 0; background: transparent; font-size: 1.5rem; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; color: inherit; }
.iconbtn:disabled { opacity: .3; }
label { display: block; font-size: .9rem; font-weight: 600; margin: 10px 0; }
label > input, label > select, label > textarea { display: block; width: 100%; margin-top: 4px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 4px 0; }
label.inline > input { display: inline; width: auto; margin: 0; }
input, select, textarea { font: inherit; padding: 9px 10px; border: 1px solid #cfd6de; border-radius: 9px; background: #fff; color: var(--ink); min-height: 42px; max-width: 100%; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 18px; height: 18px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; padding: 8px 12px; }
legend { font-size: .9rem; font-weight: 600; padding: 0 4px; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth .card { width: 100%; max-width: 380px; }
.logo { width: 52px; height: 52px; border-radius: 14px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.logo.sm { width: 34px; height: 34px; font-size: 18px; border-radius: 9px; margin: 0; }
.demo-pick > * { margin: 8px 0; }

/* shell */
.demobar { background: #fff4e0; color: #6b4a00; font-size: .82rem; padding: 6px 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.demobar label { margin: 0; font-weight: 500; display: inline-flex; gap: 4px; align-items: center; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand small { display: block; color: var(--muted); font-size: .8rem; }
.tabs { display: flex; gap: 4px; background: #fff; padding: 0 8px; border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 61px; z-index: 4; }
.tabs a { padding: 12px 9px; font-size: .95rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--pink2); border-color: var(--pink); }
.netbar:empty { display: none; }
.netbar { padding: 8px 12px; font-size: .9rem; }
.netbar.warn { background: var(--lbg); color: #6b4a00; } .netbar.off { background: #eceff3; color: var(--muted); }
main { padding: 12px; padding-bottom: 110px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.back { display: inline-block; margin-bottom: 8px; color: var(--brand2); text-decoration: none; font-weight: 600; }
.banner { padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; font-size: .92rem; }
.banner.ok { background: var(--pbg); color: #135c33; } .banner.warn { background: var(--lbg); color: #6b4a00; } .banner.off { background: #eceff3; color: var(--muted); }
.tag { display: inline-block; font-size: .75rem; padding: 1px 7px; border-radius: 20px; background: #eceff3; color: var(--muted); font-weight: 600; }
.tag.warn { background: var(--lbg); color: var(--l); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.chip { padding: 6px 12px; border-radius: 20px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 600; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 2px 10px; }
.sec-h { margin: 18px 2px 8px; display: flex; gap: 8px; align-items: baseline; }
.sec-h h3 { margin: 0; }
.toolbar { margin-bottom: 10px; }
.toolbar input[type=search] { flex: 1; min-width: 180px; }

/* take attendance */
.take-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.counts { display: flex; flex-direction: column; text-align: right; font-size: .9rem; }
.counts b { font-size: 1.25rem; }
.c-p { color: var(--p); } .c-a { color: var(--a); }
.roster { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.st { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; min-height: 56px; }
.st:last-child { border-bottom: 0; }
.st .nm { flex: 1; font-weight: 600; }
.st.wop { background: var(--abg); } .st.wp { background: var(--lbg); }
.roll { min-width: 32px; height: 32px; border-radius: 50%; background: #eef1f5; display: inline-grid; place-items: center; font-size: .85rem; font-weight: 700; color: var(--muted); padding: 0 4px; }
.st.wop .roll { background: var(--a); color: #fff; } .st.wp .roll { background: var(--l); color: #fff; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.pill.p { background: var(--pbg); color: var(--p); } .pill.wop { background: var(--a); color: #fff; } .pill.wp { background: var(--l); color: #fff; }
.reason { flex-basis: 100%; margin-left: 42px; min-height: 36px; padding: 6px 10px; font-size: .9rem; }
.submitbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); z-index: 6; }
.submitbar .btn { max-width: 936px; margin: 0 auto; }

/* dashboard */
.datebox { display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.datebox input { border: 0; min-height: 40px; }
.live { color: var(--p); font-weight: 700; font-size: .9rem; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; text-align: center; }
.stats b { display: block; font-size: 1.5rem; } .stats span { font-size: .8rem; color: var(--muted); }
.stats .bar { grid-column: 1 / -1; height: 8px; background: #eceff3; border-radius: 8px; overflow: hidden; }
.stats .bar i { display: block; height: 100%; background: var(--p); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.tile { display: block; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: #fff; }
.tile b { display: block; } .tile span { display: block; font-size: .85rem; } .tile small { display: block; color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.done { background: var(--pbg); border-color: #bfe5cd; } .tile.done span { color: var(--p); font-weight: 600; }
.tile.pend { border-style: dashed; } .tile.pend span { color: var(--l); font-weight: 600; }
.group h4 { margin-bottom: 4px; }
.abs { list-style: none; margin: 0; padding: 0; }
.abs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.abs li:first-child { border-top: 0; }
.who { display: flex; gap: 10px; align-items: flex-start; flex: 1; min-width: 200px; }
.send { display: flex; gap: 6px; }

/* tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.card .tablewrap { border: 0; }
.tbl { border-collapse: collapse; width: 100%; font-size: .92rem; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { background: #f7f9fb; font-size: .8rem; color: var(--muted); position: sticky; top: 0; }
.tbl td.r { text-align: right; }
.tbl tr.removed { opacity: .55; }
.tbl th.ck, .tbl td.ck { width: 34px; padding-right: 0; text-align: center; }
.tbl tr.sel td { background: #eef4fb; }
.selbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); z-index: 6; box-shadow: 0 -4px 14px rgba(15,23,34,.06); }
.selin { max-width: 936px; margin: 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.warnc { color: var(--l); }
.tbl td.nw { white-space: nowrap; }
@media (max-width: 520px) { .selin > b, .selin > #gstat { flex-basis: 100%; } .selin .grow { display: none; } .selin { justify-content: flex-end; } .tbl.edit .w-name { min-width: 150px; } }
.tbl.edit td { padding: 4px; } .tbl.edit th { padding: 8px 4px; }
.tbl.edit input:not([type=checkbox]) { width: 100%; min-height: 36px; padding: 6px 8px; border-radius: 7px; }
.tbl.edit .w-roll { min-width: 58px; } .tbl.edit .w-name { min-width: 190px; } .tbl.edit .w-cls { min-width: 84px; } .tbl.edit .w-sec { min-width: 52px; text-transform: uppercase; } .tbl.edit .w-ph { min-width: 128px; }
.tbl.edit td.chg input { background: #fff8d6; border-color: #e6c84f; }
.tbl.edit td.dup input { border-color: var(--l); box-shadow: 0 0 0 1px var(--l) inset; }
.tbl.edit td.bad input { background: var(--abg); border-color: var(--a); }
.tbl.edit tr.rm td input:not([type=checkbox]) { text-decoration: line-through; color: var(--muted); background: #f4f5f7; }
.tbl.reg { font-size: .78rem; }
.tbl.reg th, .tbl.reg td { padding: 4px 4px; text-align: center; }
.tbl.reg .nmcol { text-align: left; white-space: nowrap; position: sticky; left: 0; background: #fff; }
.tbl.reg th.hol { color: #c3c9d0; }
.mk.A { color: var(--a); font-weight: 700; background: var(--abg); } .mk.L { color: var(--l); font-weight: 700; background: var(--lbg); } .mk.P { color: var(--p); }
.rep h3 { margin-bottom: 2px; }
.rep .row { margin-top: 8px; }
.preview { background: #f2f7f3; border-radius: 10px; padding: 10px; font-size: .9rem; margin: 8px 0 12px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 2px 8px; }
ul.plain { padding-left: 18px; margin: 6px 0; }
.copybox { width: 100%; height: 50vh; font-family: ui-monospace, monospace; font-size: .85rem; }

/* modal & toast */
.modal-wrap { position: fixed; inset: 0; background: rgba(15, 23, 34, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal { background: #fff; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
.modal.wide { max-width: 720px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.modal .row label { flex: 1; }
@media (min-width: 640px) { .modal-wrap { align-items: center; } .modal { border-radius: 16px; } }
#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: #1b2430; color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: 92vw; font-size: .92rem; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.ok { background: #145c34; } #toast.err { background: #a11d1d; } #toast.warn { background: #7a5200; }
@media print { .top, .tabs, .submitbar, .demobar { display: none; } }

/* ---- Notes ---- */
.nlist { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.nrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.nrow:last-child { border-bottom: 0; } .nrow:hover { background: #f7f9fc; }
.nrow small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.tag.light { background: transparent; color: #9aa4af; font-weight: 500; }
.ncard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; }
.ncard.over { border-left: 4px solid var(--a); } .ncard.due { border-left: 4px solid var(--l); } .ncard.soon { border-left: 4px solid #e6c84f; }
.nname { text-decoration: none; color: var(--ink); }
.ntext { margin: 6px 0; line-height: 1.45; } .ntext.full { white-space: pre-wrap; overflow-wrap: anywhere; }
.due { font-size: .8rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; background: #eceff3; color: var(--muted); white-space: nowrap; }
.due.over { background: var(--abg); color: var(--a); } .due.due { background: var(--lbg); color: var(--l); } .due.soon { background: #fff8d6; color: #8a6d00; }
.lock { font-size: .8rem; color: var(--muted); font-weight: 600; }
.nfoot { margin-top: 6px; } .link.danger { color: var(--a); }
.shead h2 { margin: 0 0 2px; font-size: 1.2rem; }
.nform h3 { margin: 0 0 4px; } .nform .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.nform textarea { min-height: 96px; resize: vertical; }
.flabel { font-size: .9rem; font-weight: 600; margin: 10px 0 0; }
.chip.pick { position: relative; margin: 0; cursor: pointer; display: inline-flex; font-weight: 600; }
.chip.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip.pick:has(input:checked) { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.pick:has(input:focus-visible) { outline: 2px solid var(--brand2); outline-offset: 2px; }
button.chip { cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600; }
.privl { margin-top: 12px; }
@media (max-width: 440px) { .tabs { gap: 0; padding: 0 4px; } .tabs a { padding: 12px 6px; font-size: .86rem; } }

/* ---- Message parents one by one ---- */
.modal.sendall { max-width: 520px; }
.sa-bar { height: 5px; background: #e8ecf1; border-radius: 4px; overflow: hidden; margin: 2px 0 12px; } .sa-bar i { display: block; height: 100%; background: var(--wa, #1f9d55); }
.sa-card { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 10px 0; background: #fbfcfd; }
.sa-msg { margin-top: 10px; padding: 10px 12px; background: #e9f8ee; border-radius: 10px; white-space: pre-wrap; line-height: 1.45; font-size: .95rem; }
.sa-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.sa-actions .big { min-width: 170px; } .sa-actions .btn[disabled] { opacity: .55; }
.sa-note { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 520px) { .sa-actions { justify-content: stretch; } .sa-actions .big { flex-basis: 100%; order: -1; } .sa-actions > * { flex: 1; text-align: center; } }

/* ---- Student page, search, holidays, settings ---- */
.logoimg { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.modal.gsearch { max-width: 560px; align-self: flex-start; margin-top: 8vh; }
.modal.gsearch #gq { flex: 1; font-size: 1.05rem; }
.gres { margin-top: 10px; max-height: 60vh; overflow: auto; }
.gres .nrow { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.gres .nrow.first { border-color: var(--brand2, #2f5b8f); }
a.slink { color: inherit; text-decoration: none; } a.slink:hover { text-decoration: underline; }
.pcontacts { margin-top: 10px; display: grid; gap: 6px; }
.prow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: #f7f9fc; border-radius: 10px; }
.pstats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.pstat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.pstat b { font-size: 1.7rem; color: var(--brand); } .pstat.low b { color: var(--a); }
.plist { list-style: none; padding: 0; margin: 6px 0 0; } .plist li { padding: 7px 0; border-bottom: 1px solid var(--line); } .plist li:last-child { border: 0; }
.pnote { padding: 8px 0; border-top: 1px solid var(--line); }
.banner.hol { background: #eef6ff; color: #1f3a5f; border: 1px solid #cfe0f5; }
.tag.hol { background: #eef6ff; color: #1f3a5f; }
.tile.holt { background: #f4f7fb; border-style: dashed; opacity: .8; } .tile.holt span { color: var(--muted); }
.msg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .msg-grid h4 { margin: 8px 0 0; }
@media (max-width: 640px) { .msg-grid { grid-template-columns: 1fr; } }
.logo-prev { width: 72px; height: 72px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.logo-prev img { max-width: 100%; max-height: 100%; }
.hol-add { align-items: flex-end; margin-top: 12px; } .hol-add label { margin: 0; } .hol-add .grow { flex: 1; min-width: 180px; }
.hlist { list-style: none; padding: 0; margin: 10px 0; } .hlist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
#holsec details { margin-top: 6px; }
section.card + section.card { margin-top: 14px; }
input[type=file][hidden] { display: none !important; }

/* ---- Homework ---- */
.hw-title { margin: 6px 0 4px; } .hw-step { font-weight: 700; margin: 14px 0 6px; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.hw-chips { gap: 8px; } .chip.big { font-size: 1.02rem; padding: 10px 16px; font-weight: 600; cursor: pointer; font-family: inherit; }
.chip.big small { background: var(--pbg); color: #135c33; border-radius: 10px; padding: 0 6px; margin-left: 4px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); } .chip.on small { background: rgba(255,255,255,.2); color: #fff; }
.chip.done:not(.on) { border-color: #9fd3b2; background: #f0faf3; color: #135c33; }
.hw-edit textarea { width: 100%; font-size: 1.25rem; line-height: 1.45; min-height: 150px; margin: 8px 0; }
.hw-edit .big { min-height: 52px; padding: 0 26px; font-size: 1.05rem; }
.hw-ro { font-size: 1.15rem; white-space: pre-wrap; padding: 12px; background: #f7f9fc; border-radius: 10px; margin: 8px 0; }
.hw-done { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-color: #9fd3b2; background: #f0faf3; }
@media (min-width: 1200px) { .hw { font-size: 1.1rem; } .hw .chip.big { font-size: 1.15rem; padding: 12px 20px; } }
pre.hwtext { white-space: pre-wrap; font-family: inherit; background: #f7f9fc; border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: .95rem; line-height: 1.45; }
.hwc.sent { border-color: #9fd3b2; } .tag.warn { background: var(--lbg); color: #6b4a00; }

@media (min-width: 1200px) { #app.wide { max-width: 1500px; } }

/* ---- Behaviour + shared class login ---- */
.who-pick { margin: 0; min-width: 240px; } .who-pick select, .who-pick input { font-size: 1.05rem; min-height: 48px; }
.bfoot { align-items: flex-end; margin-top: 10px; }
.bh #bq { width: 100%; max-width: 420px; margin-bottom: 8px; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; max-height: 46vh; overflow: auto; padding: 2px; }
.bstu { display: flex; align-items: center; gap: 8px; text-align: left; padding: 10px 12px; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.bstu .roll { min-width: 26px; height: 26px; border-radius: 50%; background: #eef1f5; display: grid; place-items: center; font-size: .8rem; color: var(--muted); flex: none; }
.bstu.on { background: var(--abg); border-color: var(--a); } .bstu.on .roll { background: var(--a); color: #fff; }
.bh textarea#bt { width: 100%; font-size: 1.15rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; background: #fff; }
.seg a { padding: 8px 16px; text-decoration: none; color: var(--muted); font-weight: 600; } .seg a.on { background: var(--pink2); color: #fff; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--a); color: #fff; font-size: .75rem; text-align: center; }
.seg a.on .badge { background: #fff; color: var(--a); }
.pill.pr { background: #fff3c4; color: #7a5a00; }
.bcard.concern.open { border-left: 4px solid var(--a); } .bcard.praise { border-left: 4px solid #e6c84f; }
.bstudents { margin: 6px 0; font-weight: 600; } .bstudents a { color: var(--ink); }
.baction textarea { width: 100%; } .baction { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
[hidden] { display: none !important; }

/* ===== Vrindhavan HOME: Montessori screens ===== */
.tagline { color: var(--pink2); font-weight: 600; margin: -2px 0 8px; }
.authlogo { display: block; width: min(280px, 80%); height: auto; margin: 0 auto 6px; }
.logo { letter-spacing: -.02em; font-size: 22px; }
.logo.sm { font-size: 14px; }
/* stage pills */
.stg { display: inline-block; font-size: .74rem; padding: 1px 8px; border-radius: 20px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.stP { background: #eef3fb; color: #2f5f9e; } .stW { background: #fff4df; color: #8a5a00; } .stM { background: #e5f4ea; color: #1d6b3d; }
/* record screen */
.rec { padding-bottom: 20px; }
.kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 42vh; overflow: auto; padding: 2px; }
.kid { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; text-align: left; padding: 10px 12px; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.kid.on { background: var(--greenbg); border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.kid .kn { overflow: hidden; text-overflow: ellipsis; }
.kid .kb { display: inline-flex; gap: 3px; flex: none; }
.kid .kb i { font-style: normal; font-size: .72rem; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.kid .cnt { background: var(--pink); color: #fff; } .kid .stale { background: var(--lbg); color: var(--l); }
#mq { width: 100%; margin-bottom: 8px; }
.recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.chip.sm { padding: 4px 10px; font-size: .82rem; cursor: pointer; font-family: inherit; }
.chips.areas { gap: 6px; margin-bottom: 8px; }
.chip.area { border-left: 4px solid var(--ac, #999); cursor: pointer; font-family: inherit; }
.chip.area.on { background: var(--ac, var(--brand)); border-color: var(--ac, var(--brand)); }
.mgroup { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 8px; }
.mgroup > summary { padding: 10px 12px; font-weight: 700; cursor: pointer; }
.mats { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 8px; }
#matbox > .mats { padding: 0; }
.mat { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; text-align: left; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; cursor: pointer; color: var(--ink); }
.mat .mn { flex: 1; font-weight: 600; } .mat small { width: 100%; }
.mat.on { background: var(--greenbg); border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.chosen { border-left: 5px solid var(--ac); margin-top: 8px; }
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stbtn { display: flex; flex-direction: column; gap: 2px; padding: 12px 8px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font: inherit; cursor: pointer; color: var(--ink); text-align: center; }
.stbtn small { color: var(--muted); font-size: .76rem; }
.stbtn.stP.on { border-color: #2f5f9e; background: #eef3fb; } .stbtn.stW.on { border-color: #b77900; background: #fff4df; } .stbtn.stM.on { border-color: #1d6b3d; background: #e5f4ea; }
#note { width: 100%; }
.media-row { margin: 8px 0; }
.upl { display: flex; flex-wrap: wrap; gap: 8px; }
.up { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: #eceae2; display: grid; place-items: center; font-size: 1.6rem; }
.up img { width: 100%; height: 100%; object-fit: cover; }
.up small { position: absolute; left: 0; right: 0; bottom: 0; font-size: .7rem; background: rgba(0,0,0,.55); color: #fff; text-align: center; padding: 2px; }
.up.err small { background: var(--a); } .up.up img { opacity: .6; }
.up .x { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; cursor: pointer; }
/* journal */
.journal { margin-top: 8px; }
.jdate { margin: 16px 2px 6px; color: var(--muted); font-size: .9rem; }
.entry { border-left: 5px solid var(--ac); margin-bottom: 8px; }
.entry .ename { margin-right: 4px; } .entry .emat { font-weight: 700; }
.entry .about { color: #45524c; margin-top: 4px; } .enote { margin: 6px 0; white-space: pre-wrap; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.thumb { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; border: 0; padding: 0; background: #eceae2; cursor: pointer; display: grid; place-items: center; font-size: 1.6rem; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.vid::after { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.8rem; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.pbox img { width: 100%; max-height: 75vh; object-fit: contain; border-radius: 8px; background: #111; }
.vbox { position: relative; padding-top: 56.25%; } .vbox iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; background: #111; }
/* progress */
.langsw { display: inline-flex; gap: 4px; margin-bottom: 6px; }
.legend { line-height: 1.9; }
.parea { border-left: 5px solid var(--ac); padding: 0; }
.parea > summary { padding: 12px 14px; cursor: pointer; list-style: none; }
.parea > summary::-webkit-details-marker { display: none; }
.parea > :not(summary) { margin-left: 14px; margin-right: 14px; }
.pbar { display: flex; height: 8px; border-radius: 4px; background: #eceae2; overflow: hidden; margin: 6px 0 4px; }
.pbar .bM { background: #2e8b57; } .pbar .bW { background: #e0a020; } .pbar .bP { background: #6f9bd6; }
.pgroup h5 { margin: 12px 0 4px; font-size: .9rem; }
.plist2 { list-style: none; padding: 0; margin: 0 0 10px; }
.plist2 li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.plist2 li .grow { display: flex; flex-direction: column; }
.plist2 li .d { font-size: .78rem; } .plist2 li .dt { min-width: 74px; text-align: right; }
.plist2 li.notyet { color: #98a19c; }
.about-intro p { line-height: 1.55; }
.aarea { border-left: 5px solid var(--ac); }
.aarea h5 { margin: 10px 0 2px; }
/* office */
.tbl.prog td, .tbl.prog th { text-align: center; } .tbl.prog td:first-child, .tbl.prog th:first-child { text-align: left; }
.adot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ac); margin-right: 3px; }
.envrow { padding: 6px 0; border-bottom: 1px solid var(--line); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.banner { padding: 10px 12px; border-radius: 10px; margin: 8px 0; background: #eef4f1; }
@media (min-width: 900px) { .kids { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }

.allmats { margin: 4px 0 12px; } .allmats h5 { margin: 8px 0 2px; }

/* Vrindhavan pink & green */
.auth .card { border-top: 5px solid var(--pink); }
header.top, .topbar { border-bottom: 3px solid var(--pink); }
.hw-step { color: var(--pink2); }
.banner { background: var(--greenbg); }
.btn.primary:hover { background: var(--brand2); border-color: var(--brand2); }
.chosen { background: #fffafc; }

.hdrlogo { height: 44px; width: auto; max-width: 110px; object-fit: contain; flex: none; }
.hdrtext b { display: block; color: var(--brand); font-size: .92rem; line-height: 1.2; }
.hdrtext small { color: var(--pink2) !important; }
.auth .card { text-align: center; } .auth .card form, .auth .card details { text-align: left; }
.auth .tagline { color: var(--pink2); letter-spacing: .02em; }
.h-small { font-size: 1.1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pbar .bM { background: var(--leaf); } .pbar .bP { background: #f28cbc; }
.stM { background: var(--greenbg); color: #3d6e1f; } .stP { background: var(--pinkbg); color: var(--pink2); }
.stbtn.stP.on { border-color: var(--pink); background: var(--pinkbg); } .stbtn.stM.on { border-color: var(--leaf); background: var(--greenbg); }

/* four IMTC stages */
.stA { background: #fff4df; color: #8a5a00; } .stI { background: #e8f0fb; color: #2f5f9e; }
.stages { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 420px) { .stages { grid-template-columns: repeat(2, 1fr); } }
.stbtn.stA.on { border-color: #b77900; background: #fff4df; } .stbtn.stI.on { border-color: #2f5f9e; background: #e8f0fb; }
.pbar .bA { background: #e0a020; } .pbar .bI { background: #6f9bd6; }

.srvprob { text-align: left; font-size: .9rem; } .srvprob code { word-break: break-all; }

/* Progress: environment buttons and the class table */
.envtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.envtile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--lc, var(--brand)); text-decoration: none; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.05); min-height: 150px; }
.envtile:hover, .envtile:focus { box-shadow: 0 4px 14px rgba(0,0,0,.10); }
.envtile b { font-size: 1.35rem; color: var(--brand); } .envtile > small { color: var(--muted); }
.envtile.lv-primary { --lc: var(--pink); } .envtile.lv-elementary { --lc: var(--leaf); } .envtile.lv-upper { --lc: var(--brand); }
.tstats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .88rem; color: var(--muted); } .tstats i { font-style: normal; font-weight: 700; color: var(--ink); }
.tagwarn { align-self: flex-start; font-size: .8rem; background: var(--lbg); color: var(--l); padding: 2px 8px; border-radius: 10px; }
.tagok { align-self: flex-start; font-size: .8rem; background: var(--greenbg); color: #3d6e1f; padding: 2px 8px; border-radius: 10px; }
.ptable td { vertical-align: top; } .ptable td small { display: block; }
.ptable th:nth-child(3), .ptable td:nth-child(3) { width: 130px; }
.nowm { font-weight: 600; border-left: 4px solid var(--ac); padding-left: 6px; display: inline-block; }
.pcount { background: none; border: 1px solid var(--line); border-radius: 18px; padding: 6px 12px; font: inherit; cursor: pointer; color: var(--ink); white-space: nowrap; }
.pcount:hover { border-color: var(--leaf); } .pkrow.open { background: #fbfdf9; }
.pdetail td { background: #fbfdf9; border-top: 0; }
.pdgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pdgrid h4 { margin: 4px 0 8px; } .pa h5 { margin: 10px 0 4px; border-left: 4px solid var(--ac); padding-left: 6px; }
@media (max-width: 760px) {
  .pdgrid { grid-template-columns: 1fr; }
  .ptable thead { display: none; } .ptable tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; } .ptable td { display: block; border: 0; padding: 3px 8px; width: auto !important; }
  .ptable td[data-h="Level"]:empty { display: none; }
}
.ptable td .pa h5 small, .ptable td h4 small { display: inline; margin-left: 4px; }
