:root{--surface:#fff;--soft:#eaf0e7;--heading:#e8eee3;--select:#dcebdd;--dirty:#fffbe9;--invalid:#fff0eb;--focus:#46764a;--on-accent:#fff;--sidebar-muted:#bdcfc2;color-scheme:light}
:root[data-theme=blue]{--green:#215d8a;--green2:#183b59;--paper:#f1f5f9;--cream:#edf5fb;--ink:#203044;--muted:#5c7186;--line:#d9e3ed;--soft:#e8f0f8;--heading:#deeaf5;--select:#cfe4f8;--focus:#3779af;--sidebar-muted:#bdd3e5}
:root[data-theme=purple]{--green:#68528b;--green2:#382b51;--paper:#f6f3f8;--cream:#f6eefb;--ink:#352c40;--muted:#776982;--line:#e4dceb;--soft:#eee7f4;--heading:#e8def0;--select:#dfd1ef;--focus:#8869ab;--sidebar-muted:#d5c6e2}
:root[data-theme=apricot]{--green:#945126;--green2:#56331f;--paper:#faf5ee;--cream:#fff4e3;--ink:#443528;--muted:#82705e;--line:#e9ddce;--soft:#f5eadb;--heading:#f0dfc9;--select:#f8ddba;--focus:#ad723f;--sidebar-muted:#e3cdb7}
:root[data-theme=rose]{--green:#975368;--green2:#542c3d;--paper:#faf3f5;--cream:#fff0f4;--ink:#44303a;--muted:#846a76;--line:#ebdbe1;--soft:#f6e7ed;--heading:#f1dce5;--select:#f5d2df;--focus:#b36d88;--sidebar-muted:#e7c6d2}
:root[data-theme=night]{--green:#92cbb3;--green2:#152922;--paper:#111c19;--cream:#d9eee3;--ink:#e4ede8;--muted:#acbeb3;--line:#3c5147;--surface:#1d2c25;--soft:#283e32;--heading:#30493c;--select:#3b6251;--dirty:#4a4225;--invalid:#52342e;--focus:#9bd6bc;--on-accent:#14271d;--sidebar-muted:#acc6b8;--amber:#f1c97c;--red:#ffb4a6;color-scheme:dark}
.card,.stats article,.login-card,.teacher-sheet-section,.sheet-scroll,.chip-list a{background:var(--surface);border-color:var(--line)}
input,select,textarea,button,.button{background:var(--surface);border-color:var(--line)}label,.eyebrow,.sheet-table .sheet-student-code{color:var(--muted)}
.primary,.stats .accent,.teacher-tabs .teacher-tab.selected,.sheet-toolbar button[aria-pressed=true],.view-modes button[aria-pressed=true]{background:var(--green);color:var(--on-accent);border-color:var(--green)}
.stats .accent span,.stats .accent small{color:inherit;opacity:.9}.brand{color:#f8f6ef}.brand span,.account a,.account button,.account small,.nav-label{color:var(--sidebar-muted)}.account .text-button{background:transparent}
th,.sheet-table th{background:var(--heading);color:var(--ink);border-color:var(--line)}td,.sheet-table td{border-color:var(--line)}
.sheet-toolbar,.teacher-tabs .teacher-tab,.bulk-tools,.checklist label,pre,.badge{background:var(--soft);color:var(--ink);border-color:var(--line)}
.sheet-table th:first-child,.sheet-table td:first-child,.sheet-readonly{background:var(--soft);color:var(--muted)}
.sheet-dirty{background:var(--dirty)}.sheet-invalid{background:var(--invalid);outline-color:var(--red)}.sheet-error{color:var(--red)}
.sheet-table td input:focus,.sheet-table td select:focus{background:var(--surface);outline-color:var(--focus)}input:focus,select:focus,textarea:focus,.teacher-tabs .teacher-tab:focus-visible{outline-color:var(--focus)}
.sheet-selected,.sheet-selected input,.sheet-selected select{background:var(--select)!important}.sheet-selected{box-shadow:inset 0 0 0 1px var(--focus)}
.notice{background:var(--soft);border-color:var(--line)}.notice.error,.errorlist{background:var(--invalid);color:var(--red)}.notice.warning{background:var(--dirty);color:var(--amber)}.badge.active{background:var(--soft);color:var(--green)}.badge.pending{background:var(--dirty);color:var(--amber)}.badge.void{background:var(--soft);color:var(--muted)}.check-card{background:var(--soft);border-color:var(--line)}.check-card span,.trend-row small{color:var(--muted)}.trend-track{background:var(--soft)}.trend-track div{background:var(--green)}.auth-main{background:var(--paper)}
.display-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;margin-bottom:24px;background:var(--surface);border:1px solid var(--line);border-radius:9px}.display-title{font-weight:650;font-size:13px;margin-right:auto}.theme-control{display:flex;gap:8px;align-items:center;margin:0}.theme-control select{width:auto;font-size:13px;padding:6px 10px;min-height:36px}.theme-dot{height:12px;width:12px;border-radius:50%;background:var(--green)}.view-modes{display:flex;gap:2px}.view-modes button,#toggle-fullscreen{padding:6px 12px;font-size:13px;min-height:36px}.display-status{flex-basis:100%;font-size:12px;color:var(--muted);margin:0}.display-status:empty{display:none}
main{min-width:0}.page-head{flex-wrap:wrap}.page-head>div{min-width:0}.filters label{min-width:0}.teacher-tabs{max-width:100%}.teacher-section-head{flex-wrap:wrap}.sheet-scroll{overscroll-behavior:contain;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}.sheet-table input,.sheet-table select{scroll-margin:55px}.sheet-toolbar button{min-height:40px}.sheet-table td:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
html[data-layout=portrait] main{max-width:1120px}html[data-layout=portrait] .two-col,html[data-layout=portrait] .settings-grid{grid-template-columns:1fr}html[data-layout=portrait] .teacher-sheet-section .sheet-scroll{max-height:72dvh}
html[data-layout=landscape] main{max-width:none;padding-left:22px;padding-right:22px}html[data-layout=landscape] .teacher-sheet-section{padding:14px}html[data-layout=landscape] .teacher-sheet-section .sheet-scroll{max-height:76dvh}html[data-layout=landscape] .sheet-table td{height:38px}html[data-layout=landscape] .sheet-table td input{height:37px;padding-top:6px;padding-bottom:6px}
html.sheet-focus .sidebar{display:none}html.sheet-focus main{margin:0;max-width:none;padding:18px 24px}html.sheet-focus .display-toolbar{position:sticky;top:8px;z-index:10;box-shadow:0 4px 16px #00000012}html.sheet-focus .teacher-sheet-section .sheet-scroll{max-height:78dvh}
@media(max-width:1100px){.display-toolbar{gap:8px}.display-title{flex-basis:100%}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.sidebar{max-width:100%;overflow:hidden}.account{flex-wrap:wrap}.display-toolbar{padding:10px;margin-bottom:18px}.display-title{flex-basis:auto}.theme-control{margin-left:auto}.view-modes{flex:1}.view-modes button{flex:1}.view-modes button,#toggle-fullscreen{min-height:40px}.sheet-toolbar{gap:7px;padding:9px}.sheet-toolbar input{flex-basis:100%}.sheet-toolbar button{font-size:12px;padding:8px 10px}.sheet-toolbar #grid-status{flex-basis:100%}.filters{align-items:stretch}.filters label{flex:1 1 42%}.sheet-table td input,.sheet-table td select{font-size:16px}.sheet-table th:first-child,.sheet-table td:first-child{min-width:100px;width:100px}.teacher-sheet-section .sheet-scroll{max-height:65dvh}.page-head h1{font-size:26px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stats strong{overflow-wrap:anywhere}.pagination{flex-wrap:wrap}html[data-layout=landscape] main,html.sheet-focus main{padding:12px}.teacher-section-head{margin-bottom:14px}.teacher-section-head .button{max-width:100%}.display-toolbar button{touch-action:manipulation}}
@media(max-height:550px) and (orientation:landscape){.sidebar{display:none}main{margin-left:0!important;padding:12px!important}.display-toolbar{margin-bottom:12px}.teacher-sheet-section .sheet-scroll{max-height:72dvh}.sheet-toolbar{padding:8px}.page-head{margin-bottom:12px}}
@media print{.sidebar,.display-toolbar,.sheet-toolbar,.section-lock,.teacher-tabs{display:none}main{margin:0;padding:0;max-width:none}.sheet-scroll{overflow:visible;max-height:none!important}}
#toggle-navigation{padding:6px 12px;font-size:13px;min-height:36px}#toggle-navigation[hidden]{display:none}html.sheet-focus.focus-navigation .sidebar{display:flex;overflow-y:auto}html.sheet-focus.focus-navigation main{margin-left:220px}html.sheet-focus.focus-navigation .sidebar{z-index:11}
@media(max-width:1100px){html.sheet-focus.focus-navigation main{margin-left:190px}}
@media(max-width:720px){html.sheet-focus.focus-navigation .sidebar{position:static;width:100%}html.sheet-focus.focus-navigation main{margin-left:0}#toggle-navigation{min-height:40px}}
@media(max-height:550px) and (orientation:landscape){html.sheet-focus.focus-navigation .sidebar{position:fixed;width:190px}html.sheet-focus.focus-navigation main{margin-left:190px!important}}
@media print{#toggle-navigation,html.sheet-focus.focus-navigation .sidebar{display:none}}

.bill-review-layout{display:grid;grid-template-columns:minmax(280px,1fr) minmax(300px,1.2fr);gap:28px}.bill-review-layout textarea{font-size:14px;line-height:1.8;margin-bottom:12px;resize:vertical}.bill-pages{display:flex;gap:16px;overflow-x:auto;align-items:flex-start}.bill-pages figure{margin:0;flex:0 0 100%}.bill-pages img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:8px}.bill-pages figcaption{font-size:13px;padding:10px 0;color:var(--muted)}@media(max-width:1100px){.bill-review-layout{grid-template-columns:1fr}.bill-pages figure{flex-basis:min(100%,480px)}}
