:root {
    --ink: #1a2420;
    --muted: #5c675f;
    --forest: #1c3a30;
    --forest-2: #2a5646;
    --canopy: #3f7a62;
    --gold: #8d6424;
    --gold-line: #d7b56a;
    --paper: #f3efe6;
    --paper-2: #e7e0d2;
    --card: #fbf8f3;
    --line: #ddd4c4;
    --danger: #8c332c;
    --danger-bg: #f8e7e3;
    --ok: #1d6844;
    --ok-bg: #e4f2ea;
    --warn: #8a5a12;
    --warn-bg: #f8efd9;
    --info: #1d4e70;
    --info-bg: #e5f0f6;
    --shadow: 0 18px 50px rgba(28, 42, 34, 0.08);
    --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
    --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
}
h1, h2, h3, .brand strong { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }
h1 { font-size: 2.1rem; line-height: 1.15; margin: 0; }
h2 { font-size: 1.35rem; margin: 0 0 0.8rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }
p { margin: 0; }
a { color: var(--forest-2); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.skip {
    position: absolute; left: 1rem; top: -4rem; background: var(--forest); color: white;
    padding: 0.5rem 0.8rem; z-index: 50;
}
.skip:focus { top: 0.5rem; }

.frame { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
    background: var(--forest);
    color: #f4efe4;
    padding: 1.3rem 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.brand { display: flex; gap: 0.75rem; align-items: center; color: inherit; text-decoration: none; }
.mark {
    width: 36px; height: 36px; border-radius: 10px; background:
        linear-gradient(var(--gold-line), var(--gold-line)) center/18px 2px no-repeat,
        linear-gradient(135deg, transparent 46%, var(--gold-line) 46% 54%, transparent 54%) center/22px 22px no-repeat,
        #143028;
    border: 1px solid rgba(228, 200, 138, 0.45);
}
.brand strong { display: block; font-size: 1.25rem; }
.brand em { display: block; font-style: normal; color: #d9d0c0; font-size: 0.78rem; }
.side-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.side-nav a {
    color: #efe8db; text-decoration: none; padding: 0.45rem 0.7rem; border-radius: 8px;
}
.side-nav a:hover, .side-nav a.is-active { background: rgba(255, 255, 255, 0.08); }
.side-nav a.is-active { box-shadow: inset 3px 0 0 var(--gold-line); }
.side-user { margin-top: auto; display: grid; gap: 0.2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.12); }
.side-user span, .muted, .kicker { color: var(--muted); }
.side-user span { color: #d5cdbf; font-size: 0.85rem; }
.workspace { min-width: 0; }
.topbar {
    display: flex; gap: 1rem; align-items: center; justify-content: space-between;
    padding: 0.9rem 1.6rem; border-bottom: 1px solid var(--line); background: rgba(251, 248, 243, 0.9);
}
.topbar-school { color: var(--muted); font-size: 0.92rem; }
.topbar time { font-variant-numeric: tabular-nums; margin-left: 0.45rem; }
main { padding: 1.6rem; max-width: 1180px; }
.page-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; margin-bottom: 1.2rem; }
.gradebook-head { align-items: flex-start; }
.weight-note { width: min(22rem, 100%); margin-left: auto; background: var(--forest); color: #f6f1e6; border-radius: 18px; padding: 0.95rem 1rem 1.05rem; box-shadow: var(--shadow); }
.weight-note .kicker { color: var(--gold-line); margin-bottom: 0.55rem; }
.weight-note p { margin: 0; color: #efe8db; font-size: 0.92rem; line-height: 1.5; }
.weight-note strong { display: block; font-family: var(--serif); color: #fff; font-weight: 560; margin-bottom: 0.2rem; }
.weight-note [lang="bn"] { font-family: "Noto Sans Bengali", var(--sans); line-height: 1.75; margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid rgba(215, 181, 106, 0.4); }
.weight-note [lang="bn"] strong { font-family: "Noto Serif Bengali", var(--serif); }
.kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; margin-bottom: 0.3rem; }
.lede { color: var(--muted); max-width: 42rem; margin-top: 0.4rem; }

.btn,
button.btn,
a.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    border-radius: 999px; padding: 0.62rem 1.05rem; border: 1px solid #5f6b64;
    text-decoration: none; background-color: #ffffff; color: #1a2420;
    font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(26, 36, 32, 0.08);
}
button.btn.btn-primary,
a.btn.btn-primary,
label.btn.btn-primary {
    background-color: #146b43; color: #ffffff; border-color: #0e4e31;
    box-shadow: 0 2px 0 #0c3d26;
}
button.btn.btn-primary:hover,
a.btn.btn-primary:hover,
label.btn.btn-primary:hover,
button.btn.btn-primary:focus-visible,
a.btn.btn-primary:focus-visible,
label.btn.btn-primary:focus-visible {
    background-color: #0e5233; color: #ffffff; border-color: #0a3b25;
}
button.btn.btn-ghost,
a.btn.btn-ghost {
    background-color: #ffffff; color: #1a2420; border-color: #5f6b64;
    box-shadow: none;
}
button.btn.btn-ghost:hover,
a.btn.btn-ghost:hover {
    background-color: #e7f3ec; color: #143026; border-color: #146b43;
}
.sidebar button.btn.btn-ghost {
    background-color: transparent; color: #f6f1e6; border-color: rgba(246, 241, 230, 0.55);
    width: fit-content; margin-top: 0.45rem;
}
.sidebar button.btn.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.12); color: #ffffff; border-color: #ffffff;
}
button.btn.btn-danger,
a.btn.btn-danger {
    background-color: #9c342c; color: #ffffff; border-color: #7a2721;
    box-shadow: 0 2px 0 #641f1a;
}
button.btn.btn-danger:hover,
a.btn.btn-danger:hover {
    background-color: #7f2923; color: #ffffff;
}
button.btn:disabled,
button.btn[disabled] {
    opacity: 0.55; cursor: not-allowed;
}
.nav-toggle {
    display: none; background: #ffffff; color: #1a2420; border: 1px solid #5f6b64;
    border-radius: 999px; padding: 0.4rem 0.8rem; font-weight: 600;
}

.panel {
    background: var(--card); border: 1px solid var(--line); border-radius: 18px;
    padding: 1rem 1.1rem; box-shadow: var(--shadow);
}
.report { margin-inline: auto; }
.report-year { width: min(100%, 297mm); }
.report-head { text-align: center; padding-bottom: 0.7rem; margin-bottom: 0.8rem; border-bottom: 2px solid var(--forest); }
.report-school { font-family: var(--serif); font-size: clamp(1.9rem, 3vw, 2.5rem); color: var(--forest); margin: 0.1rem 0; line-height: 1.1; }
.report-motto { font-style: italic; margin: 0.15rem 0 0.4rem; font-size: 1.05rem; }
.report-head h1 { font-size: 1.05rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0.7rem 0 0.2rem; }
.report-head p { margin: 0.12rem 0; font-size: 1rem; }
.report-head .fine { font-size: 0.98rem; }
.report-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem 0.9rem; margin: 0 0 0.85rem; }
.report-facts div { border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }
.report-facts dt { font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.report-facts dd { margin: 0.12rem 0 0; font-weight: 600; font-size: 1.05rem; }
.report-name { margin: 0 0 0.5rem; font-size: 1.6rem; }
.report .stat { padding: 0.6rem 0.8rem; }
.report .stat span { font-size: 0.95rem; }
.report .stat strong { font-size: 1.7rem; }
.report .stat-row { margin-bottom: 0.85rem; }
.report th, .report td { padding: 0.5rem 0.35rem; font-size: 1rem; }
.report th { font-size: 0.84rem; }
.report td:not(:first-child), .report th:not(:first-child) { text-align: center; }
.merit-table td:nth-child(2), .merit-table th:nth-child(2) { text-align: left; }
.report table { table-layout: fixed; }
.stack { display: grid; gap: 1rem; }
.stat-grid, .split, .thirds { display: grid; gap: 1rem; }
.stat-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 1rem; }
.stat-grid.wide { grid-template-columns: repeat(5, minmax(0, 1fr)); }
a.stat { color: inherit; text-decoration: none; }
a.stat.is-selected { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.split { grid-template-columns: 1.4fr 0.8fr; }
.thirds { grid-template-columns: 1.2fr 0.8fr; }
.stat strong { display: block; font-family: var(--serif); font-size: 1.8rem; margin-top: 0.2rem; }
.stat span, .fine { color: var(--muted); font-size: 0.92rem; }

.table-wrap { overflow-x: auto; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.accounts-sheet td:last-child:not([colspan]), .accounts-sheet th:last-child { text-align: right; white-space: nowrap; }
.pick { width: 2.2rem; }
.pick input { width: 1rem; height: 1rem; accent-color: var(--forest); }
.accounts-sheet tr.sheet-total td { font-weight: 700; }
.accounts-sheet tr.sheet-balance td { font-weight: 700; border-top: 2px solid var(--forest); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0.9rem 1rem; }
.stat span { color: var(--muted); font-size: 0.85rem; }
.stat strong { display: block; font-family: var(--serif); font-size: 1.45rem; margin-top: 0.2rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.65rem 0.45rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

.pill {
    display: inline-flex; align-items: center; border-radius: 999px; padding: 0.12rem 0.55rem;
    font-size: 0.78rem; background: var(--paper-2); color: var(--ink);
}
.pill-enrolled, .pill-present, .pill-paid, .pill-accepted, .pill-active { background: var(--ok-bg); color: var(--ok); }
.pill-partial, .pill-late, .pill-offered, .pill-assessment, .pill-under_review { background: var(--warn-bg); color: var(--warn); }
.pill-issued, .pill-inquiry, .pill-submitted { background: var(--info-bg); color: var(--info); }
.pill-absent, .pill-void, .pill-declined, .pill-withdrawn, .pill-suspended, .pill-inactive, .pill-unpaid { background: var(--danger-bg); color: var(--danger); }
.pill-excused, .pill-medical, .pill-waitlisted, .pill-alumni { background: var(--paper-2); }

.flash { border-radius: 14px; padding: 0.8rem 1rem; margin-bottom: 1rem; background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--danger-bg); color: var(--danger); }
.flash ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.filters, .inline { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; }
.status-form select {
    width: auto; min-width: 9.5rem; background: white; border: 1px solid var(--line);
    border-radius: 10px; padding: 0.4rem 0.55rem; font: inherit;
}
.field { display: grid; gap: 0.28rem; min-width: 0; }
.reveal { position: relative; display: block; }
.reveal input { padding-right: 4.4rem; }
.reveal-toggle {
    position: absolute; right: 0.45rem; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: var(--forest); font: inherit; font-weight: 600; cursor: pointer;
}
.field[hidden] { display: none; }
.field span, .check span { font-size: 0.86rem; }
.field input, .field select, .field textarea, .inline input, .inline select {
    width: 100%; background: white; border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.7rem;
}
.combo { position: relative; }
.field .combo-input { padding-right: 2.3rem; }
.combo-toggle {
    position: absolute; top: 0; right: 0; width: 2.3rem; height: 100%;
    border: 0; background: transparent; color: var(--muted); cursor: pointer;
    display: grid; place-items: center;
}
.combo-toggle::before {
    content: ""; width: 0.45rem; height: 0.45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-0.12rem) rotate(45deg);
}
.combo-native {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.combo-list {
    position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 16px 36px rgba(28, 58, 48, 0.18); max-height: 240px; overflow: auto; padding: 0.3rem;
}
.combo-option {
    display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px;
    padding: 0.5rem 0.65rem; cursor: pointer; color: var(--ink); font: inherit;
}
.combo-option:hover, .combo-option.is-active, .combo-option.is-current { background: #e7efe9; color: var(--forest); }
.combo-group { padding: 0.45rem 0.65rem 0.15rem; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.combo-empty, .combo-hint { color: var(--muted); }
.combo-empty { padding: 0.55rem 0.65rem; }
.combo-hint { margin: 0.28rem 0 0; font-size: 0.82rem; }
textarea { min-height: 7rem; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.span-2 { grid-column: span 2; }
.checks { display: flex; flex-wrap: wrap; gap: 0.8rem 1rem; }
.check { display: flex; gap: 0.45rem; align-items: center; }
.menu-group { margin-top: 0.9rem; }
.menu-group h3 { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem 1rem; }
.stack-form { display: grid; gap: 1rem; }
.section-title { margin: 1.2rem 0 0.6rem; }
.exam-section { margin-top: 1.1rem; padding-top: 0.2rem; }
.exam-row { display: grid; grid-template-columns: 0.8fr 1.1fr 0.9fr 0.7fr auto; gap: 0.6rem; align-items: end; margin: 0.7rem 0; }
.exam-row .btn { margin-bottom: 0.15rem; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.9rem; }
.person-card {
    display: grid; grid-template-columns: 92px 1fr; gap: 0.95rem; align-items: start;
    background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 0.95rem;
}
.person-card > a { text-decoration: none; color: inherit; }
.person-meta { display: grid; gap: 0.2rem; min-width: 0; }
.person-meta h2 { font-size: 1.28rem; margin: 0; }
.person-meta h2 a { color: inherit; text-decoration: none; }
.person-meta h2 a:hover { color: var(--forest-2); }
.person-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.65rem; }
.portrait {
    width: 92px; height: 112px; border-radius: 16px; overflow: hidden; flex: none;
    display: grid; place-items: center; background: #e7efe9; color: var(--forest);
    border: 1px solid var(--line); font-family: var(--serif); font-size: 1.55rem;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.portrait-lg { width: 120px; height: 148px; font-size: 2rem; }
.person { display: flex; gap: 0.7rem; align-items: center; text-decoration: none; color: inherit; }
.avatar, .avatar-lg {
    display: grid; place-items: center; border-radius: 50%; background: #e7efe9; color: var(--forest);
    font-weight: 600; flex: none;
}
.avatar { width: 36px; height: 36px; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar-lg img, .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.dossier-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.dossier-id { display: flex; gap: 0.9rem; align-items: center; }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.35rem; }
.bar-row { display: grid; grid-template-columns: 7rem 1fr 2rem; gap: 0.6rem; align-items: center; margin: 0.35rem 0; }
.bar { height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--canopy); }
.empty { color: var(--muted); padding: 0.6rem 0; }
.list { display: grid; gap: 0.8rem; }
.list article { padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.list article:last-child { border-bottom: 0; padding-bottom: 0; }
.pager { display: flex; gap: 0.8rem; align-items: center; margin-top: 0.8rem; }
.pager a { text-decoration: none; }
.pager-disabled { color: var(--muted); }
.timetable { min-width: 640px; }
.note { background: var(--gold-line); color: var(--ink); border-radius: 12px; padding: 0.7rem 0.85rem; }

.marketing { background: var(--paper); }
.m-nav, .hero, .covers, .band, .m-foot, .poster { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.m-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 0; }
.m-links { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.m-links a:not(.btn) { color: var(--forest); font-weight: 600; text-decoration: none; }
.m-links a:not(.btn):hover { text-decoration: underline; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.m-links .lang-switch a { padding: 0.38rem 0.75rem; text-decoration: none; }
.m-links .lang-switch a.is-on { background: var(--forest); color: #f6f1e6; }
.m-links .lang-switch a.is-on:hover { text-decoration: none; color: #f6f1e6; }
body.lang-bn { font-family: "Noto Sans Bengali", var(--sans); }
body.lang-bn h1,
body.lang-bn h2,
body.lang-bn h3,
body.lang-bn .dayline strong { font-family: "Noto Serif Bengali", var(--serif); letter-spacing: 0; }
body.lang-bn .poster-mast h1 { max-width: 11em; line-height: 1.28; }
body.lang-bn .poster-mast .lede,
body.lang-bn .dayline li,
body.lang-bn .feature-board li,
body.lang-bn .hero .lede,
body.lang-bn .band p,
body.lang-bn .covers p,
body.lang-bn .dossier-card .lede { line-height: 1.7; }
body.lang-bn .hero h1 { line-height: 1.25; }
.word { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.28rem; font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--forest); text-decoration: none; }
.word small { font-family: var(--sans); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em; line-height: 1.2; color: var(--muted); }
.auth-copy .word small { color: var(--gold-line); }
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: center; padding: 1.5rem 0 3rem; }
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); }
.hero .lede { font-size: 1.12rem; margin: 1rem 0 1.3rem; }
.actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.dossier-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 1.1rem; box-shadow: var(--shadow); }
.dossier-card header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.ring {
    width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
    background: conic-gradient(var(--canopy) 0 82%, var(--paper-2) 82% 100%);
}
.ring span { width: 54px; height: 54px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-family: var(--serif); }
.covers { display: grid; gap: 1.35rem; margin: -0.2rem auto 2.4rem; }
.covers h2 {
    margin: 0 0 0.7rem;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
body.lang-bn .covers h2 { font-family: "Noto Serif Bengali", var(--serif); letter-spacing: 0; text-transform: none; font-size: 1.05rem; }
.cover-row { display: grid; gap: 0.75rem; }
.cover-row-3 { grid-template-columns: repeat(3, 1fr); }
.cover-row-5 { grid-template-columns: repeat(5, 1fr); }
.cover-row article {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem 0.9rem 0.95rem;
    box-shadow: var(--shadow);
}
.cover-row h3 { margin: 0 0 0.25rem; font-size: 1.28rem; }
.cover-row p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.cover-feature {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem 1.05rem 1.05rem;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--forest);
}
.cover-feature h2 {
    margin: 0 0 0.25rem;
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 560;
    letter-spacing: -0.03em;
    text-transform: none;
    color: var(--ink);
}
body.lang-bn .cover-feature h2 { font-family: "Noto Serif Bengali", var(--serif); font-size: 1.45rem; }
.cover-feature p { margin: 0; color: var(--muted); }
.band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-bottom: 3rem; }
.band article { padding: 1rem; border-top: 2px solid var(--forest); }
.m-foot { padding: 1rem 0 2rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-credit {
    margin: 0;
    padding: 0.75rem 1.2rem 1rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.86rem;
}
.site-credit-sep { margin: 0 0.45rem; }
.site-credit a { color: var(--forest-2); font-weight: 600; text-decoration: none; }
.site-credit a:hover { text-decoration: underline; }
.m-foot .site-credit {
    flex: 1 0 100%;
    padding: 0.75rem 0 0;
    border-top: 1px solid var(--line);
}
.app-body { min-height: 100vh; display: flex; flex-direction: column; }
.app-body .frame { flex: 1 0 auto; min-height: auto; }
.app-body .site-credit { border-top: 1px solid var(--line); background: var(--card); }
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-page .auth-shell { flex: 1 0 auto; min-height: auto; }
body.marketing { min-height: 100vh; display: flex; flex-direction: column; }
body.marketing > .m-foot,
body.marketing > .site-credit { margin-top: auto; }
.poster .m-foot { width: auto; margin: 0; }
.poster-section { margin: 1.15rem 0 0; font-family: var(--serif); font-size: 1.35rem; color: var(--ink); }
.owner-note { margin: 0.35rem 0 0; color: var(--muted); font-size: 1rem; }
.poster { padding-bottom: 1rem; }
.print-page { display: contents; }
.reasons, .sheet-two { display: grid; gap: 1rem; margin-top: 1rem; }
.poster-section + .reasons, .owner-note + .sheet-two { margin-top: 0.7rem; }
.reasons { grid-template-columns: repeat(4, 1fr); }
.sheet-two { grid-template-columns: repeat(3, 1fr); }
.reasons article {
    background: var(--forest);
    color: #f6f1e6;
    border-radius: 18px;
    padding: 1rem 1rem 1.1rem;
}
.reasons h2 { color: #fff; font-size: 1.35rem; margin-bottom: 0.45rem; }
.reasons p { color: #d9d0c0; }
.reasons .kicker { color: var(--gold-line); }
.poster-mast {
    background: var(--forest);
    color: #f6f1e6;
    border-radius: 28px;
    padding: 2rem 1.6rem 1.5rem;
    box-shadow: var(--shadow);
}
.poster-mast .kicker { color: var(--gold-line); }
.poster-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; margin: 0 0 1.15rem; }
.poster-brand span { font-family: var(--serif); font-size: 1.7rem; line-height: 1; color: #f6f1e6; }
.poster-brand small { font-family: var(--sans); font-size: 0.92rem; font-weight: 500; letter-spacing: 0.04em; line-height: 1.2; color: var(--gold-line); }
body.lang-bn .poster-brand small { font-family: "Noto Sans Bengali", var(--sans); letter-spacing: 0; }
.poster-mast h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); max-width: 16ch; }
.poster-mast .lede { color: #d9d0c0; font-size: 1.08rem; margin-top: 0.8rem; }
.dayline {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.7rem;
}
.moneyline { grid-template-columns: repeat(5, 1fr); }
.dayline li {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 0.8rem 0.75rem;
    font-size: 0.92rem;
    color: #efe8db;
}
.dayline strong { display: block; font-family: var(--serif); font-size: 1.15rem; color: #fff; margin-bottom: 0.25rem; }
.money-label { margin: 1.1rem 0 0; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-line); }
.moneyline { margin-top: 0.55rem; }
body.lang-bn .money-label { letter-spacing: 0; font-family: "Noto Serif Bengali", var(--serif); text-transform: none; }
.poster article {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.1rem 1.1rem 0.4rem;
    border-top: 3px solid var(--forest);
}
.poster article h2 { font-size: 1.45rem; }
.poster article ul { list-style: none; margin: 0; padding: 0; }
.poster article li { padding: 0.7rem 0; border-top: 1px solid var(--line); }
.poster article li strong { font-weight: 600; }
.poster article.poster-invite {
    background: #143028;
    color: #f6f1e6;
    border-color: #143028;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding-bottom: 1.2rem;
}
.poster-invite .kicker { color: var(--gold-line); }
.poster-invite h2, .poster-invite p { color: #f6f1e6; }
.poster-invite p { color: #d9d0c0; }
.poster-invite .btn { align-self: flex-start; margin-top: 0.3rem; }
.poster .reasons article {
    background: var(--forest);
    color: #f6f1e6;
    border-color: var(--forest);
    border-top-color: var(--gold-line);
    padding: 1rem 1rem 1.1rem;
}
.poster .reasons h2 { color: #fff; font-size: 1.35rem; }
.poster .reasons p { color: #d9d0c0; border: 0; padding: 0; }
.poster .reasons .kicker { color: var(--gold-line); }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-copy { background: var(--forest); color: #f6f1e6; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-copy h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); }
.auth-panel { display: grid; align-content: center; padding: 2rem; }
.auth-card { width: min(440px, 100%); margin: 0 auto; }
.demo { margin-top: 1.2rem; }
.demo td, .demo th { font-size: 0.92rem; }

@media (max-width: 980px) {
    .frame { grid-template-columns: 1fr; }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); transform: translateX(-105%); z-index: 30; transition: transform 0.2s ease; }
    body.nav-open .sidebar { transform: none; }
    .nav-toggle { display: inline-flex; }
    .stat-grid, .stat-grid.wide, .split, .thirds, .hero, .band, .auth-shell, .form-grid, .menu-grid, .people-grid, .exam-row, .reasons, .sheet-two { grid-template-columns: 1fr; }
    .cover-row-3 { grid-template-columns: 1fr; }
    .cover-row-5 { grid-template-columns: 1fr 1fr; }
    .cover-row-5 article:last-child { grid-column: 1 / -1; }
    .dayline { grid-template-columns: 1fr 1fr; }
    .m-nav { align-items: flex-start; flex-wrap: wrap; }
    .span-2 { grid-column: auto; }
    .auth-copy { display: none; }
    main { padding: 1rem; }
}
@page result {
    size: A4;
    margin: 7mm;
}
@page result-year {
    size: A4 landscape;
    margin: 7mm;
}
.report { page: result; }
.report-year { page: result-year; }
@page poster {
    size: A4;
    margin: 7mm;
}
@media print {
    .no-print, .id-side { display: none !important; }
    .id-sheet { display: flex; gap: 8mm; justify-content: flex-start; }
    .id-face { width: 85.6mm; }
    .id-card, .id-band, .id-return, .id-photo, .id-sign img { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    html, body.marketing { margin: 0 !important; padding: 0 !important; background: white; font-size: 11pt; line-height: 1.35; }
    .poster { display: block; page: poster; width: 100%; }
    .poster-mast { border-radius: 0; box-shadow: none; padding: 0 0 6px; background: white; color: #1a2420; break-after: avoid; page-break-after: avoid; }
    .poster-mast .kicker { margin-bottom: 2px; font-size: 9pt; }
    .poster-brand { margin: 0 0 6px; gap: 1px; }
    .poster-brand span { font-size: 16pt; color: #1a2420; }
    .poster-brand small { font-size: 11pt; color: #1a2420; letter-spacing: 0.02em; }
    .poster-mast h1 { font-size: 30pt; max-width: none; line-height: 1.12; }
    .poster-mast .lede { font-size: 12.5pt; margin-top: 6px; max-width: 40em; }
    .poster-mast .kicker, .poster-mast h1, .poster-mast .lede, .dayline li, .dayline strong { color: #1a2420; }
    .dayline { grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 10px; }
    .moneyline { grid-template-columns: repeat(5, 1fr); }
    .money-label { margin: 6px 0 0; font-size: 9pt; letter-spacing: 0.04em; color: #1a2420; }
    .moneyline { margin-top: 4px; }
    .dayline li { background: white; border: 1px solid #ccc; padding: 6px; font-size: 10pt; line-height: 1.3; }
    .dayline strong { font-size: 12pt; margin-bottom: 2px; }
    .print-page { display: flex; flex-direction: column; overflow: hidden; }
    .print-page-1 { height: 276mm; max-height: 276mm; break-after: page; page-break-after: always; }
    .print-page-2 { height: auto; max-height: none; overflow: visible; break-before: page; page-break-before: always; }
    .poster-section { margin: 2mm 0 0; font-size: 11pt; color: #1a2420; }
    .owner-note { margin: 0 0 1mm; font-size: 8pt; color: #1a2420; }
    .reasons { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; flex: 1; gap: 3mm; margin-top: 3mm; min-height: 0; }
    .poster .reasons article, .poster .reasons h2, .poster .reasons p, .poster .reasons .kicker { color: #1a2420; background: white; }
    .reasons article { border: 1px solid #ccc; border-radius: 8px; padding: 6px 8px; border-top-color: #ccc; }
    .sheet-two { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: none; gap: 2mm 3mm; margin-top: 0; align-items: start; flex: 0 0 auto; }
    .sheet-two article { height: auto; align-self: stretch; }
    .print-page article { padding: 3px 6px 2px; border-radius: 6px; break-inside: avoid; page-break-inside: avoid; }
    .print-page h2 { font-size: 11pt; margin-bottom: 1px; line-height: 1.2; }
    .print-page .kicker { font-size: 7.5pt; margin-bottom: 0; }
    .print-page article li { padding: 1px 0; font-size: 7.5pt; line-height: 1.22; }
    .feature-board article, .poster-invite { box-shadow: none; background: white; color: #1a2420; border-color: #ccc; }
    .poster-invite { align-self: stretch; height: 100%; padding-bottom: 8px; }
    .poster-invite h2, .poster-invite p, .poster-invite .kicker { color: #1a2420; }
    body.lang-bn .poster-mast h1 { max-width: none; font-size: 22pt; line-height: 1.15; }
    body.lang-bn .poster-mast .lede,
    body.lang-bn .dayline li,
    body.lang-bn .print-page article li { line-height: 1.3; }
    .print-page-2 .m-foot { margin-top: 2mm; }
    .m-foot { width: 100%; padding: 8px 0 0; font-size: 9pt; break-before: avoid; page-break-before: avoid; }
    .frame { display: block; min-height: 0; }
    .app-body, .auth-page, body.marketing { display: block; min-height: 0; }
    .site-credit { padding: 6px 0 0; font-size: 9pt; background: transparent; border: 0; }
    body, .panel { background: white; box-shadow: none; }
    main { max-width: none; padding: 0; }
    .table-wrap { overflow: visible; }
    .report {
        width: 100%;
        border: 0;
        border-radius: 0;
        padding: 0;
        font-size: 13px;
        line-height: 1.35;
    }
    .report-year { width: 100%; }
    .report-school { font-size: 24px; }
    .report-head { padding-bottom: 6px; margin-bottom: 8px; }
    .report-head h1 { font-size: 14px; margin: 6px 0 2px; }
    .report-head p, .report-motto { font-size: 13px; }
    .report-head .fine { font-size: 12px; }
    .report-name { font-size: 20px; margin-bottom: 6px; }
    .report-facts { gap: 4px 10px; margin-bottom: 8px; }
    .report-facts dt { font-size: 11px; }
    .report-facts dd { font-size: 14px; }
    .report .stat { padding: 6px 10px; border-radius: 8px; }
    .report .stat span { font-size: 12px; }
    .report .stat strong { font-size: 20px; }
    .report .stat-row { gap: 8px; margin-bottom: 8px; }
    .report th, .report td { padding: 5px 4px; font-size: 13px; }
    .report th { font-size: 11px; }
    .report thead, .report tr { break-inside: avoid; }
}
.dossier-head .chips { justify-content: flex-end; align-items: center; }
.portal-grid { display: grid; grid-template-columns: 1.3fr 0.8fr 0.8fr; gap: 1rem; }
.diary-date .field { width: 11.5rem; }
.diary-block { padding: 0.85rem 0; border-top: 1px solid var(--line); }
.diary-block:first-of-type { border-top: 0; }
.diary-file { display: block; margin-top: 0.55rem; }
.diary-file img { display: block; max-width: min(420px, 100%); max-height: 320px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.id-sheet { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem 1.6rem; align-items: flex-start; }
.id-face { width: min(36rem, 100%); margin: 0; container-type: inline-size; }
.id-side { margin: 0 0 0.35rem; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.id-card { width: 100%; aspect-ratio: 85.6 / 53.98; display: grid; overflow: hidden; border-radius: 3.6cqw; background: #fbf8f3; color: #1a2420; border: 1px solid #e4dccb; box-shadow: 0 16px 40px rgba(20, 36, 32, 0.1); text-align: left; padding: 0; }
.id-band, .id-return { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; margin: 0; padding: 2cqw 3.6cqw; background: #143028; color: #f3d48a; }
.id-band p, .id-return { margin: 0; font-size: 2.25cqw; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.2; }
.id-role { flex: none; font-size: 2cqw; letter-spacing: 0.14em; text-transform: uppercase; color: #f6f1e6; border: 1px solid rgba(243, 212, 138, 0.75); border-radius: 999px; padding: 0.45cqw 1.5cqw; }
.id-front { grid-template-columns: 32% 1fr; grid-template-rows: auto 1fr; }
.id-front .id-band { grid-column: 1 / -1; }
.id-front .id-photo { grid-row: 2; align-self: start; width: calc(100% - 4.4cqw); height: auto; aspect-ratio: 4 / 5; margin: 2.6cqw 2.2cqw 0; border-radius: 1.8cqw; border: 0.35cqw solid #e4dccb; }
.id-body { grid-row: 2; min-width: 0; display: flex; flex-direction: column; padding: 3cqw 3.6cqw 2.6cqw; }
.id-card h2 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; font-size: 5cqw; line-height: 1.05; margin: 0; }
.id-class { margin: 0.7cqw 0 0; font-size: 2.8cqw; color: #2a5646; }
.id-facts { margin: 1.6cqw 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2cqw 2cqw; }
.id-facts div { min-width: 0; }
.id-facts dt { margin: 0; font-size: 1.85cqw; letter-spacing: 0.12em; text-transform: uppercase; color: #8a8172; }
.id-facts dd { margin: 0; font-size: 2.7cqw; font-weight: 600; overflow-wrap: anywhere; }
.id-card-id { margin: auto 0 0; font-size: 2.5cqw; font-weight: 600; letter-spacing: 0.04em; }
.id-back { grid-template-rows: auto 1fr auto; }
.id-back-main { display: grid; grid-template-columns: 1fr 28%; gap: 3cqw; align-items: center; padding: 3cqw 3.6cqw 1.5cqw; min-width: 0; }
.id-back h2 { font-size: 4cqw; margin: 0 0 1cqw; }
.id-address { margin: 0; font-size: 2.55cqw; line-height: 1.35; color: #3d4a44; }
.id-card .id-qr { width: 100%; height: auto; margin: 0; background: white; padding: 1cqw; border-radius: 1.4cqw; }
.id-foot { display: flex; justify-content: space-between; align-items: end; gap: 3cqw; padding: 1.4cqw 3.6cqw 2.4cqw; border-top: 1px solid #e4dccb; }
.id-foot .id-card-id { margin: 0; }
.id-token { margin: 0.3cqw 0 0; font-size: 2.1cqw; letter-spacing: 0.08em; color: #5c675f; }
.id-sign { margin: 0; min-width: 24cqw; text-align: center; font-size: 1.9cqw; letter-spacing: 0.08em; text-transform: uppercase; color: #5c675f; }
.id-sign span { display: block; height: 0; border-top: 0.28cqw solid #1a2420; margin-bottom: 0.7cqw; }
.id-sign img { display: block; height: 8cqw; width: auto; max-width: 28cqw; margin: 0 auto 0.3cqw; object-fit: contain; }
.signature-preview { display: block; height: 72px; width: auto; max-width: 240px; object-fit: contain; background: white; border: 1px solid var(--line); border-radius: 10px; padding: 0.4rem; margin: 0.7rem 0; }
.id-photo { width: 118px; height: 148px; margin: 0.7rem auto 0.35rem; border-radius: 14px; overflow: hidden; background: #e7efe9; border: 1px solid var(--line); display: grid; place-items: center; }
.id-photo img { width: 100%; height: 100%; object-fit: cover; margin: 0; }
.id-photo span { font-family: var(--serif); font-size: 2rem; color: var(--forest); }
.gate-photo, .gate-fallback { width: min(320px, 70vw); height: min(400px, 62vw); object-fit: cover; border-radius: 18px; border: 3px solid #f6f1e6; }
.gate-fallback { display: grid; place-items: center; background: #e7efe9; color: #146b43; font-family: var(--serif); font-size: clamp(3rem, 6vw, 4.5rem); }
.gate-body { background: #10241c; color: #f6f1e6; min-height: 100vh; }
body.gate-display { height: 100dvh; max-height: 100dvh; overflow: hidden; }
body.gate-display .gate-wrap { width: min(1400px, calc(100% - 3rem)); height: calc(100dvh - 2.1rem); min-height: 0; max-height: calc(100dvh - 2.1rem); display: flex; flex-direction: column; box-sizing: border-box; padding: 1.1rem 0 1.25rem; }
body.gate-display .gate-top { flex: none; }
body.gate-display .gate-stage { flex: 1; min-height: 0; align-content: center; }
body.gate-display .gate-board { width: min(1500px, 100%); margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
body.gate-display .gate-facts { text-align: left; min-width: 0; }
body.gate-display .gate-facts h1 { font-size: clamp(2.8rem, 5.2vw, 5.2rem); line-height: 1.02; margin: 0.15rem 0 0.35rem; }
body.gate-display .gate-photo { width: auto; height: auto; max-width: min(42vw, 520px); max-height: min(68vh, calc(100dvh - 8.5rem)); aspect-ratio: auto; object-fit: contain; }
body.gate-display .gate-fallback { width: min(42vw, 360px); height: min(68vh, calc(100dvh - 8.5rem)); max-height: calc(100dvh - 8.5rem); aspect-ratio: 4 / 5; object-fit: cover; }
body.gate-display .gate-time { font-size: clamp(2.2rem, 4vw, 3.6rem); }
.gate-wrap { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; padding: 1.4rem 0 2.5rem; }
.gate-top, .gate-form { display: flex; gap: 0.8rem; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.gate-top a, .gate-body .fine { color: #d7c7a4; }
.gate-top .kicker { color: #d7b56a; }
.gate-stage { min-height: 48vh; display: grid; align-content: center; justify-items: center; text-align: center; gap: 0.4rem; }
.gate-stage h1 { font-size: clamp(2.8rem, 7vw, 6rem); color: #f6f1e6; }
.gate-direction { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); margin: 0; }
.gate-in { color: #b7ebc9; }
.gate-out { color: #f3d48a; }
.gate-log { color: #d7c7a4; }
.gate-person { display: grid; justify-items: center; gap: 0.6rem; }
.gate-meta { font-size: 1.25rem; }
.gate-time { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 4rem); }
.gate-form .field { flex: 1; min-width: 240px; }
.gate-body input { background: #fbf8f3; color: #1a2420; border: 1px solid #d7c7a4; border-radius: 12px; padding: 0.75rem 0.9rem; width: 100%; }
.gate-body video, .scan-video { width: min(420px, 100%); max-height: 52vh; object-fit: cover; margin-top: 1rem; border-radius: 16px; background: #000; }
.gate-result { font-size: 1.35rem; min-height: 2.4rem; }
body.gate-scan { height: 100dvh; max-height: 100dvh; overflow: hidden; }
body.gate-scan .gate-wrap { height: calc(100dvh - 2.1rem); max-height: calc(100dvh - 2.1rem); display: flex; flex-direction: column; min-height: 0; width: min(980px, calc(100% - 1.5rem)); padding: 0.65rem 0; box-sizing: border-box; }
.gate-body .site-credit { color: #d7c7a4; padding: 0.2rem 1rem 0.45rem; }
.gate-body .site-credit a { color: #f3d48a; }
body.gate-scan .gate-top, body.gate-scan .gate-result, body.gate-scan .scan-actions, body.gate-scan .scan-send { flex: none; }
body.gate-scan .gate-result { font-size: 1.15rem; line-height: 1.3; max-height: 3.5rem; overflow: auto; }
body.gate-scan .scan-stage { flex: 1 1 auto; min-height: 0; margin: 0.4rem 0; display: grid; place-items: center; container-type: size; }
body.gate-scan .scan-frame { width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); position: relative; border-radius: 22px; overflow: hidden; background: #07140f; box-shadow: inset 0 0 0 1px rgba(215, 181, 106, 0.45); }
body.gate-scan .scan-video { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; margin: 0; border-radius: 0; object-fit: cover; background: #000; }
body.gate-scan .scan-idle { position: absolute; inset: 0; margin: 0; padding: 1.4rem; display: grid; place-items: center; text-align: center; color: #d7c7a4; }
body.gate-scan .scan-idle[hidden], body.gate-scan .scan-video[hidden] { display: none; }
body.gate-scan .scan-reticle { position: absolute; inset: 8%; pointer-events: none; opacity: 0; }
body.gate-scan .scan-frame.is-live .scan-reticle { opacity: 1; }
body.gate-scan .scan-reticle span { position: absolute; width: 22%; height: 22%; border: 3px solid #f3d48a; }
body.gate-scan .scan-reticle span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
body.gate-scan .scan-reticle span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
body.gate-scan .scan-reticle span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
body.gate-scan .scan-reticle span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
body.gate-scan .scan-actions, body.gate-scan .scan-send { display: flex; gap: 0.55rem; align-items: end; flex-wrap: wrap; }
body.gate-scan .scan-send { margin-top: 0.55rem; }
body.gate-scan .scan-send .field { flex: 1; min-width: 10rem; }
body.gate-scan .gate-log { flex: 0 1 7.5rem; min-height: 4.5rem; margin-top: 0.55rem; overflow: auto; padding-right: 0.35rem; }
.gate-body h1 { color: #f6f1e6; }
label.btn { cursor: pointer; }
.head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.clock-cell { width: 9.2rem; min-width: 9.2rem; white-space: nowrap; }
.clock {
    width: 8.8rem; min-width: 8.8rem; max-width: 8.8rem; padding: 0.32rem 0.35rem;
    border: 1px solid var(--line); border-radius: 8px; background: white;
    font-variant-numeric: tabular-nums;
}
.date-cell { white-space: nowrap; }
.register-sheet th, .register-sheet td { vertical-align: middle; }
tr.log-absent td { background: var(--danger-bg); }
tr.log-late td { background: var(--warn-bg); }
tr.log-leave td { background: var(--info-bg); }
tr.log-medical td { background: #efe6f4; }
tr.log-off td { background: var(--paper-2); }
tr.log-absent td, tr.log-late td, tr.log-leave td, tr.log-medical td, tr.log-off td { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.register-sheet .student-cell { white-space: nowrap; }
.register-sheet .pick { width: 4.5rem; text-align: center; }
.register-sheet .note-cell { width: 11rem; }
.register-sheet .note-cell input { width: 100%; min-width: 8rem; }
.mark-code { font-weight: 700; text-align: center; font-size: 0.82rem; }
.mark-present { color: var(--ok); }
.mark-late, .mark-on_leave { color: var(--warn); }
.mark-absent { color: var(--danger); }
.mark-excused, .mark-medical, .mark-none { color: var(--muted); }
.row-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }
.row-actions input { width: 11rem; padding: 0.4rem 0.55rem; border: 1px solid var(--line); border-radius: 8px; }
.gate-log { margin-top: 1.4rem; display: grid; gap: 0.45rem; }
.gate-log h2 { color: #f6f1e6; }
.gate-body .btn-ghost { background: transparent; color: #f6f1e6; border-color: #d7c7a4; }
@media (max-width: 720px) {
    .portal-grid, .stat-row { grid-template-columns: 1fr; }
    .report-facts { grid-template-columns: 1fr 1fr; }
    .gate-stage { min-height: 36vh; }
    body.gate-display { height: auto; max-height: none; overflow: auto; }
    body.gate-display .gate-wrap { height: auto; max-height: none; }
    body.gate-display .gate-board { grid-template-columns: 1fr; justify-items: center; }
    body.gate-display .gate-facts { text-align: center; }
    body.gate-display .gate-photo,
    body.gate-display .gate-fallback { width: min(240px, 70vw); height: min(300px, 42vh); }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
