:root {
  --bg:#f8f7f5; --paper:#fff; --ink:#272522; --muted:#68645f; --light-ink:#807974;
  --line:#e9e5e0; --orange:#c64813; --orange-hover:#a93c10; --orange-bg:#fff1e8;
  --orange-ink:#963b13; --green:#287450; --radius:14px;
  color-scheme:light;
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"PingFang SC","Noto Sans CJK SC","Microsoft YaHei",Arial,sans-serif;
  font-size:14px; font-weight:450; color:var(--ink); background:var(--bg);
}
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; line-height:1.5; min-width:320px; }
h1,h2,h3,h4,p { margin:0; }
a { color:inherit; text-decoration:none; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
:focus-visible { outline:3px solid #e77641; outline-offset:3px; }
.icon { flex:none; vertical-align:middle; }
.shell { display:grid; grid-template-columns:228px minmax(0,1fr); min-height:100vh; }
.sidebar { display:flex; flex-direction:column; position:sticky; top:0; height:100vh; padding:0 15px; border-right:1px solid var(--line); background:#fff; }
.brand-link { display:block; padding:27px 10px 27px; }
.brand { display:flex; align-items:center; gap:11px; }
.brand strong,.brand small { display:block; }
.brand strong { font-size:20px; letter-spacing:-.045em; line-height:1.17; font-weight:820; }
.brand small { color:var(--muted); font-size:12px; margin-top:2px; font-weight:620; letter-spacing:.045em; }
.brand-mark { display:flex; align-items:end; justify-content:center; gap:3px; width:39px; height:39px; padding-bottom:11px; background:#d45018; border-radius:11px; color:white; box-shadow:0 4px 10px #c3461426; }
.brand-mark span { width:4px; height:8px; border-radius:2px; background:currentColor; }
.brand-mark span:nth-child(2) { height:12px; }
.brand-mark span:nth-child(3) { height:17px; }
.nav { display:grid; gap:7px; padding-top:12px; border-top:1px solid var(--line); }
.nav-link { display:flex; align-items:center; gap:11px; min-height:45px; border-radius:9px; padding:0 12px; color:#5d5955; font-weight:620; }
.nav-link:hover { background:#f7f5f2; color:var(--ink); }
.nav-link.active { color:#fff; background:var(--orange); box-shadow:0 2px 3px #983a151a; }
.sidebar-end { margin-top:auto; padding-bottom:15px; display:grid; gap:10px; }
.profile { display:flex; gap:9px; align-items:center; padding:13px 3px 0 4px; border-top:1px solid var(--line); min-width:0; }
.profile div { flex:1; min-width:0; }
.profile strong,.profile small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile strong { font-size:13px; }
.profile small { color:var(--muted); font-size:11px; }
.avatar { display:grid; place-items:center; width:33px; height:33px; border-radius:50%; background:#fcecdf; color:#a33d15; font-weight:700; }
.icon-button { display:inline-grid; place-items:center; border:0; border-radius:7px; background:transparent; color:#57524c; padding:7px; }
.icon-button:hover { background:#f4efea; }
.workarea { min-width:0; }
.topbar { display:flex; align-items:center; justify-content:space-between; padding:0 32px; min-height:62px; background:#fff; border-bottom:1px solid var(--line); color:var(--muted); font-size:13px; font-weight:630; }
.slash { padding:0 7px; color:#aaa39b; }
.topbar div span:last-child { color:var(--ink); }
.system-label { display:inline-flex; align-items:center; gap:6px; color:#685e55; }
.main { max-width:1550px; margin:0 auto; padding:27px 32px 40px; display:grid; gap:17px; }
.page-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; padding:1px 0 4px; }
.page-heading h1 { font-size:32px; font-weight:790; letter-spacing:.025em; line-height:1.2; }
.page-heading p { color:var(--muted); margin-top:7px; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:39px; padding:0 13px; border:1px solid transparent; border-radius:8px; font-size:13px; font-weight:660; white-space:nowrap; text-align:center; }
.button:disabled { opacity:.55; cursor:wait; }
.primary { background:var(--orange); border-color:var(--orange); color:#fff; }
.primary:hover { background:var(--orange-hover); border-color:var(--orange-hover); }
.secondary { background:#fff; border-color:#ded9d3; color:var(--ink); }
.secondary:hover { color:var(--orange-ink); border-color:#e3a487; background:#fff8f3; }
.text-button { background:none; border:0; color:var(--orange-ink); padding:2px; font-weight:700; }
.danger-text { color:#8e3024; }
.danger { color:#fff; background:#8e3024; border-color:#8e3024; }
.danger:hover { background:#72251b; border-color:#72251b; }
.actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.actions.right { justify-content:flex-end; }
.end { justify-self:end; }
.wide { width:100%; }
.panel { min-width:0; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 1px 2px #27221b06; }
.padded { padding:18px 20px; }
.panel-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 14px; padding:17px 19px; }
.panel-heading h2,.report-person h2 { font-size:17px; font-weight:780; line-height:1.35; }
.panel-heading p,.report-person p { color:var(--muted); font-size:12px; margin-top:4px; }
.softened { border-block:1px solid var(--line); background:#f9f7f5; }
.stack { display:grid; gap:14px; min-width:0; }
.two-col,.three-col { display:grid; gap:14px; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; min-width:0; }
.three-col { grid-template-columns:repeat(3,minmax(0,1fr)); }
label { display:grid; gap:5px; font-size:12px; color:#524c46; font-weight:660; min-width:0; }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  min-width:0; width:100%; min-height:37px; border:1px solid #dfdad4;
  border-radius:7px; color:var(--ink); background:#fff; padding:6px 9px; font-size:13px; font-weight:490;
}
select { padding-right:28px; }
textarea { resize:vertical; line-height:1.55; }
input[readonly],input:disabled:not([type=checkbox]) { background:#f5f2ef; color:#746c63; }
input:disabled { opacity:.7; }
input[type=checkbox] { width:15px; height:15px; margin:0; accent-color:var(--orange); cursor:pointer; }
.check-label { display:flex; align-items:center; gap:6px; font-weight:520; width:max-content; max-width:100%; }
.filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(115px,1fr)); align-items:end; gap:11px 13px; padding:13px 16px; }
.entry-filters { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
.report-filters { grid-template-columns:minmax(95px,.7fr) minmax(143px,1.2fr) minmax(145px,1.2fr) minmax(113px,.83fr) minmax(113px,.83fr) auto; }
.report-filters .button { min-height:37px; }
.muted { color:var(--muted); }
.compact { font-size:12px; }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; }
.metric { display:flex; align-items:flex-start; gap:11px; min-height:113px; padding:15px 15px; }
.metric h2 { color:#625d57; font-size:12px; font-weight:680; }
.tile { display:inline-grid; place-items:center; width:37px; height:37px; border-radius:9px; flex:none; }
.tile-orange { background:#fff0e6; color:#b64214; }
.tile-green { background:#eaf3ed; color:#2b7653; }
.tile-neutral { background:#f1efec; color:#635952; }
.metric-value { font-size:27px; line-height:1.2; letter-spacing:-.04em; font-weight:800; margin:5px 0 4px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.metric-value small { color:#777067; font-size:13px; letter-spacing:0; font-weight:620; }
.metric-value.green { color:var(--green); }
.metric-meta { display:block; color:var(--muted); font-size:11px; }
.chart-pair { display:grid; grid-template-columns:minmax(0,1.22fr) minmax(0,1fr); gap:14px; }
.chart-panel { min-height:265px; }
.chart-panel .panel-heading { padding-bottom:12px; }
.chart-key { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; }
.chart-key i { display:inline-block; background:#e56a32; border-radius:3px; width:9px; height:9px; }
.chart-area { display:flex; gap:7px; padding:18px 17px 12px 15px; }
.axis { position:relative; display:flex; flex-direction:column; justify-content:space-between; align-items:end; flex:none; width:31px; height:128px; font-size:10px; color:var(--muted); transform:translateY(-.7em); }
.plot,.grade-chart { display:flex; align-items:flex-start; flex:1; min-width:0; overflow-x:auto; padding-top:16px; margin-top:-16px; }
.plot,.grade-chart { background:repeating-linear-gradient(to bottom,#eae6e2 0 1px,transparent 1px 31.75px); background-size:100% 128px; background-repeat:no-repeat; background-position:0 16px; }
.column { flex:1 0 36px; min-width:0; text-align:center; }
.bar-track { height:128px; display:flex; align-items:flex-end; justify-content:center; border-bottom:1px solid #dedbd7; position:relative; }
.bar { position:relative; height:var(--amount); width:clamp(12px,59%,64px); border-radius:5px 5px 0 0; }
.bar span { position:absolute; left:50%; bottom:100%; transform:translateX(-50%); white-space:nowrap; font-size:10px; font-weight:730; padding-bottom:3px; color:#493d33; }
.bar.warm { background:linear-gradient(180deg,#ed814c,#d7521c); }
.bar-none { color:#625951; font-size:9px; margin-bottom:5px; writing-mode:vertical-rl; }
.plot-caption { display:grid; place-items:center; padding:6px 2px 0; gap:0; font-size:11px; }
.plot-caption strong { max-width:100%; text-overflow:ellipsis; overflow:hidden; white-space:nowrap; }
.plot-caption small { color:var(--muted); font-size:10px; white-space:nowrap; }
.grade-chart { margin:2px 17px 0; padding-top:16px; }
.grade-A { background:#3e9067; }.grade-B { background:#74ae82; }.grade-C { background:#e4b352; }
.grade-D { background:#e99144; }.grade-E { background:#df7557; }.grade-F { background:#bf5346; }
.table-scroll { overflow:auto; }
.data-table { width:100%; border-collapse:collapse; text-align:left; font-size:13px; }
.data-table th,.data-table td { border-top:1px solid var(--line); padding:9px 15px; }
.data-table th:first-child,.data-table td:first-child { padding-left:19px; }
.data-table thead th { background:#faf8f6; color:#615952; font-size:12px; font-weight:690; white-space:nowrap; }
.data-table tbody th { font-weight:650; }
.data-table tbody tr:hover { background:#fdfaf7; }
.code { display:inline-block; background:#f0eeeb; color:#544c44; padding:2px 6px; border-radius:5px; font-size:11px; font-weight:710; margin-right:7px; max-width:100%; overflow-wrap:anywhere; }
.data-table td,.data-table th { font-variant-numeric:tabular-nums; }
.empty { min-height:133px; display:grid; justify-items:center; align-content:center; text-align:center; gap:5px; padding:15px; }
.empty strong { font-size:13px; }
.empty p { color:var(--muted); font-size:12px; }
.empty .tile { margin-bottom:2px; }
.notice { display:flex; align-items:center; gap:8px; color:#235b3e; border:1px solid #cce3d5; padding:10px 13px; background:#f1f9f4; border-radius:8px; font-size:13px; }
.notice.error { color:#8e3024; border-color:#efd4cb; background:#fff2ed; }
.heading-separator { color:#a59383; padding-inline:4px; }
.grid-tip { display:flex; align-items:center; gap:7px; color:#655347; padding:8px 19px; background:#fff3e9; font-size:12px; border-top:1px solid #f7dfcd; }
.score-table .subtext { display:block; font-size:11px; color:var(--muted); font-weight:450; }
.score-input { display:flex; align-items:center; gap:6px; white-space:nowrap; min-width:104px; }
.score-input input { width:69px!important; min-height:31px!important; }
.score-input span { color:#70645a; font-size:11px; }
.level-label { min-width:24px; display:inline-block; width:max-content; border-radius:5px; color:#554f49; background:#f2efeb; font-size:11px; font-weight:730; padding:2px 6px; text-align:center; }
.level-label[data-band="pass"] { color:#246141; background:#e8f3e9; }
.level-label[data-band="fail"] { color:#8e3428; background:#fae9e3; }
.trend-filter { min-width:min(245px,100%); }
.class-trend-chart { padding:5px 22px 10px; max-width:850px; margin-inline:auto; }
.class-trend-chart svg { width:100%; height:auto; display:block; }
dialog { width:min(455px,calc(100% - 30px)); padding:20px; border:1px solid var(--line); border-radius:14px; color:var(--ink); box-shadow:0 15px 60px #2a130638; }
dialog::backdrop { background:#1f1b18a0; }
.dialog-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.dialog-head h2 { font-size:20px; }
.upload-row { display:flex; gap:12px; align-items:end; }
.upload-row label { max-width:530px; flex:1; }
.upload-row + .notice { margin-top:12px; }
.mapping { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; margin:10px 0; }
.mapping + p { margin-bottom:9px; }
.preview-table { max-height:360px; border-bottom:1px solid var(--line); }
.preview-table thead { position:sticky; top:0; }
.report-person { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding:15px 18px; }
.report-person-name { display:flex; align-items:center; gap:10px; }
.assessments details { border-top:1px solid var(--line); }
.assessments summary { cursor:pointer; padding:12px 18px; }
.assessments summary::marker { color:#a85229; }
.assessments summary .code { margin-left:5px; }
.assessments summary small { color:var(--muted); margin-left:10px; }
.assessment-form { display:grid; gap:11px; padding:3px 18px 14px 30px; }
.tabs { display:flex; gap:6px; align-items:center; flex-wrap:wrap; border-bottom:1px solid #e1d9d2; }
.tabs a { padding:9px 12px; border-bottom:2px solid transparent; font-weight:620; color:var(--muted); }
.tabs a.active { color:var(--orange-ink); border-color:var(--orange); }
.settings-pair { display:grid; grid-template-columns:1fr 1fr; gap:14px; align-items:start; }
.settings-detail { width:100%; max-width:720px; }
.class-list .table-scroll { max-height:320px; }
.class-list thead th { position:sticky; top:0; }
fieldset { border:1px solid var(--line); border-radius:8px; margin:0; min-width:0; }
fieldset legend { color:#524c46; font-size:12px; font-weight:690; }
.check-list { display:grid; gap:7px; }
.teacher-list { margin:0; padding:0; list-style:none; }
.teacher-list a { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:11px 16px; border-top:1px solid var(--line); }
.teacher-list a[aria-current="page"] { background:#fff4eb; }
.teacher-list small { display:block; color:var(--muted); overflow-wrap:anywhere; }
.teacher-status { text-align:right; flex-shrink:0; }
.teacher-grants details { border:1px solid var(--line); border-radius:8px; padding:10px 12px; }
.teacher-grants summary { cursor:pointer; font-weight:650; }
.teacher-grants summary small { margin-left:7px; color:var(--muted); }
.teacher-grants .check-list { margin-top:10px; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); }
.error-page { max-width:700px; margin:30px auto; }
.error-page .button { margin-top:12px; }
.signin { min-height:100dvh; display:grid; grid-template-columns:1.1fr 1fr; max-width:1260px; align-content:center; align-items:center; padding:24px; margin:auto; gap:0; }
.signin-visual { align-self:stretch; display:flex; flex-direction:column; justify-content:space-between; min-height:450px; padding:36px 43px; border-radius:19px 0 0 19px; background:linear-gradient(142deg,#fff3e8,#fbe0cb); border:1px solid #f1d6c2; }
.signin-visual p { color:#824323; font-weight:650; }
.signin-art { width:100%; display:block; }
.signin-card { width:100%; height:100%; min-height:450px; display:grid; align-content:center; border:1px solid var(--line); border-left:0; border-radius:0 19px 19px 0; background:white; padding:35px clamp(24px,5vw,70px); }
.signin-card h1 { font-size:28px; }
.signin-card form { margin-top:23px; }
.google-signin { margin-top:18px; }
.demo-login-title { font-size:15px; }
.signin-card .notice { margin-top:10px; }
@media (max-width:1180px) {
  .shell { grid-template-columns:190px minmax(0,1fr); }
  .main { padding-inline:22px; }
  .topbar { padding-inline:22px; }
  .metric { padding-inline:10px; gap:8px; }
}
@media (max-width:1000px) {
  .report-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:780px) {
  .shell { display:block; }
  .sidebar { height:auto; z-index:2; padding:8px 12px; display:grid; grid-template-columns:1fr auto; }
  .brand-link { padding:0; }
  .brand-mark { width:34px; height:34px; padding-bottom:8px; }
  .brand strong { font-size:17px; }.brand small { font-size:10px; }
  .nav { grid-row:2; grid-column:span 2; grid-template-columns:repeat(4,minmax(0,1fr)); padding-top:8px; gap:4px; border-top:0; }
  .nav-link { justify-content:center; gap:5px; padding:4px 2px; min-height:36px; font-size:12px; white-space:nowrap; }
  .nav .icon { width:15px; height:15px; }
  .sidebar-end { margin:0; padding:0; display:flex; gap:5px; align-items:center; }
  .sidebar-end>.nav-link { padding-inline:6px; }
  .sidebar-end>.nav-link .icon,.profile div,.avatar { display:none; }
  .profile { border:0; padding:0; }
  .topbar { display:none; }
  .main { padding:17px 12px 30px; gap:13px; }
  .page-heading h1 { font-size:25px; }
  .chart-pair,.settings-pair { grid-template-columns:1fr; }
  .data-table { min-width:530px; }
  .signin { display:block; padding:13px; }
  .signin-visual { min-height:0; border-radius:12px 12px 0 0; padding:17px; }
  .signin-visual p,.signin-art { display:none; }
  .signin-card { min-height:310px; border:1px solid var(--line); border-radius:0 0 12px 12px; }
}
@media (max-width:510px) {
  .nav .icon { display:none; }
  .three-col { grid-template-columns:1fr; }
  .filters,.entry-filters,.report-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .upload-row { flex-wrap:wrap; }
  .upload-row label { min-width:100%; }
}
