/* Shared school portal design tokens */
:root {
  --navy:#15344b; --navy-2:#224b67; --blue:#2760a0; --blue-soft:#edf3fc;
  --gold:#dfa845; --ink:#23384a; --muted:#697989; --line:#e5eaef;
  --paper:#fff; --canvas:#f6f8fa; --green:#177a64; --green-soft:#eaf6f0;
  --orange:#a5681b; --orange-soft:#fff5e6; --red:#b84c4c; --red-soft:#fdf0ef;
  --purple:#7c60ad; --purple-soft:#f2eef8; --shadow:0 3px 12px rgba(25,48,70,.025); --radius:14px;
}
* { box-sizing:border-box; }
iframe { display:none; }
[hidden] { display:none !important; }
html { scroll-behavior:smooth; }
body { margin:0; color:var(--ink); background:var(--canvas); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height:1.5; -webkit-font-smoothing:antialiased; }
button,input,select { font:inherit; }
button,a,select { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
a { color:var(--blue); }
button:disabled { cursor:not-allowed; opacity:.5; }
:focus-visible { outline:3px solid #5c95ce; outline-offset:3px; }
input:focus-visible,select:focus-visible { outline-offset:1px; }
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:8px; color:var(--navy); font-size:clamp(25px,2.5vw,32px); font-weight:650; letter-spacing:-1.1px; line-height:1.25; }
h2 { margin-bottom:16px; color:var(--navy); font-size:16px; font-weight:650; letter-spacing:-.3px; }
h3 { margin-bottom:7px; font-size:14px; }
.icon { flex-shrink:0; display:block; }
[data-icon] { display:inline-flex; align-items:center; flex-shrink:0; }
.skip-link { position:fixed; top:12px; left:12px; padding:12px 20px; background:var(--navy); color:white; z-index:200; transform:translateY(-150%); border-radius:8px; }
.skip-link:focus { transform:none; }
.app { min-height:100vh; display:grid; grid-template-columns:246px minmax(0,1fr); }
.sidebar { position:sticky; top:0; height:100vh; display:flex; flex-direction:column; padding:30px 18px 16px; background:#fff; border-right:1px solid var(--line); overflow-y:auto; }
.brand { display:flex; gap:12px; align-items:center; padding:0 8px 26px; color:var(--navy); text-decoration:none; }
.brand-mark { width:44px; height:48px; display:grid; place-items:center; flex-shrink:0; border-radius:9px 9px 17px 17px; color:#fff; background:var(--navy); font-family:Georgia,serif; font-size:14px; font-weight:700; box-shadow:inset 0 -4px 0 var(--gold); }
.brand strong { display:block; font-family:Georgia,serif; font-size:20px; line-height:1.3; }
.brand small { color:var(--muted); font-size:11px; }
.campus-label { display:flex; align-items:center; gap:7px; margin:0 5px 27px; padding:11px 8px; border:1px solid var(--line); border-radius:8px; color:var(--muted); font-size:10px; white-space:nowrap; }
.campus-label strong { color:var(--ink); font-weight:600; margin-left:auto; }
.campus-dot { display:inline-block; width:6px; height:6px; flex-shrink:0; background:var(--green); border-radius:50%; }
.nav { display:grid; gap:24px; }
.nav-label { margin:0 12px 9px; color:#778591; font-size:10px; font-weight:600; letter-spacing:1.1px; text-transform:uppercase; }
.nav-group { display:grid; gap:4px; }
.nav-button { display:flex; align-items:center; gap:12px; min-height:46px; padding:11px 12px; border-radius:8px; text-decoration:none; color:#617181; font-size:12px; font-weight:500; transition:background .16s,color .16s; }
.nav-button:hover { background:#f4f7fa; color:var(--navy); }
.nav-button.active { color:var(--blue); background:var(--blue-soft); font-weight:650; }
.nav-count { display:grid; place-items:center; margin-left:auto; width:21px; height:21px; background:var(--orange-soft); color:var(--orange); border-radius:6px; font-size:10px; }
.sidebar-foot { margin-top:auto; padding-top:36px; }
.help-button { display:flex; align-items:center; gap:12px; width:100%; min-height:44px; color:var(--muted); background:none; border:0; padding:10px 12px; font-size:12px; text-align:left; border-radius:8px; }
.help-button:hover { background:var(--canvas); }
.sidebar-profile { display:flex; align-items:center; gap:10px; margin-top:14px; padding:18px 8px 0; border-top:1px solid var(--line); }
.sidebar-profile strong,.sidebar-profile small { display:block; }
.sidebar-profile strong { font-size:12px; font-weight:600; }
.sidebar-profile small { font-size:10px; color:var(--muted); }
.avatar { width:36px; height:36px; display:grid; place-items:center; flex-shrink:0; border-radius:50%; color:var(--navy); background:#e9eef5; font-size:11px; font-weight:700; }
.main { min-width:0; }
.topbar { min-height:76px; display:flex; align-items:center; gap:14px; padding:12px 34px; background:rgba(255,255,255,.96); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20; backdrop-filter:blur(10px); }
.breadcrumb { display:flex; gap:12px; align-items:center; font-size:11px; white-space:nowrap; }
.breadcrumb>span { color:var(--muted); }
.breadcrumb strong { font-weight:600; }
.breadcrumb-separator { opacity:.5; }
.top-actions { margin-left:auto; display:flex; align-items:center; gap:14px; }
.workspace-search { display:flex; align-items:center; gap:9px; min-height:44px; color:var(--muted); border:0; background:none; font-size:11px; }
kbd { border:1px solid var(--line); border-radius:4px; padding:2px 5px; font:10px inherit; color:var(--muted); }
.workspace-search kbd { margin-left:20px; }
.icon-button { display:grid; place-items:center; width:44px; height:44px; padding:0; border:1px solid transparent; border-radius:9px; color:var(--muted); background:transparent; flex-shrink:0; }
.icon-button:hover { color:var(--navy); background:var(--canvas); }
.notification-button { position:relative; }
.notification-dot { position:absolute; top:8px; right:10px; width:5px; height:5px; background:var(--gold); border-radius:50%; box-shadow:0 0 0 2px #fff; }
.menu-button,.sidebar-close { display:none; }
.select,.search { min-height:44px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); padding:0 12px; font-size:12px; }
.role-select { min-height:36px; font-size:11px; background:#fafbfd; }
.prototype-bar { min-height:35px; display:flex; align-items:center; gap:9px; padding:7px 34px; color:#748393; background:#f0f3f6; border-bottom:1px solid var(--line); font-size:10px; }
.prototype-pill { background:#e4eaf0; border:1px solid #dbe3eb; padding:1px 6px; border-radius:4px; font-size:9px; color:#54677a; }
.prototype-disclaimer { margin-left:auto; }
.content { max-width:1510px; margin:0 auto; padding:32px 34px 24px; }
.page { display:none; animation:enter .2s ease; }
.page.active { display:block; }
@keyframes enter { from { opacity:0; transform:translateY(4px); } }
.page-head { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:25px; }
.eyebrow { margin-bottom:7px; color:var(--muted); font-size:10px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.subtitle { margin:0; color:var(--muted); font-size:13px; }
.greeting-dot { color:var(--gold); }
.btn { display:inline-flex; justify-content:center; align-items:center; gap:8px; min-height:44px; padding:10px 15px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--navy); font-size:12px; font-weight:600; text-decoration:none; transition:background .15s,border-color .15s; }
.btn:hover { border-color:#b7c6d3; background:#f7fafc; }
.btn.primary { border-color:var(--navy); color:#fff; background:var(--navy); box-shadow:0 3px 5px rgba(21,52,75,.1); }
.btn.primary:hover { background:var(--navy-2); }
.btn.small { min-height:44px; padding:7px 11px; font-size:11px; }
.overview-strip { display:flex; align-items:center; gap:18px; margin-bottom:20px; font-size:11px; color:var(--muted); }
.overview-strip>span:first-child { color:var(--green); display:flex; gap:7px; align-items:center; }
.overview-strip>span:nth-child(2) { border-left:1px solid #d9e0e7; padding-left:18px; }
.overview-strip a { display:flex; align-items:center; gap:6px; margin-left:auto; text-decoration:none; font-weight:600; }
.overview-strip .icon { width:15px; height:15px; }
.cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
.card,.panel { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.metric { padding:20px; min-height:158px; position:relative; overflow:hidden; }
.metric-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.metric .label { color:var(--muted); font-size:11px; font-weight:500; }
.metric-icon { display:grid; place-items:center; width:30px; height:30px; border-radius:8px; }
.metric-icon .icon { width:17px; height:17px; }
.blue { color:var(--blue); background:var(--blue-soft); }
.green { color:var(--green); background:var(--green-soft); }
.orange { color:var(--orange); background:var(--orange-soft); }
.red { color:var(--red); background:var(--red-soft); }
.purple { color:var(--purple); background:var(--purple-soft); }
.metric .value { margin:12px 0 8px; color:var(--navy); font-size:30px; font-weight:650; letter-spacing:-1px; line-height:1.2; font-variant-numeric:tabular-nums; }
.value-unit { font-size:22px; font-weight:500; }
.metric .detail { display:flex; align-items:center; flex-wrap:wrap; gap:6px; color:var(--muted); font-size:10px; }
.trend-chip { display:inline-flex; padding:3px 6px; border-radius:4px; background:var(--green-soft); color:var(--green); font-size:10px; font-weight:600; }
.trend-up { color:var(--green); font-weight:600; }
.trend-warn { color:var(--orange); font-weight:600; }
.progress { height:5px; border-radius:99px; background:#edf1f5; overflow:hidden; }
.progress>span { display:block; height:100%; border-radius:inherit; background:var(--blue); }
.metric-progress { margin-top:22px; }
.metric-link { display:flex; gap:6px; align-items:center; margin-top:17px; font-size:10px; font-weight:600; text-decoration:none; }
.metric-link .icon { width:14px; height:14px; }
.mini-bars { display:flex; align-items:flex-end; gap:5px; height:22px; margin-top:10px; }
.mini-bars i { flex:1; height:var(--bar); background:#cbdcf1; border-radius:2px 2px 0 0; }
.mini-bars i:last-child { background:var(--blue); }
.grid-2 { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr); gap:20px; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:22px; align-items:start; }
.panel { min-width:0; padding:22px; margin-bottom:22px; }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.panel-head h2 { margin:0; }
.panel-caption { margin:4px 0 0; font-size:10px; color:var(--muted); }
.segmented { display:flex; flex-shrink:0; background:#f3f5f8; padding:3px; border:1px solid var(--line); border-radius:7px; }
.segmented button { min-height:38px; padding:5px 10px; border:0; border-radius:5px; color:var(--muted); background:none; font-size:10px; }
.segmented button.active { color:var(--navy); background:#fff; box-shadow:0 1px 4px #dfe5ed; }
.chart-summary { display:flex; align-items:center; gap:12px; margin:0 0 22px; }
.chart-summary>strong { font-size:24px; font-weight:600; letter-spacing:-.5px; }
.collection-chart { display:grid; grid-template-columns:38px 1fr; gap:12px; height:192px; margin-bottom:14px; }
.chart-scale { display:flex; flex-direction:column; justify-content:space-between; height:164px; color:var(--muted); font-size:9px; }
.chart-bars { display:flex; justify-content:space-around; align-items:flex-end; gap:14px; padding:0 14px; height:164px; border-bottom:1px solid var(--line); background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),#eef1f5 calc(25% - 1px),#eef1f5 25%); }
.chart-column { height:100%; flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; position:relative; }
.chart-bar { width:100%; max-width:48px; height:var(--height); min-height:12px; border-radius:5px 5px 0 0; background:#d9e5f3; position:relative; transition:background .15s; cursor:default; }
.chart-bar.current { background:var(--blue); }
.chart-bar:hover,.chart-bar:focus-visible { background:var(--navy-2); }
.chart-tooltip { position:absolute; bottom:calc(100% + 7px); left:50%; transform:translateX(-50%); padding:5px 8px; color:white; background:var(--navy); border-radius:5px; white-space:nowrap; font-size:10px; opacity:0; pointer-events:none; }
.chart-bar:hover .chart-tooltip,.chart-bar:focus-visible .chart-tooltip { opacity:1; }
.chart-month { position:absolute; top:calc(100% + 8px); font-size:10px; color:var(--muted); }
.chart-footer { display:flex; align-items:center; justify-content:space-between; padding-top:14px; border-top:1px solid var(--line); font-size:10px; color:var(--muted); }
.legend-dot { display:inline-block; width:7px; height:7px; border-radius:2px; background:var(--blue); margin-right:5px; }
.text-link { display:inline-flex; align-items:center; gap:6px; color:var(--blue); text-decoration:none; font-size:11px; font-weight:600; }
.text-link .icon { width:14px; height:14px; }
.heading-count { display:inline-grid; place-items:center; width:22px; height:22px; margin-left:6px; background:#f1f4f7; color:var(--muted); border-radius:6px; font-size:10px; vertical-align:middle; }
.priority-list { display:grid; }
.priority-item { display:flex; gap:12px; align-items:center; padding:15px 0; border-bottom:1px solid var(--line); text-decoration:none; color:var(--ink); }
.priority-item:last-child { border:0; padding-bottom:0; }
.priority-item:first-child { padding-top:0; }
.priority-item:hover strong { color:var(--blue); }
.priority-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:9px; flex-shrink:0; }
.priority-icon .icon { width:18px; height:18px; }
.priority-item>div { flex:1; min-width:0; }
.priority-item strong { display:block; font-size:11px; font-weight:600; }
.priority-item small { display:block; color:var(--muted); font-size:10px; margin-top:4px; }
.priority-item>span:last-child { color:#8493a1; }
.priority-item>span:last-child .icon { width:16px; height:16px; }
.quick-panel { padding:24px 22px 12px; margin-bottom:22px; border-radius:var(--radius); background:var(--navy); color:#fff; position:relative; overflow:hidden; }
.quick-panel:before { content:""; position:absolute; width:200px; height:200px; border:1px solid #ffffff13; border-radius:50%; top:-140px; right:-70px; box-shadow:0 0 0 25px #ffffff06,0 0 0 50px #ffffff03; pointer-events:none; }
.quick-panel h2 { color:#fff; font-family:Georgia,serif; font-size:22px; font-weight:400; margin-bottom:6px; }
.quick-panel-heading { margin-bottom:18px; }
.quick-panel p { color:#b7cbdc; font-size:11px; margin-bottom:18px; }
.quick-links a { display:flex; align-items:center; gap:10px; color:#eef5fa; font-size:11px; text-decoration:none; min-height:48px; border-top:1px solid #ffffff16; }
.quick-links a:hover { color:#ffdb98; }
.quick-links a>span:last-child { margin-left:auto; }
.quick-links .icon { width:16px; height:16px; }
.event { display:flex; gap:12px; align-items:center; padding:14px 0; border-top:1px solid var(--line); }
.event:last-child { padding-bottom:0; }
.event-date { display:grid; place-items:center; min-width:40px; height:48px; background:#f4f6f9; border-radius:8px; padding:6px 0; }
.event-date small { font-size:8px; color:var(--muted); letter-spacing:1px; }
.event-date strong { font-size:19px; line-height:1; font-weight:600; }
.event>div:last-child strong { display:block; font-size:11px; font-weight:600; }
.event>div:last-child small { display:block; font-size:10px; color:var(--muted); margin-top:4px; }
.live-label { font-size:9px; color:var(--muted); }
.activity { display:grid; gap:22px; }
.activity-item { display:grid; grid-template-columns:9px 1fr; gap:10px; position:relative; }
.activity-item:not(:last-child):before { content:""; position:absolute; left:3px; top:12px; bottom:-22px; width:1px; background:var(--line); }
.activity-dot { width:7px; height:7px; margin-top:5px; border-radius:50%; background:var(--blue); z-index:1; }
.activity-dot.green { background:var(--green); }
.activity-dot.purple { background:var(--purple); }
.activity-dot.orange { background:var(--gold); }
.activity-item p { margin:0; font-size:10px; }
.activity-item strong { font-weight:600; }
.activity-item small { color:var(--muted); font-size:9px; }
.filters { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:18px; }
.search { min-width:180px; flex:1; padding-left:14px; }
.table-wrap { overflow-x:auto; border-radius:8px; }
table { width:100%; border-collapse:collapse; white-space:nowrap; font-size:12px; }
th { padding:12px; color:var(--muted); background:#f6f8fa; border-bottom:1px solid var(--line); text-align:left; font-size:9px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; }
td { padding:17px 12px; border-bottom:1px solid var(--line); font-variant-numeric:tabular-nums; }
tr:last-child td { border-bottom:0; }
tbody tr:hover { background:#fbfcfe; }
td strong { font-weight:600; }
td small { color:var(--muted); font-size:10px; }
.student { display:flex; align-items:center; gap:11px; }
.mini-avatar { width:33px; height:33px; display:grid; place-items:center; border-radius:50%; background:var(--blue-soft); color:var(--blue); font-size:10px; font-weight:600; }
.badge { display:inline-flex; align-items:center; padding:4px 8px; border-radius:5px; font-size:9px; font-weight:600; white-space:nowrap; }
.badge.green { color:var(--green); background:var(--green-soft); }
.badge.orange { color:var(--orange); background:var(--orange-soft); }
.badge.red { color:var(--red); background:var(--red-soft); }
.badge.blue { color:var(--blue); background:var(--blue-soft); }
.badge.purple { color:var(--purple); background:var(--purple-soft); }
.notice { padding:14px 16px; border-left:3px solid var(--gold); border-radius:8px; background:#fff9ee; font-size:12px; line-height:1.7; }
.timetable { display:grid; grid-template-columns:100px repeat(8,minmax(124px,1fr)); min-width:1092px; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:#fff; }
.time-cell,.day-cell,.period-cell { min-height:90px; padding:14px 12px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.day-cell { min-height:auto; color:var(--navy); background:#f2f6fa; font-size:11px; font-weight:600; }
.day-cell small { font-size:9px; color:var(--muted); font-weight:400; }
.day-cell.period-heading { display:grid; align-content:center; gap:5px; padding:10px 8px; text-align:center; }
.period-heading strong { font-size:10px; }
.timetable-corner,.timetable-day { display:flex; align-items:center; }
.timetable-day { color:var(--navy); background:#f8fafc; }
.time-cell { color:var(--muted); background:#fafbfc; font-size:10px; }
.period-cell { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:5px; min-width:0; background:#fff; }
.period-cell strong { display:block; color:var(--navy); font-size:11px; font-weight:600; }
.period-cell span { color:var(--muted); font-size:9px; }
.period-cell small { color:#7b8b99; font-size:9px; }
.period-cell .timetable-class-tag { align-self:flex-start; padding:2px 5px; border-radius:4px; background:#fff; color:var(--muted); font-size:8px; }
.subject-math { box-shadow:inset 3px 0 #7da9d6; background:#f3f8fd; }
.subject-science { box-shadow:inset 3px 0 #69a890; background:#f1f8f5; }
.subject-language { box-shadow:inset 3px 0 #d5af5f; background:#fffaf0; }
.subject-technology { box-shadow:inset 3px 0 #9c85c4; background:#f7f4fb; }
.subject-humanities { box-shadow:inset 3px 0 #7c9db7; background:#f3f7fa; }
.subject-activity { box-shadow:inset 3px 0 #d28c78; background:#fff6f2; }
.free-period { display:grid; place-items:center; min-height:90px; background:#fafbfc; color:#8b98a3; font-size:10px; }
.timetable-panel { padding:20px; }
.timetable-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.timetable-view-switch { flex:0 0 auto; }
.timetable-view-switch button { min-height:40px; padding:7px 13px; }
.timetable-filters { display:flex; align-items:end; gap:8px; }
.timetable-filters label { display:grid; gap:5px; color:var(--muted); font-size:10px; font-weight:600; }
.timetable-filters .select { min-width:130px; }
.timetable-status { margin-left:auto; }
.timetable-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:18px 0 14px; }
.timetable-heading h2 { margin:0; font-size:16px; }
.timetable-heading p { margin:0; color:var(--muted); font-size:10px; }
.timetable-heading p span { padding:0 4px; }
.timetable-scroll { border:1px solid var(--line); border-radius:10px; }
@media (max-width:800px) {
  .timetable-toolbar { align-items:stretch; }
  .timetable-status { margin-left:0; align-self:center; }
  .timetable-heading { display:block; }
  .timetable-heading p { margin-top:7px; line-height:1.6; }
}
@media (max-width:540px) {
  .timetable-panel { padding:15px; }
  .timetable-view-switch { width:100%; }
  .timetable-view-switch button { flex:1; }
  .timetable-filters { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .timetable-filters label:only-child { grid-column:1/-1; }
  .timetable-filters .select { min-width:0; width:100%; }
}
.subject-blue { box-shadow:inset 3px 0 #b3cceb; background:#f6f9fd; }
.subject-gold { box-shadow:inset 3px 0 #ebc77d; background:#fffaf1; }
.subject-green { box-shadow:inset 3px 0 #9acdbd; background:#f3faf7; }
.score-ring { width:142px; height:142px; display:grid; place-items:center; margin:25px auto; border-radius:50%; background:conic-gradient(var(--green) 0 87%,#e9eff3 87%); position:relative; }
.score-ring:after { content:""; position:absolute; inset:12px; border-radius:50%; background:#fff; }
.score-ring strong { position:relative; z-index:1; color:var(--navy); font-size:32px; font-weight:600; }
.results-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.results-actions .btn { white-space:nowrap; }
.result-print-frame { position:fixed; left:-12000px; top:0; width:210mm; height:297mm; border:0; }
.results-browser { display:grid; grid-template-columns:250px minmax(0,1fr); align-items:start; gap:18px; }
.result-student-browser { position:sticky; top:18px; min-width:0; padding:16px; }
.result-student-browser h2 { margin:0 0 14px; font-size:15px; }
.result-filters { display:grid; gap:10px; }
.result-filters label { display:grid; gap:5px; color:var(--muted); font-size:10px; font-weight:600; }
.result-filters .select { width:100%; }
.results-record-count { color:var(--muted); font-size:11px; text-align:right; font-variant-numeric:tabular-nums; }
.result-student-browser .results-record-count { margin:14px 0 8px; text-align:left; }
.result-student-list { display:grid; gap:5px; max-height:min(54vh,540px); overflow:auto; }
.result-student-item { display:grid; gap:4px; width:100%; min-height:54px; padding:9px 10px; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.result-student-item:hover { background:var(--canvas); }
.result-student-item[aria-pressed="true"] { border-color:#c5d8eb; background:var(--blue-soft); color:var(--navy); }
.result-student-item strong { font-size:11px; font-weight:650; }
.result-student-item span { color:var(--muted); font-size:9px; }
.results-report-column { min-width:0; }
.full-result-card { padding:0 24px; }
.full-result-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:24px 0 20px; border-bottom:1px solid var(--line); }
.full-result-heading h2 { margin:12px 0 4px; font-family:Georgia,serif; font-size:25px; font-weight:500; }
.full-result-heading p { margin:0; color:var(--muted); font-size:11px; }
.full-result-heading p span { margin:0 4px; }
.result-file-link { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; border:1px solid var(--line); border-radius:9px; color:var(--blue); text-decoration:none; font-size:20px; }
.result-file-link:hover { background:var(--blue-soft); }
.result-section { padding:21px 0; border-bottom:1px solid var(--line); }
.result-section:last-of-type { border-bottom:0; }
.result-section-heading { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:12px; }
.result-section-heading h3 { margin:0; color:var(--navy); font-size:14px; }
.result-detail-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px 20px; margin:0; }
.result-detail-grid dt { margin-bottom:4px; color:var(--muted); font-size:10px; }
.result-detail-grid dd { margin:0; font-size:12px; font-weight:550; overflow-wrap:anywhere; }
.result-report-copy,.report-empty { margin:0; color:var(--muted); font-size:12px; line-height:1.65; }
.result-table-wrap table { white-space:normal; min-width:640px; }
.result-table-wrap th { vertical-align:bottom; line-height:1.45; }
.result-table-wrap td { padding:12px; }
.result-table-wrap td:first-child { min-width:185px; }
.result-lower-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.attendance-stat { display:flex; align-items:center; gap:15px; }
.attendance-stat .score-ring { flex:0 0 96px; width:96px; height:96px; margin:0; background:conic-gradient(var(--green) 0 var(--score),#e9eff3 var(--score) 100%); }
.attendance-stat .score-ring:after { inset:9px; }
.attendance-stat .score-ring strong { font-size:21px; }
.attendance-stat p { color:var(--muted); font-size:11px; line-height:1.6; }
.attendance-stat p strong { color:var(--ink); }
.attendance-stat p span { color:var(--muted); }
.overall-grade { display:inline-block; color:var(--navy); font-size:28px; }
.result-overall .notice { margin-top:10px; }
.result-note-list { margin:0; padding-left:18px; color:var(--muted); font-size:11px; line-height:1.7; }
.result-note-list li+li { margin-top:6px; }
.result-glossary { grid-template-columns:repeat(3,minmax(0,1fr)); }
.result-card-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:16px 0 22px; color:var(--muted); font-size:10px; }
.results-source-note { margin:0; padding:14px 2px; color:var(--muted); font-size:10px; line-height:1.6; }
@media (max-width:800px) {
  .result-detail-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:1350px) {
  .results-browser { grid-template-columns:minmax(0,1fr); }
  .result-student-browser { position:static; }
  .result-student-browser h2 { margin-bottom:10px; }
  .result-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .result-student-list { display:flex; max-height:none; padding-bottom:3px; overflow-x:auto; }
  .result-student-item { flex:0 0 190px; }
  .results-report-column .result-report { width:100%; min-height:0; }
}
@media (max-width:540px) {
  .result-student-browser { padding:14px; }
  .result-filters { gap:8px; }
  .result-filters .select { min-width:0; padding:0 8px; font-size:11px; }
  .result-student-item { flex-basis:165px; }
  .results-actions { justify-content:flex-start; }
  .results-actions .btn { min-height:44px; padding:8px 10px; font-size:10px; }
  .full-result-card { padding:0 16px; }
  .full-result-heading { padding-top:18px; }
  .full-result-heading h2 { font-size:22px; }
  .result-detail-grid,.result-glossary { grid-template-columns:minmax(0,1fr); }
  .result-lower-grid { grid-template-columns:minmax(0,1fr); gap:18px; }
  .result-section { padding:17px 0; }
}
.circular-list { display:grid; gap:10px; }
.circular { display:grid; grid-template-columns:42px 1fr auto; align-items:center; gap:14px; padding:17px; border:1px solid var(--line); border-radius:10px; }
.circular-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:9px; color:var(--blue); background:var(--blue-soft); }
.circular p { margin:4px 0 0; color:var(--muted); font-size:11px; }
.circular h3 { margin:0; }
.circular-title { padding:8px 0; border:0; background:none; color:var(--navy); font-size:13px; font-weight:600; text-align:left; min-height:44px; }
.circular-title:hover { color:var(--blue); }
.parent-hero { display:grid; grid-template-columns:1fr auto; gap:20px; padding:28px; color:#fff; background:var(--navy); border-radius:var(--radius); margin-bottom:22px; }
.parent-hero h2 { color:#fff; margin-bottom:8px; font-family:Georgia,serif; font-size:25px; font-weight:400; }
.parent-hero p { color:#c5d6e5; margin:0; font-size:12px; }
.child-picker { align-self:center; border-color:#ffffff40; color:#fff; background:#ffffff12; }
.child-picker option { color:var(--ink); }
.attendance-row { display:flex; gap:5px; flex-wrap:wrap; }
.att { width:26px; height:26px; display:grid; place-items:center; border-radius:6px; color:var(--green); background:var(--green-soft); font-size:9px; font-weight:600; font-style:normal; }
.att.absent { color:var(--red); background:var(--red-soft); }
.att.late { color:var(--orange); background:var(--orange-soft); }
.role-note { margin-bottom:20px; display:none; }
.role-note.show { display:block; }
.workspace-footer { display:flex; justify-content:space-between; gap:12px; margin-top:10px; padding-top:20px; border-top:1px solid var(--line); color:#7c8996; font-size:10px; }
.toast { position:fixed; right:24px; bottom:24px; z-index:150; max-width:min(430px,calc(100vw - 32px)); padding:14px 20px; color:#fff; background:var(--navy); border-radius:10px; box-shadow:0 8px 30px #102a4333; transform:translateY(100px); opacity:0; transition:.2s; font-size:12px; pointer-events:none; }
.toast.show { transform:none; opacity:1; }
.portal-dialog,.search-dialog { width:min(540px,calc(100vw - 32px)); max-height:85vh; padding:26px; border:1px solid var(--line); border-radius:16px; color:var(--ink); box-shadow:0 30px 100px #102a4333; }
dialog::backdrop { background:#0d253a77; backdrop-filter:blur(3px); }
.dialog-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.dialog-header h2 { margin:0; font-size:20px; }
#dialogContent>p { color:var(--muted); font-size:13px; }
.help-shortcuts { display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; padding:16px; margin:20px 0; background:var(--canvas); border-radius:8px; font-size:12px; }
.notification-list { display:grid; }
.notification-list a,.search-result { display:flex; align-items:center; gap:12px; padding:15px 4px; text-decoration:none; color:var(--ink); border-bottom:1px solid var(--line); }
.notification-list a:hover,.search-result:hover { color:var(--blue); background:var(--canvas); }
.notification-list a>span,.search-result>span { flex:1; }
.notification-list strong { display:block; font-size:12px; font-weight:600; }
.notification-list small,.search-result small { display:block; color:var(--muted); font-size:10px; margin-top:4px; }
.search-dialog { padding:16px; }
.search-dialog-input { display:flex; align-items:center; gap:12px; padding-bottom:10px; border-bottom:1px solid var(--line); }
.search-dialog-input input { flex:1; min-width:0; height:44px; border:0; padding:8px; font-size:14px; background:none; color:var(--ink); }
.search-result { padding:14px 12px; border:0; border-radius:8px; font-size:13px; }
.search-hint { font-size:10px; color:var(--muted); margin:14px 8px 0; }
.empty-state { padding:32px 15px; color:var(--muted); text-align:center; font-size:12px; }
.table-meta { margin:16px 0 0; padding-top:12px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
.empty-results { text-align:center; padding:32px; color:var(--muted); font-size:12px; }
.dialog-form { display:grid; gap:16px; }
.dialog-form label { display:grid; gap:6px; font-size:12px; font-weight:600; }
.dialog-form input,.dialog-form select { width:100%; height:44px; border:1px solid var(--line); border-radius:8px; padding:0 12px; background:#fff; color:var(--ink); }
.dialog-form .btn { justify-self:end; }
.form-hint { color:var(--muted); font-size:11px; }
.status-select { min-width:110px; min-height:44px; }
.sidebar-backdrop { position:fixed; inset:0; z-index:30; background:#102a4355; }
@media (max-width:1200px) {
  .dashboard-grid { grid-template-columns:minmax(0,1fr) 275px; gap:18px; }
  .content { padding:28px 24px 24px; }
  .topbar { padding:12px 24px; }
  .workspace-search span,.workspace-search kbd { display:none; }
  .workspace-search { width:44px; justify-content:center; }
  .metric { padding:16px; }
  .metric .label { font-size:10px; }
}
@media (max-width:1080px) {
  .cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-grid,.grid-2 { grid-template-columns:1fr; }
  .dashboard-grid>aside { display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:start; }
  .dashboard-grid>aside>section:last-child { grid-column:1/-1; }
  .metric { min-height:158px; }
  .metric .label { font-size:11px; }
}
@media (max-width:800px) {
  .app { grid-template-columns:1fr; }
  .sidebar { position:fixed; z-index:40; width:268px; height:100dvh; transform:translateX(-100%); transition:transform .2s; }
  .sidebar.open { transform:none; box-shadow:14px 0 34px #102a4326; }
  .sidebar-close { display:grid; position:absolute; right:10px; top:8px; width:44px; }
  .menu-button { display:grid; }
  .menu-open { overflow:hidden; }
  .topbar { min-height:68px; padding:10px 16px; gap:8px; }
  .breadcrumb>span { display:none; }
  .top-actions { gap:5px; }
  .content { padding:24px 20px; }
  .prototype-bar { padding:7px 20px; }
  .top-avatar { display:none; }
  .role-select { max-width:125px; }
  .page-head { gap:16px; }
}
@media (max-width:540px) {
  .page-head { align-items:flex-start; flex-direction:column; }
  .page-head .btn { align-self:flex-start; }
  .breadcrumb { font-size:10px; }
  .breadcrumb strong { max-width:100px; overflow:hidden; text-overflow:ellipsis; }
  .notification-button { display:none; }
  .content { padding:22px 16px; }
  .prototype-disclaimer { display:none; }
  .prototype-bar { padding:7px 16px; font-size:9px; }
  .cards { gap:10px; }
  .metric { min-height:149px; padding:14px; }
  .metric .value { font-size:27px; }
  .metric-top { gap:4px; align-items:flex-start; }
  .metric .label { font-size:10px; }
  .metric-icon { width:24px; height:24px; }
  .metric-icon .icon { width:14px; height:14px; }
  .metric .detail { font-size:9px; }
  .overview-strip { flex-wrap:wrap; gap:8px 12px; font-size:10px; }
  .overview-strip>span:nth-child(2) { padding-left:12px; }
  .overview-strip>a { display:none; }
  .dashboard-grid>aside { grid-template-columns:1fr; gap:0; }
  .panel { padding:18px; }
  .panel-head { gap:10px; }
  .collection-panel .panel-head { align-items:flex-start; flex-direction:column; }
  .chart-bars { gap:10px; padding:0 5px; }
  .chart-summary { flex-wrap:wrap; gap:8px; }
  .priority-item { gap:9px; }
  .priority-item>.badge { display:none; }
  .priority-item strong { font-size:11px; }
  .priority-item small { font-size:9px; }
  .filters .select { flex:1; min-width:0; }
  .search { flex-basis:100%; min-width:0; width:100%; }
  .parent-hero { grid-template-columns:1fr; padding:22px; }
  .child-picker { width:100%; }
  .circular { grid-template-columns:36px 1fr; padding:14px; gap:10px; }
  .circular-icon { width:36px; height:36px; }
  .circular>.badge { grid-column:2; justify-self:start; }
  .portal-dialog { padding:20px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*:before,*:after { animation:none !important; transition:none !important; }
}
@page timetablePage { size:A4 landscape; margin:8mm; }
body[data-page="timetable"] { page:timetablePage; }
@media print {
  .sidebar,.topbar,.prototype-bar,.workspace-footer,.page-head>.btn,.results-actions,.results-picker,.results-source-note,.filters,.toast,dialog,.skip-link { display:none !important; }
  #results > .page-head { display:none !important; }
  .app,.dashboard-grid,.grid-2 { display:block; }
  .content { padding:0; }
  .panel,.card { box-shadow:none; break-inside:avoid; }
  .table-wrap { overflow:visible; }
  #timetable .timetable-toolbar { display:none !important; }
  #timetable .timetable-heading { padding:8px 0; }
  #timetable .timetable-heading p { margin:0; }
  #timetable .timetable-scroll { overflow:visible; border:0; }
  #timetable .timetable { grid-template-columns:22mm repeat(8,minmax(0,1fr)); min-width:0; border-radius:0; }
  #timetable .time-cell,#timetable .day-cell,#timetable .period-cell { min-height:20mm; padding:3mm 2mm; }
  #timetable .day-cell.period-heading { min-height:12mm; padding:2mm 1mm; }
  #timetable .period-cell strong { font-size:7pt; }
  #timetable .period-cell span,#timetable .period-cell small { font-size:6pt; }
  .result-table-wrap table { min-width:0; font-size:9px; }
  .result-table-wrap th,.result-table-wrap td { padding:6px; }
  .result-section { break-inside:avoid; }
  .full-result-card { padding:0 8mm; }
  body { background:white; }
}

/* Public parent fee payment */
.public-payment { min-height: 100vh; background: #f4f7fa; }
.public-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px max(20px, calc((100vw - 1180px) / 2)); background: #fff; border-bottom: 1px solid var(--line); }
.public-header .back-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; white-space: nowrap; }
.public-header .back-link:hover { background: var(--canvas); border-color: #cbd6df; }
.public-brand { display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; }
.public-brand .brand-logo { width:54px; height:58px; flex:0 0 auto; object-fit:contain; }
.public-brand .brand-mark { flex: 0 0 auto; border: 1px solid #dbe6ee; }
.public-brand strong, .public-brand small { display: block; }
.public-brand strong { font-family: Georgia, serif; font-size: 18px; }
.public-brand small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.payment-shell { max-width: 1180px; margin: 0 auto; padding: 26px 20px 56px; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--blue); text-decoration: none; font-size: 13px; font-weight: 750; }
.payment-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 25px; }
.payment-steps { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 11px; font-weight: 750; }
.payment-steps li { display: flex; align-items: center; gap: 7px; }
.payment-steps .step-number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: #e8eef3; font-size: 12px; }
.payment-steps .step-label-mobile { display: none; }
.payment-steps .active { color: var(--blue); }
.payment-steps .active .step-number { color: #fff; background: var(--blue); }
.verified-student { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-bottom: 20px; padding: 17px 20px; color: #fff; background: linear-gradient(125deg, var(--navy), var(--blue)); border-radius: var(--radius); box-shadow: var(--shadow); }
.student-badge { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--navy); background: #fff; font-weight: 900; }
.verified-student small { color: #bcd5e8; font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.verified-student h2 { margin: 1px 0 2px; color: #fff; }
.verified-student p { margin: 0; color: #d6e6f2; font-size: 12px; }
.verified-student .btn { min-width: 124px; color: var(--navy); border-color: var(--gold); background: var(--gold); white-space: nowrap; }
.verified-student .btn:hover { border-color: #efbd55; background: #efbd55; }
.student-details { margin-bottom: 20px; }
.student-details .panel-head { margin-bottom: 13px; }
.student-details .panel-head h2 { margin: 1px 0 0; }
.details-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.details-grid div { min-width: 0; padding: 12px 14px; background: #fbfcfd; }
.details-grid dt, .payment-period dt { margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.details-grid dd, .payment-period dd { margin: 0; color: var(--navy); font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.details-grid .overdue-text { color: var(--red); }
.payment-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; align-items: start; gap: 20px; }
.payment-panel { margin-bottom: 20px; }
.field-label { display: block; margin-bottom: 7px; color: var(--navy); font-size: 12px; font-weight: 800; }
.entry-field span { display: block; margin-bottom: 6px; color: var(--navy); font-size: 11px; font-weight: 800; }
.entry-field small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.entry-field i { color: var(--red); font-style: normal; }
.entry-field input { width: 100%; height: 42px; padding: 0 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.entry-field input[readonly] { color: var(--muted); background: #f7f9fb; }
.entry-field input:focus { outline: 3px solid var(--blue-soft); border-color: var(--blue); }
.entry-field input[aria-invalid="true"] { border-color: var(--red); }
.month-control-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.month-control-row .field-label { margin: 0; }
.month-control-row small { color: var(--muted); font-size: 10px; }
.overdue-pill { display: inline-block; padding: 2px 8px; border: 1px solid #f0c9c5; border-radius: 999px; color: var(--red); background: var(--red-soft); font-size: 10px; font-weight: 750; line-height: 1.5; }
.month-stepper { display: grid; grid-template-columns: 42px 58px 42px; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.month-stepper button { width: 42px; height: 42px; padding: 0; color: var(--blue); background: var(--blue-soft); border: 0; font-size: 23px; font-weight: 700; }
.month-stepper button:hover:not(:disabled) { color: #fff; background: var(--blue); }
.month-stepper button:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(23,105,170,.28); outline-offset: -3px; }
.month-stepper button:disabled { color: #aab6c0; background: #f4f6f8; cursor: not-allowed; }
.month-stepper output { height: 42px; display: grid; place-items: center; color: var(--navy); background: #fff; border-inline: 1px solid var(--line); font-size: 16px; font-weight: 900; }
.payment-period { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.payment-period div { padding: 11px 13px; background: var(--blue-soft); border-radius: 10px; }
.fee-months { display: grid; gap: 9px; }
.fee-month { display: grid; grid-template-columns: 32px minmax(120px, 1fr) minmax(190px, 1.4fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; }
.month-order { width: 28px; height: 28px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 9px; font-size: 11px; font-weight: 900; }
.month-name strong, .month-name small, .month-total strong { display: block; }
.month-name small { color: var(--muted); font-size: 10px; }
.month-components { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 10px; }
.month-components .late-text { color: var(--red); }
.month-total { text-align: right; }
.month-total .badge { margin-top: 4px; }
.gateway-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gateway-guidance { margin: 14px 0 0; }
.gateway-option { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.gateway-option.selected { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.gateway-option input { margin: 0; }
.gateway-option small, .gateway-option strong { display: block; }
.gateway-option small { color: var(--muted); font-size: 10px; }
.gateway-option i { visibility: hidden; color: var(--blue); font-style: normal; font-weight: 900; }
.gateway-option.selected i { visibility: visible; }
.gateway-logo { width: 42px; height: 34px; display: grid; place-items: center; color: #1261a0; background: #eaf4fb; border-radius: 7px; font-size: 11px; font-weight: 900; }
.gateway-logo.icici { color: #a43b22; background: #fff0e9; font-size: 9px; }
.help-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.help-panel p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.order-card { position: sticky; top: 20px; }
.mobile-summary-continue, .mobile-summary-back { display: none; }
.summary-row { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; color: var(--muted); font-size: 12px; }
.summary-row strong { color: var(--ink); }
.summary-row.total { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--navy); font-size: 14px; }
.summary-row.total strong { color: var(--navy); font-family: Georgia, serif; font-size: 24px; }
.green-text { color: var(--green) !important; }
.summary-caption { margin: -3px 0 17px; color: var(--muted); font-size: 10px; text-align: right; }
.payer-email-field { display: grid; gap: 6px; margin: 0 0 14px; color: var(--navy); font-size: 12px; font-weight: 750; }
.payer-email-field input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-weight: 450; }
.payer-email-field input:focus { outline: 3px solid var(--blue-soft); border-color: var(--blue); }
.payer-email-field input[aria-invalid="true"] { border-color: var(--red); }
.payer-email-field i { color: var(--red); font-style: normal; }
.payer-email-field small { color: var(--muted); font-size: 10px; font-weight: 450; }
.payer-email-field .email-error { color: var(--red); }
.consent { display: flex; gap: 9px; margin: 10px 0 15px; color: var(--muted); font-size: 11px; cursor: pointer; }
.consent input { flex: 0 0 auto; margin-top: 2px; }
.pay-button { width: 100%; min-height: 46px; }
.pay-button:disabled { cursor: not-allowed; opacity: .48; }
.trust-note { margin-top: 13px; color: var(--green); font-size: 10px; text-align: center; font-weight: 750; }
.prototype-note { margin: 12px 0 0; padding-top: 12px; color: var(--orange); border-top: 1px solid var(--line); font-size: 10px; text-align: center; }
.public-footer { display: flex; justify-content: space-between; gap: 20px; max-width: 1180px; margin: 0 auto; padding: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(7, 24, 39, .68); backdrop-filter: blur(4px); }
.modal-backdrop[hidden] { display: none; }
.gateway-modal { width: min(460px, 100%); padding: 28px; background: #fff; border-radius: 18px; box-shadow: 0 25px 70px rgba(0,0,0,.25); text-align: center; }
.gateway-modal > p { color: var(--muted); }
.modal-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 14px; color: var(--blue); background: var(--blue-soft); border-radius: 50%; font-size: 22px; font-weight: 900; }
.gateway-modal .notice { margin-top: 18px; text-align: left; }
.modal-actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.modal-open { overflow: hidden; }

@media (max-width: 900px) {
  .payment-heading { align-items: flex-start; flex-direction: column; }
  .payment-layout { grid-template-columns: 1fr; }
  .order-card { position: static; }
}
@media (max-width: 760px) {
  .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .public-header { padding: 12px 16px; }
  .public-brand strong { font-size: 14px; }
  .public-brand small { font-size: 9px; letter-spacing: .03em; }
  .public-brand .portal-word { display: none; }
  .payment-shell { padding: 20px 14px 40px; }
  .payment-steps { width: 100%; justify-content: center; gap: 28px; }
  .payment-steps li { flex-direction: column; text-align: center; }
  .payment-steps .step-label-full { display: none; }
  .payment-steps .step-label-mobile { display: block; font-size: 12px; }
  .verified-student { grid-template-columns: auto 1fr; }
  .verified-student form { grid-column: 1 / -1; width: 100%; }
  .verified-student form .btn { width: 100%; }
  .fee-month { grid-template-columns: 32px 1fr auto; }
  .month-components { grid-column: 2 / -1; }
  .gateway-options { grid-template-columns: 1fr; }
  .help-panel, .public-footer { align-items: flex-start; flex-direction: column; }
  .public-footer { align-items: center; gap: 4px; text-align: center; }
  .payment-layout:not(.mobile-summary-step) .order-card { display: none; }
  .mobile-summary-continue { display: flex; width: 100%; min-height: 48px; margin: 0 0 20px; }
  .payment-layout.mobile-summary-step > div:first-child { display: none; }
  .payment-layout.mobile-summary-step .order-card { display: block; }
  .payment-layout.mobile-summary-step .mobile-summary-back { display: flex; width: 100%; margin: 0 0 14px; }
}
@media (max-width: 340px) {
  .details-grid { grid-template-columns: 1fr; }
  .month-control-row { align-items: flex-start; flex-direction: column; }
}

/* Match the public payment flow to the portal */
.public-payment { background:var(--canvas); }
.public-payment .prototype-bar { justify-content:center; }
.public-brand strong { font-family:Georgia,serif; }
.payment-shell { padding-top:30px; }
.gateway-options { grid-template-columns:1fr; }
.fee-month { grid-template-columns:28px minmax(105px,1fr) minmax(130px,1.25fr) auto; gap:10px; }
.gateway-option strong { font-size:12px; }
.gateway-option input,.consent input { accent-color:var(--blue); }
.entry-field span { font-size:12px; }
.entry-field small { font-size:11px; }
.consent { font-size:12px; line-height:1.6; }
.month-stepper { grid-template-columns:44px 58px 44px; }
.month-stepper button,.month-stepper output { height:44px; }
.month-stepper button { width:44px; }
.summary-row { font-size:13px; padding:7px 0; }
.summary-row.total { margin-top:5px; padding-top:10px; }
.summary-caption { margin-bottom:10px; }
.payer-email-field { gap:4px; margin-bottom:9px; }
.summary-row.total strong { font-family:inherit; font-weight:650; letter-spacing:-.5px; }
.payment-panel .subtitle { font-size:12px; }
.order-card { border-top:3px solid var(--navy); }
.trust-note { font-size:11px; }
.prototype-note { font-size:11px; }
.public-payment .public-brand small,
.public-payment .payment-steps,
.public-payment .help-panel p,
.public-payment .payer-email-field small { font-size:12px; }
.public-payment .verified-student small { font-size:11px; }
.public-payment .details-grid dt,
.public-payment .payment-period dt,
.public-payment .month-name small,
.public-payment .month-components,
.public-payment .gateway-option small,
.public-payment .summary-caption,
.public-payment .overdue-pill,
.public-payment .public-footer { font-size:11px; }
.public-payment .month-control-row small,
.public-payment .trust-note,
.public-payment .prototype-note { font-size:12px; }
.public-payment .badge { font-size:11px; }
@media (max-width:650px) {
  .fee-month { grid-template-columns:minmax(0,1fr) auto; gap:6px 10px; padding:10px 12px; }
  .month-order { display:none; }
  .month-name { grid-column:1; }
  .month-components { display:none; }
  .month-total { grid-column:2; grid-row:1; display:flex; align-items:center; gap:6px; }
  .month-total .badge { margin-top:0; }
  .payment-steps { font-size:10px; }
}
dialog.gateway-modal { border:1px solid var(--line); color:var(--ink); }
input[type="checkbox"] { width:18px; height:18px; accent-color:var(--blue); }
#bank td:first-child,#bank th:first-child { min-width:44px; padding:13px 10px; }

/* Focused teacher activities: no portal sidebar or administrative chrome. */
.teacher-activity { background:var(--canvas); color:var(--ink); }
.teacher-workspace { width:100%; max-width:1024px; margin:0 auto; padding:20px 28px 140px; }
.teacher-context { display:flex; align-items:center; gap:8px; margin-bottom:20px; color:var(--muted); font-size:11px; }
.teacher-back { display:grid; place-items:center; width:44px; height:44px; margin-left:-10px; border-radius:8px; color:var(--muted); }
.teacher-back:hover { background:#eaf0f5; color:var(--navy); }
.teacher-preview { margin-left:auto; font-size:10px; }
.teacher-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:20px; }
.teacher-heading h1 { margin:0 0 5px; font-size:26px; letter-spacing:-.6px; }
.teacher-heading p { margin:0; color:var(--muted); font-size:13px; }
.teacher-heading p>span { margin:0 5px; }
.teacher-analytics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); flex-shrink:0; width:420px; gap:12px; margin:0; padding:12px 16px; background:#fff; border:1px solid var(--line); border-radius:11px; text-align:center; }
.teacher-analytics dt { color:var(--muted); font-size:10px; white-space:nowrap; }
.teacher-analytics dd { margin:4px 0 0; font-size:24px; font-weight:650; line-height:1.25; letter-spacing:-.5px; font-variant-numeric:tabular-nums; }
.teacher-analytics-present dd { color:var(--green); }
.teacher-analytics-absent dd { color:var(--red); }
.teacher-analytics-marked dd { font-size:20px; line-height:30px; white-space:nowrap; }
.teacher-toolbar { display:flex; align-items:center; gap:10px; margin-bottom:20px; }
.teacher-search { display:flex; align-items:center; gap:10px; flex:1; min-width:0; padding:0 13px; background:#fff; border:1px solid var(--line); border-radius:9px; color:var(--muted); }
.teacher-search:focus-within { border-color:var(--blue); box-shadow:0 0 0 3px var(--blue-soft); }
.teacher-search>svg { flex-shrink:0; }
.teacher-search input { min-width:0; width:100%; min-height:48px; padding:10px 0; border:0; color:var(--ink); background:none; font-size:13px; }
.teacher-search input:focus { outline:none; }
.teacher-search input::placeholder { color:var(--muted); }
.teacher-filters { display:grid; grid-template-columns:repeat(3,1fr); gap:2px; padding:4px; background:#fff; border:1px solid var(--line); border-radius:9px; }
.teacher-filters button { min-height:40px; min-width:76px; padding:8px 14px; border:0; border-radius:6px; color:var(--muted); background:none; font-size:12px; font-weight:550; }
.teacher-filters button:hover { background:var(--canvas); color:var(--navy); }
.teacher-filters button.active { background:var(--navy); color:#fff; }
.teacher-list-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 2px; margin-bottom:10px; }
.teacher-list-heading h2 { margin:0; font-size:13px; }
.teacher-list-heading>span { font-size:11px; color:var(--muted); }
.teacher-students { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.teacher-student { display:flex; min-width:0; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.teacher-roll { display:grid; place-items:center; flex-shrink:0; width:34px; height:34px; background:#f1f4f7; color:var(--muted); border-radius:7px; font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; }
.teacher-student-name { min-width:0; flex:1; overflow-wrap:anywhere; font-size:13px; font-weight:550; }
.teacher-status { display:flex; align-items:center; justify-content:center; gap:6px; flex-shrink:0; min-width:98px; min-height:44px; padding:9px 12px; border:1px solid transparent; border-radius:7px; font-size:12px; font-weight:600; }
.teacher-status.is-present { color:var(--green); background:var(--green-soft); }
.teacher-status.is-present:hover { background:#dcefe6; border-color:#b7dace; }
.teacher-status.is-absent { color:var(--red); background:var(--red-soft); }
.teacher-status.is-absent:hover { background:#f8dfdc; border-color:#edc2bc; }
.teacher-empty { margin-top:10px; padding:35px 16px; border:1px solid var(--line); border-radius:10px; background:#fff; text-align:center; }
.teacher-empty strong { font-size:14px; font-weight:600; }
.teacher-empty p { margin:6px 0 16px; font-size:12px; color:var(--muted); }
.teacher-record-count { margin:12px 2px 0; font-size:11px; color:var(--muted); }
.teacher-savebar { position:fixed; bottom:0; inset-inline:0; z-index:10; padding:14px 28px max(14px,env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:rgba(255,255,255,.97); backdrop-filter:blur(10px); }
.teacher-savebar-inner { max-width:968px; display:flex; align-items:center; gap:20px; margin:0 auto; }
.teacher-save-summary { flex:1; min-width:0; }
.teacher-save-summary strong { display:block; font-size:13px; font-weight:600; }
.teacher-save-summary>span { display:block; margin-top:3px; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.teacher-save-summary .saved { color:var(--green); }
.teacher-save-summary .unsaved { color:var(--orange); }
.teacher-save-summary .save-error { color:var(--red); }
.teacher-savebar .btn { min-width:200px; min-height:46px; }
.teacher-savebar .btn:disabled { background:#edf5f1; border-color:#d6e7de; color:var(--green); opacity:1; }
@media (max-width:799px) {
  .teacher-heading { flex-wrap:wrap; gap:16px; }
  .teacher-analytics { width:100%; }
}
@media (max-width:639px) {
  .teacher-workspace { padding:10px 14px 160px; }
  .teacher-context { margin-bottom:13px; gap:6px; font-size:10px; }
  .teacher-preview { font-size:9px; }
  .teacher-heading { gap:14px; margin-bottom:16px; }
  .teacher-heading h1 { font-size:23px; }
  .teacher-heading p { font-size:11px; }
  .teacher-heading p>span { margin:0 3px; }
  .teacher-analytics { gap:4px; padding:11px 8px; }
  .teacher-analytics dt { font-size:9px; }
  .teacher-analytics dd { font-size:22px; }
  .teacher-analytics-marked dd { font-size:17px; line-height:27.5px; }
  .teacher-toolbar { flex-direction:column; align-items:stretch; gap:8px; margin-bottom:16px; }
  .teacher-search input { min-height:46px; }
  .teacher-filters button { min-height:44px; }
  .teacher-students { grid-template-columns:minmax(0,1fr); gap:8px; }
  .teacher-student { gap:10px; padding:9px 11px; }
  .teacher-student-name { font-size:12px; }
  .teacher-savebar { padding:10px 14px max(10px,env(safe-area-inset-bottom)); }
  .teacher-savebar-inner { flex-wrap:wrap; gap:8px; }
  .teacher-save-summary { flex-basis:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; }
  .teacher-save-summary strong { font-size:11px; flex-shrink:0; }
  .teacher-save-summary>span { margin:0; text-align:right; font-size:10px; }
  .teacher-savebar .btn { width:100%; min-height:46px; }
}
@media print {
  .teacher-back,.teacher-preview,.teacher-toolbar,.teacher-savebar,.teacher-record-count { display:none !important; }
  .teacher-workspace { padding:0; }
  .teacher-student { break-inside:avoid; }
}

/* Attendance entry: choose the register before starting the teacher activity. */
.attendance-selection-workspace { padding-bottom:40px; }
.attendance-selection-card { max-width:520px; margin:48px auto 0; padding:32px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 12px 40px rgba(21,52,75,.04); }
.attendance-selection-icon { display:grid; place-items:center; width:50px; height:50px; margin-bottom:18px; border-radius:12px; color:var(--blue); background:var(--blue-soft); }
.attendance-selection-card h1 { font-size:27px; margin-bottom:8px; }
.selection-intro { margin-bottom:26px; color:var(--muted); font-size:13px; }
.selection-teacher { display:flex; align-items:center; gap:12px; padding:16px; margin-bottom:24px; border:1px solid var(--line); border-radius:10px; background:var(--canvas); }
.selection-avatar { display:grid; place-items:center; flex-shrink:0; width:40px; height:40px; border-radius:50%; color:var(--navy); background:#e3eaf2; font-size:12px; font-weight:650; }
.selection-teacher>div { flex:1; min-width:0; }
.selection-teacher label { display:block; margin-bottom:2px; font-size:10px; color:var(--muted); }
.selection-teacher select { width:100%; min-height:44px; margin-left:-4px; padding:3px 2px; border:0; border-radius:4px; background:transparent; color:var(--ink); font-size:13px; font-weight:600; }
.selection-teacher p { margin:3px 0 0; font-size:11px; color:var(--muted); }
.selection-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px; align-items:end; gap:12px; }
.selection-fields label { display:grid; gap:7px; color:var(--ink); font-size:12px; font-weight:600; }
.selection-fields select { width:100%; min-height:46px; padding:10px 11px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font-size:13px; }
.selection-fields select:disabled { background:var(--canvas); color:var(--muted); cursor:not-allowed; opacity:.7; }
.selection-reset { min-height:46px; border:1px solid var(--line); background:#fff; }
.selection-hint { min-height:36px; margin:12px 0 22px; font-size:11px; line-height:1.6; color:var(--muted); }
.selection-continue { width:100%; min-height:48px; justify-content:space-between; padding:12px 16px; font-size:13px; }
.selection-continue.guest { background:#a65c18; border-color:#a65c18; }
.selection-continue.guest:hover:not(:disabled) { background:#8e4e13; border-color:#8e4e13; }
.selection-continue:disabled { cursor:not-allowed; opacity:.5; }
.selection-sample-note { margin:18px 0 0; color:var(--muted); text-align:center; font-size:10px; }
.teacher-preview.guest-role { color:var(--orange); }
.teacher-heading p>#registerClass,.teacher-heading p>#registerSection { margin:0; }
@media (max-width:639px) {
  .attendance-selection-card { margin-top:22px; padding:24px 20px; border-radius:14px; }
  .attendance-selection-card h1 { font-size:25px; }
  .selection-intro { font-size:12px; }
  .selection-fields { gap:8px; }
  .selection-fields select { padding:10px 7px; font-size:12px; }
  .selection-teacher { padding:12px; }
  .teacher-preview#registerTeacherRole { max-width:180px; text-align:right; }
}

/* Bank counter collections */
.entry-field select { width:100%; height:42px; padding:0 12px; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:10px; }
.bank-collection-panel { margin:20px 0; }
.bank-collection-panel .panel-head { align-items:flex-start; }
.bank-collection-panel .panel-caption { max-width:650px; }
.bank-collection-form { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px 16px; }
.bank-collection-form .entry-field { min-width:0; }
.bank-collection-form .entry-field small { min-height:14px; font-size:10px; }
.bank-collection-form input:disabled { color:var(--muted); background:#f5f7f9; cursor:not-allowed; }
.bank-submit-row { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:18px; padding-top:5px; border-top:1px solid var(--line); }
.bank-submit-row .form-hint { max-width:650px; margin:10px 0 0; line-height:1.55; }
@media (max-width:800px) {
  .bank-collection-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:440px) {
  .bank-collection-form { grid-template-columns:minmax(0,1fr); }
  .bank-submit-row { align-items:stretch; flex-direction:column; gap:10px; }
  .bank-submit-row .btn { width:100%; }
}
