/* Edenburgh Cambridge School Portals — professional design system
   Restrained institutional theme: one brand colour (emerald) used
   sparingly, gold reserved for the brand mark and a single active
   indicator, hairline borders, flat surfaces, consistent 8px radius,
   tabular numbers, and quiet 160–200ms motion. */
:root {
  --emerald: #0F766E;
  --emerald-dark: #115E59;
  --emerald-deep: #07403B;
  --emerald-light: #E7F4F1;
  --gold: #C9A227;
  --bronze: #96771A;
  --ink: #182230;
  --ink2: #2B3947;
  --muted: #5C6B7A;
  --faint: #8494A5;
  --line: #DFE5EB;
  --line-strong: #CBD5DE;
  --bg: #F7F9FA;
  --surface: #FFFFFF;
  --input-bg: #FFFFFF;
  --th-bg: #F8FAF9;
  --hover-bg: #F0F5F2;
  --danger: #B3261E;
  --ok: #177245;
  --radius: 16px;
  --shadow-panel: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-pop: 0 16px 40px rgba(7, 30, 22, .22);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(15, 118, 110, .18); }
.hidden { display: none !important; }
h1, h2, h3, h4 { margin: 0 0 .5rem; letter-spacing: -.01em; }
h2.page-title { font-size: 1.3rem; font-weight: 700; color: var(--ink); }
h3 { font-size: 1rem; font-weight: 700; }
button { font: inherit; cursor: pointer; }
input, select, textarea {
  font: inherit; padding: .52rem .7rem; border: 1px solid var(--line-strong);
  border-radius: 12px; background: var(--input-bg); width: 100%; color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(15, 118, 110, .14); }
input::placeholder, textarea::placeholder { color: var(--faint); }
label { display: block; font-weight: 600; margin: .65rem 0 .3rem; font-size: .86rem; color: var(--ink2); }

/* ---------- buttons, chips, misc ---------- */
.btn {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: .52rem .95rem; font-weight: 600; font-size: .92rem; color: var(--ink);
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btn:hover { border-color: var(--emerald); background: var(--hover-bg); }
.btn-primary { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.btn-primary:hover { background: var(--emerald-dark); border-color: var(--emerald-dark); }
.btn-gold { background: var(--bronze); color: #fff; border-color: var(--bronze); }
.btn-gold:hover { background: #7D6314; border-color: #7D6314; }
.btn-danger { background: #fff; color: var(--danger); border-color: #E4C4C1; }
.btn-danger:hover { background: #FDF3F2; border-color: var(--danger); }
.btn-small { padding: .32rem .65rem; font-size: .84rem; }
.btn-block { width: 100%; margin-top: .8rem; }
.btn-link { border: none; background: none; color: var(--emerald); padding-left: 0; padding-right: 0; }
.btn-link:hover { background: none; border: none; text-decoration: underline; }
.btn:disabled { opacity: .55; cursor: wait; }
.chip {
  background: var(--emerald-light); color: var(--emerald-dark); border-radius: 6px;
  padding: .22rem .6rem; font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.chip.gold { background: #F5EEDC; color: #6E5710; }
.badge { border-radius: 999px; padding: .08rem .5rem; font-size: .74rem; font-weight: 600; }
.badge.ok { background: #E3F2E8; color: var(--ok); }
.badge.warn { background: #FaF0D7; color: #7D5F08; }
.badge.bad { background: #F9E7E5; color: var(--danger); }
.badge.grey { background: #EDF1F5; color: var(--muted); }
.error { color: var(--danger); background: #F9E7E5; border-radius: var(--radius); padding: .6rem .8rem; margin-top: 1rem; font-size: .9rem; }
.info { color: var(--emerald-dark); background: var(--emerald-light); border-radius: var(--radius); padding: .6rem .8rem; margin-top: 1rem; font-size: .9rem; }
.hint { color: var(--muted); font-size: .85rem; margin: .4rem 0 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.icon-btn { background: none; border: none; font-size: 1.1rem; padding: .3rem .5rem; color: var(--muted); border-radius: 10px; }
.icon-btn:hover { background: var(--hover-bg); color: var(--ink); }

/* ---------- login (reference-inspired shell design, 28-Oct-2026) ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(1000px 560px at 50% -10%, rgba(15, 118, 110, .12), rgba(15, 118, 110, 0) 60%);
  padding: 1.2rem;
}
.login-shell {
  display: grid; grid-template-columns: 44% 56%;
  width: min(1060px, 100%); min-height: 630px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .13); overflow: hidden;
}
.login-art { position: relative; background: #FBF6EA; overflow: hidden; }
.login-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.art-brand {
  position: absolute; top: 0; left: 0; z-index: 1;
  display: flex; align-items: center; gap: .75rem; padding: .9rem 1.15rem .9rem 1.25rem;
  background: rgba(251, 246, 234, .95); border-radius: 0 0 18px 0;
}
.art-mark {
  width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--emerald); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: .03em;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, .5);
}
.art-name { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; color: var(--emerald-deep); line-height: 1.15; }
.art-tag { color: #7A6C48; font-size: .8rem; margin: .12rem 0 0; font-weight: 500; }
.login-main { display: flex; flex-direction: column; justify-content: center; padding: 1.3rem 2.3rem 1.6rem; }
.login-main .lang-row { justify-content: flex-end; margin: 0 0 1rem; }
.login-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .08); overflow: hidden; width: 100%;
}
.login-band {
  background: var(--emerald); color: #fff; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; letter-spacing: .22em;
  padding: .95rem 1rem;
}
.login-formbody { padding: 1.35rem 1.6rem 1.5rem; }
.login-formbody label { color: var(--emerald-dark); }
.login-formbody input, .login-formbody select, .login-formbody textarea { border-radius: 12px; }
.login-formbody #passLoginBtn { padding-top: .8rem; padding-bottom: .8rem; font-size: 1rem; border-radius: 14px; }
.login-formbody #forgotBtn { text-align: right; }
.login-under { color: var(--faint); font-size: .8rem; text-align: center; margin-top: 1rem; }
.pass-wrap { position: relative; margin: .3rem 0 .8rem; }
.pass-wrap input { margin: 0; padding-right: 2.7rem; }
.pass-eye {
  position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 10px; color: var(--faint); cursor: pointer;
}
.pass-eye:hover { color: var(--emerald); background: var(--hover-bg); }
.pass-eye svg { width: 19px; height: 19px; }
@media (max-width: 899px) {
  .login-wrap { padding: .7rem; }
  .login-shell { grid-template-columns: 1fr; min-height: 0; }
  .login-art { height: 168px; }
  .login-art img { object-position: center 78%; }
  .art-brand { padding: .8rem 1rem 1.6rem; }
  .art-mark { width: 38px; height: 38px; font-size: .9rem; }
  .art-name { font-size: 1rem; }
  .art-tag { display: none; }
  .login-main { padding: 1rem 1rem 1.3rem; justify-content: flex-start; }
  .login-formbody { padding: 1.1rem 1.1rem 1.25rem; }
}
.brand { text-align: center; margin-bottom: 1.3rem; }
.brand-mark {
  width: 54px; height: 54px; margin: 0 auto .65rem; border-radius: 16px;
  background: var(--emerald); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.15rem; letter-spacing: .4px;
}
.brand-mark.sm { width: 32px; height: 32px; font-size: .78rem; margin: 0; border-radius: 10px; }
.brand h1 { font-size: 1.32rem; font-weight: 750; color: var(--ink); }
.tagline { color: var(--muted); font-weight: 500; margin: 0; font-size: .83rem; letter-spacing: .02em; }
.login-foot { color: var(--muted); margin-top: 1.1rem; font-size: .83rem; text-align: center; }
#recaptcha-container { margin-top: .8rem; display: flex; justify-content: center; }

/* ---------- language chooser ---------- */
.lang-row { display: flex; align-items: center; gap: .4rem; justify-content: center; margin: .1rem 0 1rem; }
.lang-label { font-size: .84rem; color: var(--muted); font-weight: 500; }
.lang-btn {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink2);
  border-radius: 999px; padding: .26rem .8rem; font-weight: 600; font-size: .84rem;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.lang-btn:hover { border-color: var(--emerald); }
.lang-btn.active { background: var(--emerald); border-color: var(--emerald); color: #fff; }

/* ---------- app layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .65rem;
  background: var(--surface); border-bottom: 1px solid var(--line); padding: .5rem 1rem;
}
.topbar-brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--ink); font-size: .96rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.layout { display: flex; min-height: calc(100vh - 53px); }
.sidebar {
  width: 224px; flex: 0 0 224px; background: var(--surface); color: #3D4F61;
  border-right: 1px solid var(--line);
  padding: .9rem .55rem 1.4rem; position: sticky; top: 53px; height: calc(100vh - 53px); overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(15, 118, 110, .25) transparent;
}
.sidebar .who { padding: .35rem .65rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: .65rem; }
.sidebar .who .nm { font-weight: 700; color: var(--ink); font-size: .95rem; }
.sidebar .who .rl { color: var(--emerald); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; margin-top: .1rem; }
.nav-btn {
  display: flex; align-items: center; gap: .62rem; width: 100%; text-align: left;
  background: none; border: none; color: #41566A; padding: .52rem .65rem; border-radius: 12px;
  font-weight: 500; font-size: .9rem; margin-bottom: 1px;
  transition: background .16s ease, color .16s ease;
}
.nav-btn svg { width: 18px; height: 18px; flex: none; opacity: .75; }
.nav-btn:hover { background: var(--hover-bg); color: var(--ink); }
.nav-btn.active { background: var(--emerald-light); color: var(--emerald-dark); box-shadow: inset 3px 0 0 var(--emerald); font-weight: 600; }
.nav-btn.active svg { opacity: 1; }
.content { flex: 1; padding: 1.4rem 1.5rem 2rem; min-width: 0; }
.loading { padding: 3rem; text-align: center; color: var(--muted); }
.loading::before {
  content: ''; display: block; width: 30px; height: 30px; margin: 0 auto .8rem;
  border: 3px solid rgba(15, 118, 110, .18); border-top-color: var(--emerald);
  border-radius: 50%; animation: shsSpin .8s linear infinite;
}

/* ---------- cards & tables ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .85rem; margin-bottom: 1.15rem; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .95rem 1rem; box-shadow: var(--shadow-panel); }
.stat-card .k { color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.stat-card .v { font-size: 1.4rem; font-weight: 750; color: var(--ink); margin-top: .3rem; font-variant-numeric: tabular-nums; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.05rem 1.15rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-panel); }
.panel h3 { color: var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: .91rem; font-variant-numeric: tabular-nums; }
th, td { padding: .55rem .65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--th-bg); color: #51626F; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line-strong); }
tbody tr { transition: background .14s ease; }
tbody tr:hover td { background: var(--th-bg); }
.table-wrap { overflow-x: auto; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: 1rem; }
.toolbar .fld { min-width: 160px; }
.toolbar label { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem 1rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.tab-btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius); padding: .42rem .85rem; font-weight: 600; font-size: .88rem; color: var(--ink2); transition: background .16s ease, color .16s ease, border-color .16s ease; }
.tab-btn:hover { border-color: var(--emerald); }
.tab-btn.active { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.pill-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg button { border: none; background: var(--surface); padding: .32rem .8rem; font-weight: 600; font-size: .85rem; color: var(--muted); }
.seg button.on-p { background: var(--ok); color: #fff; }
.seg button.on-a { background: var(--danger); color: #fff; }
.seg button.on-l { background: var(--bronze); color: #fff; }

/* ---------- modal & toast ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(6, 20, 15, .52); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 1rem; overflow-y: auto;
  backdrop-filter: blur(2px);
}
.modal { background: var(--surface); border-radius: 20px; width: min(680px, 100%); padding: 1.15rem 1.3rem 1.3rem; margin-top: 2vh; box-shadow: var(--shadow-pop); }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; }
.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: #14231D; color: #fff; padding: .65rem 1.1rem; border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(7, 30, 22, .3); font-weight: 500; font-size: .9rem;
}
.check-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .7rem; }
.check-list label { display: flex; gap: .5rem; align-items: center; font-weight: 500; margin: .3rem 0; }
.check-list input { width: auto; }

/* ---------- motion — quiet and functional only ---------- */
@keyframes shsFadeUp { from { opacity: 0; transform: perspective(900px) rotateX(6deg) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes shsFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shsPop { from { opacity: 0; transform: perspective(900px) rotateX(-7deg) translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes shsToastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes shsSpin { to { transform: rotate(360deg); } }
.login-card { animation: shsFadeUp .35s ease both; }
.content { transform-origin: 50% 0; }
.content.view-enter { animation: viewIn3d .45s cubic-bezier(.2,.7,.25,1) backwards; }
@keyframes viewIn3d { from { opacity: 0; transform: perspective(1300px) rotateX(4.5deg) translateY(22px); } to { opacity: 1; transform: none; } }
.modal-backdrop { animation: shsFade .16s ease both; }
.modal { animation: shsPop .18s ease both; }
.toast { animation: shsToastIn .2s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- responsive ---------- */
#menuBtn { display: none; }
@media (max-width: 820px) {
  #menuBtn { display: block; }
  .layout { flex-direction: column; }
  .sidebar { display: none; width: 100%; flex: none; position: static; height: auto; }
  .sidebar.open { display: block; }
  .content { padding: .95rem; }
  .grid2 { grid-template-columns: 1fr; }
  .topbar-title { font-size: .92rem; }
  .chip { display: none; }
  .chip.gold { display: inline-block; }
}

/* ---------- login tabs (legacy) ---------- */
.login-tabs { display: flex; gap: .4rem; margin-bottom: 1.1rem; }
.login-tab {
  flex: 1; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius);
  padding: .55rem .4rem; font-weight: 600; color: var(--muted);
}
.login-tab.active { border-color: var(--emerald); background: var(--emerald-light); color: var(--emerald-dark); }

/* ---------- interactive layer: chart, progress, fabs, assistant ---------- */
.prog { height: 10px; background: #EDF1F0; border-radius: 999px; overflow: hidden; }
.prog-fill { height: 100%; width: var(--w, 0%); background: var(--emerald); border-radius: 999px; animation: shsWidth .9s cubic-bezier(.2,.7,.3,1) both; }
@keyframes shsWidth { from { width: 0; } }
.chart { display: flex; align-items: flex-end; gap: .6rem; height: 150px; padding-top: .4rem; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; justify-content: flex-end; }
.chart .bars { display: flex; align-items: flex-end; gap: 4px; height: 118px; }
.chart .bar { width: 15px; border-radius: 3px 3px 0 0; height: var(--h, 0%); min-height: 2px; animation: shsGrow .8s cubic-bezier(.2,.7,.3,1) both; transition: filter .15s ease; }
.chart .bar:hover { filter: brightness(1.18); }
.chart .bar.inc { background: var(--emerald); }
.chart .bar.exp { background: #C08A2D; }
@keyframes shsGrow { from { height: 0; } }
.chart-lab { font-size: .74rem; color: var(--muted); font-weight: 600; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: -1px; }
.dot.inc { background: var(--emerald); } .dot.exp { background: #C08A2D; }

/* entrance + hover life (quiet, professional) */
.cards > * { animation: shsFadeUp .34s ease backwards; }
.cards > *:nth-child(2) { animation-delay: .04s; } .cards > *:nth-child(3) { animation-delay: .08s; }
.cards > *:nth-child(4) { animation-delay: .12s; } .cards > *:nth-child(5) { animation-delay: .16s; }
.stat-card { transition: transform .18s ease, box-shadow .18s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(7, 30, 22, .1); }
.panel { animation: shsFadeUp .28s ease backwards; }
.nav-btn svg { transition: transform .16s ease; }
.nav-btn:hover svg { transform: translateX(1.5px); }
.res-row { cursor: pointer; }
.sheet-head { text-align: center; margin-bottom: .8rem; }
.sheet-school { font-size: 1.25rem; font-weight: 800; color: var(--emerald-dark); letter-spacing: -.01em; }
.sheet-sub { color: var(--muted); font-size: .88rem; font-weight: 600; }

/* floating action buttons */
.fab-stack { position: fixed; right: 18px; bottom: 18px; z-index: 65; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.fab {
  display: inline-flex; align-items: center; gap: .5rem; border: none; cursor: pointer;
  border-radius: 999px; padding: .62rem 1rem; font-weight: 600; font-size: .9rem; color: #fff;
  box-shadow: 0 10px 24px rgba(7, 30, 22, .28); text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}
.fab svg { width: 19px; height: 19px; }
.fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(7, 30, 22, .32); }
.fab-wa { background: #1FA855; }
.fab-asst { background: var(--emerald-dark); }

/* assistant panel */
.asst-panel {
  position: fixed; right: 18px; bottom: 86px; z-index: 66; width: min(350px, calc(100vw - 24px));
  height: min(540px, calc(100dvh - 208px));
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; overflow: hidden; animation: shsPop .2s ease both;
}
.asst-head { background: var(--emerald); color: #fff; padding: .8rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.asst-title { font-weight: 700; font-size: .98rem; }
.asst-sub { font-size: .76rem; opacity: .78; }
.asst-x { color: #fff !important; }
.asst-msgs { padding: .85rem; display: flex; flex-direction: column; gap: .5rem; flex: 1 1 auto; min-height: 0; overflow-y: auto; background: #FAFBFA; scroll-behavior: smooth; }
.asst-msg { max-width: 88%; padding: .55rem .75rem; border-radius: 16px; font-size: .88rem; line-height: 1.45; animation: shsFadeUp .18s ease both; }
.asst-msg.bot { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 3px; }
.asst-msg.me { background: var(--emerald); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.asst-chips { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; padding: .6rem .85rem .25rem; flex: none; }
.asst-chip { text-align: center; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: .28rem .65rem; font-size: .78rem; font-weight: 500; color: var(--ink2); transition: border-color .15s ease, background .15s ease; }
.asst-chip:hover { border-color: var(--emerald); background: var(--emerald-light); }
.asst-form { display: flex; gap: .45rem; padding: .7rem .85rem .85rem; }
.asst-form input { flex: 1; }

/* print: only the marksheet */
@media print {
  body.printing-sheet .topbar, body.printing-sheet .sidebar, body.printing-sheet .fab-stack,
  body.printing-sheet .asst-panel, body.printing-sheet .toolbar, body.printing-sheet .toast { display: none !important; }
  body.printing-sheet .content { padding: 0; }
  body.printing-sheet .panel { border: none; box-shadow: none; animation: none; }
  body.printing-sheet .content > *:not(:has(#printSheet)) { display: none !important; }
  body.printing-sheet #res_grid > *:not(#printSheet) { display: none !important; }
  body.printing-sheet .panel:has(#printSheet) { padding: 0 !important; }
  body.printing-sheet .table-wrap { overflow: visible !important; }
  body.printing-sheet #printSheet .sheet-table { font-size: .7rem; width: 100%; }
  body.printing-sheet #printSheet .sheet-table th, body.printing-sheet #printSheet .sheet-table td { padding: .18rem .3rem; }
}

/* ---------- dashboard: today strip + quick actions ---------- */
.today-panel { border-left: 3px solid var(--emerald); }
.today-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .55rem; }
.today-head h3 { margin: 0; }
.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem 1.2rem; }
.today-grid .k { color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.today-v { font-weight: 650; font-size: .98rem; margin-top: .18rem; }
.quick-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.quick-btn {
  display: inline-flex; align-items: center; gap: .5rem; background: var(--surface); cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .6rem .95rem;
  font-weight: 600; font-size: .9rem; color: var(--ink);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.quick-btn svg { width: 18px; height: 18px; color: var(--emerald); }
.quick-btn:hover { border-color: var(--emerald); background: var(--emerald-light); transform: translateY(-1px); }

/* ---------- dark theme ---------- */
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.theme-btn:hover { color: var(--ink); border-color: var(--emerald); }
.theme-btn svg { width: 17px; height: 17px; }
[data-theme="dark"] {
  color-scheme: dark;
  --emerald: #45B8A8;
  --emerald-dark: #8FD8CC;
  --emerald-light: #0E2A28;
  --gold: #C9A227;
  --bronze: #C39A2E;
  --ink: #E8EEEB;
  --ink2: #C9D6CE;
  --muted: #9DB0A6;
  --faint: #879A8F;
  --line: #26322D;
  --line-strong: #37463F;
  --bg: #0C1210;
  --surface: #151D1A;
  --input-bg: #1A2421;
  --th-bg: #18211E;
  --hover-bg: #1B2622;
  --shadow-panel: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, .55);
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .login-wrap { background: var(--bg); }
[data-theme="dark"] .brand h1 { color: var(--ink); }
[data-theme="dark"] .brand-mark { color: #fff; }
[data-theme="dark"] .chip { background: #0E2A28; color: #8FD8CC; }
[data-theme="dark"] .chip.gold { background: #38300F; color: #D9BC55; }
[data-theme="dark"] .badge.ok { background: #123527; color: #6FCF9E; }
[data-theme="dark"] .badge.warn { background: #38300F; color: #D9BC55; }
[data-theme="dark"] .badge.bad { background: #3D1B18; color: #F0938C; }
[data-theme="dark"] .badge.grey { background: #22302A; color: var(--muted); }
[data-theme="dark"] .error { background: #3D1B18; color: #F0938C; }
[data-theme="dark"] .info { background: #0E2A28; color: #8FD8CC; }
[data-theme="dark"] .prog { background: #22302A; }
[data-theme="dark"] .toast { background: #E8EEEB; color: #14231D; }
[data-theme="dark"] .asst-msgs { background: #101613; }
[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, .65); }
[data-theme="dark"] .stat-card .v, [data-theme="dark"] h2.page-title { color: var(--ink); }
[data-theme="dark"] .sheet-school { color: #8FD8CC; }
[data-theme="dark"] .btn-gold { color: #fff; }
[data-theme="dark"] .seg button.on-l { color: #fff; }
[data-theme="dark"] ::selection { background: rgba(69, 184, 168, .35); }

/* ---------- collapsible sidebar ---------- */
.sidebar { transition: width .2s ease, flex-basis .2s ease; }
.who-ava {
  display: none; width: 34px; height: 34px; border-radius: 50%; margin: 0 auto;
  background: var(--emerald-light); color: var(--emerald-dark);
  align-items: center; justify-content: center; font-weight: 700; font-size: .95rem;
}
.sb-toggle {
  display: flex; align-items: center; justify-content: center; width: 100%;
  margin-top: .8rem; padding: .45rem; border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface); color: var(--muted); cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}
.sb-toggle:hover { color: var(--emerald); border-color: var(--emerald); }
.sb-toggle svg { width: 16px; height: 16px; transition: transform .2s ease; }
.sidebar.sb-mini { width: 62px; flex: 0 0 62px; padding-inline: .42rem; }
.sidebar.sb-mini .nav-btn { justify-content: center; padding: .55rem 0; }
.sidebar.sb-mini .nav-btn .lbl { display: none; }
.sidebar.sb-mini .who { text-align: center; padding-inline: 0; }
.sidebar.sb-mini .who .nm, .sidebar.sb-mini .who .rl, .sidebar.sb-mini .who .who-sub { display: none; }
.sidebar.sb-mini .who-ava { display: flex; }
.sidebar.sb-mini .sb-toggle svg { transform: rotate(180deg); }
@media (max-width: 860px) {
  .sb-toggle { display: none; }
  .sidebar.sb-mini { width: 100%; flex: none; }
  .sidebar.sb-mini .nav-btn { justify-content: flex-start; padding: .52rem .65rem; }
  .sidebar.sb-mini .nav-btn .lbl { display: inline; }
  .sidebar.sb-mini .who .nm, .sidebar.sb-mini .who .rl, .sidebar.sb-mini .who .who-sub { display: block; }
  .sidebar.sb-mini .who-ava { display: none; }
}

.chart-col { cursor: pointer; }


/* ---------- dark mode: sidebar + table text (owner report, 28-Oct-2026) ---------- */
[data-theme="dark"] .sidebar { color: #B7C9BF; }
[data-theme="dark"] .nav-btn { color: #A9BDB2; }
[data-theme="dark"] .nav-btn:hover { color: #FFFFFF; }
[data-theme="dark"] .nav-btn.active { color: #8FD8CC; }
[data-theme="dark"] th { color: #8FA69A; }

input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }

/* ---------- dark-theme contrast pass (28-Oct-2026) ---------- */
[data-theme="dark"] .asst-panel { background: var(--surface); }
[data-theme="dark"] .btn-danger { background: transparent; border-color: #6E3A36; color: #F0938C; }
[data-theme="dark"] .btn-danger:hover { background: #3D1B18; border-color: #F0938C; }
[data-theme="dark"] .mom-pill.good { color: #6FCF9E; }
[data-theme="dark"] .mom-pill.bad { color: #F0938C; }
[data-theme="dark"] .pastel-exp .spark { color: #E08A83; }
[data-theme="dark"] .login-band { background: #0B5E57; }

/* ---------- dashboard v2 (reference-inspired, 28-Oct-2026) ---------- */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.range-pill {
  display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: .32rem .8rem;
  font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface);
}
.today-slim { padding: .8rem 1.1rem; margin-bottom: 1rem; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 302px; gap: 1rem; align-items: start; margin-bottom: 1rem; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.pastel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 640px) { .pastel-row { grid-template-columns: 1fr; } }
.pastel { border: none; border-radius: 16px; padding: 1.05rem 1.15rem; }
.pastel-inc { background: #DFF2E4; }
.pastel-exp { background: #FBE3E3; }
[data-theme="dark"] .pastel-inc { background: #12332A; }
[data-theme="dark"] .pastel-exp { background: #382322; }
.pastel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.pastel .k { color: var(--muted); font-weight: 600; font-size: .85rem; }
.pastel .v { font-size: 1.65rem; margin: .35rem 0 .5rem; }
.spark { width: 92px; height: 30px; flex: none; }
.spark polyline { stroke: currentColor; }
.pastel-inc .spark { color: var(--emerald); }
.pastel-exp .spark { color: #C4554D; }
.pastel-bot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.mom-pill {
  display: inline-flex; align-items: center; gap: .3rem; background: #fff; border-radius: 999px;
  padding: .22rem .65rem; font-size: .78rem; font-weight: 700;
}
.mom-pill.good { color: #177245; }
.mom-pill.bad { color: #B03A32; }
.mom-pill.flat { color: var(--muted); font-weight: 600; }
.mom-pill .mom-vs { font-weight: 500; color: var(--muted); font-size: .72rem; }
[data-theme="dark"] .mom-pill { background: rgba(255, 255, 255, .09); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.lchart { width: 100%; height: auto; display: block; }
.lc-grid { stroke: var(--line); stroke-width: 1; }
.lc-ylab, .lc-xlab { fill: var(--faint); font-size: 10.5px; font-weight: 500; }
.act-list { display: flex; flex-direction: column; }
.act-item { display: flex; align-items: center; gap: .65rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.act-item:last-child { border-bottom: none; }
.act-ava {
  width: 34px; height: 34px; flex: none; border-radius: 12px; background: var(--hover-bg);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; color: var(--emerald-dark);
}
.act-main { flex: 1; min-width: 0; }
.act-title { font-weight: 650; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-sub { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-time {
  flex: none; background: var(--emerald-light); color: var(--emerald-dark);
  font-size: .7rem; font-weight: 600; border-radius: 999px; padding: .18rem .55rem;
}
.donut-wrap { display: flex; align-items: center; gap: 1.1rem; }
.donut-box { position: relative; width: 128px; height: 128px; flex: none; }
.donut { width: 128px; height: 128px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-pct { font-size: 1.45rem; font-weight: 800; line-height: 1; }
.donut-lab { color: var(--muted); font-size: .72rem; font-weight: 600; margin-top: .15rem; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: .45rem; }
.dl-row { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.dl-row b { margin-left: auto; }
.dl-bar { width: 3.5px; height: 24px; border-radius: 999px; flex: none; }
.quick-col { display: flex; flex-direction: column; gap: .5rem; }
.quick-col .quick-btn { width: 100%; }

/* ---------- button interactions (Webflow-inspired, adapted 28-Oct-2026) ---------- */
.btn { transition: background .18s ease, border-color .18s ease, box-shadow .22s ease, transform .12s ease; }
.btn:hover { box-shadow: 0 4px 14px rgba(10, 40, 32, .13); }
[data-theme="dark"] .btn:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.btn:active { transform: scale(.965); }
/* Primary: light-sweep shine + teal glow (from the demo's sweep + glow buttons) */
.btn-primary { position: relative; overflow: hidden; transition: background .2s ease, box-shadow .25s ease, transform .12s ease; }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .38) 50%, transparent 68%);
  transform: translateX(-130%); transition: transform .6s ease;
}
.btn-primary:hover::before { transform: translateX(130%); }
.btn-primary:hover { box-shadow: 0 6px 22px rgba(13, 122, 110, .45); }
/* Gold: shifting gradient + warm glow (from the demo's gradient-glow button) */
.btn-gold {
  background: linear-gradient(135deg, #B08A24, var(--bronze) 55%, #8F6D14);
  background-size: 170% 170%; background-position: 0% 50%;
  transition: background-position .45s ease, box-shadow .25s ease, transform .12s ease, border-color .18s ease;
}
.btn-gold:hover {
  background: linear-gradient(135deg, #B08A24, var(--bronze) 55%, #8F6D14);
  background-size: 170% 170%; background-position: 95% 50%;
  box-shadow: 0 6px 22px rgba(176, 138, 36, .5);
}
.btn-danger:hover { box-shadow: 0 4px 14px rgba(176, 58, 50, .22); }
/* Chips & small buttons: lift + soft shadow, press-in on click */
.tab-btn, .asst-chip, .lang-btn, .theme-btn { transition: background .16s ease, color .16s ease, border-color .16s ease, transform .15s ease, box-shadow .2s ease; }
.tab-btn:hover, .asst-chip:hover, .lang-btn:hover, .theme-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10, 40, 32, .12); }
.quick-btn:active, .tab-btn:active, .asst-chip:active, .lang-btn:active, .theme-btn:active { transform: scale(.96); }
/* Quick actions: deeper lift + icon grow */
.quick-btn:hover { box-shadow: 0 6px 16px rgba(13, 122, 110, .18); }
.quick-btn svg { transition: transform .18s ease; }
.quick-btn:hover svg { transform: scale(1.22); }
/* Floating buttons: sonar ring pulse on hover (from the demo's halo-outline button) */
.fab:hover { animation: fabSonar 1.05s ease-out; }
@keyframes fabSonar {
  0% { box-shadow: 0 10px 24px rgba(7, 30, 22, .28), 0 0 0 0 rgba(20, 140, 125, .45); }
  100% { box-shadow: 0 14px 30px rgba(7, 30, 22, .32), 0 0 0 20px rgba(20, 140, 125, 0); }
}
.fab:active { transform: scale(.95); }
/* Sidebar: gentle slide on hover */
.nav-btn { transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-btn:hover { transform: translateX(3px); }
.sidebar.sb-mini .nav-btn:hover { transform: none; }
/* Attendance segment buttons: press feel */
.seg button { transition: background .15s ease, color .15s ease, transform .1s ease; }
.seg button:active { transform: scale(.94); }
/* Keyboard focus: soft teal ring */
.btn:focus-visible, .quick-btn:focus-visible, .tab-btn:focus-visible, .nav-btn:focus-visible, .fab:focus-visible {
  outline: 2px solid rgba(20, 140, 125, .55); outline-offset: 2px;
}

/* ---------- role avatar + brand animation + top collapse (28-Oct-2026) ---------- */
/* Assistant button is now a live full-body character per role */
.fab-asst {
  position: relative; background: none; border: none; box-shadow: none;
  padding: 0; overflow: visible; border-radius: 0;
}
.fab-asst:hover { animation: none; box-shadow: none; transform: none; }
.asst-avatar {
  height: 128px; width: auto; display: block; transform-origin: bottom center;
  filter: drop-shadow(0 10px 16px rgba(7, 30, 22, .30));
  animation: avIn .5s ease both, avIdle 9s ease-in-out 2.5s infinite; transform-origin: 50% 92%;
}
@keyframes avIn { from { opacity: 0; transform: translateY(16px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes avBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes avWave { 0%, 100% { transform: rotate(0deg) translateY(0); } 25% { transform: rotate(2.6deg) translateY(-3px); } 75% { transform: rotate(-2.6deg) translateY(-3px); } }
.fab-asst:hover .asst-avatar { animation: avWave .6s ease-in-out infinite; }
.fab-asst:active .asst-avatar { transform: scale(.94); }
.asst-bubble {
  position: absolute; right: calc(100% + 10px); top: 10px; white-space: nowrap;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  padding: .45rem .7rem; border-radius: 14px; font-size: .82rem; font-weight: 600;
  box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none;
  transform: translateX(6px) scale(.95); transition: opacity .3s ease, transform .3s ease;
}
.asst-bubble::after {
  content: ""; position: absolute; right: -5.5px; top: 16px; width: 10px; height: 10px;
  background: var(--surface); border-top: 1px solid var(--line); border-right: 1px solid var(--line);
  transform: rotate(45deg);
}
.asst-bubble.show, .fab-asst:hover .asst-bubble { opacity: 1; transform: none; }
.asst-panel { bottom: 190px; }
@media (max-width: 640px) {
  .asst-avatar { height: 96px; }
  .asst-panel { bottom: 160px; }
  .asst-bubble { display: none; }
}
/* Sidebar header row: user block + collapse toggle at the TOP */
.sb-head { display: flex; align-items: flex-start; gap: .35rem; border-bottom: 1px solid var(--line); margin-bottom: .65rem; }
.sb-head .who { flex: 1; min-width: 0; border-bottom: none; margin-bottom: 0; }
.sb-toggle {
  width: 32px; height: 32px; flex: none; margin-top: .3rem; padding: 0; border-radius: 10px;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .15s ease;
}
.sb-toggle:hover { background: var(--emerald-light); transform: scale(1.08); }
.sb-toggle:active { transform: scale(.92); }
.sb-toggle svg { transition: transform .35s ease; }
.sidebar { transition: width .3s ease, flex-basis .3s ease; }
.sidebar.sb-mini .sb-head { flex-direction: column; align-items: center; gap: .25rem; }
.sidebar.sb-mini .sb-toggle { margin-top: 0; }
/* Animated school name in the topbar: letters rise in, then a colour wave travels across */
.topbar-title { font-weight: 800; }
.topbar-title .tw { white-space: nowrap; }
.topbar-title .tl {
  display: inline-block; opacity: 0; transform: translateY(7px);
  animation: tlIn .45s ease forwards, tlWave 7.5s ease-in-out infinite;
}
@keyframes tlIn { to { opacity: 1; transform: none; } }
@keyframes tlWave { 0%, 60%, 100% { color: var(--ink); } 73% { color: var(--gold); } 86% { color: var(--emerald); } }

/* Topbar chips: staggered entrance + a slow sheen on the gold user chip */
#sessionChip, #userChip { animation: chipIn .5s ease both; }
#userChip { animation-delay: .12s; position: relative; overflow: hidden; }
@keyframes chipIn { from { opacity: 0; transform: translateY(-6px) scale(.94); } to { opacity: 1; transform: none; } }
#userChip::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%);
  transform: translateX(-130%); animation: chipSheen 5.5s ease-in-out 1.2s infinite;
}
@keyframes chipSheen { 0%, 55% { transform: translateX(-130%); } 85%, 100% { transform: translateX(130%); } }
#sessionChip:hover, #userChip:hover { transform: translateY(-1px); }
#sessionChip, #userChip { transition: transform .15s ease; }

/* ---------- cursor feel everywhere (28-Oct-2026) ---------- */
.stat-card, .pastel { transition: translate .16s ease-out, scale .22s ease, box-shadow .25s ease, border-color .2s ease, background .18s ease; }
.panel { transition: box-shadow .25s ease, border-color .25s ease; }
.panel:hover { box-shadow: 0 10px 28px rgba(10, 40, 32, .10); border-color: var(--line-strong); }
[data-theme="dark"] .panel:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
tbody td { transition: background .15s ease, box-shadow .15s ease; }
tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--emerald); }
input:hover, select:hover, textarea:hover { border-color: var(--emerald); }
.nav-btn:hover svg { transform: translateX(1px) scale(1.16); }
.who-ava, .act-ava { transition: transform .2s ease; }
tbody tr:hover .act-ava { transform: scale(1.1); }
/* chips: brighter sheen, wider sweep window, breathing glow on the gold chip */
#sessionChip { position: relative; overflow: hidden; }
#sessionChip::after, #userChip::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .8) 50%, transparent 70%);
  transform: translateX(-140%); animation: chipSheen2 4.2s ease-in-out .8s infinite;
}
@keyframes chipSheen2 { 0%, 32% { transform: translateX(-140%); } 68%, 100% { transform: translateX(140%); } }
#userChip { animation: chipIn .5s ease both, chipGlow 3.8s ease-in-out 1s infinite; }
@keyframes chipGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0); } 50% { box-shadow: 0 0 16px 3px rgba(201, 162, 39, .5); } }

/* ---------- 3D pages (28-Oct-2026): rows cascade in, cards carry real depth ---------- */
tbody tr { animation: rowIn .38s ease backwards; }
tbody tr:nth-child(2) { animation-delay: .03s; } tbody tr:nth-child(3) { animation-delay: .06s; }
tbody tr:nth-child(4) { animation-delay: .09s; } tbody tr:nth-child(5) { animation-delay: .12s; }
tbody tr:nth-child(6) { animation-delay: .15s; } tbody tr:nth-child(7) { animation-delay: .18s; }
tbody tr:nth-child(8) { animation-delay: .21s; } tbody tr:nth-child(9) { animation-delay: .24s; }
tbody tr:nth-child(10) { animation-delay: .27s; } tbody tr:nth-child(11) { animation-delay: .3s; }
tbody tr:nth-child(12) { animation-delay: .33s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.stat-card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 1px 2px rgba(10, 40, 32, .05), 0 10px 24px -12px rgba(10, 40, 32, .18); }
[data-theme="dark"] .stat-card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 12px 26px -12px rgba(0, 0, 0, .6); }
.stat-card:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 2px 4px rgba(10, 40, 32, .06), 0 20px 38px -14px rgba(10, 40, 32, .3); }
.stat-card, .pastel { transition: transform .18s ease-out, box-shadow .3s ease, border-color .2s ease, background .18s ease; will-change: transform; }
.login-shell { animation: shellIn .55s cubic-bezier(.2, .7, .25, 1) backwards; }
@keyframes shellIn { from { opacity: 0; transform: perspective(1200px) rotateX(7deg) translateY(26px); } to { opacity: 1; transform: none; } }
.sb-nav .nav-btn { animation: navIn .45s ease backwards; }
.sb-nav .nav-btn:nth-child(2) { animation-delay: .04s; } .sb-nav .nav-btn:nth-child(3) { animation-delay: .08s; }
.sb-nav .nav-btn:nth-child(4) { animation-delay: .12s; } .sb-nav .nav-btn:nth-child(5) { animation-delay: .16s; }
.sb-nav .nav-btn:nth-child(6) { animation-delay: .2s; } .sb-nav .nav-btn:nth-child(7) { animation-delay: .24s; }
.sb-nav .nav-btn:nth-child(8) { animation-delay: .28s; } .sb-nav .nav-btn:nth-child(9) { animation-delay: .32s; }
.sb-nav .nav-btn:nth-child(10) { animation-delay: .36s; }
@keyframes navIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

/* ---------- liveness (28-Oct-2026): live clock, click ripple, drawing chart, avatar waves on its own ---------- */
.dash-greet { font-size: 1.03rem; font-weight: 600; color: var(--ink2); margin: 0 0 .95rem; animation: shsFadeUp .4s ease backwards; }
.fab-asst { animation: avBob 3.4s ease-in-out infinite; }
@keyframes avIdle { 0%, 56%, 100% { transform: rotate(0deg); } 64% { transform: rotate(-7deg); } 72% { transform: rotate(6deg); } 80% { transform: rotate(-4deg); } 88% { transform: rotate(0deg); } }
.lc-draw { stroke-dasharray: 100; stroke-dashoffset: 100; animation: dashDraw 1.4s .15s ease forwards; }
@keyframes dashDraw { to { stroke-dashoffset: 0; } }
.lc-area { opacity: 0; animation: lcAreaIn .8s .75s ease forwards; }
@keyframes lcAreaIn { from { opacity: 0; } to { opacity: .07; } }
.lc-fade { opacity: 0; animation: lcFadeIn .7s .95s ease forwards; }
@keyframes lcFadeIn { from { opacity: 0; } to { opacity: 1; } }
.btn, .nav-btn, .quick-btn, .asst-chip, .tab-btn, .lang-btn, .theme-btn, .btn-icon { position: relative; overflow: hidden; }

.btn-primary .ink, .btn-gold .ink, .nav-btn.active .ink, .asst-chip .ink { background: rgba(15, 118, 110, .28); }
.btn-primary .ink, .btn-gold .ink { background: rgba(255, 255, 255, .5); }
@keyframes inkPop { to { transform: scale(2.4); opacity: 0; } }
.ink { position: absolute; border-radius: 50%; background: rgba(15, 118, 110, .28); transform: scale(0); opacity: .6; pointer-events: none; animation: inkPop .8s ease-out forwards; z-index: 0; }

/* ---------- profile section: sidebar top (28-Oct-2026) — top bar stays clean ---------- */
.sidebar .who { text-align: center; }
.sidebar .who-ava {
  display: flex; width: 56px; height: 56px; font-size: 1.35rem; margin: 0 auto .45rem;
  padding: 0; border: none; cursor: pointer; overflow: hidden; transition: box-shadow .18s ease, transform .18s ease;
}
.sidebar .who-ava:hover { box-shadow: 0 0 0 3px var(--emerald-light), 0 6px 14px -6px rgba(10, 40, 32, .35); transform: translateY(-1px); }
.sidebar .who-ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.sidebar.sb-mini .who-ava { width: 36px; height: 36px; font-size: 1rem; margin-bottom: 0; }
.sb-actions { display: flex; gap: .4rem; padding: 0 .55rem .6rem; margin-bottom: .4rem; border-bottom: 1px solid var(--line); }
.sb-act {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  padding: .42rem .3rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink2);
  border-radius: 10px; font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.sb-act:hover { border-color: var(--emerald); color: var(--emerald-dark); }
.sb-act svg { width: 17px; height: 17px; }
.sb-act.theme-btn { width: auto; height: auto; }
.sidebar.sb-mini .sb-actions { display: none; }

/* ---------- mobile audit fixes (28-Oct-2026) ---------- */
@media (max-width: 760px) {
  /* data tables: one line per row, scroll sideways inside the panel instead of wrapping into tall rows */
  .table-wrap th, .table-wrap td { white-space: nowrap; }
  /* assistant panel: shorter on phones, page stays visible around it */
  .asst-panel { height: min(470px, calc(100dvh - 196px)); }
  /* while the menu drawer is open, the floating characters step aside */
  body.sb-open .fab-stack { opacity: 0; pointer-events: none; }
}
.fab-stack { transition: opacity .25s ease; }

/* page itself never scrolls sideways — section-change animations stay inside (28-Oct-2026) */
html, body { overflow-x: hidden; overflow-x: clip; }

/* Portal Login Bhejna (rollout) */
.roll-row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;justify-content:space-between;padding:.6rem 0;border-bottom:1px solid var(--line)}
.roll-row:last-child{border-bottom:none}
.roll-row .who{min-width:190px;flex:1}
.roll-row.done{opacity:.55}
.roll-acts{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}
.roll-ticklab{display:flex;gap:.3rem;align-items:center;font-size:.85rem;cursor:pointer}
.roll-search{width:100%;padding:.6rem .8rem;border:1px solid var(--line);border-radius:10px;font-size:.95rem;background:var(--surface);color:var(--ink)}
.roll-chips{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.6rem}
.fchip{border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:.32rem .7rem;border-radius:999px;font-size:.8rem;cursor:pointer}
.fchip.on{background:var(--emerald);color:#fff;border-color:var(--emerald);font-weight:700}
.btn-wa{background:#22a06b;color:#fff}
.roll-num{padding:.45rem .6rem;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);width:150px}
.roll-grp{margin:1rem 0 .2rem;color:var(--emerald);font-size:.95rem;text-transform:uppercase;letter-spacing:.04em}
.roll-grp:first-child{margin-top:0}

/* Syllabus entry photo (data-URL image stored on the syllabus doc) */
.syl-img { max-width: 100%; height: auto; display: block; border-radius: 10px; margin-top: .5rem; }
.doc-img { max-width: 240px; max-height: 240px; width: auto; height: auto; display: block; border-radius: 10px; margin-top: .5rem; cursor: pointer; }

/* ---------- fee receipt ---------- */
.receipt .amt-big { font-size: 1.2rem; font-weight: 800; }
@media print {
  body.printing-receipt .topbar, body.printing-receipt .sidebar, body.printing-receipt .fab-stack,
  body.printing-receipt .asst-panel, body.printing-receipt .content, body.printing-receipt .toast { display: none !important; }
  body.printing-receipt .modal-backdrop { position: static !important; background: none !important; padding: 0 !important; display: block !important; }
  body.printing-receipt .modal { box-shadow: none !important; border: none !important; margin: 0 !important; width: 100% !important; max-height: none !important; overflow: visible !important; animation: none !important; }
  body.printing-receipt .modal-head, body.printing-receipt .receipt-actions { display: none !important; }
}

.sheet-tag { color: var(--muted); font-size: .8rem; font-style: italic; margin-top: .1rem; }
.sheet-sign { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.4rem; font-size: .86rem; font-weight: 600; }
.sheet-foot { text-align: right; font-size: .75rem; color: var(--muted); margin-top: .7rem; }
.sheet-title { text-align: center; font-size: 1.02rem; font-weight: 800; letter-spacing: .16em; color: #fff; background: var(--emerald-dark); border-radius: 6px; padding: .32rem .5rem; margin-bottom: .45rem; }
.sheet-meta { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; margin: .35rem 0 .6rem; }
.sheet-info { width: 100%; border-collapse: collapse; font-size: .88rem; }
.sheet-info th, .sheet-info td { border: 1px solid var(--line-strong); padding: .32rem .5rem; text-align: left; }
.sheet-info th { background: rgba(11, 107, 79, .07); width: 16%; font-weight: 700; white-space: nowrap; }
.sheet-table tr.sheet-total td { border-top: 2px solid currentColor; font-size: .92rem; }
.sheet-scale { font-size: .74rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: .35rem .55rem; margin-top: .8rem; }
@media print {
  .sheet-title { background: #0b6b4f !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet-info th { background: #eef3f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media print {
  body.printing-card .topbar, body.printing-card .sidebar, body.printing-card .fab-stack,
  body.printing-card .asst-panel, body.printing-card .content, body.printing-card .toast { display: none !important; }
  body.printing-card .modal-backdrop { position: static !important; background: none !important; padding: 0 !important; display: block !important; }
  body.printing-card .modal { box-shadow: none !important; border: none !important; margin: 0 !important; width: 100% !important; max-height: none !important; overflow: visible !important; animation: none !important; }
  body.printing-card .modal-head, body.printing-card #rc_print { display: none !important; }
}

/* ---- Staff Attendance: Gate Mode (added 14-Nov-2026) ---- */
.gate-overlay { position: fixed; inset: 0; z-index: 80; background: var(--bg); overflow-y: auto; padding: 1rem; }
.gate-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.gate-title { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.gate-sub { color: var(--muted); font-size: .95rem; margin-top: .15rem; }
.gate-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; margin-bottom: .7rem; box-shadow: var(--shadow-panel); }
.gate-name { font-size: 1.3rem; font-weight: 750; color: var(--ink); }
.gate-btn { font-size: 1.3rem; font-weight: 700; padding: 1rem 2.2rem; min-width: 150px; min-height: 64px; }
.gate-exit { font-size: 1rem; padding: .7rem 1.2rem; }
.gate-pin { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1rem 1.15rem; margin-bottom: 1rem; }
.gate-pin label { font-weight: 600; }
.gate-pin input { font-size: 1.2rem; padding: .5rem .7rem; }
.gate-scan { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; text-align: center; }
.gate-scan video { width: min(420px, 100%); border-radius: 10px; background: #000; }
.gate-scan-msg { font-size: 1.1rem; font-weight: 650; color: var(--ink); margin: .7rem 0; }
.gate-confirm { background: var(--emerald-light); border: 2px solid var(--emerald); border-radius: var(--radius); padding: 1.6rem 1rem; margin-bottom: 1rem; text-align: center; color: var(--ink); }
.gate-confirm-name { font-size: 2rem; font-weight: 850; }
.gate-confirm-io { font-size: 1.6rem; font-weight: 750; margin-top: .3rem; }

/* Staff card scanner (15-Nov-2026): big page button + camera guide frame */
.scan-big-btn { font-size: 1.15rem; font-weight: 800; padding: .95rem 1.6rem; }
.scan-wrap { position: relative; width: min(440px, 100%); margin: 0 auto; }
.scan-wrap video { width: 100%; border-radius: 10px; background: #000; display: block; }
.scan-guide { position: absolute; left: 16%; right: 16%; top: 10%; bottom: 10%; border: 3px solid var(--gold, #c9a227); border-radius: 16px; pointer-events: none; }
