:root {
  --bg: #F2F5FB;
  --surface: #ffffff;
  --surface-2: #EDF2FA;
  --ink: #0F172A;
  --muted: #5B6B82;
  --line: #E4EAF4;
  --line-strong: #CBD6E8;
  --green: #2563EB;
  --green-2: #06B6D4;
  --green-soft: #EAF1FF;
  --amber: #7C3AED;
  --amber-soft: #F1EAFE;
  --red: #EF4444;
  --red-soft: #FEECEC;
  --blue: #2563EB;
  --blue-soft: #EAF1FF;
  --sidebar: #17251f;
  --shadow: 0 12px 36px rgba(26, 38, 33, .08);
}

* { box-sizing: border-box; letter-spacing: 0; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; stroke-width: 1.8; flex: 0 0 auto; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.3; font-weight: 700; }
h2 { font-size: 17px; line-height: 1.4; }
small, .muted { color: var(--muted); }
.hidden { display: none !important; }
.eyebrow { display: block; color: var(--green-2); font-size: 10px; font-weight: 700; text-transform: uppercase; margin-bottom: 5px; }

.btn { min-height: 38px; border: 1px solid transparent; border-radius: 5px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 650; background: transparent; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--green); border-color: var(--green); }
.btn-primary:hover { background: #0f533d; }
.btn-secondary { color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--green); color: var(--green); }
.btn-quiet { color: var(--muted); padding: 0 8px; }
.btn-quiet:hover { color: var(--ink); background: var(--surface-2); }
.btn-danger { color: var(--red); background: var(--red-soft); border-color: #efcaca; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--green); border-color: var(--green); }
.icon-btn.inverse { background: rgba(255,255,255,.05); color: #aebbb5; border-color: rgba(255,255,255,.12); }
.icon-btn.inverse:hover { color: white; border-color: rgba(255,255,255,.35); }

label { display: grid; gap: 7px; color: #3d4944; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); min-height: 40px; padding: 9px 11px; outline: none; }
textarea { resize: vertical; min-height: 88px; }
input:focus, select:focus, textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(34, 123, 93, .11); }
input::placeholder, textarea::placeholder { color: #9ca6a1; }

.brand-mark { width: 34px; height: 34px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: #111c24; color: white; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand-inline { display: inline-flex; align-items: center; gap: 10px; }

/* Login */
.login-body { min-height: 100vh; background: white; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 56%) minmax(420px, 44%); }
.login-visual { position: relative; overflow: hidden; min-height: 640px; background: #20372d; color: white; }
.login-visual::after { content: ""; position: absolute; inset: 0; background: rgba(12, 28, 21, .34); pointer-events: none; }
.login-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-brand { position: absolute; z-index: 1; left: 44px; top: 38px; display: flex; align-items: center; gap: 12px; }
.login-brand .brand-mark { background: white; color: var(--green); }
.login-brand div { display: grid; gap: 1px; }
.login-brand strong { font-size: 20px; }
.login-brand span { font-size: 11px; color: rgba(255,255,255,.76); }
.login-caption { position: absolute; z-index: 1; left: 44px; bottom: 46px; max-width: 490px; }
.login-caption p { color: #dbe8e2; margin-bottom: 12px; }
.login-caption strong { font-size: 28px; line-height: 1.4; display: block; }
.login-panel { min-height: 100vh; display: grid; align-content: center; position: relative; background: #fbfcfb; }
.login-form-wrap { width: min(390px, calc(100% - 64px)); margin: auto; }
.mobile-brand { display: none; }
.login-heading { margin-bottom: 30px; }
.login-heading h1 { font-size: 30px; margin-bottom: 6px; }
.login-heading p { color: var(--muted); }
.login-form { display: grid; gap: 19px; }
.login-password-fields { display: grid; gap: 19px; }
.login-form input { min-height: 47px; background: white; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.password-field .icon-btn { position: absolute; right: 5px; top: 5px; border: 0; background: transparent; }
.login-form .btn { min-height: 47px; margin-top: 4px; }
.wechat-web-login { display: grid; justify-items: center; gap: 10px; margin: 4px 0 16px; }
.wechat-code-frame { position: relative; width: 184px; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.wechat-code-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.wechat-code-frame img.is-loading { opacity: .2; }
.wechat-code-refresh { position: absolute; right: 6px; bottom: 6px; background: rgba(255,255,255,.94); box-shadow: 0 1px 4px rgba(15,23,42,.14); }
.wechat-web-login p { min-height: 20px; margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.wechat-web-login p[data-state="success"] { color: var(--success); }
.wechat-web-login p[data-state="error"], .wechat-web-login p[data-state="expired"] { color: var(--danger); }
.login-method-divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 8px 0 18px; color: var(--muted); font-size: 12px; }
.login-method-divider::before, .login-method-divider::after { content: ""; height: 1px; background: var(--line); }
.student-entry { margin-top: 20px; min-height: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.student-entry span { display: flex; align-items: center; gap: 9px; }
.student-entry:hover { color: var(--green); }
.alert { border-radius: 5px; padding: 11px 13px; display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.alert-error { color: var(--red); background: var(--red-soft); border: 1px solid #efcaca; }
.demo-access { margin-top: 17px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.demo-access code { color: var(--green); }
.login-panel footer { position: absolute; bottom: 25px; width: 100%; text-align: center; color: #9aa39f; font-size: 11px; }

/* Project picker */
.simple-header { height: 68px; padding: 0 clamp(20px, 5vw, 72px); display: flex; justify-content: space-between; align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); }
.projects-page { width: min(1100px, calc(100% - 40px)); margin: 50px auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.project-list { border-top: 1px solid var(--line-strong); }
.project-row { min-height: 82px; display: grid; grid-template-columns: 120px 1fr auto 34px; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); padding: 0 12px; }
.project-row:hover { background: var(--surface); }
.project-code { color: var(--green); font-family: ui-monospace, monospace; font-size: 12px; }
.project-row strong { display: block; font-size: 16px; margin-bottom: 5px; }
.project-row small { display: block; }
.status-dot { color: var(--green); background: var(--green-soft); border-radius: 99px; padding: 5px 9px; font-size: 11px; }

/* Workspace */
.workspace-body { overflow: hidden; }
.workspace-shell { height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { background: var(--sidebar); color: #e9efec; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar-brand { height: 72px; padding: 0 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand .brand-mark { background: #dcece4; color: var(--green); }
.sidebar-brand > span:last-child { display: grid; gap: 1px; }
.sidebar-brand strong { font-size: 17px; }
.sidebar-brand small { color: #91a198; font-size: 10px; }
.project-switcher { margin: 16px 14px 8px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 5px; display: grid; gap: 3px; background: rgba(255,255,255,.035); }
.project-switcher span, .project-switcher small { color: #82958b; font-size: 10px; }
.project-switcher strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-nav { display: grid; gap: 2px; padding: 10px 10px; }
.sidebar-nav button { width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: #a8b7af; display: flex; align-items: center; gap: 11px; cursor: pointer; text-align: left; }
.sidebar-nav button:hover { color: white; background: rgba(255,255,255,.06); }
.sidebar-nav button.active { color: white; background: var(--green-2); }
.sidebar-nav svg { width: 17px; height: 17px; }
.sidebar-user { margin-top: auto; min-height: 68px; padding: 12px 14px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #d8a85d; color: #3e301a; font-weight: 700; }
.sidebar-user > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.sidebar-user strong { font-size: 12px; }
.sidebar-user small { color: #87978f; font-size: 10px; }
.sidebar-user .icon-btn { width: 32px; height: 32px; }
.workspace-main { min-width: 0; overflow-x: hidden; overflow-y: auto; height: 100vh; }
.workspace-topbar { height: 72px; padding: 0 28px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; }
.workspace-topbar h1 { font-size: 17px; margin-top: 3px; }
.breadcrumb { color: var(--muted); font-size: 11px; }
.breadcrumb b { color: var(--green); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.connection > span { width: 7px; height: 7px; border-radius: 50%; background: #36a26e; box-shadow: 0 0 0 3px #dff2e8; }
.mobile-menu { display: none; }
.view { display: none; padding: 26px 28px 50px; max-width: 1500px; margin: 0 auto; }
.view.active { display: block; }

.metrics-strip { min-height: 112px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 22px; }
.metric { padding: 21px 22px; position: relative; display: grid; grid-template-columns: auto 1fr; align-content: center; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span { grid-column: 1 / -1; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.metric strong { font-size: 29px; line-height: 1; font-variant-numeric: tabular-nums; }
.metric small { align-self: end; margin: 0 0 2px 5px; }
.metric.accent::before { content: ""; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 3px; background: var(--amber); }
.metrics-strip.compact { min-height: 86px; margin-top: 18px; }
.metrics-strip.compact .metric { padding: 14px 18px; }
.metrics-strip.compact .metric strong { font-size: 23px; }
.teacher-workbench { margin-bottom: 22px; padding: 18px 20px; display: grid; grid-template-columns: minmax(170px, .7fr) minmax(0, 2.3fr); align-items: center; gap: 20px; color: white; background: var(--sidebar); border-radius: 6px; }
.workbench-heading { min-width: 0; display: grid; gap: 4px; }.workbench-heading .eyebrow { color: #8ec4ad; margin: 0; }.workbench-heading .muted { color: #9bada4; font-size: 10px; }
.workbench-actions { min-width: 0; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); }
.workbench-actions button { min-width: 0; min-height: 68px; padding: 12px 14px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 10px; border: 0; color: white; background: #21342c; text-align: left; cursor: pointer; }.workbench-actions button:hover { background: #29463a; }.workbench-actions button > svg { color: #8ec4ad; }.workbench-actions button > span { min-width: 0; display: grid; gap: 3px; }.workbench-actions strong { overflow-wrap: anywhere; font-size: 12px; }.workbench-actions small { color: #9bada4; font-size: 9px; }
.workbench-alerts { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.workbench-alerts button, .workbench-clear { min-height: 34px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #3a4e58; border-radius: 4px; color: #dce8e3; background: #1b2c35; font-size: 11px; }
.workbench-alerts button { cursor: pointer; }.workbench-alerts button:hover { border-color: #5dd9ba; }.workbench-alerts button svg, .workbench-clear svg { width: 15px; height: 15px; color: #5dd9ba; }.workbench-alerts button strong { color: #ffd479; font-size: 13px; }
.workbench-pending-list { min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 7px; }
.workbench-pending-list > button { min-width: 0; min-height: 44px; padding: 8px 10px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 14px; align-items: center; gap: 7px; border: 1px solid #3a4e58; border-radius: 4px; color: #e7efeb; background: #1b2c35; cursor: pointer; text-align: left; }
.workbench-pending-list > button:hover { border-color: #5dd9ba; background: #223a43; }
.workbench-pending-list > button svg { width: 16px; height: 16px; color: #5dd9ba; }.workbench-pending-list > button svg:last-child { width: 13px; color: #8ea2ac; }
.workbench-pending-list > button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }.workbench-pending-list > button strong { color: #ffd479; font-size: 15px; }
.overview-grid, .reports-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; }
.span-5 { grid-column: span 5; }.span-7 { grid-column: span 7; }.span-12 { grid-column: span 12; }
.content-block { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
.section-heading { min-height: 40px; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 15px; }
.section-heading > div { min-width: 0; }
.loading-block { color: var(--muted); min-height: 120px; display: grid; place-items: center; }
.schedule-list { display: grid; }
.schedule-item { min-height: 64px; display: grid; grid-template-columns: 60px 3px 1fr auto; align-items: center; gap: 14px; border-top: 1px solid var(--line); }
.schedule-item:first-child { border-top: 0; }
.schedule-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.period-time { display: grid; align-content: center; gap: 2px; line-height: 1.15; letter-spacing: 0; }
.period-time small { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 0; }
.period-time span { white-space: nowrap; }
.schedule-mark { width: 3px; height: 32px; background: var(--green-2); }
.schedule-item:nth-child(2n) .schedule-mark { background: var(--amber); }
.schedule-info { display: grid; gap: 3px; }
.schedule-info small { display: flex; gap: 10px; }
.pill { border-radius: 99px; padding: 4px 8px; font-size: 10px; color: var(--green); background: var(--green-soft); white-space: nowrap; }
.ranking-list { display: grid; }
.rank-item { min-height: 54px; display: grid; grid-template-columns: 28px 32px 1fr auto; gap: 9px; align-items: center; border-top: 1px solid var(--line); }
.rank-item:first-child { border-top: 0; }
.rank-number { color: var(--muted); font-weight: 700; text-align: center; }
.rank-item:nth-child(1) .rank-number { color: var(--amber); }
.mini-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--green); }
.rank-person { display: grid; gap: 2px; }
.rank-person strong { font-size: 12px; }
.rank-person small { font-size: 10px; }
.rank-score { font-size: 14px; font-weight: 700; }
.score-negative { color: var(--red) !important; font-variant-numeric: tabular-nums; }
.topbar-undo { min-width: 156px; height: 46px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 9px; padding: 6px 11px; border: 1px solid rgba(190, 63, 67, .35); border-radius: 7px; color: #9c3136; background: #fff7f7; cursor: pointer; text-align: left; }
.topbar-undo > svg { width: 19px; height: 19px; }
.topbar-undo > span { min-width: 0; display: grid; gap: 1px; }
.topbar-undo strong { font-size: 11px; }
.topbar-undo small { max-width: 128px; overflow: hidden; color: #a66367; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-undo:not(:disabled):hover { border-color: var(--red); background: var(--red-soft); }
.topbar-undo:disabled { border-color: var(--line); color: #999ca3; background: #f5f6f7; cursor: not-allowed; opacity: .78; }
.topbar-undo:disabled small { color: #a8aab0; }
.btn-undo-outline { color: #9c3136; border-color: rgba(190, 63, 67, .35); background: #fff7f7; }
.btn-undo-outline:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.attendance-exception-row { background: #fff8f7; }
.attendance-exception-row td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.attendance-reset { color: #9c3136; }
.data-safety-button { color: #276b57; background: #eef8f3; border-color: #bddccd; }
.today-exceptions .table-wrap { max-height: 320px; }
.today-exceptions tbody tr { background: #fffaf8; }
.today-exceptions tbody tr td:first-child { box-shadow: inset 3px 0 0 #c66a62; }
.today-exceptions .table-primary small { margin-top: 2px; }
.section-count { margin-left: 7px; color: var(--muted); font-size: 10px; font-weight: 500; }
.attendance-status { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 4px; color: #9c3136; background: #fae8e6; font-size: 10px; font-weight: 700; white-space: nowrap; }
.attendance-status.sick_leave, .attendance-status.personal_leave { color: #7a561d; background: #f8edd8; }
.snapshot-table pre { max-width: 520px; max-height: 180px; margin: 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #41464c; font: 10px/1.55 Consolas, monospace; }
.snapshot-operation { font-weight: 700; white-space: nowrap; }
.progress-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.progress-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.progress-item strong { font-size: 12px; }.progress-item span { color: var(--muted); font-size: 11px; }
.progress-track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--green-2); }
.progress-item:nth-child(2) .progress-track i { background: var(--amber); }
.progress-item:nth-child(3) .progress-track i { background: var(--blue); }

.action-bar { min-height: 54px; display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; }
.action-bar > div { display: flex; align-items: center; gap: 9px; }
.filters { min-width: 0; display: flex; align-items: center; gap: 9px; }
.filters select, .filters input { min-width: 145px; }
.action-bar > .profile-filters { display: grid; grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(145px, 1fr)); }
.score-toolbar { align-items: stretch; flex-direction: column; }
.score-toolbar > div { width: 100%; }
.score-toolbar > .filters { display: grid; grid-template-columns: repeat(3, minmax(145px, .72fr)) minmax(250px, 1.35fr); }
.score-toolbar > div:last-child { justify-content: flex-end; flex-wrap: wrap; }
.score-toolbar > div:last-child > * { flex: 0 0 auto; white-space: nowrap; }
.search-input { min-width: 250px; position: relative; display: block; }
.search-input svg { position: absolute; left: 11px; top: 11px; color: var(--muted); }
.search-input input { padding-left: 37px; }
.file-button input { display: none; }
.quiz-import-progress { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); }
.quiz-import-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quiz-import-progress-head strong { font-size: 12px; }
.quiz-import-progress-head span { color: var(--green); font-size: 12px; font-variant-numeric: tabular-nums; }
.quiz-import-progress-track { height: 8px; margin: 9px 0 7px; overflow: hidden; border-radius: 4px; background: var(--line-strong); }
.quiz-import-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .2s ease; }
.quiz-import-progress:not(.is-complete):not(.is-error) .quiz-import-progress-track i { animation: quiz-upload-pulse 1.4s ease-in-out infinite; }
.quiz-import-progress small { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.quiz-import-progress.is-complete { border-color: #b8dfcb; background: #f0faf4; }
.quiz-import-progress.is-complete .quiz-import-progress-head span { color: #197247; }
.quiz-import-progress.is-complete .quiz-import-progress-track i { background: #249561; }
.quiz-import-progress.is-error { border-color: #efcaca; background: var(--red-soft); }
.quiz-import-progress.is-error .quiz-import-progress-head strong, .quiz-import-progress.is-error .quiz-import-progress-head span { color: var(--red); }
.quiz-import-progress.is-error .quiz-import-progress-track i { background: var(--red); }
@keyframes quiz-upload-pulse { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }
.button-count { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: inline-grid; place-items: center; color: #fff; background: var(--red); font-size: 9px; font-variant-numeric: tabular-nums; }
.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.table-wrap.flat { border: 0; border-radius: 0; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th { height: 43px; padding: 0 14px; color: #6e7974; background: #f0f3f1; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 650; text-align: left; white-space: nowrap; }
td { height: 52px; padding: 8px 14px; border-bottom: 1px solid #e9edeb; font-size: 12px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfb; }
.table-primary { display: grid; gap: 2px; }.table-primary strong { font-size: 12px; }.table-primary small { font-size: 10px; }
.status-badge { border-radius: 99px; padding: 4px 8px; display: inline-block; font-size: 10px; }
.status-active, .status-graded, .status-completed, .status-attended { color: var(--green); background: var(--green-soft); }
.status-pending, .status-scheduled, .status-submitted { color: var(--blue); background: var(--blue-soft); }
.status-overdue, .status-cancelled, .status-inactive, .status-absent { color: var(--red); background: var(--red-soft); }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }.row-actions .icon-btn { width: 30px; height: 30px; border-color: transparent; background: transparent; }
.row-actions .icon-btn.danger { color: var(--red); }
.row-actions .icon-btn.danger:hover { background: var(--red-soft); }
.actions-col { text-align: right; }
.table-footer { min-height: 52px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; }
.pagination { display: flex; align-items: center; gap: 10px; }.pagination .icon-btn { width: 32px; height: 32px; }
.empty-row td { text-align: center; color: var(--muted); height: 150px; }

.timeline { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.timeline-day { display: grid; grid-template-columns: 120px 1fr; border-bottom: 1px solid var(--line); }
.timeline-day:last-child { border-bottom: 0; }
.timeline-date { padding: 20px; background: #f0f3f1; border-right: 1px solid var(--line); display: grid; align-content: start; gap: 2px; }
.timeline-date strong { font-size: 22px; }.timeline-date span { color: var(--muted); font-size: 11px; }
.timeline-events { padding: 10px 20px; }
.timeline-event { min-height: 70px; display: grid; grid-template-columns: 95px 1fr auto; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.timeline-event:last-child { border-bottom: 0; }
.timeline-event.is-current, .student-schedule-item.is-current { padding-left: 10px; border-left: 4px solid var(--green); background: #eef8f3; }
.timeline-event time { font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline-event-info { display: grid; gap: 4px; }.timeline-event-info small { display: flex; align-items: center; gap: 7px; }
.timeline-event-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }

.matrix-notice { min-height: 44px; padding: 0 12px; display: flex; align-items: center; gap: 8px; color: var(--muted); background: var(--amber-soft); border: 1px solid #ecd1ae; border-radius: 5px; margin-bottom: 10px; }
.matrix-wrap { max-height: calc(100vh - 230px); }
.matrix-wrap th { position: sticky; top: 0; z-index: 3; }
.matrix-wrap th:first-child, .matrix-wrap td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 2; min-width: 135px; }
.matrix-wrap th:first-child { background: #f0f3f1; z-index: 4; }
.score-cell { min-width: 130px; }
.score-cell input { min-height: 34px; padding: 5px 8px; font-variant-numeric: tabular-nums; }
.score-cell small { display: block; margin-top: 3px; }

.assignment-list { border-top: 1px solid var(--line-strong); }
.assignment-row { min-height: 94px; display: grid; grid-template-columns: 46px minmax(0, 1fr) 160px 150px minmax(122px, auto); align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding: 12px 6px; }
.assignment-icon { width: 42px; height: 42px; border-radius: 5px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); }
.assignment-main { display: grid; gap: 5px; }.assignment-main strong { font-size: 14px; }.assignment-main p { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 620px; }
.assignment-stat { display: grid; gap: 4px; }.assignment-stat strong { font-size: 13px; }.assignment-stat span { color: var(--muted); font-size: 10px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border-radius: 99px; padding: 5px 8px; background: var(--surface-2); color: #495650; font-size: 10px; }
.profile-layout { width: 100%; min-width: 0; display: grid; gap: 22px; }
.profile-identity { min-width: 0; background: var(--sidebar); color: white; border-radius: 6px; padding: 20px 24px; display: grid; grid-template-columns: 66px minmax(210px, 1fr) minmax(220px, 1.4fr) auto; align-items: center; gap: 20px; }
.profile-avatar { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: #d8a85d; color: #3e301a; font-size: 23px; font-weight: 700; }
.profile-person { min-width: 0; }.profile-person h2 { font-size: 20px; margin-bottom: 5px; }.profile-person p { color: #aebbb5; font-size: 11px; overflow-wrap: anywhere; }
.profile-identity .tag { color: #dbe6e1; background: rgba(255,255,255,.08); }
.profile-total { min-width: 130px; padding-left: 24px; border-left: 1px solid rgba(255,255,255,.12); display: grid; gap: 3px; }
.profile-total span, .profile-total small { color: #aebbb5; }.profile-total strong { font-size: 30px; }
.profile-data { min-width: 0; display: grid; gap: 22px; }
.profile-section { min-width: 0; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
.profile-overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); gap: 22px; }
.profile-benchmark-heading { align-items: center; }.profile-benchmark-heading > div:first-child { display: grid; gap: 3px; }
.profile-benchmark-heading .segmented { display: flex; overflow-x: auto; }.profile-benchmark-heading .segmented button { white-space: nowrap; }
.profile-benchmark-toolbar { min-width: 0; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.profile-benchmark-toolbar .search-input { flex: 1 1 280px; min-width: 210px; }
.profile-benchmark-date { min-width: 210px; display: grid; grid-template-columns: auto 150px; align-items: center; gap: 8px; }.profile-benchmark-date input { min-height: 40px; }
.profile-benchmark-toolbar > .btn { margin-left: auto; }.profile-benchmark-toolbar > .btn b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; color: white; background: var(--green); font-size: 10px; }
.profile-benchmark-picker { margin-bottom: 17px; padding: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.profile-benchmark-picker > div:first-child { margin-bottom: 11px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }.profile-benchmark-picker > div:first-child > span { display: flex; gap: 12px; }.profile-benchmark-picker > div:first-child button { padding: 0; border: 0; color: var(--green); background: transparent; cursor: pointer; font-size: 11px; }
.profile-benchmark-options { max-height: 230px; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.profile-benchmark-option { min-width: 0; min-height: 54px; padding: 9px 11px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; background: var(--surface); cursor: pointer; }.profile-benchmark-option input { width: 16px; min-height: 16px; margin: 0; padding: 0; }.profile-benchmark-option span { min-width: 0; display: grid; gap: 2px; }.profile-benchmark-option strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }.profile-benchmark-option small { font-size: 9px; }
.profile-benchmark-chart { height: 340px; min-height: 300px; transition: height .18s ease; }
.profile-benchmark-details { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.profile-benchmark-detail { min-width: 0; min-height: 74px; padding: 13px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }.profile-benchmark-detail:nth-child(odd) { border-right: 1px solid var(--line); }.profile-benchmark-detail > div { min-width: 0; display: grid; gap: 4px; }.profile-benchmark-detail strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.profile-benchmark-detail small { overflow-wrap: anywhere; font-size: 9px; line-height: 1.5; }.profile-benchmark-detail > span { display: grid; gap: 3px; text-align: right; font-variant-numeric: tabular-nums; }.profile-benchmark-detail > span b { color: var(--green); font-size: 14px; }.profile-benchmark-detail > span small { white-space: nowrap; }
.profile-secondary-grid { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }.profile-secondary-grid .chart-frame { height: 280px; }
.profile-analysis-panel { min-width: 0; border: 1px solid #cdd8df; border-top: 4px solid #d08128; border-radius: 6px; padding: 22px; background: #f8fafb; }
.profile-analysis-panel > .section-heading { margin-bottom: 4px; }
.profile-analysis-panel > p { margin-top: 18px; padding-top: 14px; border-top: 1px solid #dce3e7; color: var(--muted); font-size: 10px; line-height: 1.7; }
.profile-analysis-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.profile-analysis-item { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 13px; padding: 19px 0; border-bottom: 1px solid #dce3e7; }
.profile-analysis-item:nth-last-child(-n+2) { border-bottom: 0; }
.profile-analysis-item > b { color: #b84e3f; font-size: 23px; line-height: 1; font-variant-numeric: tabular-nums; }
.profile-analysis-item h3 { margin: 0 0 7px; color: #20333d; font-size: 13px; }
.profile-analysis-item p { margin: 0; color: #52636c; font-size: 11px; line-height: 1.85; overflow-wrap: anywhere; }
.chart-frame { height: 290px; position: relative; }
.chart-frame canvas, .student-radar canvas { width: 100% !important; max-width: 100% !important; }
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.profile-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-person-search { position: relative; min-width: 0; display: grid; gap: 4px; }
.profile-person-search > span, .search-select > span { color: var(--muted); font-size: 9px; }
.profile-person-search .search-input { min-width: 0; }
.profile-search-results { width: min(420px, 90vw); max-height: 300px; padding: 5px; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: 0 16px 36px rgba(28, 39, 35, .16); }
.profile-search-results button { width: 100%; min-height: 50px; padding: 8px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; }
.profile-search-results button:hover, .profile-search-results button:focus-visible { background: var(--surface-2); }
.profile-search-results button > span { min-width: 0; display: grid; gap: 3px; }
.profile-search-results strong, .profile-search-results small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-search-results small, .profile-search-results em { color: var(--muted); font-size: 9px; font-style: normal; }
.profile-search-empty { min-height: 64px; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.signal { background: var(--surface); padding: 16px; display: grid; gap: 5px; }.signal span { color: var(--muted); font-size: 10px; }.signal strong { font-size: 20px; }
.profile-score-items { display: grid; border-top: 1px solid var(--line); }
.profile-score-item { width: 100%; min-height: 49px; padding: 0 2px; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid var(--line); color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.profile-score-item:hover { background: var(--surface-2); }.profile-score-item > svg { width: 14px; color: var(--muted); }
.profile-score-item > span { min-width: 0; display: grid; gap: 2px; }.profile-score-item strong { overflow-wrap: anywhere; font-size: 11px; }.profile-score-item small { color: var(--muted); font-size: 9px; }
.profile-score-item b { color: var(--green); font-size: 14px; font-variant-numeric: tabular-nums; }.profile-score-item b.negative, .profile-detail-table .negative { color: var(--red); }
.profile-detail-launcher { display: flex; align-items: center; justify-content: space-between; gap: 18px; }.profile-detail-launcher > div:first-child { min-width: 155px; display: grid; gap: 4px; }.profile-detail-launcher > div:first-child .muted { white-space: nowrap; }.profile-detail-launcher h2 { font-size: 16px; }
.profile-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }.profile-detail-actions .btn.active { color: white; border-color: var(--green); background: var(--green); }
.profile-process-section { display: grid; gap: 16px; }
.profile-process-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-process-actions { justify-content: flex-start; padding-top: 2px; }
.profile-attendance-formula { max-width: 560px; line-height: 1.5; text-align: right; }
.profile-detail-heading-action { display: flex; align-items: center; gap: 9px; }
.profile-detail-filters { display: flex; align-items: center; gap: 8px; }.profile-detail-filters select { min-width: 170px; }.profile-detail-filters input { width: 145px; }
.profile-detail-table { width: 100%; min-width: 0; max-width: 100%; max-height: 520px; overflow-x: auto; overscroll-behavior-x: contain; }.profile-detail-table th { position: sticky; top: 0; z-index: 2; }.profile-detail-table td { white-space: nowrap; }
.profile-detail-note { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.profile-assessment-list { display: grid; border-top: 1px solid var(--line); }
.profile-assessment-item { padding: 17px 0; display: grid; gap: 13px; border-bottom: 1px solid var(--line); }
.profile-assessment-item > div:first-child { display: flex; justify-content: space-between; align-items: start; gap: 16px; }.profile-assessment-item > div:first-child > span { display: grid; gap: 3px; }.profile-assessment-item > div:first-child strong { font-size: 13px; }.profile-assessment-item > div:first-child small { color: var(--muted); font-size: 10px; }.profile-assessment-item > div:first-child b { color: var(--green); font-size: 12px; }
.profile-assessment-dimensions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); }
.profile-assessment-dimensions > span { min-height: 60px; padding: 10px 12px; display: grid; align-content: center; gap: 4px; border-right: 1px solid var(--line); }.profile-assessment-dimensions > span:last-child { border-right: 0; }.profile-assessment-dimensions small { color: var(--muted); font-size: 9px; }.profile-assessment-dimensions strong { font-size: 15px; }
.profile-inline-empty { min-height: 100px; display: grid; place-items: center; color: var(--muted); font-size: 11px; }

.segmented { padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.segmented button { height: 31px; min-width: 70px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; }
.segmented button.active { color: white; background: var(--green); }
.audit-list { max-height: 590px; overflow: auto; }
.audit-item { padding: 12px 0; display: grid; grid-template-columns: 28px 1fr; gap: 9px; border-top: 1px solid var(--line); }
.audit-item:first-child { border-top: 0; }
.audit-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--green); }.audit-icon svg { width: 14px; }
.audit-copy { display: grid; gap: 4px; }.audit-copy strong { font-size: 11px; }.audit-copy span { color: var(--muted); font-size: 10px; }

.settings-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.settings-layout > section { min-width: 0; }
.organization-list, .member-list { border-top: 1px solid var(--line-strong); }
.organization-row, .member-row { min-height: 63px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.member-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.member-select { display: grid; place-items: center; width: 28px; height: 36px; }
.member-manager-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-strong); }
.member-manager-toolbar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.credential-table { max-height: 420px; }
.organization-row > span, .member-row > span { display: grid; gap: 3px; }.organization-row small, .member-row small { font-size: 10px; }
.organization-child { min-height: 52px; padding-left: 24px; background: var(--surface-2); }
.organization-child > span:first-child { position: relative; }
.organization-child > span:first-child::before { content: ''; width: 10px; height: 1px; position: absolute; left: -17px; top: 9px; background: var(--line-strong); }
.member-scope-text { color: var(--muted); overflow-wrap: anywhere; }
.member-group-scope-list { display: grid; gap: 10px; }
.member-group-scope { min-width: 0; padding: 10px 0; display: grid; grid-template-columns: minmax(90px, .3fr) minmax(0, 1fr); gap: 12px; align-items: start; border-bottom: 1px solid var(--line); }
.member-group-scope:last-child { border-bottom: 0; }
.member-group-scope > strong { padding-top: 7px; font-size: 11px; }
.permission-template-apply { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-strong); display: grid; gap: 12px; }
.permission-member-list { max-height: 220px; overflow-y: auto; align-items: stretch; }
.permission-member-list label { align-items: flex-start; }.permission-member-list label > span { min-width: 0; display: grid; gap: 2px; }.permission-member-list small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }

.empty-state { min-height: 170px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); }.empty-state svg { width: 28px; height: 28px; }.empty-state.large { min-height: 390px; }

/* Dialog */
.app-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); border: 0; border-radius: 6px; padding: 0; box-shadow: 0 24px 90px rgba(17, 31, 25, .26); }
.app-dialog.dialog-wide { width: min(820px, calc(100vw - 32px)); }
.app-dialog::backdrop { background: rgba(18, 29, 24, .48); }
.dialog-shell > header { min-height: 70px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-shell > footer { min-height: 66px; padding: 12px 20px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.dialog-body { padding: 20px; overflow-y: auto; max-height: calc(100vh - 190px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.form-grid .full { grid-column: 1 / -1; }
.copy-project-sections { padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; border: 1px solid var(--line-strong); border-radius: 5px; }.copy-project-sections legend { padding: 0 5px; font-weight: 700; }.copy-project-sections label { display: flex; align-items: center; gap: 7px; }.copy-project-sections input { width: 16px; min-height: 16px; }
.rule-config-fields { padding-top: 2px; }
.form-note { color: var(--muted); font-size: 11px; padding: 9px 10px; background: var(--surface-2); border-radius: 4px; }
.check-line { min-height: 38px; display: flex !important; flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--text); }
.check-line input[type="checkbox"] { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--green); }
.leader-mark { margin-left: 5px; display: inline-flex; align-items: center; gap: 3px; color: #965713; font-size: 9px; font-weight: 600; }.leader-mark svg { width: 11px; height: 11px; }
.committee-role-mark { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border: 1px solid #b8d8cc; border-radius: 4px; background: #eef8f4; color: #14634d; font-size: 9px; font-weight: 700; line-height: 1.2; }
.point-task-admin-list { margin-bottom: 18px; border: 1px solid var(--line); border-radius: 6px; }
.point-task-admin-row { min-height: 58px; padding: 9px 12px; display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }.point-task-admin-row:last-child { border-bottom: 0; }.point-task-admin-row > span:nth-child(2) { display: grid; gap: 3px; }.point-task-admin-row small { color: var(--muted); font-size: 9px; }
.point-task-admin-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #955813; background: #f8e7d2; }.point-task-admin-icon svg { width: 15px; }
.point-option-editor { margin-top: 5px; padding-top: 14px; border-top: 1px solid var(--line); }
.point-option-heading { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.point-option-row { min-height: 62px; padding: 9px 0; display: grid; grid-template-columns: 1fr 1.4fr 90px 105px 34px; align-items: end; gap: 8px; border-bottom: 1px solid var(--line); }.point-option-row label { font-size: 9px; }.point-option-row .check-line { align-self: center; }
.point-review-list { display: grid; gap: 10px; }
.point-review-row { padding: 14px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.point-review-head { display: flex; justify-content: space-between; gap: 10px; }.point-review-head > span { display: grid; gap: 3px; }.point-review-head small { color: var(--muted); font-size: 9px; }.point-review-score { color: var(--green); font-size: 20px; }
.point-review-option { padding: 9px; background: var(--surface-2); border-radius: 4px; font-size: 11px; line-height: 1.55; }.point-review-option a { color: #316786; }
.point-review-actions { display: flex; justify-content: flex-end; gap: 7px; }
.point-review-toolbar { min-height: 48px; margin-bottom: 12px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; }.point-review-toolbar .check-line { font-size: 11px; }
.point-review-select { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; }.point-review-select > input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--green); }.point-review-select > div { min-width: 0; display: grid; gap: 10px; }
.quick-center-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-center-item { min-height: 76px; padding: 12px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; }.quick-center-item > span:first-child { width: 32px; height: 32px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 5px; }.quick-center-item > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }.quick-center-item strong { font-size: 12px; }.quick-center-item small { font-size: 9px; }.quick-center-actions { display: flex; align-items: center; gap: 5px; }
.quick-score-picker { padding-top: 2px; }.quick-score-heading { margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }.quick-score-heading > div { display: flex; gap: 6px; }.quick-score-heading .btn { min-height: 30px; padding: 0 9px; font-size: 10px; }
.quick-score-search { margin-bottom: 8px; }.quick-score-students { max-height: 230px; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 5px; }.quick-score-student { min-width: 0; min-height: 46px; padding: 7px 9px; display: grid; grid-template-columns: 17px minmax(0, 1fr); align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }.quick-score-student:nth-child(odd) { border-right: 1px solid var(--line); }.quick-score-student input { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--green); }.quick-score-student > span { min-width: 0; display: grid; gap: 2px; }.quick-score-student strong, .quick-score-student small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.quick-score-student strong { font-size: 11px; }.quick-score-student small { font-size: 9px; }
.quick-score-entry-section { min-width: 0; padding: 12px; border: 1px solid var(--line-strong); border-radius: 5px; }
.quick-score-entry-heading { margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quick-score-entry-heading > span { display: grid; gap: 3px; }.quick-score-entry-heading small { color: var(--muted); font-size: 9px; }
#quickScoreEntries { display: grid; gap: 8px; }
.quick-score-entry { min-width: 0; padding: 10px 0; display: grid; grid-template-columns: minmax(130px, .85fr) minmax(180px, 1.35fr) 92px minmax(130px, 1fr) 34px; gap: 8px; align-items: end; border-top: 1px solid var(--line); }
.quick-score-entry > label, .quick-score-entry-value { min-width: 0; }
.quick-score-entry-value > span { min-height: 36px; margin-top: 5px; display: flex; align-items: center; }
.quick-score-entry .score-option-set { min-width: 0; }
.score-option-set { min-width: 150px; display: flex; flex-wrap: wrap; gap: 5px; }
.score-option-button { min-height: 30px; padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--text); cursor: pointer; }
.score-option-button small { color: var(--muted); font-size: 9px; }
.score-option-button:hover { border-color: var(--green); }
.score-option-button.active { border-color: var(--green); background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.score-option-button.active small { color: inherit; }
.score-option-summary { flex: 1 0 100%; color: var(--green); font-size: 10px; font-weight: 600; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { min-width: 280px; max-width: 390px; min-height: 48px; padding: 11px 14px; border-radius: 5px; box-shadow: var(--shadow); background: var(--sidebar); color: white; display: flex; align-items: center; gap: 9px; animation: toast-in .2s ease; }
.toast.error { background: #7b2929; }.toast.success { background: var(--green); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* Student portal */
.student-body { min-height: 100vh; background: #edf2ef; }
.student-shell { width: min(100%, 620px); min-height: 100vh; margin: auto; background: #f9fbfa; box-shadow: 0 0 50px rgba(27,42,35,.08); }
.student-header { height: 62px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); position: sticky; top: 0; z-index: 10; }
.student-header-actions { display: flex; align-items: center; gap: 6px; }
.student-header .brand-mark { width: 30px; height: 30px; }.student-header .brand-mark svg { width: 17px; }
.student-login { padding: 58px 27px 30px; }
.student-login h1 { font-size: 30px; margin-bottom: 5px; }.student-login > p { color: var(--muted); margin-bottom: 34px; }
.student-login form, .student-login .login-password-fields { display: grid; gap: 17px; }.student-login .btn { min-height: 47px; margin-top: 5px; }
.student-dashboard { padding-bottom: 40px; }
.student-greeting { padding: 25px 20px 18px; }.student-greeting > span { color: var(--green); font-size: 11px; }.student-greeting h1 { font-size: 23px; margin: 6px 0 5px; }.student-greeting p { color: var(--muted); font-size: 11px; }
.student-score-band { margin: 0 18px 18px; min-height: 104px; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--sidebar); color: white; border-radius: 6px; overflow: hidden; }
.student-score-band > div { display: grid; align-content: center; justify-items: center; gap: 6px; border-right: 1px solid rgba(255,255,255,.1); }.student-score-band > div:last-child { border-right: 0; }
.student-score-band span { color: #acbbb4; font-size: 10px; }.student-score-band strong { font-size: 24px; }
.student-tabs { height: 54px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; border-bottom: 1px solid var(--line); background: white; position: sticky; top: 62px; z-index: 9; }
.student-tabs button { min-width: 0; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 10px; }
.student-tabs button span { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.student-tabs button svg { width: 16px; height: 16px; }
.student-tabs button.active { color: var(--green); border-color: var(--green); font-weight: 700; }
.student-section { padding: 0 0 20px; border-bottom: 8px solid #edf2ef; }
.student-section:last-child { border-bottom: 0; }
.mobile-section-heading { min-height: 58px; padding: 18px 20px 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }.mobile-section-heading h2 { font-size: 16px; }.mobile-section-heading > span { color: var(--muted); font-size: 10px; }
.student-date-control { display: grid; grid-template-columns: 30px 124px 30px; align-items: center; gap: 3px; }
.student-date-control .icon-btn { width: 30px; height: 30px; }
.student-date-control input { height: 30px; padding: 3px 6px; font-size: 11px; }
.student-learning-grid { margin: 0 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.student-learning-metric { min-height: 88px; padding: 14px; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.student-learning-metric > svg { width: 20px; color: var(--green); }.student-learning-metric > div { min-width: 0; display: grid; gap: 2px; }
.student-learning-metric span, .student-learning-metric small { color: var(--muted); font-size: 10px; }.student-learning-metric strong { font-size: 19px; }
.student-quest-stage { min-height: 166px; padding: 24px 20px; display: grid; grid-template-columns: 60px minmax(0, 1fr) 58px; align-items: center; gap: 15px; color: white; background: #263a46; border-bottom: 6px solid #d9a441; }
.quest-level-mark { width: 58px; height: 72px; display: grid; place-items: center; align-content: center; gap: 1px; color: #4b3510; background: #f3c75f; border: 2px solid #ffdda0; border-radius: 6px; box-shadow: 0 5px 0 #9d7224; }.quest-level-mark svg { width: 19px; }.quest-level-mark span { font-size: 8px; }.quest-level-mark strong { font-size: 21px; }
.quest-stage-copy { min-width: 0; display: grid; gap: 6px; }.quest-stage-copy > span { color: #a8d6c5; font-size: 10px; }.quest-stage-copy h2 { font-size: 21px; color: white; }.quest-stage-copy small { color: #c5d1d4; font-size: 9px; }
.quest-xp-track { height: 9px; overflow: hidden; background: #17252c; border: 1px solid #4f6873; border-radius: 5px; }.quest-xp-track span { display: block; width: 0; height: 100%; background: #4fc18d; border-radius: 4px; transition: width .25s ease; }
.quest-flame { display: grid; justify-items: center; gap: 1px; color: #ffc69d; }.quest-flame svg { width: 27px; height: 27px; color: #ef7b4a; }.quest-flame strong { font-size: 22px; color: white; }.quest-flame span { color: #c5d1d4; font-size: 8px; }
.quest-summary { margin: 16px 20px 0; min-height: 70px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 6px; background: white; }
.quest-summary > div { display: grid; place-items: center; align-content: center; gap: 2px; border-right: 1px solid var(--line); }.quest-summary > div:last-child { border-right: 0; }.quest-summary svg { width: 15px; color: #78612b; }.quest-summary strong { font-size: 16px; }.quest-summary span { color: var(--muted); font-size: 8px; }
.student-quest-list { margin: 0 20px; position: relative; display: grid; gap: 10px; }.student-quest-list::before { content: ''; position: absolute; top: 20px; bottom: 20px; left: 16px; width: 2px; background: #d7dfdb; }
.student-quest-card { min-height: 138px; padding: 13px; position: relative; display: grid; grid-template-columns: 34px 42px minmax(0, 1fr); align-items: start; gap: 10px; border: 1px solid var(--line); border-left: 4px solid #56836f; border-radius: 7px; background: white; box-shadow: 0 3px 12px rgba(28,48,39,.05); }.student-quest-card.quest-challenge { border-left-color: #c56a4e; }.student-quest-card.quest-collaboration { border-left-color: #537d9b; }.student-quest-card.quest-daily { border-left-color: #b48a36; }
.quest-path-node { z-index: 1; display: grid; place-items: center; }.quest-path-node span { width: 32px; height: 32px; display: grid; place-items: center; border: 3px solid white; border-radius: 50%; color: white; background: #486c5c; box-shadow: 0 0 0 2px #bfcac5; font-size: 10px; font-weight: 700; }
.quest-card-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 7px; color: #89501c; background: #f7e7d2; }.quest-card-icon svg { width: 20px; }
.quest-card-main { min-width: 0; display: grid; gap: 8px; }.quest-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }.quest-card-title > span:first-child { min-width: 0; display: grid; gap: 3px; }.quest-card-title small { color: var(--muted); font-size: 8px; line-height: 1.4; }.quest-card-main p { margin: 0; font-size: 10px; line-height: 1.5; color: #46534c; }
.quest-review-tag, .quest-auto-tag { flex: 0 0 auto; padding: 3px 5px; border-radius: 3px; color: #8e5218; background: #f8ead9; font-size: 8px; }.quest-auto-tag { color: #216b51; background: #e1f2eb; }
.quest-rewards { display: flex; flex-wrap: wrap; gap: 5px; }.quest-rewards span { min-height: 24px; padding: 3px 6px; display: inline-flex; align-items: center; gap: 3px; border: 1px solid #e6d2ae; border-radius: 4px; color: #725019; background: #fffaf0; font-size: 8px; }.quest-rewards svg { width: 10px; }
.quest-action-btn { min-height: 34px; justify-self: start; color: white; background: #356c59; }.quest-action-btn:hover { background: #285545; }.quest-status, .quest-wait { min-height: 29px; justify-self: start; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }.quest-status svg, .quest-wait svg { width: 14px; }.quest-status.status-approved { color: var(--green); }.quest-status.status-rejected { color: #a8423b; }
.quest-review-note { padding: 7px 8px; color: #804819; background: #fbf1e5; border-radius: 4px; font-size: 9px; }
.student-schedule, .student-task-list { margin: 0 20px; border-top: 1px solid var(--line-strong); }
.student-schedule-item, .student-task { min-height: 72px; display: grid; grid-template-columns: 55px 1fr auto; gap: 11px; align-items: center; border-bottom: 1px solid var(--line); }
.student-schedule-item time { font-weight: 700; }.student-schedule-item > div { min-width: 0; display: grid; gap: 4px; }.student-schedule-item small { font-size: 10px; line-height: 1.45; }
.student-row-action { flex: 0 0 auto; }
.student-feed { margin: 0 20px; border-top: 1px solid var(--line-strong); }
.student-feed-item { min-height: 78px; padding: 11px 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.student-feed-item.unread { background: linear-gradient(90deg, rgba(32,129,96,.06), transparent 64%); }
.student-feed-item > div { min-width: 0; display: grid; gap: 3px; }.student-feed-item p { margin: 0; color: var(--text); font-size: 11px; line-height: 1.45; }.student-feed-item small { color: var(--muted); font-size: 9px; }
.student-feed-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--green); background: var(--green-soft); }.student-feed-icon svg { width: 15px; }.student-feed-icon.amber { color: #995515; background: #f9ead8; }.student-feed-icon.blue { color: #316786; background: #e5f1f7; }.student-feed-icon.red { color: #a8423b; background: #f8e7e5; }
.student-feed-score { font-size: 16px; color: var(--green); }.student-feed-score.negative, .student-score-item strong.negative { color: #a8423b; }
.student-exam-score { justify-items: end; }.student-exam-score strong { font-size: 20px; }.student-exam-score small { font-size: 9px; }
.student-score-items { margin: 0 20px; display: grid; gap: 12px; }
.student-score-item { display: grid; gap: 6px; }.student-score-item > div:first-child { display: flex; justify-content: space-between; gap: 12px; }.student-score-item span { font-size: 11px; }.student-score-item strong { color: var(--green); }
.student-score-track { height: 7px; overflow: hidden; background: var(--surface-2); border-radius: 4px; }.student-score-track span { display: block; height: 100%; background: #258563; border-radius: 4px; }.student-score-track span.negative { background: #c66a62; }
.student-score-items.compact { margin-top: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.student-dimension { min-height: 46px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }.student-dimension:nth-child(odd) { border-right: 1px solid var(--line); }.student-dimension span { color: var(--muted); font-size: 10px; }
.student-trend { height: 220px; margin: 0 16px; position: relative; }
.student-task { min-height: 92px; grid-template-columns: 34px minmax(0, 1fr) 34px; padding: 13px 0; align-items: start; }
.task-check { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }.task-check svg { width: 15px; }.task-check.done { background: var(--green-soft); color: var(--green); }
.student-task-main { min-width: 0; display: grid; gap: 6px; }.student-task-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.student-task-main p { margin: 0; font-size: 11px; line-height: 1.55; }.student-task-main > small { color: var(--muted); font-size: 9px; }
.student-file-links { display: flex; flex-wrap: wrap; gap: 12px; }.student-file-links a, .student-submit-meta > a { display: inline-flex; align-items: center; gap: 4px; color: #316786; font-size: 10px; }.student-file-links svg, .student-submit-meta > a svg { width: 12px; }
.student-feedback { padding: 8px 9px; display: grid; grid-template-columns: 18px 1fr; gap: 6px; color: #74420f; background: #fbf1e5; border-radius: 4px; font-size: 10px; line-height: 1.5; }.student-feedback svg { width: 14px; }.student-feedback span { display: grid; }.student-feedback strong { font-size: 10px; }
.student-radar { height: 310px; margin: 0 18px; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 6px; }.student-section > .tag-list { margin: 14px 20px 0; }
.student-achievements { margin: 0 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.student-achievement { min-height: 76px; padding: 11px; display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 9px; border: 1px solid #ead9c6; border-radius: 6px; background: #fffaf5; }.student-achievement > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #9b5c1c; background: #f6e2ca; }.student-achievement svg { width: 18px; }.student-achievement > div { display: grid; gap: 3px; }.student-achievement small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.student-inline-empty { min-height: 92px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); font-size: 11px; }.student-inline-empty svg { width: 22px; }
.student-submit-meta { margin-bottom: 16px; padding-bottom: 14px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }.student-submit-meta p { margin: 0; line-height: 1.6; }.student-submit-meta > small { color: var(--muted); }
.student-photo-folders { margin: 0 20px; }
.student-photo-folder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.student-photo-folder { min-width: 0; min-height: 92px; padding: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr) 18px; align-items: center; gap: 11px; overflow: hidden; color: inherit; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; text-align: left; }
.student-photo-folder-cover { width: 110px; height: 92px; position: relative; display: block; overflow: hidden; background: var(--surface-soft); }
.student-photo-folder-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.student-photo-folder-cover > svg { width: 26px; height: 26px; padding: 6px; position: absolute; left: 7px; bottom: 7px; color: #fff; border-radius: 5px; background: rgba(23,35,58,.75); }
.student-photo-folder-cover > b { min-width: 24px; height: 24px; padding: 0 7px; position: absolute; right: 7px; top: 7px; display: grid; place-items: center; color: #fff; border-radius: 12px; background: rgba(23,35,58,.8); font-size: 10px; }
.student-photo-folder > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.student-photo-folder strong, .student-photo-folder small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-photo-folder strong { font-size: 12px; }.student-photo-folder small { color: var(--muted); font-size: 9px; }
.student-photo-folder > svg { width: 15px; color: var(--muted); }
.student-photo-folder-toolbar { min-height: 50px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.student-photo-folder-toolbar > span { display: grid; gap: 2px; }.student-photo-folder-toolbar strong { font-size: 12px; }.student-photo-folder-toolbar small { color: var(--muted); font-size: 9px; }
.student-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.student-photo-thumb { min-width: 0; padding: 0; overflow: hidden; color: inherit; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: zoom-in; text-align: left; }
.student-photo-thumb img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: var(--surface-soft); }
.student-photo-thumb > span { padding: 8px 9px; display: grid; gap: 3px; }.student-photo-thumb strong, .student-photo-thumb small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.student-photo-thumb strong { font-size: 10px; }.student-photo-thumb small { color: var(--muted); font-size: 9px; }
.student-photo-dialog { max-width: min(920px, 94vw); max-height: 90vh; padding: 42px 14px 14px; overflow: hidden; color: #fff; border: 0; border-radius: 7px; background: #111827; }
.student-photo-dialog::backdrop { background: rgba(15,23,42,.78); }
.student-photo-dialog > .icon-btn { position: absolute; right: 9px; top: 9px; color: #fff; background: rgba(255,255,255,.12); }
.student-photo-dialog img { max-width: 100%; max-height: calc(90vh - 88px); display: block; object-fit: contain; }
.student-photo-dialog > strong { margin-top: 10px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; text-align: center; }

@media (max-width: 1100px) {
  .workspace-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .overview-grid .span-7, .overview-grid .span-5 { grid-column: span 12; }
  .progress-grid { grid-template-columns: repeat(2, 1fr); }
  .reports-grid .span-7, .reports-grid .span-5 { grid-column: span 12; }
  .assignment-row { grid-template-columns: 42px minmax(0, 1fr) 110px 120px minmax(118px, auto); }
  .settings-layout { grid-template-columns: 1fr; }
  .profile-benchmark-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .login-layout { display: block; }.login-visual { display: none; }.login-panel { min-height: 100vh; }.mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 52px; }
  .workspace-shell { display: block; }.sidebar { position: fixed; inset: 0 auto 0 0; width: 230px; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 18px 0 50px rgba(0,0,0,.22); }.sidebar.open { transform: translateX(0); }
  .workspace-main { height: 100vh; }.workspace-topbar { padding: 0 16px; }.workspace-topbar > div:nth-child(2) { margin-right: auto; margin-left: 10px; }.mobile-menu { display: inline-flex; }.connection { display: none; }
  .view { padding: 18px 16px 40px; }.metrics-strip { grid-template-columns: repeat(2, 1fr); }.metric:nth-child(2) { border-right: 0; }.metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .teacher-workbench { grid-template-columns: 1fr; }.workbench-pending-list { grid-template-columns: 1fr 1fr; }.workbench-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-bar { align-items: stretch; flex-direction: column; }.action-bar > div, .filters { width: 100%; }.filters > * { flex: 1; min-width: 0 !important; }.action-bar > div:last-child { justify-content: flex-end; }.action-bar > .profile-filters { display: grid; grid-template-columns: 1fr; }
  .profile-identity { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 14px; }.profile-avatar { width: 58px; height: 58px; }.profile-identity > .tag-list { grid-column: 1 / -1; }.profile-total { grid-column: 3; grid-row: 1; }.signal-grid { grid-template-columns: repeat(2, 1fr); }.profile-overview-grid, .profile-secondary-grid { grid-template-columns: 1fr; }.profile-detail-launcher { align-items: stretch; flex-direction: column; }.profile-detail-launcher > div:first-child { min-width: 0; }.profile-detail-actions { justify-content: flex-start; }
  .profile-process-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.profile-attendance-formula { max-width: none; text-align: left; }
  .profile-benchmark-heading { align-items: stretch; flex-direction: column; }.profile-benchmark-heading .segmented { width: 100%; }.profile-benchmark-heading .segmented button { flex: 1 0 auto; }
  .profile-benchmark-toolbar > .btn { margin-left: 0; }.profile-benchmark-options, .profile-benchmark-details { grid-template-columns: 1fr; }.profile-benchmark-detail:nth-child(odd) { border-right: 0; }
  .profile-analysis-list { grid-template-columns: 1fr; }.profile-analysis-item:nth-last-child(2) { border-bottom: 1px solid #dce3e7; }
  .profile-analysis-item { grid-template-columns: 36px minmax(0, 1fr); }.profile-analysis-item > b { font-size: 20px; }
  .profile-detail-filters { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, .8fr) 36px; }.profile-detail-filters select, .profile-detail-filters input { width: 100%; min-width: 0; }
  .profile-assessment-dimensions { grid-template-columns: repeat(2, minmax(0, 1fr)); }.profile-assessment-dimensions > span:nth-child(2n) { border-right: 0; }.profile-assessment-dimensions > span:nth-child(n+3) { border-top: 1px solid var(--line); }
  .timeline-day { grid-template-columns: 80px 1fr; }.timeline-date { padding: 15px 10px; }.timeline-events { padding: 8px 12px; }.timeline-event { grid-template-columns: 72px 1fr; }.timeline-event-tags { grid-column: 2; justify-content: flex-start; padding-bottom: 8px; }
  .assignment-row { grid-template-columns: 40px 1fr auto; }.assignment-stat { display: none; }
  .form-grid { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }
  .point-option-row { grid-template-columns: 1fr 1fr; }.point-option-row > .icon-btn { align-self: center; }
}

@media (max-width: 480px) {
  .login-form-wrap { width: calc(100% - 40px); }.login-heading h1 { font-size: 27px; }
  .metrics-strip { min-height: auto; }.metric { padding: 16px; }.metric strong { font-size: 24px; }
  .progress-grid { grid-template-columns: 1fr; }
  .teacher-workbench { padding: 15px; }.workbench-pending-list,.workbench-actions, .quick-center-grid, .quick-score-students { grid-template-columns: 1fr; }.quick-score-student:nth-child(odd) { border-right: 0; }
  .attendance-workbench .configuration-actions { display: grid; grid-template-columns: 1fr 1fr; }.attendance-search { grid-column: 1 / -1; min-width: 0; }.attendance-workbench td select,.attendance-workbench td input { min-height: 44px; }
  .span-5, .span-7, .span-12 { grid-column: span 12; }
  .search-input { min-width: 0; }
  .action-bar > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .action-bar > div:last-child > .btn, .action-bar > div:last-child > .file-button { width: 100%; min-width: 0; white-space: nowrap; }
  .profile-section { padding: 15px; }.profile-section > .section-heading { align-items: stretch; flex-direction: column; }.profile-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-identity { padding: 16px; grid-template-columns: 48px minmax(0, 1fr); }.profile-avatar { width: 48px; height: 48px; font-size: 18px; }.profile-person h2 { font-size: 17px; }.profile-total { grid-column: 1 / -1; grid-row: auto; padding: 13px 0 0; border-top: 1px solid rgba(255,255,255,.12); border-left: 0; grid-template-columns: 1fr auto; align-items: end; }.profile-total strong { grid-column: 1; font-size: 25px; }.profile-total small { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .profile-benchmark-toolbar .search-input, .profile-benchmark-date { min-width: 100%; }.profile-benchmark-date { grid-template-columns: auto minmax(0, 1fr); }.profile-benchmark-toolbar > .btn { flex: 1; }.profile-benchmark-chart { min-height: 280px; }
  .profile-detail-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }.profile-detail-actions .btn { width: 100%; min-width: 0; }
  .topbar-actions .icon-btn { display: none; }
  .workspace-topbar h1 { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .student-shell { box-shadow: none; }
  .student-score-band { grid-template-columns: repeat(2, 1fr); }
  .student-score-band > div { min-height: 78px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .student-score-band > div:nth-child(2) { border-right: 0; }.student-score-band > div:nth-child(n+3) { border-bottom: 0; }
  .student-tabs { height: 52px; }
  .student-tabs button { font-size: 9px; }
  .student-tabs button svg { width: 15px; height: 15px; }
  .student-learning-grid, .student-achievements { margin-left: 14px; margin-right: 14px; }
  .student-schedule, .student-task-list, .student-feed, .student-score-items { margin-left: 16px; margin-right: 16px; }
  .student-photo-folders { margin-left: 14px; margin-right: 14px; }
  .student-photo-folder-grid { grid-template-columns: minmax(0, 1fr); }
  .student-photo-folder { grid-template-columns: 96px minmax(0, 1fr) 16px; }
  .student-photo-folder-cover { width: 96px; }
  .student-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-section-heading { padding-left: 16px; padding-right: 16px; }
  .student-date-control { grid-template-columns: 28px 116px 28px; }
  .student-quest-stage { grid-template-columns: 52px minmax(0, 1fr) 48px; padding-left: 14px; padding-right: 14px; gap: 10px; }
  .quest-level-mark { width: 50px; }
  .quest-summary, .student-quest-list { margin-left: 14px; margin-right: 14px; }
  .student-quest-card { grid-template-columns: 32px 36px minmax(0, 1fr); padding: 11px; gap: 8px; }
  .quest-card-icon { width: 34px; height: 34px; }
}

@media (max-width: 350px) {
  .student-learning-grid, .student-achievements { grid-template-columns: 1fr; }
  .student-tabs button span { display: none; }
}

/* Zhejiang Post and Telecommunication College visual system */
:root {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-2: #edf2f4;
  --ink: #14232d;
  --text: #14232d;
  --muted: #65757f;
  --line: #d9e2e7;
  --line-strong: #c4d0d7;
  --green: #008d78;
  --green-2: #00a486;
  --green-soft: #dff4ee;
  --amber: #c97819;
  --amber-soft: #fff0dc;
  --red: #c23d4b;
  --red-soft: #fde9ec;
  --blue: #316dcc;
  --blue-soft: #e5eefc;
  --sidebar: #111c24;
  --shadow: 0 14px 40px rgba(27, 46, 57, .09);
  --shadow-soft: 0 5px 18px rgba(27, 46, 57, .06);
}

html { background: var(--bg); }
body { color: var(--ink); background: var(--bg); }
::selection { color: #fff; background: var(--green); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.eyebrow { color: var(--green); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 10px; }

.brand-mark { position: relative; width: 38px; height: 38px; border: 1px solid rgba(0, 164, 134, .25); border-radius: 6px; color: #fff; background: #111c24; box-shadow: 0 0 0 3px rgba(0, 164, 134, .1); }
.brand-mark::after { display: none; }
.brand-mark svg { width: 21px; height: 21px; stroke-width: 1.9; }
.brand-copy { min-width: 0; display: grid; gap: 2px; }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { color: var(--ink); font-size: 14px; line-height: 1.25; }
.brand-copy small { color: var(--muted); font-size: 10px; }

.btn { min-height: 40px; border-radius: 5px; font-weight: 650; box-shadow: none; }
.btn:hover { transform: none; }
.btn-primary { border-color: #007d6b; background: var(--green); box-shadow: 0 6px 16px rgba(0, 141, 120, .16); }
.btn-primary:hover { border-color: #006c5c; background: #007c69; }
.btn-secondary { border-color: var(--line-strong); background: #fff; }
.btn-secondary:hover { color: var(--green); border-color: var(--green); background: #f7fcfa; }
.btn-quiet:hover { color: var(--ink); background: var(--surface-2); }
.icon-btn { border-radius: 5px; border-color: var(--line); background: #fff; }
.icon-btn:hover { color: var(--green); border-color: rgba(0, 141, 120, .55); background: #f6fbfa; }
input, select, textarea { border-radius: 5px; border-color: var(--line-strong); background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 141, 120, .1); }

/* Login */
.login-body { background: #f4f7f8; }
.login-layout { grid-template-columns: minmax(0, 58%) minmax(420px, 42%); }
.login-visual { min-height: 680px; background: #101d24; }
.login-visual::after { background: rgba(10, 25, 32, .46); }
.login-visual::before { content: ""; position: absolute; z-index: 1; inset: 0; border: 18px solid rgba(255,255,255,.035); pointer-events: none; }
.login-visual img { filter: saturate(.82) contrast(1.04); }
.login-brand { left: clamp(30px, 4vw, 64px); top: 44px; gap: 14px; }
.login-brand .brand-mark { color: #fff; border-color: rgba(103, 235, 201, .45); background: rgba(9, 44, 49, .82); box-shadow: 0 0 0 4px rgba(103, 235, 201, .1); }
.login-brand strong { font-size: 19px; }
.login-brand span { color: rgba(255,255,255,.7); font-size: 11px; }
.login-caption { left: clamp(30px, 4vw, 64px); bottom: 58px; max-width: 560px; padding-left: 20px; border-left: 3px solid #55d6b6; }
.login-caption p { color: #74ddc3; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.login-caption strong { max-width: 510px; color: #fff; font-size: 28px; font-weight: 650; }
.login-panel { background: #f7f9fa; }
.login-panel::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--green); }
.login-form-wrap { width: min(400px, calc(100% - 70px)); }
.login-heading { margin-bottom: 32px; }
.login-heading h1 { color: #11212b; font-size: 30px; }
.login-heading p { margin-top: 5px; }
.login-form input { border-color: #cbd6dc; box-shadow: 0 1px 2px rgba(22, 40, 50, .03); }
.student-entry { border-color: var(--line); }
.login-panel footer { color: #7c8a93; }

/* Project picker */
.simple-header { height: 76px; border-bottom-color: var(--line); box-shadow: 0 1px 0 rgba(20, 35, 45, .02); }
.simple-header .brand-inline { gap: 13px; }
.projects-page { width: min(1120px, calc(100% - 48px)); margin-top: 56px; }
.page-heading { align-items: center; margin-bottom: 28px; }
.page-heading h1 { font-size: 28px; }
.project-list { display: grid; gap: 10px; border-top: 0; }
.project-row { min-height: 88px; grid-template-columns: 132px minmax(0, 1fr) auto 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 18px; background: #fff; box-shadow: var(--shadow-soft); }
.project-row:hover { border-color: rgba(0, 141, 120, .45); background: #fbfefd; box-shadow: 0 9px 26px rgba(27, 46, 57, .09); }
.project-code { color: var(--blue); }
.status-dot { color: #007561; background: var(--green-soft); }

/* Management workspace */
.workspace-shell { grid-template-columns: 256px minmax(0, 1fr); }
.sidebar { position: relative; background: var(--sidebar); border-right: 1px solid #263641; }
.sidebar::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background: rgba(78, 215, 181, .12); pointer-events: none; }
.sidebar-brand { height: 76px; padding: 0 18px; gap: 12px; border-bottom-color: rgba(255,255,255,.08); }
.sidebar-brand .brand-mark { color: #fff; border-color: rgba(95, 230, 196, .32); background: rgba(0, 141, 120, .2); box-shadow: 0 0 0 3px rgba(0, 141, 120, .08); }
.sidebar-brand > span:last-child { gap: 2px; min-width: 0; }
.sidebar-brand strong { color: #f3f8f7; font-size: 14px; line-height: 1.25; white-space: nowrap; }
.sidebar-brand small { color: #82959f; font-size: 10px; white-space: nowrap; }
.project-switcher { margin: 17px 14px 8px; padding: 12px 13px; border-color: rgba(255,255,255,.1); border-radius: 5px; background: #17252e; }
.project-switcher span { color: #60cdb1; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.project-switcher small { color: #778b96; }
.sidebar-nav { gap: 3px; padding: 11px 10px; }
.sidebar-nav button { position: relative; height: 42px; border: 1px solid transparent; border-radius: 5px; color: #9aabb4; }
.sidebar-nav button:hover { color: #ecf7f4; border-color: rgba(255,255,255,.07); background: #182832; }
.sidebar-nav button.active { color: #fff; border-color: rgba(78, 215, 181, .22); background: #17352f; }
.sidebar-nav button.active::before { content: ""; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 2px 2px 0; background: #4ed7b5; box-shadow: 0 0 10px rgba(78, 215, 181, .42); }
.sidebar-nav button.active svg { color: #62ddbd; }
.sidebar-user { min-height: 74px; border-top-color: rgba(255,255,255,.08); background: #0e1820; }
.sidebar-user .avatar { border: 1px solid rgba(255,255,255,.12); color: #13382f; background: #67d7bb; }
.sidebar-user strong { color: #edf5f3; }
.workspace-main { background: var(--bg); }
.workspace-topbar { height: 76px; padding: 0 30px; border-bottom-color: var(--line); background: rgba(255,255,255,.96); box-shadow: 0 1px 8px rgba(23, 41, 51, .035); backdrop-filter: blur(10px); }
.workspace-topbar h1 { max-width: min(760px, 56vw); overflow: hidden; color: #13242e; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb { color: #778790; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.breadcrumb b { color: var(--green); }
.connection > span { background: #19b58f; box-shadow: 0 0 0 3px rgba(25,181,143,.14), 0 0 9px rgba(25,181,143,.3); }
.view { padding: 28px 30px 52px; max-width: 1540px; }

.metrics-strip { min-height: 116px; border-color: var(--line); border-radius: 6px; box-shadow: var(--shadow-soft); }
.metric { overflow: hidden; padding: 22px 24px; }
.metric::after { content: ""; position: absolute; right: 20px; top: 23px; width: 24px; height: 2px; background: #b7c6ce; }
.metric span { color: #657680; }
.metric strong { color: #122631; font-size: 31px; }
.metric.accent::before { top: 0; bottom: 0; left: 0; width: 3px; background: var(--amber); }
.metric.accent strong { color: #a85f13; }
.teacher-workbench { border: 1px solid #253a45; border-radius: 6px; background: #16242d; box-shadow: 0 12px 28px rgba(16, 29, 37, .12); }
.workbench-heading .eyebrow { color: #5dd9ba; }
.workbench-heading .muted { color: #90a2ab; }
.workbench-actions { border-color: #324751; background: #324751; }
.workbench-actions button { background: #1b2c35; }
.workbench-actions button:hover { background: #223a43; }
.workbench-actions button > svg { color: #5dd9ba; }
.workbench-actions small { color: #8ea2ac; }
.overview-grid, .reports-grid { gap: 20px; }
.content-block, .profile-section { border-color: var(--line); border-radius: 6px; box-shadow: var(--shadow-soft); }
.section-heading { margin-bottom: 16px; }
.section-heading h2 { color: #172832; }
.schedule-mark { background: var(--green); }
.schedule-item:nth-child(2n) .schedule-mark { background: var(--blue); }
.pill, .status-badge, .status-dot { border-radius: 4px; }
.mini-avatar { border: 1px solid #d5e0e5; color: var(--blue); background: #eff4f7; }
.progress-track { height: 7px; background: #e8eef1; }
.progress-track i { background: var(--green); }

.action-bar { min-height: 58px; }
.filters select, .filters input { background-color: #fff; }
.search-input svg { color: #7b8b94; }
.table-wrap, .timeline { border-color: var(--line); border-radius: 6px; box-shadow: var(--shadow-soft); }
th { height: 45px; color: #576a75; background: #eef3f5; border-bottom-color: #cfdae0; }
td { height: 54px; border-bottom-color: #e7edf0; }
tbody tr:hover { background: #f4faf8; }
.row-actions .icon-btn:hover { background: var(--green-soft); }
.timeline-date { background: #eef3f5; }
.timeline-event time { color: var(--blue); }
.matrix-notice { color: #72521e; border-color: #eed3a8; background: #fff6e8; }
.assignment-icon { color: var(--blue); background: var(--blue-soft); }
.profile-identity { border: 1px solid #263d48; border-radius: 6px; background: #162630; box-shadow: var(--shadow); }
.profile-avatar { color: #123b31; background: #67d7bb; }
.profile-total strong { color: #75e0c4; }
.profile-score-item b { color: var(--green); }
.signal-grid { border-color: #d5e0e5; background: #d5e0e5; }
.signal { background: #fff; }
.segmented { background: #e8eef1; }
.segmented button.active { background: var(--blue); }
.audit-icon { color: var(--blue); background: var(--blue-soft); }

.app-dialog { border: 1px solid rgba(99, 119, 130, .22); border-radius: 7px; box-shadow: 0 28px 90px rgba(10, 25, 33, .28); }
.app-dialog::backdrop { background: rgba(9, 22, 29, .58); backdrop-filter: blur(3px); }
.dialog-shell > header { background: #f7f9fa; }
.dialog-shell > footer { background: #f7f9fa; }
.point-task-admin-list, .point-review-row, .quick-center-item { border-color: var(--line); }
.point-task-admin-icon { color: var(--blue); background: var(--blue-soft); }
.quick-center-item > span:first-child { color: var(--green); background: var(--green-soft); }
.toast { border: 1px solid #344752; border-radius: 6px; background: #14242d; }
.toast.success { border-color: #2eb797; background: #087d6a; }

/* Student experience */
.student-body { background: #e9eff2; }
.student-shell { width: min(100%, 680px); background: #f7f9fa; box-shadow: 0 0 52px rgba(24, 42, 52, .1); }
.student-header { height: 68px; border-bottom-color: #d7e1e6; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.student-header .brand-inline { gap: 11px; }
.student-header .brand-mark { width: 34px; height: 34px; }
.student-header .brand-copy strong { font-size: 12px; }
.student-header .brand-copy small { font-size: 9px; }
.student-login { padding-top: 68px; }
.student-login h1 { color: #10232d; }
.student-score-band { border: 1px solid #29404b; border-radius: 6px; background: #152630; box-shadow: 0 12px 28px rgba(17, 34, 43, .14); }
.student-score-band span { color: #9fb0b8; }
.student-score-band strong { color: #ecf8f5; }
.student-score-band > div:first-child strong { color: #68ddbf; }
.student-tabs { top: 68px; border-top: 1px solid var(--line); box-shadow: 0 5px 14px rgba(27, 46, 57, .05); }
.student-tabs button.active { color: var(--green); border-color: var(--green); background: #f4fbf9; }
.student-section { border-bottom-color: #e9eff2; }
.student-learning-metric { border-color: var(--line); box-shadow: var(--shadow-soft); }
.student-learning-metric > svg { color: var(--blue); }
.student-quest-stage { border-bottom-color: #d99a38; background: #172a34; }
.quest-xp-track { border-color: #4a626e; background: #0f1c23; }
.quest-xp-track span { background: #50d5b4; }
.quest-summary, .student-quest-card, .student-radar, .student-achievement { box-shadow: var(--shadow-soft); }
.student-quest-card { border-left-color: var(--green); }
.quest-path-node span { background: var(--green); }
.quest-action-btn { background: var(--green); }
.quest-action-btn:hover { background: #007866; }
.student-feed-icon { color: var(--blue); background: var(--blue-soft); }
.student-score-track span { background: var(--green); }

@media (max-width: 1300px) {
  .profile-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-insight-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr); }
}

@media (max-width: 1200px) {
  .action-bar { align-items: stretch; flex-direction: column; }
  .action-bar > div, .filters { width: 100%; }
  .filters > * { flex: 1; min-width: 0 !important; }
  .action-bar > div:last-child { justify-content: flex-end; flex-wrap: wrap; }
}

@media (max-width: 1100px) {
  .workspace-shell { grid-template-columns: 226px minmax(0, 1fr); }
  .sidebar-brand { padding: 0 13px; gap: 9px; }
  .sidebar-brand strong { font-size: 13px; }
  .sidebar-brand small { font-size: 9px; }
  .teacher-workbench { grid-template-columns: minmax(150px, .7fr) minmax(0, 2.3fr); }
  .workbench-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench-actions strong { white-space: nowrap; }
}

@media (max-width: 800px) {
  .login-layout { display: block; }
  .login-panel { min-height: 100vh; }
  .mobile-brand { align-items: center; gap: 12px; margin-bottom: 50px; }
  .mobile-brand .brand-copy strong { font-size: 14px; }
  .workspace-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 40; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-brand { padding: 0 18px; gap: 12px; }
  .sidebar-brand strong { font-size: 14px; }
  .sidebar-brand small { font-size: 10px; }
  .workspace-topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 0 16px; }
  .workspace-topbar > div:nth-child(2) { min-width: 0; margin: 0; }
  .workspace-topbar h1 { max-width: 100%; }
  .view { padding: 20px 16px 44px; }
  .score-toolbar > .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects-page { width: min(100% - 32px, 1120px); }
  .project-row { grid-template-columns: 104px minmax(0, 1fr) auto 28px; padding: 0 12px; }
}

@media (max-width: 560px) {
  .simple-header { padding: 0 16px; }
  .score-toolbar > .filters { grid-template-columns: minmax(0, 1fr); }
  .simple-header .brand-copy small { display: none; }
  .simple-header .brand-copy strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .projects-page { margin-top: 32px; }
  .page-heading { align-items: flex-start; gap: 18px; }
  .page-heading h1 { font-size: 24px; }
  .project-row { min-height: 104px; grid-template-columns: minmax(0, 1fr) auto 26px; gap: 8px 12px; padding: 14px; }
  .project-code { grid-column: 1 / -1; }
  .project-row > span:nth-child(2) { min-width: 0; }
  .project-row > span:nth-child(2) strong { overflow-wrap: anywhere; }
  .login-form-wrap { width: calc(100% - 40px); }
  .login-panel footer { padding: 0 18px; overflow-wrap: anywhere; }
}

@media (max-width: 480px) {
  .workspace-topbar { height: 70px; }
  .workspace-topbar h1 { font-size: 14px; }
  .breadcrumb { font-size: 9px; }
  .metrics-strip { box-shadow: none; }
  .metric::after { right: 13px; top: 16px; width: 18px; }
  .teacher-workbench { box-shadow: none; }
  .content-block, .profile-section, .table-wrap, .timeline { box-shadow: none; }
  .student-header .brand-copy strong { font-size: 11px; }
  .student-header .brand-copy small { font-size: 8px; }
}

.timeline-event { grid-template-columns: 95px minmax(0, 1fr) minmax(90px, auto) auto; }
.timeline-event > .row-actions { flex-wrap: nowrap; }
.activity-score-options { min-width: 0; margin: 0; padding: 11px 12px 12px; border: 1px solid var(--line-strong); border-radius: 5px; }
.activity-score-options legend { padding: 0 5px; color: #3d4944; font-size: 13px; font-weight: 600; }
.activity-score-options > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.activity-score-option { min-width: 0; min-height: 34px; display: grid; grid-template-columns: 17px minmax(0, 1fr); align-items: center; gap: 7px; font-size: 11px; font-weight: 500; }
.activity-score-option input { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--green); }
.activity-score-option span { overflow-wrap: anywhere; }
.activity-score-options > small { display: block; margin-top: 7px; font-size: 10px; }

.exam-toolbar > div:last-child, .question-toolbar { flex-wrap: wrap; }
.exam-toolbar > div:last-child > .btn, .question-toolbar .btn { flex: 0 0 auto; white-space: nowrap; }
.question-toolbar { margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }
.question-toolbar .btn { min-height: 34px; }
.question-option-preview { min-width: 180px; max-width: 360px; display: grid; gap: 3px; }.question-option-preview span { color: #46564e; font-size: 10px; white-space: normal; overflow-wrap: anywhere; }.question-option-preview small { color: var(--muted); }
.question-answer-preview { min-width: 180px; max-width: 320px; display: grid; gap: 4px; }
.question-answer-preview strong { color: #173a70; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.question-answer-preview small { max-height: 42px; overflow: hidden; color: var(--muted); line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
.exam-paper-preview { display: grid; gap: 14px; }
.exam-paper-file { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #b9dce4; border-radius: 7px; background: #eefafb; }
.exam-paper-file > svg { width: 26px; height: 26px; flex: 0 0 auto; color: #0e8298; }
.exam-paper-file > span { min-width: 0; display: grid; gap: 3px; }
.exam-paper-file strong { overflow: hidden; color: #173a70; text-overflow: ellipsis; white-space: nowrap; }
.exam-paper-file small { color: #587087; }
.exam-paper-summary { display: grid; grid-template-columns: 1.25fr 1fr .75fr; gap: 1px; overflow: hidden; border: 1px solid #d7e1ee; border-radius: 7px; background: #d7e1ee; }
.exam-paper-summary > div { min-width: 0; display: grid; gap: 5px; padding: 13px 14px; background: #fff; }
.exam-paper-summary span { color: #6b7a90; font-size: 10px; font-weight: 700; }
.exam-paper-summary strong { color: #223c61; overflow-wrap: anywhere; }
.exam-paper-types { display: flex; flex-wrap: wrap; gap: 7px; }
.exam-paper-types > span { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 9px; color: #3d5878; border: 1px solid #cfe0f3; border-radius: 5px; background: #f4f8fd; font-size: 11px; }
.exam-paper-types strong { color: #2866b2; font-size: 14px; }
.exam-paper-error-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 14px; border-left: 3px solid #d45b65; background: #fff4f4; }
.exam-paper-error-head strong { color: #a32932; }
.exam-paper-error-head span { color: #7b5960; font-size: 11px; }
.exam-paper-errors { max-height: 50vh; margin: 0; padding: 0; display: grid; gap: 7px; overflow: auto; list-style: none; }
.exam-paper-errors li { display: grid; grid-template-columns: minmax(170px, .65fr) minmax(260px, 1.35fr); gap: 12px; padding: 10px 12px; border-bottom: 1px solid #e6ebf2; }
.exam-paper-errors li strong { color: #96313a; font-size: 11px; }
.exam-paper-errors li span { color: #46566d; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .exam-paper-summary { grid-template-columns: minmax(0, 1fr); }
  .exam-paper-errors li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .exam-paper-error-head { align-items: flex-start; flex-direction: column; gap: 3px; }
}
.question-options-editor { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line-strong); border-radius: 5px; }.question-options-editor legend { padding: 0 5px; color: #3d4944; font-size: 13px; font-weight: 600; }.question-options-editor > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.question-options-editor > .btn { width: fit-content; min-height: 34px; margin-top: 9px; }
.question-option-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 6px; }.question-option-row:has(input[readonly]) { grid-template-columns: minmax(0, 1fr); }.question-option-row input { min-width: 0; }.question-option-row .icon-btn { width: 38px; height: 40px; }
.matrix-wrap th small, .matrix-wrap td small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 400; }
.matrix-wrap td input { min-width: 72px; }
.tag-analysis-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border: 1px solid var(--line); border-radius: 5px; }
.tag-analysis-summary > div { min-height: 82px; padding: 12px; display: grid; gap: 3px; align-content: center; border-right: 1px solid var(--line); }
.tag-analysis-summary > div:last-child { border-right: 0; }
.tag-analysis-summary span, .tag-analysis-summary small { color: var(--muted); font-size: 10px; }
.tag-analysis-summary strong { font-size: 20px; }

@media (max-width: 700px) {
  .question-options-editor > div { grid-template-columns: 1fr; }
}

.assignment-bonus { width: fit-content; margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; color: #2563EB; font-size: 10px; font-weight: 700; }
.assignment-bonus svg { width: 14px; height: 14px; }
.assignment-reward-config, .profile-dimension-rules { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line-strong); border-radius: 5px; }
.assignment-reward-config legend, .profile-dimension-rules legend { padding: 0 5px; color: var(--text); font-size: 12px; font-weight: 700; }
.attachment-type-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 12px; }
.submission-content { min-width: 180px; max-width: 360px; display: grid; gap: 5px; }
.submission-content > span { overflow-wrap: anywhere; white-space: normal; }
.submission-content > a { width: fit-content; display: inline-flex; align-items: center; gap: 4px; color: #316786; font-size: 10px; font-weight: 700; }
.submission-content svg { width: 13px; height: 13px; }
.attendance-workbench { min-width: 0; display: grid; gap: 12px; }
.attendance-workbench .table-wrap { max-height: min(55vh, 520px); overflow: auto; }
.attendance-workbench thead { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.attendance-search { min-width: 190px; flex: 1 1 220px; }
.toggle-row { min-width: 0; display: flex !important; grid-auto-flow: column; justify-content: start; align-items: center; gap: 8px; }
.toggle-row input[type="checkbox"] { width: 17px; min-height: 17px; padding: 0; accent-color: var(--green); }
.profile-dimension-rules > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.profile-dimension-rules .toggle-row > span { display: grid; gap: 1px; }
.profile-dimension-rules small { color: var(--muted); font-size: 9px; }

.learning-log-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.learning-log-item { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.learning-log-item > header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.learning-log-item > header > span { min-width: 0; display: grid; gap: 3px; }
.learning-log-item > header strong { overflow-wrap: anywhere; font-size: 14px; }
.learning-log-item > header small { color: var(--muted); font-size: 9px; }
.learning-log-item > p { margin: 12px 0; color: #3e4a44; font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.learning-log-ai { margin-top: 12px; padding: 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; border-left: 3px solid var(--green); background: var(--green-soft); }
.learning-log-ai > span { display: flex; align-items: center; gap: 5px; color: var(--green); font-size: 10px; font-weight: 700; }
.learning-log-ai svg { width: 13px; height: 13px; }
.learning-log-ai > p { grid-column: 1 / -1; margin: 0; color: #40534b; font-size: 10px; line-height: 1.6; white-space: pre-wrap; }
.learning-log-ai.pending { display: block; border-left-color: var(--line-strong); background: var(--surface-2); }
.log-review-preview { margin-bottom: 16px; padding: 14px; border-left: 3px solid var(--green); background: var(--surface-2); }.log-review-preview header { display: flex; justify-content: space-between; gap: 12px; }.log-review-preview header small { color: var(--muted); }.log-review-preview p { max-height: 34vh; overflow: auto; white-space: pre-wrap; line-height: 1.7; }
.student-picker { min-width: 0; margin: 0; padding: 12px; display: grid; gap: 11px; border: 1px solid var(--line-strong); border-radius: 5px; }
.student-picker legend { padding: 0 5px; color: var(--text); font-size: 12px; font-weight: 700; }
.student-picker-filters { display: grid; grid-template-columns: minmax(140px, .8fr) minmax(180px, 1.2fr); gap: 10px; }
.student-picker > small { color: var(--muted); font-size: 10px; }
.rotation-group-member-picker { min-width: 0; margin: 0; padding: 12px; display: grid; gap: 10px; border: 1px solid var(--line-strong); border-radius: 5px; }
.rotation-group-member-picker legend { padding: 0 5px; color: var(--text); font-size: 12px; font-weight: 700; }
.rotation-group-member-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.rotation-group-member-heading > span { min-width: 0; display: grid; gap: 2px; }
.rotation-group-member-heading small, .rotation-group-member-picker > small { color: var(--muted); font-size: 10px; }
.rotation-group-member-heading b { color: var(--blue); font-size: 12px; white-space: nowrap; }
.rotation-group-member-picker > select { min-height: 190px; }
.rotation-group-member-checklist { max-height: 260px; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 5px; }
.rotation-group-member-checklist label { min-width: 0; min-height: 50px; padding: 8px 10px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; border-bottom: 1px solid var(--line); cursor: pointer; }
.rotation-group-member-checklist label:nth-child(odd) { border-right: 1px solid var(--line); }
.rotation-group-member-checklist label:hover { background: var(--surface-2); }
.rotation-group-member-checklist input { width: 17px; min-height: 17px; margin: 0; padding: 0; accent-color: var(--blue); }
.rotation-group-member-checklist span { min-width: 0; display: grid; gap: 2px; }
.rotation-group-member-checklist strong { overflow-wrap: anywhere; font-size: 11px; }
.rotation-group-member-checklist small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.camp-progress-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.camp-progress-item { min-width: 0; min-height: 82px; padding: 13px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.camp-progress-item > svg { width: 20px; color: var(--blue); }.camp-progress-item > span { min-width: 0; display: grid; gap: 3px; }.camp-progress-item small { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }.camp-progress-item strong { font-size: 22px; font-variant-numeric: tabular-nums; }.camp-progress-item.urgent { border-left: 3px solid var(--red); }.camp-progress-item.urgent > svg { color: var(--red); }
.camp-warning-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.camp-warning-list > div { padding: 11px 13px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; border-left: 3px solid var(--red); background: var(--red-soft); }.camp-warning-list strong { font-size: 12px; }.camp-warning-list span,.camp-warning-list small { color: var(--muted); font-size: 9px; }.camp-warning-list small { grid-column: 1 / -1; }
.camp-center-list { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }.camp-center-list article { min-width: 0; padding: 13px; display: grid; grid-template-columns: 26px minmax(0, 1fr) 32px; align-items: start; gap: 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }.camp-center-list article.is-disabled { opacity: .62; }.camp-center-list svg { color: var(--blue); }.camp-center-list span { min-width: 0; display: grid; gap: 3px; }.camp-center-list strong { overflow-wrap: anywhere; }.camp-center-list small,.camp-center-list em { color: var(--muted); font-size: 9px; font-style: normal; overflow-wrap: anywhere; }.camp-center-list .icon-btn { width: 32px; height: 32px; }
.camp-vote-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }.camp-vote-item { min-width: 0; padding: 15px; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }.camp-vote-item header { display: flex; align-items: start; justify-content: space-between; gap: 8px; }.camp-vote-item header > span:first-child { min-width: 0; display: grid; gap: 3px; }.camp-vote-item small { color: var(--muted); font-size: 9px; }.vote-result-row { padding: 7px 0; display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); font-size: 10px; }.camp-checkbox-list { padding: 11px; border: 1px solid var(--line); }.camp-checkbox-list label { display: inline-flex; grid-auto-flow: column; align-items: center; gap: 6px; margin: 4px 12px 4px 0; }.camp-checkbox-list input { width: 16px; min-height: 16px; }.table-secondary { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }

@media (max-width: 820px) {
  .learning-log-list, .profile-dimension-rules > div, .student-picker-filters { grid-template-columns: 1fr; }
  .camp-progress-grid,.camp-center-list,.camp-vote-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .question-toolbar .btn { flex: 1 1 calc(50% - 8px); }
  .tag-analysis-summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .tag-analysis-summary > div:last-child { border-bottom: 0; }
}

@media (max-width: 520px) {
  .camp-progress-grid,.camp-center-list,.camp-vote-list,.camp-warning-list { grid-template-columns: 1fr; }
  .rotation-group-member-checklist { grid-template-columns: 1fr; }
  .rotation-group-member-checklist label:nth-child(odd) { border-right: 0; }
}

@media (max-width: 1200px) {
  .timeline-event { grid-template-columns: 82px minmax(0, 1fr) auto; }
  .timeline-event-tags { grid-column: 2; justify-content: flex-start; padding-bottom: 9px; }
  .timeline-event > .row-actions { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 800px) {
  .timeline-event { grid-template-columns: 72px minmax(0, 1fr); }
  .timeline-event > .row-actions { grid-column: 2; grid-row: auto; justify-content: flex-start; padding-bottom: 10px; }
  .activity-score-options > div { grid-template-columns: minmax(0, 1fr); }
}

.configuration-stack { display: grid; gap: 18px; }
.evaluation-config-section { min-width: 0; padding: 15px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
.configuration-heading { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.configuration-heading > span { min-width: 0; display: grid; gap: 3px; }
.configuration-heading strong { font-size: 13px; }
.configuration-heading small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.configuration-heading > strong { flex: 0 0 auto; color: var(--green); font-variant-numeric: tabular-nums; }
.configuration-heading > strong.invalid-total { color: var(--red); }
.configuration-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.evaluation-dimension-row { min-width: 0; padding: 9px 0; display: grid; grid-template-columns: minmax(180px, 1fr) 120px 100px 112px; align-items: end; gap: 9px; border-bottom: 1px solid var(--line); }
.policy-module-row { min-width: 0; padding: 9px 0; display: grid; grid-template-columns: minmax(160px, 1fr) 105px 105px 90px 112px; align-items: end; gap: 9px; border-bottom: 1px solid var(--line); }
.evaluation-dimension-row label, .policy-module-row label, .policy-rule-weight-row label { min-width: 0; font-size: 9px; }
.evaluation-dimension-row .check-line, .policy-module-row .check-line { align-self: center; }
.evaluation-config-section > [data-dimension-add] { margin-top: 12px; }
.policy-mode-select { max-width: 320px; margin-bottom: 12px; }
.policy-rule-weight-list { border-top: 1px solid var(--line); }
.policy-rule-weight-row { min-width: 0; min-height: 66px; display: grid; grid-template-columns: minmax(190px, 1fr) minmax(180px, .75fr) 115px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.policy-rule-weight-row > span { min-width: 0; display: grid; gap: 3px; }
.policy-rule-weight-row > span strong, .policy-rule-weight-row > span small { overflow-wrap: anywhere; }
.policy-rule-weight-row > span small { color: var(--muted); font-size: 9px; }
.policy-honor-switch { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.policy-honor-switch > span { min-width: 0; display: grid; gap: 3px; }
.policy-honor-switch > span strong { font-size: 12px; }
.policy-honor-switch > span small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.policy-honor-switch .switch-control { flex: 0 0 auto; }
.lecturer-dimension-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.marketing-workbench { display: grid; gap: 12px; }
.marketing-toolbar { display: grid; grid-template-columns: 1fr 1fr 1fr minmax(180px, 1.4fr); gap: 8px; }
.marketing-table input { min-width: 88px; }
.marketing-table [data-marketing-note] { min-width: 180px; }
.marketing-basis { display: grid; gap: 3px; min-width: 150px; }
.marketing-basis small { color: var(--muted); }
.marketing-page-table table { min-width: 1480px; }
.marketing-page-table [data-marketing-basis] { min-width: 170px; }
.marketing-page-table [data-marketing-score] { width: 92px; }
.marketing-page-table [data-marketing-note] { min-width: 210px; }
.marketing-suggestion { white-space: nowrap; color: var(--green); font-weight: 700; }
.marketing-ai-toggle { width: auto; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); background: #fff; }
.marketing-config-table { min-width: 780px; }
.marketing-config-table td:nth-child(2) { min-width: 180px; }
.marketing-config-table td:nth-child(2) strong,
.marketing-config-table td:nth-child(2) small { display: block; }
.marketing-config-table input[type="number"] { width: 88px; }
.stage-progress-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.stage-progress-grid article { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; }
.stage-progress-grid article span { display: grid; gap: 3px; min-width: 0; }.stage-progress-grid article small { color: var(--muted); }.stage-progress-grid article b { color: var(--green); }
.stage-progress-grid article div { grid-column: 1 / -1; height: 6px; overflow: hidden; background: var(--line); border-radius: 3px; }.stage-progress-grid article i { display: block; height: 100%; background: var(--green); }
.lecturer-evaluation-dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lecturer-score-row { min-width: 0; padding: 10px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 6px; }
.lecturer-score-row > span { min-width: 0; display: grid; gap: 2px; }
.lecturer-score-row > span small { color: var(--muted); }
.lecturer-score-row .score-option-set { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }

@media (max-width: 720px) {
  .evaluation-dimension-row, .policy-module-row { grid-template-columns: minmax(0, 1fr) minmax(100px, .55fr); }
  .lecturer-dimension-grid, .marketing-toolbar, .lecturer-evaluation-dimensions, .stage-progress-grid { grid-template-columns: 1fr; }
  .evaluation-dimension-row .check-line, .policy-module-row .check-line { align-self: end; min-height: 36px; }
  .evaluation-dimension-row .row-actions, .policy-module-row .row-actions { justify-content: flex-end; align-self: end; }
  .policy-rule-weight-row { padding: 11px 0; grid-template-columns: minmax(0, 1fr) minmax(94px, .45fr); }
  .policy-rule-weight-row > label:first-of-type { grid-column: 1 / -1; }
  .configuration-heading { align-items: flex-start; }
  .quick-score-entry { grid-template-columns: minmax(0, 1fr) minmax(110px, .7fr); }
  .quick-score-entry-value { grid-column: 1 / -1; }
  .quick-score-entry > [data-remove-quick-entry] { justify-self: end; }
  .attachment-type-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-group-scope { grid-template-columns: 1fr; gap: 4px; }
}

/* Momentum UI: youthful, calm and operational */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --ink: #1c1d22;
  --text: #1c1d22;
  --muted: #737680;
  --line: #e3e4e8;
  --line-strong: #d3d5db;
  --green: #16a085;
  --green-2: #0f8a72;
  --green-soft: #e7f8f3;
  --amber: #f2a93b;
  --amber-soft: #fff5df;
  --red: #e5484d;
  --red-soft: #ffeded;
  --blue: #4f7cff;
  --blue-soft: #edf2ff;
  --coral: #EF4444;
  --coral-dark: #DC2626;
  --coral-soft: #fff0ee;
  --sidebar: #ffffff;
  --shadow: 0 18px 50px rgba(24, 26, 32, .11);
  --shadow-soft: 0 7px 22px rgba(24, 26, 32, .055);
}

html, body { background: var(--bg); }
body { color: var(--ink); font-size: 14px; }
::selection { color: #fff; background: var(--coral); }
h1 { font-size: 27px; font-weight: 760; }
h2 { font-size: 18px; font-weight: 740; }
.eyebrow { color: var(--coral-dark); font-family: inherit; font-size: 10px; font-weight: 780; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(79, 124, 255, .28); outline-offset: 2px; }

.btn { min-height: 42px; border-radius: 8px; padding: 0 16px; font-weight: 720; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { border-color: var(--coral); background: var(--coral); box-shadow: 0 8px 18px rgba(255, 92, 92, .2); }
.btn-primary:hover { border-color: var(--coral-dark); background: var(--coral-dark); box-shadow: 0 10px 22px rgba(229, 72, 77, .24); }
.btn-secondary { border-color: var(--line-strong); background: #fff; }
.btn-secondary:hover { color: var(--coral-dark); border-color: rgba(255, 92, 92, .55); background: var(--coral-soft); }
.btn-quiet:hover { color: var(--ink); background: #eceef2; }
.icon-btn { width: 40px; height: 40px; border-radius: 8px; border-color: var(--line); color: #6f727b; background: #fff; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.icon-btn:hover { color: var(--coral-dark); border-color: #ffc4c1; background: var(--coral-soft); }
input, select, textarea { min-height: 42px; border-radius: 8px; border-color: var(--line-strong); background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 124, 255, .12); }

.brand-mark { width: 40px; height: 40px; border: 0; border-radius: 8px; background: #1f2026; box-shadow: none; }
.brand-copy strong { color: var(--ink); font-size: 14px; font-weight: 760; }
.brand-copy small { color: var(--muted); }

/* Immersive login */
.login-body { min-height: 100vh; background: #1d1e23; }
.login-layout { position: relative; display: block; min-height: 100vh; overflow: hidden; }
.login-visual { position: absolute; inset: 0; min-height: 100%; background: #222329; }
.login-visual::after { background: linear-gradient(90deg, rgba(18, 19, 23, .22) 0%, rgba(18, 19, 23, .36) 48%, rgba(18, 19, 23, .68) 100%); }
.login-visual::before { inset: auto auto 0 0; width: 46%; height: 8px; border: 0; background: var(--coral); }
.login-visual img { filter: saturate(.94) contrast(1.03); }
.login-brand { left: clamp(28px, 5vw, 72px); top: 48px; }
.login-brand .brand-mark { border: 1px solid rgba(255,255,255,.2); background: rgba(31, 32, 38, .72); box-shadow: 0 8px 30px rgba(0,0,0,.18); }
.login-brand strong { font-size: 20px; }
.login-brand span { color: rgba(255,255,255,.72); }
.login-caption { left: clamp(28px, 5vw, 72px); bottom: 62px; max-width: 560px; padding-left: 0; border: 0; }
.login-caption::before { content: ""; display: block; width: 46px; height: 5px; margin-bottom: 18px; border-radius: 3px; background: var(--coral); }
.login-caption p { color: #ffd0ce; font-family: inherit; font-weight: 750; }
.login-caption strong { max-width: 540px; font-size: 31px; font-weight: 760; }
.login-panel { position: relative; z-index: 2; width: clamp(430px, 38vw, 540px); min-height: 100vh; margin-left: auto; padding: 40px 0; background: rgba(251, 251, 252, .95); box-shadow: -24px 0 70px rgba(12, 13, 16, .18); backdrop-filter: blur(18px); }
.login-panel::before { top: 0; bottom: 0; left: 0; width: 5px; height: auto; background: var(--coral); }
.login-form-wrap { width: min(390px, calc(100% - 64px)); }
.login-heading h1 { color: var(--ink); font-size: 34px; }
.login-heading p { margin-top: 7px; }
.login-form input { border-color: var(--line-strong); box-shadow: none; }
.login-form .btn { min-height: 50px; }
.student-entry:hover { color: var(--coral-dark); }
.demo-access code { color: var(--blue); font-weight: 700; }

/* Project picker */
.simple-header { height: 78px; border: 0; background: rgba(255,255,255,.94); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(14px); }
.projects-page { width: min(1160px, calc(100% - 48px)); margin-top: 52px; }
.page-heading { align-items: center; margin-bottom: 28px; }
.page-heading h1 { font-size: 32px; }
.project-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.project-row { min-height: 170px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; align-items: start; gap: 15px 10px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow-soft); }
.project-row:hover { border-color: #ffb8b5; background: #fff; box-shadow: 0 14px 34px rgba(32, 33, 39, .1); transform: translateY(-2px); }
.project-code { grid-column: 1; color: var(--blue); font-size: 11px; font-weight: 760; }
.project-row > span:nth-child(2) { grid-column: 1 / -1; align-self: center; }
.project-row strong { font-size: 17px; line-height: 1.5; }
.project-row > .status-dot { grid-column: 1; width: fit-content; }
.project-row > svg { grid-column: 2; grid-row: 3; color: var(--coral); }
.status-dot { color: var(--green-2); background: var(--green-soft); border-radius: 6px; }

/* Light workspace */
.workspace-shell { grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { color: var(--ink); background: #fff; border-right: 1px solid var(--line); }
.sidebar::after { display: none; }
.sidebar-brand { height: 74px; border-bottom: 1px solid var(--line); }
.sidebar-brand .brand-mark { border: 0; background: #1f2026; box-shadow: none; }
.sidebar-brand strong { color: var(--ink); font-size: 14px; }
.sidebar-brand small { color: var(--muted); }
.project-switcher { margin: 16px 12px 7px; padding: 13px 14px; border: 0; border-radius: 8px; background: var(--coral-soft); }
.project-switcher span { color: var(--coral-dark); font-family: inherit; font-weight: 760; }
.project-switcher strong { color: var(--ink); }
.project-switcher small { color: #9a6464; }
.sidebar-nav { gap: 4px; padding: 10px 9px; }
.sidebar-nav button { height: 42px; padding: 0 13px; border: 0; border-radius: 8px; color: #676a73; font-weight: 650; }
.sidebar-nav button:hover { color: var(--ink); background: #f1f2f4; }
.sidebar-nav button.active { color: var(--coral-dark); border: 0; background: var(--coral-soft); }
.sidebar-nav button.active::before { left: 0; top: 11px; bottom: 11px; width: 4px; border-radius: 0 4px 4px 0; background: var(--coral); box-shadow: none; }
.sidebar-nav button.active svg { color: var(--coral); }
.sidebar-user { border-top: 1px solid var(--line); background: #fafafa; }
.sidebar-user .avatar { border: 0; color: #fff; background: var(--blue); }
.sidebar-user strong { color: var(--ink); }
.sidebar-user small { color: var(--muted); }
.sidebar-user .icon-btn.inverse { color: #6f727b; border-color: var(--line); background: #fff; }
.workspace-main { background: var(--bg); }
.workspace-topbar { height: 74px; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); box-shadow: none; backdrop-filter: blur(14px); }
.workspace-topbar h1 { color: var(--ink); font-size: 18px; }
.breadcrumb { color: var(--muted); font-family: inherit; }
.breadcrumb b { color: var(--coral-dark); }
.connection > span { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.view { padding: 26px 30px 54px; max-width: 1540px; }

.metrics-strip { min-height: 110px; gap: 10px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.metric { padding: 20px 22px; border: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow-soft); }
.metric::after { right: 18px; top: 18px; width: 30px; height: 4px; border-radius: 2px; background: var(--blue); }
.metric:nth-child(2)::after { background: var(--green); }
.metric:nth-child(3)::after { background: var(--amber); }
.metric:nth-child(4)::after { background: var(--coral); }
.metric strong { color: var(--ink); font-size: 31px; }
.metric.accent::before { display: none; }
.metric.accent strong { color: var(--coral-dark); }
.teacher-workbench { color: var(--ink); border: 1px solid #ffd1cf; border-radius: 8px; background: #fff; box-shadow: var(--shadow-soft); }
.workbench-heading .eyebrow { color: var(--coral-dark); }
.workbench-heading .muted { color: var(--muted); }
.workbench-actions { gap: 8px; border: 0; background: transparent; }
.workbench-actions button { border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #f8f8fa; }
.workbench-actions button:hover { border-color: #ffb8b5; background: var(--coral-soft); }
.workbench-actions button > svg { color: var(--coral); }
.workbench-actions button:nth-child(2) > svg { color: var(--green); }
.workbench-actions button:nth-child(3) > svg { color: var(--blue); }
.workbench-actions button:nth-child(4) > svg { color: var(--amber); }
.workbench-actions small { color: var(--muted); }
.workbench-alerts button, .workbench-clear, .workbench-pending-list > button { color: var(--ink); border-color: var(--line); border-radius: 8px; background: #f8f8fa; }
.workbench-alerts button:hover, .workbench-pending-list > button:hover { border-color: #ffb8b5; background: var(--coral-soft); }
.workbench-alerts button svg, .workbench-clear svg, .workbench-pending-list > button svg { color: var(--coral); }
.workbench-alerts button strong, .workbench-pending-list > button strong { color: var(--coral-dark); }

.content-block, .profile-section { border-color: var(--line); border-radius: 8px; box-shadow: var(--shadow-soft); }
.section-heading h2 { color: var(--ink); }
.schedule-mark, .progress-track i { background: var(--coral); }
.schedule-item:nth-child(2n) .schedule-mark, .progress-item:nth-child(2) .progress-track i { background: var(--blue); }
.progress-item:nth-child(3) .progress-track i { background: var(--green); }
.pill, .status-badge { border-radius: 6px; }
.mini-avatar { color: var(--blue); border-color: #d9e1ff; background: var(--blue-soft); }
.action-bar { min-height: 62px; }
.table-wrap, .timeline { border-color: var(--line); border-radius: 8px; box-shadow: var(--shadow-soft); }
th { height: 46px; color: #62656e; background: #f3f4f6; border-bottom-color: var(--line-strong); }
td { height: 56px; border-bottom-color: #ececef; }
tbody tr:hover { background: #fff7f6; }
.row-actions .icon-btn:hover { background: var(--coral-soft); }
.timeline-date { background: #f3f4f6; }
.timeline-event time { color: var(--blue); }
.assignment-icon, .audit-icon, .point-task-admin-icon { color: var(--blue); background: var(--blue-soft); }
.tag { color: var(--blue); background: var(--blue-soft); border-radius: 6px; }
.segmented { padding: 4px; border-radius: 8px; background: #e9eaed; }
.segmented button { border-radius: 6px; }
.segmented button.active { color: #fff; background: var(--coral); }
.profile-identity { color: var(--ink); border: 1px solid #ffd1cf; border-radius: 8px; background: var(--coral-soft); box-shadow: var(--shadow-soft); }
.profile-avatar { color: #fff; background: var(--coral); }
.profile-total strong { color: var(--coral-dark); }
.profile-total span, .profile-total small { color: #8f6262; }
.profile-identity .tag { color: var(--blue); background: #fff; }
.profile-score-item b { color: var(--coral-dark); }
.signal-grid { border-color: var(--line); background: var(--line); }
.app-dialog { border: 0; border-radius: 8px; box-shadow: 0 28px 90px rgba(18, 19, 24, .25); }
.app-dialog::backdrop { background: rgba(24, 25, 30, .52); backdrop-filter: blur(4px); }
.dialog-shell > header, .dialog-shell > footer { background: #fff; }
.dialog-shell > header { border-bottom-color: var(--line); }
.dialog-shell > footer { border-top-color: var(--line); }
.evaluation-config-section, .learning-log-item, .camp-progress-item, .camp-center-list article, .camp-vote-item { border-radius: 8px; }
.learning-log-ai { border-left-color: var(--coral); background: var(--coral-soft); }
.learning-log-ai > span { color: var(--coral-dark); }
.toast { border: 0; border-radius: 8px; background: #24252b; }
.toast.success { background: var(--green); }

/* Student web experience */
.student-body { background: #ececf0; }
.student-shell { width: min(100%, 720px); background: #f7f7f9; box-shadow: 0 0 60px rgba(30, 31, 36, .09); }
.student-header { height: 68px; border-bottom-color: var(--line); background: rgba(255,255,255,.94); }
.student-score-band { margin: 0 18px 18px; gap: 1px; border: 0; border-radius: 8px; color: var(--ink); background: #ffd8d5; box-shadow: var(--shadow-soft); }
.student-score-band > div { border-right: 0; background: #fff; }
.student-score-band > div:first-child { background: var(--coral); }
.student-score-band span { color: var(--muted); }
.student-score-band strong { color: var(--ink); }
.student-score-band > div:first-child span { color: #ffe6e4; }
.student-score-band > div:first-child strong { color: #fff; }
.student-tabs { display: flex; top: 68px; height: 60px; padding: 0 8px; overflow-x: auto; border-top: 0; box-shadow: 0 5px 16px rgba(31, 32, 38, .05); }
.student-tabs button { flex: 1 0 70px; border-bottom: 3px solid transparent; }
.student-tabs button.active { color: var(--coral-dark); border-color: var(--coral); background: var(--coral-soft); }
.student-section { border-bottom-color: #ececf0; }
.student-learning-metric { border-color: var(--line); border-radius: 8px; box-shadow: none; }
.student-learning-metric:nth-child(1) > svg { color: var(--coral); }
.student-learning-metric:nth-child(2) > svg { color: var(--green); }
.student-learning-metric:nth-child(3) > svg { color: var(--blue); }
.student-learning-metric:nth-child(4) > svg { color: var(--amber); }
.student-quest-stage { border: 0; border-bottom: 8px solid var(--coral); border-radius: 0; background: #24252b; }
.quest-level-mark { color: #5f430b; background: #ffd66b; }
.quest-xp-track { border-color: #555860; background: #17181c; }
.quest-xp-track span { background: var(--coral); }
.quest-flame { color: #ff8a70; }
.quest-summary, .student-quest-card, .student-radar, .student-achievement { border-radius: 8px; box-shadow: none; }
.student-quest-card { border-left-color: var(--coral); }
.quest-path-node span, .quest-action-btn { background: var(--coral); }
.quest-action-btn:hover { background: var(--coral-dark); }
.student-feed-icon { color: var(--blue); background: var(--blue-soft); }
.student-score-track span { background: var(--coral); }

@media (max-width: 1000px) {
  .project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .login-panel { width: 100%; background: rgba(250,250,251,.93); box-shadow: none; }
  .login-visual::after { background: rgba(23,24,29,.62); }
  .login-brand, .login-caption { display: none; }
  .mobile-brand { display: flex; }
  .workspace-shell { display: block; }
  .sidebar { box-shadow: 18px 0 50px rgba(22,23,28,.14); }
  .workspace-topbar { padding: 0 16px; }
  .view { padding: 20px 16px 44px; }
  .project-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .projects-page { width: calc(100% - 32px); }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .btn { width: 100%; }
  .project-row { min-height: 150px; }
  .metrics-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 96px; }
  .workbench-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Workspace information architecture */
html, body, button, input, select, textarea { letter-spacing: 0; }
.workspace-shell { grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { min-width: 0; }
.sidebar-brand { height: 82px; padding: 0 18px; gap: 11px; }
.sidebar-brand > span:last-child { min-width: 0; }
.sidebar-brand strong { display: block; font-size: 15px; }
.sidebar-brand small { display: block; margin-top: 2px; font-size: 10px; }
.project-switcher { margin: 14px 12px 6px; padding: 13px 14px 12px; background: #f6f7f8; }
.project-switcher > span { display: flex; align-items: center; gap: 7px; color: #72757d; font-size: 10px; }
.project-switcher > span i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.project-switcher strong { margin-top: 6px; font-size: 13px; line-height: 1.45; }
.project-switcher small { margin-top: 3px; color: #8a8d95; }
.sidebar-nav { display: block; min-height: 0; padding: 9px 10px 24px; overflow-y: auto; }
.nav-group { display: grid; gap: 3px; margin-bottom: 13px; }
.nav-group-label { padding: 0 12px 5px; color: #a0a2a9; font-size: 9px; font-weight: 760; }
.sidebar-nav .nav-group button { width: 100%; height: 40px; padding: 0 12px; }
.sidebar-nav .nav-group button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav .nav-group button.active { color: #191b20; background: #f1f2f4; }
.sidebar-nav .nav-group button.active::before { background: var(--coral); }
.sidebar-nav .nav-group button.active svg { color: var(--coral); }
.sidebar-user { min-height: 68px; padding: 10px 12px; }
.workspace-topbar { height: 88px; padding: 0 32px; }
.topbar-heading { min-width: 0; display: grid; gap: 5px; }
.workspace-topbar h1 { max-width: 700px; font-size: 23px; line-height: 1.15; }
.breadcrumb { min-width: 0; display: flex; align-items: center; gap: 7px; font-size: 10px; }
.breadcrumb i { color: #c3c5ca; font-style: normal; }
.breadcrumb > span { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb b { color: var(--blue); }
.view { max-width: 1600px; padding: 24px 32px 56px; }
.action-bar { margin-bottom: 16px; padding: 0 0 15px; border-bottom: 1px solid var(--line); }
.btn.is-downloading { cursor: wait; opacity: .82; }
.attendance-report { margin: 0 0 20px; padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.attendance-report .section-heading { margin-bottom: 13px; }
.attendance-report-metrics { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--line); gap: 1px; }
.attendance-report-metric { min-width: 0; padding: 14px 16px; background: var(--surface); display: grid; gap: 4px; }
.attendance-report-metric span { color: var(--muted); font-size: 10px; }
.attendance-report-metric strong { font-size: 20px; color: var(--ink); }
.attendance-report-metric.primary { border-left: 4px solid var(--green); }
.attendance-report-metric.primary strong { color: var(--green); font-size: 25px; }
.attendance-formula { display: flex; align-items: center; gap: 8px; padding: 10px 2px; color: var(--muted); font-size: 10px; }
.attendance-formula svg { width: 15px; flex: 0 0 auto; color: var(--blue); }
.attendance-formula small { margin-left: auto; white-space: nowrap; }
.attendance-rate { color: var(--green); }
.attendance-rate.attention { color: var(--amber); }
.content-block { padding: 20px; }

.evaluation-header { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 16px; }
.evaluation-header h2 { margin-top: 4px; font-size: 22px; }
.learning-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.action-menu { position: relative; }
.action-menu summary { list-style: none; cursor: pointer; }
.action-menu summary::-webkit-details-marker { display: none; }
.action-menu summary svg:last-child { width: 14px; }
.action-menu[open] summary { color: var(--coral-dark); border-color: #ffc4c1; background: var(--coral-soft); }
.action-menu > div { position: absolute; z-index: 18; right: 0; top: calc(100% + 6px); width: 190px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 18px 45px rgba(23, 25, 31, .16); }
.action-menu > div button { width: 100%; height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border: 0; border-radius: 6px; color: var(--ink); background: transparent; text-align: left; }
.action-menu > div button:hover { background: #f1f2f4; }
.action-menu > div svg { width: 17px; color: var(--blue); }
.evaluation-shell { min-height: calc(100vh - 210px); display: grid; grid-template-columns: 188px minmax(0, 1fr); border-top: 1px solid var(--line); }
.evaluation-rail { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 17px 16px 20px 0; border-right: 1px solid var(--line); }
.evaluation-rail > span { margin: 13px 10px 5px; color: #a0a2a9; font-size: 9px; font-weight: 760; }
.evaluation-rail > span:first-child { margin-top: 0; }
.evaluation-rail button { min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 11px; border: 0; border-radius: 7px; color: #676a73; background: transparent; text-align: left; }
.evaluation-rail button:hover { color: var(--ink); background: #f1f2f4; }
.evaluation-rail button.active { color: #191b20; background: var(--coral-soft); }
.evaluation-rail button svg { width: 17px; }
.evaluation-rail button.active svg { color: var(--coral); }
.evaluation-rail button b { font-size: 12px; font-weight: 680; }
.evaluation-stage { min-width: 0; padding: 20px 0 0 22px; }
.evaluation-stage > [data-learning-panel] { min-width: 0; }
.evaluation-stage .content-block:first-child { margin-top: 0; }

.ai-assist-box { margin: 4px 0 2px; padding: 16px 16px 16px 18px; border: 0; border-left: 4px solid var(--blue); background: #f3f6ff; }
.ai-assist-box > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ai-assist-box > header > span { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1px 8px; }
.ai-assist-box > header svg { grid-row: 1 / 3; width: 20px; color: var(--blue); }
.ai-assist-box > header strong { color: #202d4f; }
.ai-assist-box > header small { color: #687493; font-size: 9px; }
.ai-assist-box label { color: #414c68; }
.ai-assist-box textarea { margin-top: 6px; background: rgba(255,255,255,.9); }
.ai-scoring-guide { margin: 12px 0 14px; overflow: hidden; border: 1px solid #d4dced; border-radius: 6px; background: #fff; }
.ai-scoring-guide > summary { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 10px 13px; cursor: pointer; list-style: none; background: #f7f8fc; }
.ai-scoring-guide > summary::-webkit-details-marker { display: none; }
.ai-scoring-guide > summary > svg:first-child { width: 19px; flex: 0 0 auto; color: var(--blue); }
.ai-scoring-guide > summary > span { min-width: 0; display: grid; gap: 2px; }
.ai-scoring-guide > summary strong { color: #263557; font-size: 11px; }
.ai-scoring-guide > summary small { color: #6f7789; font-size: 9px; line-height: 1.45; }
.ai-scoring-guide > summary > svg:last-child { width: 16px; margin-left: auto; color: #788092; transition: transform .18s ease; }
.ai-scoring-guide[open] > summary { border-bottom: 1px solid #dce2ef; }
.ai-scoring-guide[open] > summary > svg:last-child { transform: rotate(180deg); }
.ai-scoring-guide > div { padding: 13px; }
.ai-dimension-guide { margin: 0; padding: 0; display: grid; list-style: none; }
.ai-dimension-guide li { min-width: 0; padding: 9px 0; display: grid; grid-template-columns: minmax(120px, .32fr) minmax(0, 1fr); gap: 13px; border-bottom: 1px solid #e5e8ef; }
.ai-dimension-guide li:first-child { padding-top: 0; }
.ai-dimension-guide li:last-child { padding-bottom: 0; border-bottom: 0; }
.ai-dimension-guide strong { color: #29344e; font-size: 10px; }
.ai-dimension-guide span { color: #626b7c; font-size: 10px; line-height: 1.65; }
.ai-score-band-guide { margin: 13px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #dce2ef; border-left: 1px solid #dce2ef; list-style: none; }
.ai-score-band-guide li { min-width: 0; min-height: 76px; padding: 10px; display: grid; align-content: start; gap: 5px; border-right: 1px solid #dce2ef; border-bottom: 1px solid #dce2ef; }
.ai-score-band-guide b { color: var(--blue); font-size: 11px; font-variant-numeric: tabular-nums; }
.ai-score-band-guide span { color: #697181; font-size: 9px; line-height: 1.55; }
.ai-guide-reference { margin-top: 12px; padding: 11px 12px; border-left: 3px solid var(--coral); background: #fff8f5; }
.ai-guide-reference > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-guide-reference > header > span { display: flex; align-items: center; gap: 6px; }
.ai-guide-reference > p { max-height: 150px; margin: 8px 0 0; overflow: auto; color: #555d6b; font-size: 10px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-guide-boundary { margin: 12px 0 0; padding-top: 10px; display: flex; align-items: flex-start; gap: 8px; color: #697181; border-top: 1px solid #e2e6ee; font-size: 9px; line-height: 1.6; }
.ai-guide-boundary svg { width: 16px; flex: 0 0 auto; color: var(--green); }
.ai-analysis-guide > summary > svg:first-child { color: var(--green); }
.ai-analysis-guide .ai-guide-boundary { color: #596b63; }
.ai-source-hint { margin-bottom: 12px; padding: 10px 12px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid #d9e1f8; background: rgba(255,255,255,.72); }
.ai-source-hint svg { width: 17px; flex: 0 0 auto; color: var(--blue); }
.ai-source-hint span { display: grid; gap: 2px; min-width: 0; }
.ai-source-hint strong { font-size: 10px; color: #263557; }
.ai-source-hint small { color: #687493; font-size: 9px; line-height: 1.5; }
.ai-suggestion-preview { margin-top: 14px; padding-top: 14px; border-top: 1px solid #d9e1f8; }
.ai-suggestion-heading { display: flex; align-items: center; justify-content: space-between; }
.ai-suggestion-heading > span { display: flex; align-items: center; gap: 7px; }
.ai-suggestion-heading svg { width: 17px; color: var(--blue); }
.ai-suggestion-heading small { color: #79839c; }
.ai-score-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 12px 0; padding: 0; list-style: none; }
.ai-score-list li { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; background: #fff; }
.ai-score-list strong { color: var(--blue); }
.ai-suggestion-preview > p { margin: 10px 0; line-height: 1.75; }
.ai-evidence-note, .ai-risk-note { margin-top: 10px; padding: 10px 12px; background: #fff; }
.ai-evidence-note strong, .ai-risk-note strong { font-size: 11px; }
.ai-evidence-note ul, .ai-risk-note ul { margin: 6px 0 0; padding-left: 18px; color: #636976; line-height: 1.65; }
.ai-risk-note { border-left: 3px solid var(--amber); }
.ai-suggestion-preview footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.ai-suggestion-preview footer > span { max-width: 520px; color: #707786; font-size: 10px; }
.ai-suggestion-preview.adopted { border-top-color: #abdcca; }
.ai-analysis-basis { margin: 12px 0; padding: 12px; border-left: 3px solid var(--blue); background: #fff; }
.ai-analysis-basis > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-analysis-basis > header strong { color: #263557; font-size: 11px; }
.ai-analysis-basis > header small { color: #79839c; font-size: 9px; }
.ai-analysis-basis ul { margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; list-style: none; }
.ai-analysis-basis li { min-width: 0; display: flex; align-items: flex-start; gap: 7px; }
.ai-analysis-basis li > svg { width: 14px; flex: 0 0 auto; color: var(--green); }
.ai-analysis-basis li span { min-width: 0; display: grid; gap: 1px; }
.ai-analysis-basis li strong { color: var(--ink); font-size: 10px; }
.ai-analysis-basis li small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.ai-specialized-analysis { margin: 12px 0; }
.ai-specialized-analysis h4 { margin: 0 0 8px; color: #263557; font-size: 11px; }
.ai-specialized-analysis > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ai-specialized-analysis article { min-width: 0; padding: 11px 12px; border: 1px solid #dce4f6; background: rgba(255,255,255,.78); }
.ai-specialized-analysis article > strong { color: var(--blue); font-size: 10px; }
.ai-specialized-analysis article > p { margin: 6px 0; color: var(--ink); font-size: 10px; line-height: 1.55; }
.ai-specialized-analysis article > div { display: flex; align-items: flex-start; gap: 6px; color: var(--green-2); font-size: 9px; line-height: 1.5; }
.ai-specialized-analysis article > div svg { width: 13px; flex: 0 0 auto; }
.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .workspace-shell { grid-template-columns: 244px minmax(0, 1fr); }
  .view { padding-right: 24px; padding-left: 24px; }
  .evaluation-shell { grid-template-columns: 168px minmax(0, 1fr); }
}

@media (max-width: 800px) {
  .workspace-topbar { height: 78px; }
  .workspace-topbar h1 { font-size: 19px; }
  .connection { display: none; }
  .evaluation-header { align-items: flex-start; flex-direction: column; }
  .learning-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .evaluation-shell { display: block; min-height: 0; }
  .evaluation-rail { flex-direction: row; gap: 5px; margin: 0 -16px; padding: 10px 16px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .evaluation-rail > span { display: none; }
  .evaluation-rail button { flex: 0 0 auto; }
  .evaluation-stage { padding: 16px 0 0; }
  .ai-suggestion-preview footer { align-items: stretch; flex-direction: column; }
  .ai-suggestion-preview footer .btn { width: 100%; }
}

@media (max-width: 560px) {
  .workspace-topbar { padding: 0 14px; }
  .breadcrumb > span { max-width: 180px; }
  .topbar-actions { gap: 7px; }
  .topbar-actions .data-safety-button { display: inline-flex; }
  .topbar-undo { width: 42px; min-width: 42px; padding: 0; display: inline-flex; justify-content: center; }
  .topbar-undo > span { display: none; }
  .view { padding: 18px 14px 42px; }
  .evaluation-header h2 { font-size: 20px; }
  .evaluation-header .btn { min-height: 40px; }
  .ai-assist-box { margin-right: -14px; margin-left: -14px; padding: 14px; }
  .ai-assist-box > header { align-items: flex-start; flex-direction: column; }
  .ai-assist-box > header .btn { width: 100%; }
  .ai-score-list { grid-template-columns: 1fr; }
  .ai-score-band-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-dimension-guide li { grid-template-columns: 1fr; gap: 4px; }
  .ai-guide-reference > header { align-items: flex-start; flex-direction: column; }
}

/* AI evaluation control center */
.ai-config-status { min-height: 82px; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 24px; padding: 14px 18px; border-left: 5px solid #a7aab2; background: #fff; box-shadow: var(--shadow-soft); }
.ai-config-status > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; color: #737680; background: #eff0f2; }
.ai-config-status > div { min-width: 0; display: grid; gap: 3px; }
.ai-config-status small { color: var(--muted); font-size: 9px; }
.ai-config-status .ai-model-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-config-status strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.ai-config-status > b { padding: 6px 9px; border-radius: 6px; color: #6c6f78; background: #eff0f2; font-size: 10px; }
.ai-config-status.ready { border-left-color: var(--blue); }
.ai-config-status.ready > span { color: var(--blue); background: var(--blue-soft); }
.ai-config-status.active { border-left-color: var(--green); }
.ai-config-status.active > span { color: var(--green-2); background: var(--green-soft); }
.ai-config-status.active > b { color: var(--green-2); background: var(--green-soft); }
.ai-config-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 0 32px; }
.ai-config-section { min-width: 0; padding: 6px 0 26px; }
.ai-config-section + .ai-config-section { padding-left: 32px; border-left: 1px solid var(--line); }
.ai-config-section .section-heading { min-height: 50px; margin-bottom: 20px; }
.model-field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ai-model-refresh { min-height: 26px; padding: 3px 6px; color: var(--blue); font-size: 9px; }
.ai-model-refresh svg { width: 13px; height: 13px; }
.ai-model-refresh.loading svg { animation: spin 1s linear infinite; }
.switch-control { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch-control input { width: 1px; height: 1px; position: absolute; opacity: 0; pointer-events: none; }
.switch-control > span { width: 42px; height: 24px; position: relative; display: block; border-radius: 12px; background: #c9cbd1; transition: background .18s ease; }
.switch-control > span::after { content: ""; width: 18px; height: 18px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .18s ease; }
.switch-control input:checked + span { background: var(--green); }
.switch-control input:checked + span::after { transform: translateX(18px); }
.switch-control input:disabled + span { opacity: .48; cursor: not-allowed; }
.switch-control b { font-size: 11px; }
.credential-state { min-height: 42px; display: grid; grid-template-columns: auto 1fr; align-content: center; gap: 1px 8px; padding: 0 12px; border-left: 3px solid var(--line-strong); background: #f5f6f7; }
.credential-state > span { grid-row: 1 / 3; align-self: center; color: var(--muted); font-size: 10px; }
.credential-state strong { font-size: 11px; }
.credential-state strong.configured { color: var(--green-2); }
.credential-state small { color: #92959d; font-size: 9px; }
.ai-credential-field { min-width: 0; }
.credential-input { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 7px; }
.credential-input .icon-btn { width: 42px; height: 42px; border: 1px solid var(--line-strong); background: var(--surface); }
.credential-input .icon-btn svg { width: 17px; }
#aiClearCredentialRow { min-height: 34px; padding: 7px 9px; border-left: 3px solid var(--amber); background: var(--amber-soft); }
#aiClearCredentialRow.hidden { display: none !important; }
.ai-module-switches { display: grid; gap: 1px; background: var(--line); }
.ai-module-switches > label { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; background: #fff; }
.ai-module-switches > label > span:first-child { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.ai-module-switches > label > span:first-child svg { grid-row: 1 / 3; width: 20px; align-self: center; color: var(--blue); }
.ai-module-switches small { color: var(--muted); font-size: 9px; }
.student-feature-master { padding: 14px; border-left: 3px solid var(--green); background: #f5f8f6; }
.student-feature-master .configuration-heading, .student-feature-group .configuration-heading { margin-bottom: 0; }
.student-feature-group { display: grid; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); transition: opacity .18s ease; }
.student-feature-group .ai-module-switches { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; }
.student-feature-group.is-disabled .ai-module-switches { opacity: .55; }
.ai-policy-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 20px; background: var(--line); }
.ai-policy-strip > span { min-width: 0; min-height: 78px; display: grid; place-items: center; align-content: center; gap: 4px; padding: 10px; background: #f7f8f9; text-align: center; }
.ai-policy-strip svg { width: 18px; color: var(--green-2); }
.ai-policy-strip b { font-size: 10px; }
.ai-policy-strip small { color: var(--muted); font-size: 9px; }
.ai-config-layout > footer { grid-column: 1 / -1; min-height: 68px; display: flex; align-items: center; justify-content: flex-end; gap: 16px; border-top: 1px solid var(--line); }
.ai-config-layout > footer > span { color: var(--muted); font-size: 10px; }
.ai-prompt-governance { grid-column: 1 / -1; padding: 26px 0; border-top: 1px solid var(--line); }
.ai-prompt-governance .section-heading { margin-bottom: 16px; }
.ai-prompt-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr); gap: 24px; }
.ai-prompt-editor > label { min-width: 0; display: grid; gap: 7px; }
.ai-prompt-editor textarea { min-height: 250px; resize: vertical; font-family: Consolas, "Microsoft YaHei UI", monospace; font-size: 10px; line-height: 1.65; }
#aiPromptTemplateStatus { color: var(--muted); font-size: 9px; }
#aiPromptTemplateStatus.error { color: var(--red); }
.ai-prompt-preview { min-width: 0; display: grid; grid-template-rows: auto minmax(220px, 1fr); gap: 8px; }
.ai-prompt-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.ai-prompt-toolbar label { min-width: 180px; display: grid; gap: 5px; }
.ai-prompt-toolbar > div { display: flex; gap: 7px; }
#aiPromptPreviewOutput { min-width: 0; max-height: 360px; margin: 0; padding: 14px; overflow: auto; border: 1px solid var(--line); color: #4f535d; background: #f7f8f9; font-family: Consolas, "Microsoft YaHei UI", monospace; font-size: 9px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-safety-boundary { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 11px 12px; border-left: 3px solid var(--green); background: #f4f8f5; }
.ai-safety-boundary svg { width: 17px; flex: 0 0 auto; color: var(--green-2); }
.ai-safety-boundary span { display: grid; gap: 3px; }
.ai-safety-boundary strong { font-size: 10px; }
.ai-safety-boundary small { color: var(--muted); font-size: 9px; line-height: 1.6; }
.ai-quality-section { padding-top: 26px; border-top: 1px solid var(--line); }
.ai-quality-controls { display: flex; align-items: center; gap: 8px; }
.ai-quality-controls select { min-width: 120px; }
.ai-quality-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ai-quality-metrics > div { min-width: 0; display: grid; gap: 5px; padding: 15px; border-right: 1px solid var(--line); }
.ai-quality-metrics > div:last-child { border-right: 0; }
.ai-quality-metrics span { color: var(--muted); font-size: 9px; }
.ai-quality-metrics strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.ai-quality-table { margin-top: 16px; }
.ai-quality-table td, .ai-quality-table th { white-space: nowrap; }
.ai-quality-note { display: flex; align-items: flex-start; gap: 7px; margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.ai-quality-note svg { width: 15px; flex: 0 0 auto; color: var(--blue); }
.ai-evidence-map { margin-top: 14px; padding-top: 13px; border-top: 1px solid #dfe3ee; }
.ai-evidence-map h4 { margin: 0 0 9px; font-size: 10px; }
.ai-evidence-map table { min-width: 620px; font-size: 9px; }
.ai-evidence-map th, .ai-evidence-map td { padding: 8px 9px; vertical-align: top; line-height: 1.55; white-space: normal; }
.ai-evidence-map th:first-child, .ai-evidence-map td:first-child { width: 20%; }

.organization-unit-fields { padding: 13px 14px 10px; border: 1px solid var(--line); background: #f8f9fa; }
.organization-unit-fields legend { padding: 0 6px; color: var(--ink); font-size: 11px; font-weight: 720; }
.organization-unit-fields > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.organization-unit-fields > small { display: block; min-height: 18px; padding-top: 7px; color: var(--blue); font-size: 10px; }
.organization-unit-fields .field-disabled { opacity: .58; }

/* Task-oriented information architecture */
.operation-switcher { width: min(660px, 100%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #eceef1; }
.operation-switcher button { min-width: 0; min-height: 58px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 12px; border: 0; border-radius: 6px; color: #696c74; background: transparent; cursor: pointer; text-align: left; }
.operation-switcher button > svg { width: 20px; height: 20px; justify-self: center; }
.operation-switcher button > span { min-width: 0; display: grid; gap: 2px; }
.operation-switcher button strong { font-size: 12px; }
.operation-switcher button small { overflow: hidden; color: #8b8e96; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.operation-switcher button.active { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgba(22,23,28,.1); }
.operation-switcher button.active > svg { color: var(--coral); }

.profile-selection-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.action-bar > .profile-selector-shell { min-width: 0; display: grid; align-items: stretch; gap: 8px; }
.profile-selection-bar .profile-filters { display: grid; grid-template-columns: minmax(210px, 1.35fr) repeat(3, minmax(110px, 1fr)); }
.profile-selection-actions { min-width: max-content; align-self: start; justify-content: flex-end; flex-wrap: wrap; }
.profile-advanced-filters { min-width: 0; }
.profile-advanced-filters > summary { width: fit-content; min-height: 32px; display: flex; align-items: center; gap: 7px; color: var(--blue); cursor: pointer; font-size: 10px; font-weight: 700; list-style: none; }
.profile-advanced-filters > summary::-webkit-details-marker { display: none; }
.profile-advanced-filters > summary svg { width: 15px; }
.profile-advanced-filters[open] > summary { margin-bottom: 7px; }
.profile-advanced-filters > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; padding: 11px; border-top: 1px solid var(--line); background: #f8f9fa; }
.profile-advanced-filters label, .profile-process-filterbar label { min-width: 0; display: grid; gap: 5px; }
.profile-advanced-filters label > span, .profile-process-filterbar label > span { color: var(--muted); font-size: 9px; font-weight: 680; }
.profile-advanced-filters .btn { width: 100%; min-height: 40px; }

.profile-process-filterbar { display: grid; grid-template-columns: 140px 140px minmax(220px, 1fr) 170px 38px; align-items: end; gap: 8px; padding: 11px; border: 1px solid var(--line); background: #f8f9fa; }
.profile-process-filterbar .search-input { display: flex; gap: 7px; }
.profile-process-filterbar .search-input input { min-width: 0; }

.ai-scope-notice { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 14px; padding: 11px 12px; border-left: 3px solid var(--blue); background: #f3f6ff; }
.ai-scope-notice > svg { width: 19px; color: var(--blue); justify-self: center; }
.ai-scope-notice > span { display: grid; gap: 3px; }
.ai-scope-notice strong { font-size: 10px; }
.ai-scope-notice small { color: #687493; font-size: 9px; line-height: 1.6; }

.report-action-copy { min-width: 180px; display: grid !important; align-content: center; gap: 4px !important; }
.report-action-copy small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.report-action-buttons { flex-wrap: wrap; justify-content: flex-end; }
.report-ranking-heading { align-items: center; }
.report-ranking-heading > div:first-child { display: grid; gap: 3px; }
.ranking-scope-control { display: flex; align-items: center; gap: 9px; }
.ranking-scope-control > span { color: var(--muted); font-size: 9px; font-weight: 680; white-space: nowrap; }

.manual-layout { display: grid; gap: 24px; }
.manual-layout > header { max-width: none; }
.manual-layout > header h2 { margin: 5px 0 8px; font-size: 22px; }
.manual-layout > header p { margin: 0; color: var(--muted); line-height: 1.7; }
.manual-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.manual-hero > div:first-child { max-width: 820px; }
.manual-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.manual-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.manual-facts > div { min-width: 0; display: grid; gap: 5px; padding: 14px 18px; border-right: 1px solid var(--line); }
.manual-facts > div:last-child { border-right: 0; }
.manual-facts strong { font-size: 10px; }
.manual-facts span { color: var(--muted); font-size: 9px; line-height: 1.6; }
.manual-toc { position: sticky; top: 78px; z-index: 6; display: flex; align-items: center; gap: 6px; padding: 10px 0; overflow-x: auto; border-bottom: 1px solid var(--line); background: rgba(250,250,250,.96); backdrop-filter: blur(10px); }
.manual-toc > span { margin-right: 4px; color: var(--muted); font-size: 9px; font-weight: 720; white-space: nowrap; }
.manual-toc button { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: #5f626b; background: #fff; cursor: pointer; font-size: 9px; white-space: nowrap; }
.manual-toc button:hover { color: var(--coral-dark); border-color: #ffc7c4; background: var(--coral-soft); }
.manual-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.manual-section-heading h3 { margin: 4px 0 0; font-size: 17px; }
.manual-section-heading > p { max-width: 520px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; text-align: right; }
.manual-role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.manual-role-grid article { min-width: 0; min-height: 152px; display: grid; align-content: start; gap: 10px; padding: 17px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.manual-role-grid article > svg { width: 23px; color: var(--coral); }
.manual-role-grid article strong { font-size: 13px; }
.manual-role-grid article span { color: var(--muted); font-size: 10px; line-height: 1.7; }
.manual-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.manual-flow > div { min-width: 0; display: flex; align-items: center; gap: 12px; }
.manual-flow > div > b { color: var(--coral); font-size: 20px; font-variant-numeric: tabular-nums; }
.manual-flow > div > span { min-width: 0; display: grid; gap: 3px; }
.manual-flow strong { font-size: 11px; }
.manual-flow small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.manual-flow > svg { width: 16px; color: #a5a7ae; }
.manual-directory-table { box-shadow: none; }
.manual-section-list { display: grid; gap: 10px; }
.manual-section { scroll-margin-top: 138px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.manual-section > summary { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 17px; cursor: pointer; list-style: none; }
.manual-section > summary::-webkit-details-marker { display: none; }
.manual-section > summary > span { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 2px 10px; }
.manual-section > summary > span > svg { grid-row: 1 / 3; width: 18px; color: var(--coral); }
.manual-section > summary strong { font-size: 12px; }
.manual-section > summary small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.manual-section > summary > svg { width: 17px; color: var(--muted); transition: transform .18s ease; }
.manual-section[open] > summary { border-bottom: 1px solid var(--line); background: #fafafa; }
.manual-section[open] > summary > svg { transform: rotate(180deg); }
.manual-section-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr); gap: 26px; padding: 20px 22px 23px; }
.manual-section-body-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.manual-section-body h4 { margin: 0 0 10px; font-size: 11px; }
.manual-section-body ul, .manual-section-body ol { margin: 0; padding-left: 20px; color: #5d6068; font-size: 10px; line-height: 1.8; }
.manual-section-body li + li { margin-top: 4px; }
.manual-section-body aside { min-width: 0; padding-left: 18px; border-left: 3px solid var(--line-strong); }
.manual-note { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 8px; margin-top: 13px; padding: 10px 11px; color: #5c6885; background: #f3f6ff; font-size: 9px; line-height: 1.65; }
.manual-note > svg { width: 16px; color: var(--blue); }
.manual-note.attention { color: #735422; background: #fff7e8; }
.manual-note.attention > svg { color: var(--amber); }
.manual-steps { counter-reset: manual-step; list-style: none; padding-left: 0 !important; }
.manual-steps > li { position: relative; min-height: 24px; padding-left: 30px; }
.manual-steps > li::before { counter-increment: manual-step; content: counter(manual-step); position: absolute; left: 0; top: 2px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--coral); font-size: 8px; font-weight: 760; }
.manual-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; padding: 8px 22px 22px; }
.manual-faq > div { min-width: 0; padding: 15px 0; border-bottom: 1px solid var(--line); }
.manual-faq strong { font-size: 10px; }
.manual-faq p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.manual-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.manual-rules > div { padding-left: 14px; border-left: 3px solid var(--line-strong); }
.manual-rules h3 { margin: 0 0 7px; font-size: 12px; }
.manual-rules p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.ai-evidence-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #dfe3ee; color: #6f7480; font-size: 9px; line-height: 1.6; }
.ai-evidence-note > svg { width: 15px; flex: 0 0 auto; color: var(--blue); }

/* Intelligent analysis results */
.exam-ai-analysis { margin-bottom: 20px; padding: 16px 18px; border-left: 4px solid var(--blue); background: #f3f6ff; }
.exam-ai-analysis > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.exam-ai-analysis > header > span { display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; align-items: center; }
.exam-ai-analysis > header svg { grid-row: 1 / 3; width: 20px; color: var(--blue); }
.exam-ai-analysis > header small { color: #687493; font-size: 9px; }
.exam-ai-analysis [data-exam-ai-result] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #d9e1f8; }
.exam-ai-analysis [data-exam-ai-result] > div { min-width: 0; }
.exam-ai-analysis [data-exam-ai-result] > div > strong { font-size: 11px; }
.exam-ai-analysis [data-exam-ai-result] ul, .exam-ai-analysis [data-exam-ai-result] ol { margin: 7px 0 0; padding-left: 19px; color: #5e6574; line-height: 1.65; }
.exam-ai-analysis [data-exam-ai-result] footer { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.exam-ai-overview { grid-column: 1 / -1; }
.exam-ai-overview p { margin: 7px 0 0; line-height: 1.75; }
.exam-ai-focus { display: grid; gap: 5px; padding: 0 !important; list-style: none; }
.exam-ai-focus li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 9px; background: #fff; }
.exam-ai-focus strong { color: var(--blue); }

.profile-ai-analysis { margin-bottom: 16px; padding: 16px 18px; border-left: 4px solid var(--blue); background: #f3f6ff; }
.profile-ai-analysis > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.profile-ai-analysis > header > span { display: flex; align-items: center; gap: 8px; }
.profile-ai-analysis > header svg { width: 19px; color: var(--blue); }
.profile-ai-analysis > header small { max-width: 430px; color: #687493; font-size: 9px; line-height: 1.5; text-align: right; }
.profile-ai-analysis > p { margin: 13px 0; line-height: 1.75; }
.profile-ai-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #dce4f6; }
.profile-ai-grid section { min-width: 0; padding: 12px 14px; background: #fff; }
.profile-ai-grid section.attention { border-left: 3px solid var(--amber); }
.profile-ai-grid strong { font-size: 11px; }
.profile-ai-grid ul, .profile-ai-grid ol { margin: 7px 0 0; padding-left: 18px; color: #606777; line-height: 1.65; }
.profile-ai-policy { margin-top: 12px; padding-top: 10px; display: flex; align-items: flex-start; gap: 8px; color: #66716d; border-top: 1px solid #dfe5ef; font-size: 9px; line-height: 1.6; }
.profile-ai-policy svg { width: 16px; flex: 0 0 auto; color: var(--green); }

.assignment-reference-config { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); gap: 12px; padding: 14px; border: 1px solid #cfd8ef; background: #f6f8ff; }
.assignment-reference-config legend { padding: 0 6px; color: #34446d; font-size: 11px; font-weight: 720; }
.assignment-reference-config > label { min-width: 0; }
.content-review-launcher { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 0; padding: 10px 12px; border-left: 4px solid var(--blue); background: #f3f6ff; }
.content-review-launcher > span { display: flex; align-items: center; gap: 10px; }
.content-review-launcher > span > svg { width: 20px; color: var(--blue); }
.content-review-launcher > span > span { display: grid; gap: 2px; }
.content-review-launcher small { color: #687493; font-size: 9px; }
.content-review-launcher.unavailable { border-left-color: var(--amber); background: #fff9e9; }
.content-review-launcher.unavailable > span > svg { color: #9b6815; }
.log-review-attachment { display: flex; align-items: center; gap: 7px; }
.content-review-row > td { padding: 0 !important; background: #f7f9ff; }
.content-review-suggestion { padding: 16px 18px; border-left: 4px solid var(--blue); background: #f3f6ff; }
.content-review-suggestion > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.content-review-suggestion > header > span { display: flex; align-items: center; gap: 8px; }
.content-review-suggestion > header svg { width: 18px; color: var(--blue); }
.content-review-suggestion > header b { color: var(--blue); font-size: 16px; font-variant-numeric: tabular-nums; }
.content-review-suggestion > p { margin: 12px 0; line-height: 1.75; }
.review-keywords { display: flex; flex-wrap: wrap; gap: 6px; }
.review-keywords span { padding: 4px 8px; color: #34446d; background: #fff; font-size: 10px; font-weight: 680; }
.review-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 12px; background: #dce4f6; }
.review-evidence-grid section { padding: 10px 12px; background: #fff; }
.review-evidence-grid strong { font-size: 10px; }
.review-evidence-grid ul { margin: 6px 0 0; padding-left: 17px; color: #626979; line-height: 1.6; }
.content-review-suggestion > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.content-review-suggestion > footer > span { max-width: 560px; color: #717886; font-size: 9px; }
.review-keyword-summary { min-height: 82px; display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 18px; margin: 12px 0 16px; padding: 12px 15px; border: 1px solid var(--line); background: #fafafa; }
.review-keyword-summary > div:first-child { display: flex; align-items: center; gap: 10px; }
.review-keyword-summary > div:first-child > svg { width: 24px; color: var(--coral); }
.review-keyword-summary > div:first-child > span { display: grid; gap: 2px; }
.review-keyword-summary > div:first-child small { color: var(--muted); font-size: 9px; }
.keyword-cloud { min-width: 0; min-height: 52px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px 12px; }
.keyword-cloud > span { display: inline-flex; align-items: center; gap: 4px; color: #555966; line-height: 1.25; }
.keyword-cloud > span small { color: #a0a3ab; font-size: 8px; }
.keyword-cloud .keyword-weight-1 { font-size: 10px; }
.keyword-cloud .keyword-weight-2 { color: #4d617f; font-size: 12px; }
.keyword-cloud .keyword-weight-3 { color: var(--blue); font-size: 14px; font-weight: 650; }
.keyword-cloud .keyword-weight-4 { color: var(--coral-dark); font-size: 17px; font-weight: 720; }
.keyword-cloud .keyword-weight-5 { color: var(--green-2); font-size: 20px; font-weight: 760; }

.assessment-dimension-fieldset, .exam-tier-fieldset { display: grid; gap: 10px; padding: 13px 14px; border: 1px solid var(--line-strong); background: #f8f9fa; }
.assessment-dimension-fieldset legend, .exam-tier-fieldset legend { padding: 0 6px; color: var(--ink); font-size: 11px; font-weight: 720; }
.assessment-dimension-fieldset > small, .exam-tier-fieldset > small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.assessment-dimension-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.assessment-dimension-empty { grid-column: 1 / -1; padding: 12px; color: var(--muted); background: var(--surface); font-size: 10px; line-height: 1.6; }
.assessment-definition-row { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: end; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.assessment-definition-row > label { min-width: 0; }
.assessment-tag-category { display: grid; gap: 7px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.assessment-tag-options { display: flex; flex-wrap: wrap; gap: 6px; }
.assessment-tag-options label { min-height: 32px; padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); cursor: pointer; }
.assessment-tag-options input { width: auto; min-height: 0; }
.assessment-rating-dimensions { display: grid; gap: 12px; }
.assessment-rating-dimension { min-width: 0; padding: 13px; display: grid; grid-template-columns: minmax(150px, .7fr) minmax(0, 1.8fr) minmax(110px, .45fr); align-items: start; gap: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.assessment-rating-dimension > div:first-child { display: grid; gap: 4px; }
.assessment-rating-dimension > div:first-child small { color: var(--muted); line-height: 1.55; }
.assessment-rubric-list { display: grid; gap: 4px; }
.assessment-rubric-list span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.assessment-rubric-list b { color: var(--ink-soft); }
.student-tag-assessment-item { grid-template-columns: 40px minmax(0, 1fr) auto; }
.student-tag-assessment-item > div { min-width: 0; display: grid; gap: 3px; }
.student-tag-assessment-item > div > small { color: var(--muted); }
.tag-assessment-dimension { min-width: 0; padding: 14px; display: grid; gap: 11px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfb; }
.tag-assessment-dimension > header { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start; }
.tag-assessment-dimension > header > span { width: 28px; height: 28px; display: grid; place-items: center; color: var(--green); border-radius: 4px; background: var(--green-soft); font-weight: 750; }
.tag-assessment-dimension > header > div { min-width: 0; display: grid; gap: 3px; }
.tag-assessment-dimension > header small { color: var(--muted); line-height: 1.5; }
.tag-assessment-levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.tag-assessment-level { min-width: 0; min-height: 94px; padding: 9px; display: grid; align-content: start; gap: 7px; color: var(--ink-soft); text-align: left; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); cursor: pointer; }
.tag-assessment-level > span { display: flex; justify-content: space-between; gap: 5px; }
.tag-assessment-level strong { color: var(--green); font-size: 10px; white-space: nowrap; }
.tag-assessment-level small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.tag-assessment-level:hover { border-color: var(--green); }
.tag-assessment-level.active { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.tag-assessment-level.active small { color: var(--green-2); }
.assessment-observation-module { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.assessment-observation-module .section-heading > div:last-child { display: flex; align-items: center; gap: 8px; }
.assessment-observation-module .table-primary small { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-assessment-item > p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.75; white-space: pre-wrap; }
.exam-tier-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 36px; align-items: end; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.exam-tier-row > label { min-width: 0; }

@media (max-width: 1000px) {
  .report-delivery-bar { align-items: flex-start; flex-direction: column; }
  .report-action-buttons { justify-content: flex-start; }
  .attendance-report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .attendance-report-metric.primary { grid-column: span 2; }
  .ai-config-layout { grid-template-columns: 1fr; }
  .ai-config-section + .ai-config-section { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .ai-prompt-editor { grid-template-columns: 1fr; }
  .ai-quality-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ai-quality-metrics > div:nth-child(3) { border-right: 0; }
  .ai-quality-metrics > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .organization-unit-fields > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assignment-reference-config { grid-template-columns: 1fr; }
  .profile-advanced-filters > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-process-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-process-filterbar .search-input { grid-column: 1 / -1; }
  .manual-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-section-body, .manual-section-body-wide { grid-template-columns: 1fr; }
  .manual-section-body aside { padding-top: 14px; padding-left: 0; border-top: 3px solid var(--line-strong); border-left: 0; }
  .profile-selection-bar { grid-template-columns: 1fr; }
  .profile-selection-bar > div:last-child { justify-self: end; }
  .assessment-rating-dimension { grid-template-columns: 1fr; }
  .tag-assessment-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .student-feature-group .ai-module-switches { grid-template-columns: minmax(0, 1fr); }
  .report-action-copy { min-width: 0; }
  .report-action-buttons { width: 100%; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-action-buttons .btn { width: 100%; min-width: 0; }
  .report-ranking-heading { align-items: stretch; flex-direction: column; }
  .ranking-scope-control { align-items: stretch; flex-direction: column; gap: 5px; }
  .ranking-scope-control .segmented { width: 100%; display: flex; }
  .ranking-scope-control .segmented button { min-width: 0; flex: 1; }
  .attendance-report .section-heading { align-items: stretch; flex-direction: column; }
  .attendance-report .segmented { width: 100%; }
  .attendance-report .segmented button { flex: 1; }
  .attendance-report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attendance-report-metric.primary { grid-column: 1 / -1; }
  .attendance-formula { align-items: flex-start; flex-wrap: wrap; }
  .attendance-formula small { width: 100%; margin-left: 23px; }
  .ai-analysis-basis > header { align-items: flex-start; flex-direction: column; }
  .ai-analysis-basis ul { grid-template-columns: 1fr; }
  .ai-specialized-analysis > div { grid-template-columns: 1fr; }
  .ai-config-status { grid-template-columns: 40px minmax(0, 1fr); }
  .student-tag-assessment-item { grid-template-columns: 36px minmax(0, 1fr); }
  .student-tag-assessment-item > .btn { grid-column: 2; width: fit-content; }
  .tag-assessment-levels { grid-template-columns: 1fr; }
  .tag-assessment-level { min-height: 0; }
  .ai-config-status > b { grid-column: 2; width: fit-content; }
  .ai-policy-strip { grid-template-columns: 1fr; }
  .ai-prompt-toolbar, .ai-quality-section .section-heading { align-items: stretch; flex-direction: column; }
  .ai-prompt-toolbar > div, .ai-quality-controls { width: 100%; }
  .ai-prompt-toolbar .btn, .ai-quality-controls .btn, .ai-quality-controls select { min-width: 0; flex: 1; }
  .ai-quality-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-quality-metrics > div:nth-child(3) { border-right: 1px solid var(--line); }
  .ai-quality-metrics > div:nth-child(2n) { border-right: 0; }
  .ai-quality-metrics > div:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .ai-config-layout > footer { align-items: stretch; flex-direction: column; padding: 14px 0; }
  .ai-config-layout > footer .btn { width: 100%; }
  .organization-unit-fields > div { grid-template-columns: 1fr; }
  .exam-ai-analysis > header, .profile-ai-analysis > header, .content-review-launcher, .content-review-suggestion > footer { align-items: stretch; flex-direction: column; }
  .exam-ai-analysis > header .btn, .content-review-launcher .btn, .content-review-suggestion > footer .btn { width: 100%; }
  .exam-ai-analysis [data-exam-ai-result], .profile-ai-grid, .review-evidence-grid { grid-template-columns: 1fr; }
  .profile-ai-analysis > header small { max-width: none; text-align: left; }
  .review-keyword-summary { grid-template-columns: 1fr; }
  .assessment-dimension-grid { grid-template-columns: 1fr; }
  .exam-tier-row { grid-template-columns: 1fr 1fr 36px; }
  .exam-tier-row > label:nth-child(3) { grid-column: 1 / 3; }
  .exam-tier-row > button { grid-column: 3; grid-row: 1; }
  .operation-switcher { grid-template-columns: 1fr 1fr; }
  .operation-switcher button { min-height: 48px; grid-template-columns: 24px minmax(0, 1fr); padding: 7px 8px; }
  .operation-switcher button small { display: none; }
  .profile-selection-bar .profile-filters, .profile-advanced-filters > div, .profile-process-filterbar { grid-template-columns: 1fr; }
  .profile-selection-bar > div:last-child { width: 100%; justify-self: stretch; }
  .profile-process-filterbar .search-input { grid-column: auto; }
  .profile-process-filterbar > .icon-btn { width: 100%; }
  .manual-role-grid, .manual-rules { grid-template-columns: 1fr; }
  .manual-hero, .manual-section-heading { align-items: stretch; flex-direction: column; }
  .manual-actions { justify-content: flex-start; }
  .manual-actions .btn { flex: 1; }
  .manual-facts { grid-template-columns: 1fr; }
  .manual-facts > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .manual-facts > div:last-child { border-bottom: 0; }
  .manual-section-heading > p { text-align: left; }
  .manual-section > summary { min-height: 62px; padding: 11px 13px; }
  .manual-section > summary small { white-space: normal; }
  .manual-section-body { padding: 17px 15px 20px; }
  .manual-faq { grid-template-columns: 1fr; padding: 6px 15px 18px; }
  .manual-role-grid article { min-height: 0; }
  .manual-flow { grid-template-columns: 1fr; }
  .manual-flow > svg { transform: rotate(90deg); justify-self: center; }
  .manual-flow small { white-space: normal; }
}

/* Assignment and file review workbenches */
.app-dialog.dialog-review-workbench { width: min(1180px, calc(100vw - 28px)); }
.dialog-review-workbench .dialog-body { max-height: calc(100vh - 170px); background: #f6f7f9; }
.assignment-review-toolbar { position: sticky; top: -20px; z-index: 3; min-height: 64px; margin: -20px -20px 16px; padding: 12px 20px; display: grid; grid-template-columns: minmax(240px, 1fr) 160px auto auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px); }
.assignment-review-toolbar .search-input { min-width: 0; }
.submission-completion-panel { display: block; margin: 0 0 14px; overflow: hidden; border: 1px solid var(--line); border-left: 4px solid var(--green); background: #fff; }
.submission-completion-panel > summary, .submission-completion-panel > header { min-height: 58px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; background: #f7faf8; }
.submission-completion-panel > summary::-webkit-details-marker { display: none; }
.submission-completion-panel > summary > span, .submission-completion-panel > header > span { min-width: 0; display: flex; align-items: center; gap: 10px; }
.submission-completion-panel > summary > span > svg, .submission-completion-panel > header > span > svg { width: 20px; color: var(--green-2); }
.submission-completion-panel > summary > span > span, .submission-completion-panel > header > span > span { min-width: 0; display: grid; gap: 2px; }
.submission-completion-panel > summary small, .submission-completion-panel > header small { color: var(--muted); font-size: 9px; }
.submission-completion-panel > summary > svg { width: 16px; color: var(--muted); transition: transform .18s ease; }
.submission-completion-panel[open] > summary > svg { transform: rotate(180deg); }
.submission-completion-panel:not(.student-log-completion) > div { padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.submission-completion-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin-bottom: 10px; background: var(--line); }
.submission-completion-metrics > span { min-width: 0; min-height: 58px; padding: 9px 11px; display: grid; align-content: center; gap: 2px; background: #fafbfb; }
.submission-completion-metrics small { color: var(--muted); font-size: 9px; }
.submission-completion-metrics strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.submission-completion-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) 170px auto; align-items: center; gap: 8px; margin-bottom: 10px; }
.submission-completion-toolbar .search-input { min-width: 0; }
.submission-completion-table { max-height: 300px; overflow: auto; border: 1px solid var(--line); }
.submission-completion-table th { position: sticky; top: 0; z-index: 1; background: #f2f4f3; }
.student-log-completion { margin: 0 0 16px; }
.student-log-completion > header { cursor: default; }
.student-log-completion > .submission-completion-toolbar { grid-template-columns: minmax(180px,.65fr) minmax(240px,1fr) 160px auto; margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); }
.student-log-completion > .submission-completion-metrics { margin: 0 14px 10px; padding: 0; }
.student-log-completion > .submission-completion-table { margin: 0 14px 14px; padding: 0; }
.review-ai-status { min-height: 68px; margin-bottom: 14px; padding: 12px 14px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 1px solid #cfd8ef; border-left: 4px solid var(--blue); background: #f3f6ff; }
.review-ai-status.attention { border-color: #efdba5; border-left-color: var(--amber); background: #fff9e9; }
.review-ai-status > svg { width: 22px; color: var(--blue); }
.review-ai-status.attention > svg { color: #9b6815; }
.review-ai-status > span { min-width: 0; display: grid; gap: 2px; }
.review-ai-status small { color: #687493; line-height: 1.5; }
.assignment-review-list { display: grid; gap: 14px; }
.assignment-review-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 5px 18px rgba(31, 36, 47, .05); }
.assignment-review-card > header { min-height: 66px; padding: 12px 16px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.review-student-avatar { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: var(--blue); font-weight: 760; }
.review-student-name { min-width: 0; display: grid; gap: 3px; }
.review-student-name strong { font-size: 14px; }
.review-student-name small { color: var(--muted); }
.review-statuses { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.review-statuses > small { color: var(--green); font-weight: 650; }
.assignment-review-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); }
.review-submission-panel, .review-grade-panel { min-width: 0; padding: 18px; }
.review-grade-panel { border-left: 1px solid var(--line); background: #fcfcfd; }
.review-panel-heading { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-panel-heading > span { display: inline-flex; align-items: center; gap: 7px; }
.review-panel-heading svg { width: 17px; color: var(--blue); }
.review-panel-heading small { color: var(--muted); }
.review-submission-text { min-height: 116px; max-height: 280px; margin: 12px 0 16px; padding: 14px; overflow: auto; color: #343842; border: 1px solid var(--line); background: #fafafa; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-attachment { min-height: 64px; padding: 9px 10px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 38px; align-items: center; gap: 9px; border: 1px solid #cfd8ef; background: #f5f7fd; }
.review-attachment.empty { grid-template-columns: 38px minmax(0, 1fr); border-color: var(--line); background: #fafafa; }
.review-attachment-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--blue); background: #fff; }
.review-attachment-icon svg { width: 19px; }
.review-attachment > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.review-attachment small { color: var(--muted); line-height: 1.45; }
.review-score-line { margin: 12px 0; display: grid; grid-template-columns: minmax(120px, 190px) auto; align-items: end; gap: 8px; }
.review-score-line > span { padding-bottom: 11px; color: var(--muted); font-weight: 650; }
.review-feedback-label { display: grid; gap: 6px; }
.review-feedback-label textarea { min-height: 154px; line-height: 1.65; }
.review-ai-action { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-ai-action small { max-width: 260px; color: var(--muted); line-height: 1.45; text-align: right; }
.assignment-review-card > .content-review-row { border-top: 1px solid #dce4f6; }

.file-preview-dialog { width: min(1320px, calc(100vw - 28px)); }
.file-preview-dialog .dialog-shell { max-height: calc(100vh - 24px); }
.file-preview-dialog .dialog-body { height: min(78vh, 900px); max-height: none; padding: 0; background: #e8edf5; }
.file-preview-dialog .dialog-shell > footer { justify-content: flex-end; }
.file-preview-meta { margin-right: auto; color: var(--muted); font-size: 10px; }
.file-preview-body { min-width: 0; display: grid; place-items: stretch; overflow: hidden; }
.file-preview-loading { display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); }
.file-preview-loading svg { width: 28px; color: var(--blue); }
.file-preview-image { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; background: #fff; }
.file-preview-video { max-width: 100%; max-height: 100%; margin: auto; background: #000; }
.file-preview-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.file-preview-text { width: 100%; height: 100%; margin: 0; padding: 24px 28px; overflow: auto; color: #292d35; background: #fff; font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.file-preview-notice { padding: 10px 14px; color: #745307; border-top: 1px solid #ead698; background: #fff8dc; font-size: 12px; line-height: 1.55; }
.file-preview-tabs { min-height: 42px; padding: 6px 10px 0; display: flex; align-items: end; gap: 4px; overflow-x: auto; border-bottom: 1px solid #c9d3e2; background: #f7f9fc; }
.file-preview-tabs button { min-width: 88px; max-width: 220px; height: 35px; padding: 0 14px; overflow: hidden; color: #536177; border: 1px solid transparent; border-bottom: 0; border-radius: 5px 5px 0 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.file-preview-tabs button:hover { color: #214caa; background: #edf3ff; }
.file-preview-tabs button.active { color: #123c91; border-color: #c9d3e2; background: #fff; }
.file-preview-tab-panel { min-width: 0; min-height: 0; overflow: hidden; }
.file-preview-workbook, .file-preview-xmind { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #fff; }
.file-preview-sheet-scroll { min-width: 0; min-height: 0; overflow: auto; background: #fff; }
.file-preview-sheet { width: max-content; min-width: 100%; table-layout: fixed; border-collapse: collapse; color: #202735; background: #fff; font-size: 12px; }
.file-preview-sheet td { min-width: 72px; max-width: 480px; height: 28px; padding: 5px 8px; overflow: hidden; border: 1px solid #d5dbe5; background-clip: padding-box; line-height: 1.35; text-overflow: ellipsis; vertical-align: middle; white-space: pre; }
.file-preview-sheet tr:first-child td { font-weight: 700; }
.file-preview-docx { width: 100%; height: 100%; min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; background: #dfe5ed; }
.file-preview-docx-pages { min-width: 0; min-height: 0; overflow: auto; transform-origin: 0 0; }
.file-preview-docx .docx-wrapper { min-height: 100%; padding: 28px 18px 48px; background: #dfe5ed; }
.file-preview-docx .docx-wrapper > section.docx-preview-document { margin-bottom: 22px; box-shadow: 0 8px 22px rgba(24, 38, 61, 0.14); }
.file-preview-xmind-viewport { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; background: #f5f8fc; }
.file-preview-zoom { min-height: 42px; padding: 6px 12px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; border-bottom: 1px solid #d5dce8; background: #fff; }
.file-preview-zoom button { min-width: 32px; height: 30px; padding: 0 10px; color: #294466; border: 1px solid #cbd6e5; border-radius: 4px; background: #f7f9fc; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.file-preview-zoom button:hover { color: #1556c0; border-color: #92b6ee; background: #edf4ff; }
.file-preview-zoom span { min-width: 52px; color: #536177; font-size: 11px; font-weight: 700; text-align: center; }
.file-preview-xmind-scroll { min-width: 0; min-height: 0; padding: 38px 46px 80px; overflow: auto; background-color: #f5f8fc; background-image: radial-gradient(#c8d3e2 0.7px, transparent 0.7px); background-size: 18px 18px; }
.file-preview-xmind-map { width: max-content; min-width: 100%; transform-origin: 0 0; transition: transform 140ms ease; }
.xmind-tree, .xmind-tree ul { position: relative; margin: 0; padding: 0; display: flex; align-items: center; list-style: none; }
.xmind-tree ul { padding-left: 46px; flex-direction: column; align-items: flex-start; gap: 12px; }
.xmind-tree li { position: relative; display: flex; align-items: center; }
.xmind-tree ul::before { content: ""; position: absolute; left: 22px; top: 16px; bottom: 16px; width: 2px; border-radius: 2px; background: #a9bbd4; }
.xmind-tree ul > li::before { content: ""; position: absolute; left: -24px; top: 50%; width: 24px; height: 2px; background: #a9bbd4; }
.xmind-topic { max-width: 310px; min-height: 34px; padding: 7px 11px; display: inline-flex; align-items: center; color: #28364b; border: 1px solid #b9c8dc; border-left: 4px solid #2a7a78; border-radius: 5px; background: #fff; box-shadow: 0 2px 7px rgba(32, 54, 84, 0.08); font-size: 12px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.xmind-topic.branch { color: #184982; border-color: #a9c3e7; border-left-color: #2367c9; background: #edf5ff; font-weight: 700; }
.xmind-topic.root { max-width: 360px; min-height: 46px; padding: 10px 16px; color: #fff; border: 0; border-radius: 6px; background: #1f4c91; box-shadow: 0 7px 18px rgba(21, 61, 124, 0.24); font-size: 15px; font-weight: 800; }

@media (max-width: 820px) {
  .assignment-review-toolbar { position: static; margin: -20px -20px 14px; grid-template-columns: 1fr 1fr; }
  .assignment-review-toolbar .search-input { grid-column: 1 / -1; }
  .assignment-review-grid { grid-template-columns: 1fr; }
  .review-grade-panel { border-top: 1px solid var(--line); border-left: 0; }
  .review-ai-action { align-items: stretch; flex-direction: column; }
  .review-ai-action .btn { width: 100%; }
  .review-ai-action small { max-width: none; text-align: left; }
  .submission-completion-toolbar, .student-log-completion > .submission-completion-toolbar { grid-template-columns: 1fr 1fr; }
  .submission-completion-toolbar .search-input { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .assignment-review-toolbar { grid-template-columns: 1fr; }
  .assignment-review-toolbar .search-input { grid-column: auto; }
  .assignment-review-toolbar .btn { width: 100%; }
  .review-ai-status { grid-template-columns: 24px minmax(0, 1fr); }
  .review-ai-status .btn { grid-column: 1 / -1; width: 100%; }
  .assignment-review-card > header { grid-template-columns: 38px minmax(0, 1fr); }
  .review-statuses { grid-column: 1 / -1; justify-content: flex-start; }
  .submission-completion-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .submission-completion-toolbar, .student-log-completion > .submission-completion-toolbar { grid-template-columns: 1fr; }
  .submission-completion-toolbar .search-input { grid-column: auto; }
  .review-attachment { grid-template-columns: 36px minmax(0, 1fr) 38px; }
  .review-attachment .btn { grid-column: 1 / -1; width: 100%; }
  .file-preview-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .file-preview-dialog .dialog-shell { width: 100%; max-width: 100%; min-width: 0; height: 100%; max-height: none; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
  .file-preview-dialog .dialog-shell > header,
  .file-preview-dialog .dialog-shell > footer,
  .file-preview-dialog .dialog-body { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
  .file-preview-dialog .dialog-shell > header { min-height: 58px; padding: 10px 12px; gap: 10px; }
  .file-preview-dialog .dialog-shell > header > div { min-width: 0; }
  .file-preview-dialog .dialog-shell > header h2 { max-width: calc(100vw - 86px); overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .file-preview-dialog .dialog-body { height: auto; min-height: 0; }
  .file-preview-dialog .dialog-shell > footer { min-height: 0; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .file-preview-dialog .dialog-shell > footer .btn { width: 100%; min-width: 0; padding: 0 8px; }
  .file-preview-dialog .dialog-shell > footer .btn[data-file-preview-newwindow] { grid-column: 1 / -1; }
  .file-preview-meta { width: auto; min-width: 0; grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .file-preview-tabs { padding: 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 5px; overflow-x: hidden; }
  .file-preview-tabs button { width: 100%; min-width: 0; max-width: none; height: auto; min-height: 34px; padding: 5px 7px; border: 1px solid #d5dce8; border-radius: 5px; white-space: normal; }
  .file-preview-docx .docx-wrapper { padding: 12px 8px 28px; }
  .file-preview-docx-pages { width: 100%; max-width: 100%; }
  .file-preview-docx-zoom { justify-content: center; }
  .file-preview-xmind-scroll { padding: 22px 16px 52px; }
}

@media print {
  @page { margin: 14mm; }
  body { color: #111; background: #fff; }
  .sidebar, .workspace-topbar, .manual-actions, .manual-toc, #toastRegion, .app-dialog { display: none !important; }
  .workspace-shell, .workspace-main { display: block !important; height: auto !important; overflow: visible !important; }
  .view { display: none !important; }
  .view[data-view-panel="help"] { display: block !important; max-width: none; padding: 0; }
  .manual-layout { gap: 16px; }
  .manual-section { break-inside: avoid; }
  .manual-section > summary { border-bottom: 1px solid #ddd; }
  .manual-section > summary > svg { display: none; }
  .manual-section > .manual-section-body, .manual-section > .manual-faq { display: grid !important; }
}

/* Standalone assignment review workbench */
.assignment-review-entry { min-height: 34px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
.assignment-review-body { min-height: 100vh; background: #eef1f3; }
.assignment-review-header { position: sticky; top: 0; z-index: 30; min-height: 82px; padding: 13px clamp(18px, 3vw, 44px); display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #fff; background: #20262f; border-bottom: 1px solid #343b46; }
.assignment-review-heading { min-width: 0; display: grid; grid-template-columns: 40px 38px minmax(0, 1fr); align-items: center; gap: 11px; }
.assignment-review-heading > .icon-btn { color: #d8dde5; border-color: #4a515c; background: #2b323c; }
.assignment-review-heading > .icon-btn:hover { color: #fff; border-color: #7b8491; background: #363e49; }
.assignment-review-heading .brand-mark { width: 38px; height: 38px; }
.assignment-review-heading > div { min-width: 0; }
.assignment-review-heading .eyebrow { margin: 0 0 2px; color: #7fd3bc; }
.assignment-review-heading h1 { max-width: min(680px, 56vw); overflow: hidden; color: #fff; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.assignment-review-heading p { margin-top: 2px; overflow: hidden; color: #aeb6c2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.assignment-review-header-actions { display: flex; align-items: center; gap: 8px; }
.assignment-review-header-actions .btn { color: #e7ebf0; border-color: #4a515c; background: #2b323c; box-shadow: none; white-space: nowrap; }
.assignment-review-header-actions .btn:hover { color: #fff; border-color: #7b8491; background: #363e49; }
.assignment-review-header-actions .btn:disabled { cursor: not-allowed; opacity: .45; }
.assignment-review-page { width: min(1580px, calc(100% - 36px)); margin: 18px auto 30px; }
.assignment-review-overview { min-height: 82px; display: grid; grid-template-columns: repeat(5, minmax(86px, .58fr)) minmax(160px, 1fr) minmax(250px, 1.55fr); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.assignment-review-overview > div { min-width: 0; padding: 14px 16px; display: grid; align-content: center; gap: 3px; border-right: 1px solid var(--line); }
.assignment-review-overview > div:last-child { border-right: 0; }
.assignment-review-overview span { color: var(--muted); font-size: 10px; }
.assignment-review-overview strong { font-size: 23px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.assignment-review-progress i { height: 5px; margin-top: 5px; overflow: hidden; border-radius: 3px; background: #e4e8eb; }
.assignment-review-progress i b { width: 0; height: 100%; display: block; background: var(--green); transition: width .2s ease; }
.assignment-review-keywords p { margin-top: 3px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.assignment-review-keywords p > span { padding: 3px 6px; display: inline-flex; align-items: center; gap: 4px; color: #31546e; border-radius: 4px; background: var(--blue-soft); }
.assignment-review-keywords p small { color: #698298; font-size: 8px; }
.assignment-review-keywords .keyword-more-label { color: #6d7780; font-size: 9px; font-style: normal; white-space: nowrap; }
.assignment-review-workspace { min-height: calc(100vh - 218px); margin-top: 14px; display: grid; grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 14px 34px rgba(28, 37, 44, .07); }
.assignment-review-roster { min-width: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); border-right: 1px solid var(--line); background: #f8f9fa; }
.assignment-review-roster > header { min-height: 72px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: #fff; }
.assignment-review-roster > header .eyebrow { margin-bottom: 2px; }
.assignment-roster-count { flex: 0 0 auto; padding: 5px 8px; color: #41505a; border-radius: 4px; background: #edf0f2; font-size: 10px; font-weight: 700; }
.assignment-review-filters { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-bottom: 1px solid var(--line); }
.assignment-review-filters select, .assignment-review-filters input { min-width: 0; min-height: 38px; font-size: 11px; }
.assignment-review-filters .search-input { min-width: 0; grid-column: 1 / -1; }
.assignment-review-filters .search-input svg { top: 10px; width: 16px; }
.assignment-review-student-list { min-height: 360px; max-height: calc(100vh - 380px); overflow-y: auto; }
.assignment-student-row { width: 100%; min-height: 66px; padding: 10px 12px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 15px; align-items: center; gap: 9px; color: inherit; border: 0; border-bottom: 1px solid #e4e8e6; background: transparent; cursor: pointer; text-align: left; }
.assignment-student-row:hover { background: #fff; }
.assignment-student-row.active { position: relative; background: #fff; box-shadow: inset 4px 0 0 var(--coral); }
.assignment-student-row.active > i { color: var(--coral-dark); }
.assignment-student-copy { min-width: 0; display: grid; gap: 3px; }
.assignment-student-copy strong, .assignment-student-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignment-student-copy strong { font-size: 12px; }
.assignment-student-copy small { font-size: 9px; }
.assignment-student-state { display: grid; justify-items: end; gap: 4px; }
.assignment-student-state b { color: #3f4951; font-size: 10px; font-variant-numeric: tabular-nums; }
.assignment-student-row > i { width: 14px; color: #9ca4aa; }
.status-late { color: var(--amber); background: var(--amber-soft); }
.assignment-review-list-loading, .assignment-review-list-empty { min-height: 240px; padding: 24px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); text-align: center; }
.assignment-review-list-loading svg, .assignment-review-list-empty svg { width: 25px; height: 25px; }
.assignment-review-list-empty strong { color: #44505a; }
.assignment-review-list-empty span { font-size: 10px; }
.assignment-review-detail { min-width: 0; background: #fff; }
.assignment-review-detail-empty { min-height: 520px; padding: 30px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); text-align: center; }
.assignment-review-detail-empty > svg { width: 32px; height: 32px; color: #9ba6ae; }
.assignment-review-detail-empty strong { color: #3b4650; }
.assignment-review-detail-empty .btn { margin-top: 10px; }
.assignment-review-student-header { min-height: 78px; padding: 14px 20px; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #fbfcfc; }
.review-student-avatar.large { width: 46px; height: 46px; font-size: 15px; background: #355b75; }
.assignment-review-student-header > div { min-width: 0; }
.assignment-review-student-header .eyebrow { margin: 0 0 2px; color: #697780; }
.assignment-review-student-header h2 { font-size: 18px; }
.assignment-review-student-header p { margin-top: 2px; color: var(--muted); font-size: 10px; }
.assignment-review-detail-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); align-items: start; }
.assignment-submission-content { min-width: 0; min-height: 500px; padding: 20px; border-right: 1px solid var(--line); }
.assignment-submission-content > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.assignment-submission-content > header > span { display: flex; align-items: center; gap: 8px; }
.assignment-submission-content > header svg { color: var(--blue); }
.assignment-submission-text { min-height: 260px; max-height: calc(100vh - 500px); margin: 15px 0; padding: 17px 18px; overflow-y: auto; color: #303941; border-left: 3px solid #aebbc5; background: #f7f8f9; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-log-checks { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.review-log-checks .status-badge { display: inline-flex; align-items: center; gap: 5px; white-space: normal; }
.review-log-checks svg { width: 13px; height: 13px; }
.assignment-submission-attachment { min-width: 0; min-height: 66px; padding: 11px 12px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 40px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.assignment-submission-attachment > span { width: 38px; height: 38px; display: grid; place-items: center; color: var(--green); border-radius: 5px; background: var(--green-soft); }
.assignment-submission-attachment > div { min-width: 0; display: grid; gap: 3px; }
.assignment-submission-attachment small { font-size: 9px; }
.assignment-submission-attachment.empty { grid-template-columns: 38px minmax(0, 1fr); background: #fafbfb; }
.assignment-submission-attachment.empty > span { color: #8c979e; background: #eceff1; }
.assignment-grade-editor { min-width: 0; padding: 20px; }
.assignment-grade-editor > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.assignment-grade-editor > header .eyebrow { margin-bottom: 2px; }
.assignment-grade-editor > header > span { color: var(--muted); font-size: 11px; }
.assignment-grade-editor > header b { color: var(--ink); font-size: 14px; }
.assignment-ai-status { min-height: 58px; margin: 14px 0 10px; padding: 10px 12px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-left: 3px solid var(--green); background: #f0f7f4; }
.assignment-ai-status.attention { border-left-color: var(--amber); background: #fdf6ec; }
.assignment-ai-status > svg { color: var(--green); }
.assignment-ai-status.attention > svg { color: var(--amber); }
.assignment-ai-status > span { min-width: 0; display: grid; gap: 2px; }
.assignment-ai-status strong { font-size: 11px; }
.assignment-ai-status small { font-size: 9px; line-height: 1.4; }
.assignment-score-field { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 190px) auto; align-items: end; gap: 9px; }
.assignment-score-field input { min-height: 48px; font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.assignment-score-field > strong { padding-bottom: 13px; }
.assignment-ai-requirement-toggle { margin-top: 14px; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #dce6f3; border-radius: 8px; background: #f8fbff; cursor: pointer; }
.assignment-ai-requirement-toggle > span:first-child { min-width: 0; display: grid; gap: 3px; }
.assignment-ai-requirement-toggle strong { color: #17233a; font-size: 11px; }
.assignment-ai-requirement-toggle small { color: #71809a; font-size: 9px; line-height: 1.5; }
.assignment-feedback-field { margin-top: 14px; }
.assignment-feedback-field textarea { min-height: 190px; line-height: 1.7; }
.assignment-ai-actions { margin-top: 12px; display: flex; align-items: center; gap: 10px; }
.assignment-ai-actions small { font-size: 9px; line-height: 1.5; }
.assignment-ai-result { margin: 14px -20px 0; border-top: 1px solid #dce4f6; }
.assignment-grade-actions { position: sticky; bottom: 0; z-index: 2; margin: 18px -20px -20px; padding: 12px 20px; display: grid; grid-template-columns: auto minmax(10px, 1fr) auto auto; gap: 8px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .97); }
.assignment-grade-readonly { min-height: 220px; padding: 32px; display: flex; align-items: flex-start; justify-content: center; gap: 10px; color: var(--muted); }
.assignment-grade-readonly > span { display: grid; gap: 4px; }
.assignment-missing-state { min-height: 470px; padding: 30px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); text-align: center; }
.assignment-missing-state > svg { width: 34px; height: 34px; color: #9aa4ab; }
.assignment-missing-state strong { color: #3d4850; }
.assignment-missing-state > div { margin-top: 12px; display: flex; gap: 8px; }

@media (max-width: 1180px) {
  .assignment-review-overview { grid-template-columns: repeat(5, minmax(82px, 1fr)) minmax(150px, 1.25fr); }
  .assignment-review-keywords { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .assignment-review-overview > div:nth-child(6) { border-right: 0; }
  .assignment-review-keywords p { min-height: 24px; }
  .assignment-review-detail-grid { grid-template-columns: 1fr; }
  .assignment-submission-content { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .assignment-submission-text { min-height: 180px; max-height: 360px; }
}

@media (max-width: 900px) {
  .assignment-review-header { position: static; align-items: flex-start; }
  .assignment-review-heading h1 { max-width: 52vw; }
  .assignment-review-header-actions { display: grid; }
  .assignment-review-page { width: min(100% - 24px, 760px); margin-top: 12px; }
  .assignment-review-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .assignment-review-overview > div { border-bottom: 1px solid var(--line); }
  .assignment-review-overview > div:nth-child(3n) { border-right: 0; }
  .assignment-review-progress { border-bottom: 0 !important; }
  .assignment-review-keywords { grid-column: span 2; border-top: 0; border-bottom: 0 !important; }
  .assignment-review-workspace { min-height: 0; grid-template-columns: 1fr; overflow: visible; }
  .assignment-review-roster { border-right: 0; border-bottom: 1px solid var(--line); }
  .assignment-review-student-list { min-height: 180px; max-height: 300px; }
  .assignment-review-detail-empty { min-height: 320px; }
}

@media (max-width: 600px) {
  .assignment-review-header { padding: 12px; display: grid; gap: 10px; }
  .assignment-review-heading { grid-template-columns: 40px minmax(0, 1fr); }
  .assignment-review-heading .brand-mark { display: none; }
  .assignment-review-heading h1 { max-width: calc(100vw - 90px); font-size: 16px; }
  .assignment-review-header-actions { grid-template-columns: 1fr 1fr; }
  .assignment-review-header-actions .btn { min-width: 0; padding: 0 9px; font-size: 11px; }
  .assignment-review-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assignment-review-overview > div, .assignment-review-overview > div:nth-child(3n) { min-height: 68px; border-right: 1px solid var(--line); }
  .assignment-review-overview > div:nth-child(2n) { border-right: 0; }
  .assignment-review-keywords { grid-column: 1 / -1; }
  .assignment-review-filters { grid-template-columns: 1fr; }
  .assignment-review-filters .search-input { grid-column: auto; }
  .assignment-review-student-header { padding: 12px; grid-template-columns: 42px minmax(0, 1fr); }
  .assignment-review-student-header > .status-badge { grid-column: 1 / -1; width: fit-content; margin-left: 54px; }
  .assignment-submission-content, .assignment-grade-editor { padding: 14px; }
  .assignment-submission-attachment { grid-template-columns: 34px minmax(0, 1fr) 40px; }
  .assignment-submission-attachment .btn { grid-column: 1 / -1; width: 100%; }
  .assignment-ai-status { grid-template-columns: 20px minmax(0, 1fr); }
  .assignment-ai-status .btn { grid-column: 1 / -1; width: 100%; }
  .assignment-score-field { grid-template-columns: minmax(0, 1fr) auto; }
  .assignment-ai-actions { align-items: stretch; flex-direction: column; }
  .assignment-ai-actions .btn { width: 100%; }
  .assignment-ai-result { margin-right: -14px; margin-left: -14px; }
  .assignment-grade-actions { position: static; margin: 16px -14px -14px; padding: 12px 14px; grid-template-columns: 1fr 1fr; }
  .assignment-grade-actions > span { display: none; }
  .assignment-grade-actions .btn { min-width: 0; padding: 0 9px; font-size: 10px; }
  .assignment-grade-actions .btn:first-child { grid-column: 1 / -1; }
  .assignment-missing-state > div { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
}

/* Shared standalone workbench for learning logs, rotation and defense reviews */
.review-workbench-header { flex-wrap: wrap; }
.review-workbench-tabs { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #48515d; border-radius: 6px; background: #171c23; }
.review-workbench-tabs a { min-height: 34px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #aeb7c3; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.review-workbench-tabs a:hover { color: #fff; background: #2d3540; }
.review-workbench-tabs a.active { color: #142b26; background: #7fd3bc; }
.review-workbench-tabs svg { width: 15px; height: 15px; }
.review-workbench-overview { grid-template-columns: repeat(5, minmax(86px, .6fr)) minmax(150px, 1fr) minmax(250px, 1.45fr); }
.review-workbench-ai-state p > span { color: #31546e; }
.review-workbench-filters #reviewContextFilter { grid-column: 1 / -1; }
.review-keyword-selector { margin-top: 14px; display: grid; gap: 10px; padding: 14px; border: 1px solid #dce6f3; border-radius: 8px; background: #f8fbff; }
.review-keyword-selector > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.review-keyword-selector > header > span { min-width: 0; display: grid; gap: 2px; }
.review-keyword-selector > header strong { color: #17233a; font-size: 12px; }
.review-keyword-selector > header small { color: #71809a; font-size: 10px; line-height: 1.45; }
.review-keyword-selector-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.review-keyword-selector > header button { min-height: 28px; padding: 0 8px; border: 1px solid #d3dfef; border-radius: 5px; background: #fff; color: #2563eb; font-size: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.review-keyword-selector > div { display: flex; flex-wrap: wrap; gap: 7px; }
.review-keyword-selector > div button { min-height: 30px; padding: 5px 10px; border: 1px solid #d3dfef; border-radius: 6px; background: #fff; color: #40516b; font-size: 10px; font-weight: 700; cursor: pointer; }
.review-keyword-selector > div button:hover { border-color: #8db0f3; color: #1d4ed8; }
.review-keyword-selector > div button.selected { border-color: #2563eb; background: #eaf1ff; color: #1d4ed8; box-shadow: inset 0 0 0 1px rgba(37,99,235,.08); }
.review-object-context dl { margin: 18px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.review-object-context dl > div { min-width: 0; padding: 14px; display: grid; gap: 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.review-object-context dt { color: var(--muted); font-size: 10px; }
.review-object-context dd { margin: 0; color: var(--ink); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.review-data-boundary { margin-top: 18px; padding: 14px; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 10px; color: #31546e; border-left: 3px solid var(--blue); background: var(--blue-soft); }
.review-data-boundary > span { display: grid; gap: 4px; }
.review-data-boundary strong { font-size: 11px; }
.review-data-boundary small { color: #557187; font-size: 10px; line-height: 1.6; }
.review-dimension-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.review-dimension-grid label { min-width: 0; padding: 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfb; }
.review-dimension-grid label > span { color: var(--muted); font-size: 9px; font-weight: 500; }
.review-dimension-grid input { grid-column: 1 / -1; min-height: 46px; font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.review-date-field { max-width: 240px; margin-top: 14px; }
.review-textarea-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.review-textarea-grid label { min-width: 0; }
.review-textarea-grid .full { grid-column: 1 / -1; }
.review-textarea-grid textarea { min-height: 92px; line-height: 1.6; }
.review-ai-evidence { margin-top: 14px; padding: 13px; border: 1px solid #dce4f6; border-radius: 6px; background: #f7f9fd; }
.review-ai-evidence textarea { min-height: 76px; line-height: 1.6; }
.review-ai-guidance { margin-bottom: 12px; }
.review-ai-guidance small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.review-readonly-result dl { margin: 16px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.review-readonly-result dl > div { padding: 10px; display: flex; justify-content: space-between; gap: 8px; background: #f5f7f8; }
.review-readonly-result dt { color: var(--muted); }
.review-readonly-result dd { margin: 0; font-weight: 750; }
.review-readonly-result > p { min-height: 150px; padding: 15px; color: #36414a; background: #f7f8f9; line-height: 1.8; white-space: pre-wrap; }

@media (max-width: 1180px) {
  .review-workbench-overview { grid-template-columns: repeat(3, minmax(82px, 1fr)); }
  .review-workbench-overview > div:nth-child(3n) { border-right: 0; }
  .review-workbench-ai-state { grid-column: 1 / -1; border-top: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .review-workbench-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .review-workbench-tabs { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .review-workbench-tabs a { flex: 1 1 0; }
  .review-workbench-header .assignment-review-header-actions { grid-column: 2; grid-row: 1; }
}

@media (max-width: 600px) {
  .review-workbench-header { grid-template-columns: 1fr; }
  .review-workbench-header .assignment-review-header-actions { grid-column: 1; grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-workbench-tabs { grid-column: 1; grid-row: 2; }
  .review-workbench-tabs a { padding: 0 7px; font-size: 10px; }
  .review-workbench-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-workbench-overview > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .review-workbench-overview > div:nth-child(2n) { border-right: 0; }
  .review-workbench-ai-state { grid-column: 1 / -1; }
  .assignment-review-student-list { min-height: 148px; max-height: 220px; }
  .review-keyword-selector { margin-top: 12px; padding: 12px; }
  .review-keyword-selector > header { align-items: stretch; flex-direction: column; gap: 6px; }
  .review-keyword-selector-actions { width: 100%; }
  .review-keyword-selector > header button { flex: 1 1 0; }
  .review-keyword-selector > div { gap: 8px; }
  .review-keyword-selector > div button { flex: 1 1 calc(50% - 8px); min-height: 36px; font-size: 11px; }
  .assignment-feedback-field { display: grid; gap: 7px; }
  .assignment-feedback-field textarea { width: 100%; margin: 0; }
  .review-object-context dl, .review-dimension-grid, .review-textarea-grid, .review-readonly-result dl { grid-template-columns: 1fr; }
  .review-date-field { max-width: none; }
}

/* Workspace architecture: energetic technology */
:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #edf0f5;
  --surface-3: #e4e8ef;
  --ink: #171a22;
  --text: #171a22;
  --muted: #686e7a;
  --line: #dce1e9;
  --line-strong: #c7ceda;
  --green: #00a889;
  --green-2: #008672;
  --green-soft: #e3f7f2;
  --blue: #315cf5;
  --blue-soft: #e9efff;
  --coral: #f25563;
  --coral-dark: #cf3948;
  --coral-soft: #ffedef;
  --red: #cf3948;
  --red-soft: #ffedef;
  --amber: #de8c18;
  --amber-soft: #fff2dc;
  --sidebar: #171a22;
  --sidebar-panel: #20242e;
  --sidebar-line: #2c313d;
  --view-accent: var(--blue);
  --shadow: 0 20px 54px rgba(25, 31, 48, .12);
  --shadow-soft: 0 7px 22px rgba(25, 31, 48, .06);
}

body[data-active-view="activities"], body[data-active-view="scores"] { --view-accent: var(--green); }
body[data-active-view="marketing"], body[data-active-view="exams"] { --view-accent: var(--amber); }
body[data-active-view="assignments"], body[data-active-view="assessments"] { --view-accent: var(--coral); }
body[data-active-view="learning"], body[data-active-view="profiles"], body[data-active-view="roster"] { --view-accent: #1f8bbd; }

::selection { color: #fff; background: var(--blue); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn { min-height: 40px; position: relative; overflow: hidden; border-radius: 6px; font-weight: 700; box-shadow: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 7px 16px rgba(49, 92, 245, .18); }
.btn-primary:hover { border-color: #244bd6; background: #244bd6; box-shadow: 0 10px 22px rgba(49, 92, 245, .22); }
.btn-secondary { border-color: var(--line-strong); background: #fff; }
.btn-secondary:hover { color: var(--blue); border-color: #b6c3ff; background: var(--blue-soft); }
.btn-danger { color: var(--coral-dark); border-color: #ffc4ca; background: var(--coral-soft); }
.btn-danger:hover { color: #fff; border-color: var(--coral-dark); background: var(--coral-dark); }
.btn-quiet:hover { color: var(--blue); background: var(--blue-soft); }
.btn:active, .icon-btn:active { transform: translateY(0) scale(.98); }
.btn:disabled, .icon-btn:disabled { cursor: not-allowed; box-shadow: none; transform: none; opacity: .55; }
.icon-btn { border-radius: 6px; }
.icon-btn:hover { color: var(--blue); border-color: #b6c3ff; background: var(--blue-soft); }
label { color: #343945; }
input, select, textarea { border-radius: 6px; border-color: var(--line-strong); background: #fff; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
input:hover, select:hover, textarea:hover { border-color: #aeb7c7; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 92, 245, .12); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); }
fieldset { border-color: var(--line-strong); }
.eyebrow { color: var(--view-accent); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }

/* Shell and navigation */
.workspace-body { height: 100vh; overflow: hidden; }
.workspace-shell { height: 100vh; min-height: 0; grid-template-columns: 268px minmax(0, 1fr); background: var(--bg); transition: grid-template-columns .2s ease; }
.workspace-body .sidebar { min-width: 0; min-height: 0; height: 100vh; position: relative; overflow: hidden; color: #eef2f7; border-right: 1px solid var(--sidebar-line); background: var(--sidebar); }
.workspace-body .sidebar::after { background: rgba(76, 220, 188, .12); }
.sidebar-brand { min-height: 86px; height: auto; flex: 0 0 auto; padding: 14px 12px 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; gap: 8px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-brand-link { min-width: 0; display: flex; align-items: center; gap: 11px; }
.sidebar-brand .brand-mark { flex: 0 0 auto; width: 40px; height: 40px; color: #fff; border: 1px solid rgba(76,220,188,.27); background: #242936; box-shadow: 0 0 0 3px rgba(76,220,188,.07); }
.sidebar-brand-copy { min-width: 0; display: grid; gap: 2px; }
.sidebar-brand-copy strong, .sidebar-brand-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-brand-copy strong { color: #f8f9fc; font-size: 14px; }
.sidebar-brand-copy small { color: #858d9c; font-size: 9px; }
.sidebar-collapse { width: 32px; height: 32px; color: #9ba4b4; border-color: #343a48; background: #222733; }
.sidebar-collapse:hover { color: #fff; border-color: #515b70; background: #2b3140; }
.project-switcher { flex: 0 0 auto; margin: 14px 12px 9px; padding: 13px 14px; gap: 4px; border: 1px solid #2e3441; border-radius: 6px; background: var(--sidebar-panel); box-shadow: inset 3px 0 0 var(--blue); }
.project-switcher .project-state { display: flex; align-items: center; gap: 6px; color: #9ca5b4; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.project-state i { width: 6px; height: 6px; border-radius: 50%; background: #54d7b9; box-shadow: 0 0 0 3px rgba(84,215,185,.1); }
.project-switcher strong { color: #f5f7fb; font-size: 12px; }
.project-switcher small { color: #788190; }
.sidebar-nav { min-height: 0; flex: 1 1 auto; overflow-y: auto; gap: 8px; padding: 10px 9px 18px; }
.nav-group { display: grid; gap: 3px; }
.nav-group-label { min-height: 24px; padding: 8px 11px 2px; color: #687080; font-size: 9px; font-weight: 700; }
.workspace-body .sidebar-nav .nav-group button { min-height: 42px; height: auto; position: relative; padding: 0 12px; color: #aeb6c4; border: 1px solid transparent; border-radius: 6px; }
.workspace-body .sidebar-nav .nav-group button:hover { color: #fff; border-color: #303746; background: #222733; }
.workspace-body .sidebar-nav .nav-group button.active { color: #fff; border-color: #35466f; background: #27324a; }
.workspace-body .sidebar-nav .nav-group button.active::before { left: -1px; top: 10px; bottom: 10px; width: 3px; background: #54d7b9; box-shadow: 0 0 12px rgba(84,215,185,.35); }
.workspace-body .sidebar-nav .nav-group button.active svg { color: #54d7b9; }
.sidebar-user { min-height: 74px; flex: 0 0 auto; padding: 11px 12px; border-top-color: rgba(255,255,255,.08); background: #12151c; }
.workspace-body .sidebar-user .avatar { color: #fff; background: var(--blue); }
.workspace-body .sidebar-user strong { color: #f1f4f8; }
.workspace-body .sidebar-user small { color: #858d9c; }
.workspace-body .sidebar-user .icon-btn.inverse { color: #aeb6c4; border-color: #343a48; background: #20242e; }
.sidebar-scrim { display: none; }

.workspace-shell.sidebar-collapsed { grid-template-columns: 78px minmax(0, 1fr); }
.sidebar-collapsed .sidebar-brand { min-height: 104px; padding: 12px 10px; grid-template-columns: 1fr; justify-items: center; }
.sidebar-collapsed .sidebar-brand-link { justify-content: center; }
.sidebar-collapsed .sidebar-brand-copy { display: none; }
.sidebar-collapsed .sidebar-collapse { display: inline-flex; }
.sidebar-collapsed .project-switcher { min-height: 42px; padding: 0; display: grid; place-items: center; box-shadow: none; }
.sidebar-collapsed .project-switcher strong, .sidebar-collapsed .project-switcher small { display: none; }
.sidebar-collapsed .project-state { font-size: 0; }
.sidebar-collapsed .project-state i { width: 8px; height: 8px; }
.sidebar-collapsed .nav-group { gap: 5px; }
.sidebar-collapsed .nav-group-label { display: none; }
.sidebar-collapsed .sidebar-nav { padding: 9px; }
.sidebar-collapsed .sidebar-nav button { justify-content: center; padding: 0; }
.sidebar-collapsed .sidebar-nav button span { display: none; }
.sidebar-collapsed .sidebar-nav button svg { width: 19px; height: 19px; }
.sidebar-collapsed .sidebar-user { grid-template-columns: 1fr; justify-items: center; padding: 10px; }
.sidebar-collapsed .sidebar-user > span:nth-child(2) { display: none; }

/* Page frame and context */
.workspace-main { min-width: 0; height: 100vh; display: grid; grid-template-rows: 92px minmax(0, 1fr); overflow: hidden; background: var(--bg); }
.workspace-topbar { min-width: 0; height: auto; position: relative; top: auto; padding: 15px 28px 14px 30px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; border-top: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); box-shadow: 0 4px 18px rgba(25,31,48,.045); backdrop-filter: blur(10px); }
.workspace-topbar::before { content: ""; position: absolute; left: 0; top: 20px; bottom: 20px; width: 4px; background: var(--view-accent); }
.topbar-heading { min-width: 0; display: grid; gap: 6px; }
.breadcrumb { min-width: 0; display: flex; align-items: center; gap: 7px; color: #858b97; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.breadcrumb b { color: var(--view-accent); }
.breadcrumb > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title-row { min-width: 0; display: flex; align-items: baseline; gap: 14px; }
.workspace-topbar h1 { flex: 0 0 auto; max-width: min(560px, 44vw); overflow: hidden; color: #171a22; font-size: 20px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title-row > span { min-width: 0; overflow: hidden; color: #747a86; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { min-width: 0; gap: 8px; }
.connection { height: 34px; padding: 0 10px; color: #59616d; border-left: 1px solid var(--line); font-size: 9px; }
.connection > span { background: var(--green); box-shadow: 0 0 0 3px rgba(0,168,137,.12); }
.data-safety-button { color: var(--green-2); border-color: #b4e0d5; background: var(--green-soft); }
.topbar-undo { height: 42px; min-width: 146px; border-radius: 6px; }
.topbar-undo:not(:disabled):hover { border-color: var(--coral); background: var(--coral-soft); }
.workspace-canvas { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; scroll-padding-top: 18px; }
.view { width: min(100%, 1600px); max-width: none; margin: 0 auto; padding: 24px 30px 56px; }
.view.active { display: block; animation: view-enter .18s ease-out; }
@keyframes view-enter { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Reusable operational surfaces */
.action-bar { min-height: 64px; margin-bottom: 18px; padding: 11px 12px; border: 1px solid var(--line); border-left: 4px solid var(--view-accent); border-radius: 6px; background: rgba(255,255,255,.96); box-shadow: 0 6px 18px rgba(25,31,48,.045); }
.view > .action-bar:first-child, .view > .operation-switcher + .action-bar { position: sticky; top: 0; z-index: 8; }
.filters { gap: 8px; }
.filters select, .filters input { background-color: #fff; }
.search-input svg { color: #7a8290; }
.operation-switcher { margin-bottom: 14px; border-color: var(--line); background: #e8ebf1; }
.operation-switcher button { border-radius: 5px; }
.operation-switcher button.active, .evaluation-rail button.active { color: #1f356f; background: #fff; box-shadow: inset 0 -3px 0 var(--view-accent), 0 2px 7px rgba(25,31,48,.08); }
.operation-switcher button.active svg, .evaluation-rail button.active svg { color: var(--view-accent); }
.evaluation-header { min-height: 64px; margin-bottom: 18px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }

.metrics-strip { min-height: 108px; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow-soft); }
.metric { min-width: 0; overflow: hidden; padding: 18px 22px; border-right-color: var(--line); background: #fff; }
.metric::after { content: ""; position: absolute; top: 0; right: 0; left: 0; width: auto; height: 3px; background: var(--blue); }
.metric:nth-child(2)::after { background: var(--green); }
.metric:nth-child(3)::after { background: var(--amber); }
.metric:nth-child(4)::after { background: var(--coral); }
.metric span { color: #747a86; font-size: 10px; }
.metric strong { color: #171a22; font-size: 30px; }
.metric.accent::before { display: none; }
.teacher-workbench { margin-bottom: 18px; padding: 18px; color: #fff; border: 1px solid #313746; border-left: 4px solid var(--blue); border-radius: 6px; background: #20242e; box-shadow: 0 14px 32px rgba(25,28,38,.13); }
.workbench-heading .eyebrow { color: #69dec2; }
.workbench-actions { border-color: #363c49; background: #363c49; }
.workbench-actions button { color: #f4f7fb; background: #252a35; }
.workbench-actions button strong { color: #f4f7fb; }
.workbench-actions button small { color: #98a3b4; }
.workbench-actions button:hover, .workbench-alerts button:hover, .workbench-pending-list > button:hover { border-color: #58657f; background: #2d3544; }
.workbench-actions button > svg, .workbench-pending-list > button svg { color: #69dec2; }
.workbench-alerts button, .workbench-clear, .workbench-pending-list > button { color: #e9eef6; border-color: #3c4352; background: #252a35; }
.workbench-pending-list > button span { color: #e9eef6; }
.workbench-alerts button strong, .workbench-pending-list > button strong { color: #ff8b96; }
.overview-grid, .reports-grid { gap: 16px; }
.content-block, .profile-section { border: 1px solid var(--line); border-radius: 6px; box-shadow: none; }
.content-block { padding: 20px 22px; }
.section-heading { min-height: 42px; margin-bottom: 14px; }
.section-heading h2 { color: #222630; }
.section-heading h2::after { display: none; }
.schedule-mark { background: var(--blue); }
.schedule-item:nth-child(2n) .schedule-mark { background: var(--green); }
.pill, .status-badge, .status-dot { border-radius: 4px; }
.mini-avatar { color: var(--blue); border: 1px solid #d7ddea; background: #f0f3fa; }
.progress-track { background: #e6e9ef; }
.progress-track i { background: var(--blue); }

/* Management dashboard */
.dashboard-command-deck { margin-bottom: 18px; overflow: hidden; color: #f5f7fb; border: 1px solid #2c3342; border-left: 4px solid #54d7b9; border-radius: 6px; background: #171b25; box-shadow: 0 16px 36px rgba(24,29,40,.14); }
.dashboard-brief { min-width: 0; min-height: 104px; margin: 0; padding: 20px 22px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 28px; border-bottom: 1px solid #303746; }
.dashboard-brief-copy { min-width: 0; display: grid; gap: 6px; }
.dashboard-brief-copy .eyebrow { margin: 0; color: #69dec2; }
.dashboard-brief-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.dashboard-brief-title h2 { overflow: hidden; color: #f7f9fc; font-size: 25px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-brief-copy p { overflow: hidden; color: #99a4b5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-health { min-height: 24px; padding: 0 8px; display: inline-flex; align-items: center; color: #b8c0ce; border: 1px solid #465064; border-radius: 4px; background: #262c39; font-size: 9px; font-weight: 800; }
.dashboard-health.steady { color: var(--green-2); border-color: #b6e0d6; background: var(--green-soft); }
.dashboard-health.warning { color: #8a5c16; border-color: #f0d19b; background: var(--amber-soft); }
.dashboard-health.danger { color: var(--coral-dark); border-color: #ffc1c8; background: var(--coral-soft); }
.dashboard-brief-facts { min-width: 390px; display: grid; grid-template-columns: repeat(3, minmax(110px, 1fr)); border-left: 1px solid #353d4d; }
.dashboard-brief-facts > div { min-width: 0; padding: 3px 18px; display: grid; gap: 5px; border-right: 1px solid #353d4d; }
.dashboard-brief-facts span { color: #7f8a9b; font-size: 9px; }
.dashboard-brief-facts strong { overflow: hidden; color: #eef2f7; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-command-deck .dashboard-kpis { min-height: 96px; margin: 0; border: 0; border-radius: 0; background: #1d222d; box-shadow: none; }
.dashboard-command-deck .dashboard-kpis .metric { min-height: 96px; padding: 17px 22px; border-right-color: #313846; background: #1d222d; }
.dashboard-command-deck .dashboard-kpis .metric span { color: #8f99aa; }
.dashboard-command-deck .dashboard-kpis .metric strong { color: #f7f9fc; font-size: 28px; }
.dashboard-kpis .metric small { grid-column: 1 / -1; align-self: auto; margin: 8px 0 0; overflow: hidden; color: #7f8999; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-kpis [data-kpi="today"]::after { background: var(--blue); }
.dashboard-kpis [data-kpi="attendance"]::after { background: var(--green); }
.dashboard-kpis [data-kpi="assignment"]::after { background: var(--amber); }
.dashboard-kpis [data-kpi="score"]::after { background: var(--coral); }
.dashboard-section-note { min-height: 34px; margin: -5px 0 6px; display: flex; align-items: center; color: #687181; border-bottom: 1px solid var(--line); font-size: 9px; }
.dashboard-schedule .schedule-item { min-height: 68px; }
.dashboard-schedule .schedule-item.is-completed { opacity: .66; }
.dashboard-schedule .schedule-item.is-completed .schedule-mark { background: #aeb6c3; }
.dashboard-schedule .schedule-item.is-completed .pill { color: #69717e; background: #edf0f4; }
.dashboard-schedule .schedule-item.is-current { margin: 0 -10px; padding: 0 10px; background: #f0f5ff; }
.dashboard-schedule .schedule-item.is-current .schedule-mark { background: var(--blue); box-shadow: 0 0 0 4px rgba(49,92,245,.1); }
.dashboard-schedule .schedule-item.is-current .pill { color: #fff; background: var(--blue); }
.dashboard-risk-count { min-width: 42px; min-height: 26px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--green-2); border-radius: 4px; background: var(--green-soft); font-size: 9px; font-weight: 800; }
.dashboard-risk-count.warning { color: #8a5c16; background: var(--amber-soft); }
.dashboard-risk-count.danger { color: var(--coral-dark); background: var(--coral-soft); }
.dashboard-risk-list { min-height: 228px; display: grid; align-content: start; }
.dashboard-risk-item { width: 100%; min-width: 0; min-height: 58px; padding: 9px 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 16px; align-items: center; gap: 10px; color: inherit; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.dashboard-risk-item:last-child { border-bottom: 0; }
.dashboard-risk-item:hover { background: #f7f8fb; }
.dashboard-risk-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--blue); border-radius: 5px; background: var(--blue-soft); }
.dashboard-risk-item.danger .dashboard-risk-icon { color: var(--coral-dark); background: var(--coral-soft); }
.dashboard-risk-item.warning .dashboard-risk-icon { color: #a26712; background: var(--amber-soft); }
.dashboard-risk-item > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.dashboard-risk-item strong, .dashboard-risk-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-risk-item strong { font-size: 11px; }
.dashboard-risk-item small { color: var(--muted); font-size: 9px; }
.dashboard-risk-item > b { color: #252a34; font-size: 17px; font-variant-numeric: tabular-nums; }
.dashboard-risk-item > svg { width: 14px; color: #a2a8b2; }
.dashboard-all-clear { min-height: 210px; display: grid; grid-template-columns: 36px minmax(0, 1fr); place-content: center; align-items: center; gap: 11px; color: var(--green-2); }
.dashboard-all-clear > svg { width: 30px; height: 30px; }
.dashboard-all-clear > span { display: grid; gap: 4px; }
.dashboard-all-clear small { color: var(--muted); font-size: 9px; }
.dashboard-legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.dashboard-legend i { width: 8px; height: 3px; background: var(--blue); }
.dashboard-legend i:nth-child(2) { margin-left: 5px; background: var(--coral); }
.dashboard-trend-list { min-height: 282px; display: grid; align-content: start; }
.dashboard-trend-row { min-width: 0; min-height: 40px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 78px; align-items: center; gap: 12px; border-bottom: 1px solid #eceff3; }
.dashboard-trend-row:last-child { border-bottom: 0; }
.dashboard-trend-date { display: grid; grid-template-columns: 1fr; gap: 1px; }
.dashboard-trend-date strong { font-size: 10px; }
.dashboard-trend-date small { color: var(--muted); font-size: 8px; }
.dashboard-trend-bars { min-width: 0; display: grid; gap: 5px; }
.dashboard-trend-bars > i { height: 4px; overflow: hidden; background: #e8ebf1; }
.dashboard-trend-bars b { min-width: 2px; height: 100%; display: block; background: var(--blue); }
.dashboard-trend-bars i:nth-child(2) b { background: var(--coral); }
.dashboard-trend-values { display: flex; align-items: center; justify-content: flex-end; gap: 7px; white-space: nowrap; }
.dashboard-trend-values strong { font-size: 9px; }
.dashboard-trend-values small { color: var(--coral-dark); font-size: 8px; }
.dashboard-class-list { min-height: 228px; display: grid; align-content: start; }
.dashboard-class-row { min-width: 0; min-height: 45px; display: grid; grid-template-columns: 22px minmax(0, 1fr) 38px; align-items: center; gap: 9px; }
.dashboard-class-rank { color: #858b96; font-size: 9px; font-weight: 800; text-align: center; }
.dashboard-class-row:first-child .dashboard-class-rank { color: var(--amber); }
.dashboard-class-main { min-width: 0; display: grid; gap: 5px; }
.dashboard-class-main > span { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dashboard-class-main strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-class-main small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.dashboard-class-main > i { height: 4px; overflow: hidden; background: #e7eaf0; }
.dashboard-class-main > i b { height: 100%; display: block; background: var(--green); }
.dashboard-class-row > strong { font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.dashboard-subsection-title { min-height: 35px; margin-top: 8px; padding-top: 10px; display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); }
.dashboard-subsection-title span { font-size: 10px; font-weight: 800; }
.dashboard-subsection-title small { color: var(--muted); font-size: 8px; }
.dashboard-score-panel .rank-item { min-height: 45px; }
.dashboard-progress-panel .section-heading { margin-bottom: 0; }
.dashboard-progress-scope { align-self: center; font-size: 10px; white-space: nowrap; }
.dashboard-progress-panel .progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.dashboard-progress-panel .progress-item { min-width: 0; min-height: 98px; padding: 16px 16px 14px; grid-template-columns: minmax(0, 1fr) auto; align-content: center; gap: 8px 12px; border-bottom: 1px solid var(--line); }
.dashboard-progress-panel .progress-item:nth-child(2n) { border-left: 1px solid var(--line); }
.dashboard-progress-panel .progress-item > span { min-width: 0; display: grid; gap: 5px; }
.dashboard-progress-panel .progress-item > span strong { color: var(--ink); font-size: 12px; line-height: 1.35; white-space: nowrap; }
.dashboard-progress-panel .progress-item > span small { color: var(--muted); font-size: 9px; line-height: 1.35; white-space: nowrap; }
.dashboard-progress-panel .progress-item > b { align-self: start; color: var(--ink); font-size: 16px; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard-progress-panel .progress-track { height: 6px; border-radius: 99px; }
.dashboard-progress-panel .progress-track i { border-radius: inherit; }
.dashboard-progress-panel .progress-item:nth-child(2) .progress-track i { background: var(--green); }
.dashboard-progress-panel .progress-item:nth-child(3) .progress-track i { background: var(--amber); }
.dashboard-progress-panel .progress-item:nth-child(4) .progress-track i { background: var(--coral); }

[data-view-panel="overview"] .teacher-workbench { color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--blue); background: #fff; box-shadow: var(--shadow-soft); }
[data-view-panel="overview"] .workbench-heading .eyebrow { color: var(--blue); }
[data-view-panel="overview"] .workbench-heading h2 { color: #1f2430; }
[data-view-panel="overview"] .workbench-heading .muted { color: var(--muted); }
[data-view-panel="overview"] .workbench-actions { gap: 8px; border: 0; background: transparent; }
[data-view-panel="overview"] .workbench-actions button { color: var(--ink); border: 1px solid var(--line); background: #f7f8fa; }
[data-view-panel="overview"] .workbench-actions button:hover { border-color: #b9c6ff; background: var(--blue-soft); }
[data-view-panel="overview"] .workbench-actions button:disabled { cursor: wait; opacity: .7; }
[data-view-panel="overview"] .workbench-actions button strong { color: #252a34; }
[data-view-panel="overview"] .workbench-actions button small { color: var(--muted); }
[data-view-panel="overview"] .workbench-actions button > svg { color: var(--blue); }
[data-view-panel="overview"] .workbench-actions button:nth-child(2) > svg { color: var(--green); }
[data-view-panel="overview"] .workbench-actions button:nth-child(3) > svg { color: var(--amber); }
[data-view-panel="overview"] .workbench-actions button:nth-child(4) > svg { color: var(--coral); }
[data-view-panel="overview"] .workbench-pending-list > button, [data-view-panel="overview"] .workbench-alerts button, [data-view-panel="overview"] .workbench-clear { color: var(--ink); border-color: var(--line); background: #f7f8fa; }
[data-view-panel="overview"] .workbench-pending-list > button:hover, [data-view-panel="overview"] .workbench-alerts button:hover { border-color: #ffbdc4; background: var(--coral-soft); }
[data-view-panel="overview"] .workbench-pending-list > button span { color: #353b47; }
[data-view-panel="overview"] .workbench-pending-list > button strong, [data-view-panel="overview"] .workbench-alerts button strong { color: var(--coral-dark); }
[data-view-panel="overview"] .workbench-pending-list > button svg, [data-view-panel="overview"] .workbench-alerts button svg, [data-view-panel="overview"] .workbench-clear svg { color: var(--coral); }

.table-wrap, .timeline { overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: none; }
th { height: 44px; color: #59616e; border-bottom-color: #cfd5df; background: #eef1f5; }
td { border-bottom-color: #e7eaf0; }
tbody tr:hover { background: #f5f7ff; }
.row-actions .icon-btn:hover { background: var(--blue-soft); }
.matrix-notice { border-color: #edd4a8; background: var(--amber-soft); }
.segmented button.active { background: var(--blue); }
.switch-control input:checked + span { background: var(--green); }
.toggle-row input[type="checkbox"] { accent-color: var(--blue); }
.status-dot.active, .status-badge.status-active { color: var(--green-2); background: var(--green-soft); }

/* Dialogs and explicit states */
.app-dialog { border: 1px solid #d7dce5; border-radius: 7px; box-shadow: 0 32px 96px rgba(19,23,34,.28); }
.app-dialog::backdrop { background: rgba(17,20,29,.6); backdrop-filter: blur(4px); }
.dialog-shell > header { border-top: 4px solid var(--view-accent); background: #fff; }
.dialog-shell > footer { background: #f6f7fa; }
.action-menu[open] summary { color: var(--blue); border-color: #b7c4ff; background: var(--blue-soft); }
.action-menu > div button:hover { color: var(--blue); background: var(--blue-soft); }
.action-menu > div svg { color: var(--blue); }
.review-workbench-tabs a.active { color: #fff; background: var(--blue); }
.assignment-review-header { border-top: 4px solid var(--blue); }
.deadline-submit-toggle { padding: 12px 14px; border-left: 4px solid var(--blue); background: var(--blue-soft); }
.deadline-submit-toggle > span { min-width: 0; display: grid; gap: 3px; }
.deadline-submit-toggle strong { color: #20366f; font-size: 12px; }
.deadline-submit-toggle small { color: #66769d; font-size: 10px; line-height: 1.55; font-weight: 500; }

/* Audit record details */
.audit-item-button { width: 100%; grid-template-columns: 32px minmax(0, 1fr) 18px; color: inherit; border-right: 0; border-bottom: 0; border-left: 0; background: transparent; cursor: pointer; text-align: left; }
.audit-item-button:hover { background: #f5f7ff; }
.audit-item-button .audit-icon { width: 32px; height: 32px; color: var(--blue); background: var(--blue-soft); }
.audit-copy small { color: #959aa5; font-size: 9px; }
.audit-arrow { width: 15px; color: #a8adb7; }
.audit-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--line); gap: 1px; }
.audit-detail-summary > div { min-width: 0; padding: 13px; display: grid; gap: 5px; background: #fff; }
.audit-detail-summary span, .audit-detail-grid span { color: var(--muted); font-size: 9px; }
.audit-detail-summary strong { overflow-wrap: anywhere; font-size: 11px; }
.audit-detail-summary small { overflow-wrap: anywhere; font-size: 9px; }
.audit-detail-section { margin-top: 20px; }
.audit-detail-section h3 { margin: 0 0 9px; font-size: 12px; }
.audit-change-table pre { max-width: 420px; max-height: 150px; margin: 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 10px/1.55 Consolas, monospace; }
.audit-change-table td:first-child strong, .audit-change-table td:first-child small { display: block; }
.audit-change-table td:first-child small { margin-top: 3px; color: #9a9ea7; font-size: 8px; }
.audit-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.audit-detail-grid > div { min-width: 0; padding: 11px 0; display: grid; gap: 5px; border-bottom: 1px solid var(--line); }
.audit-detail-grid > div:nth-child(odd) { padding-right: 16px; }
.audit-detail-grid > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.audit-detail-grid strong { overflow-wrap: anywhere; white-space: pre-wrap; font-size: 10px; }

/* Public and student surfaces share the same interaction language */
.login-visual::after { background: rgba(17,21,29,.5); }
.login-visual::before, .login-panel::before { background: var(--blue); }
.login-caption p { color: #c9d4ff; }
.student-entry:hover, .demo-access code { color: var(--blue); }
.project-row:hover { border-color: #b9c7ff; box-shadow: 0 14px 34px rgba(49,92,245,.1); }
.project-row { position: relative; }
.project-row .project-delete-action { position: absolute; right: 48px; top: 50%; transform: translateY(-50%); z-index: 2; }
.project-row .project-delete-action + svg { margin-right: 40px; }
.project-row > svg { color: var(--blue); }
.student-tabs button.active { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }
.student-score-band { background: #dce4ff; }
.student-score-band > div:first-child { background: var(--blue); }
.student-score-band > div:first-child span { color: #dce4ff; }
.student-task .task-check.done, .student-feed-icon { color: var(--blue); background: var(--blue-soft); }
.quest-action-btn { background: var(--blue); }
.quest-action-btn:hover { background: #244bd5; }

@media (max-width: 1180px) {
  .workspace-shell { grid-template-columns: 238px minmax(0, 1fr); }
  .workspace-shell.sidebar-collapsed { grid-template-columns: 78px minmax(0, 1fr); }
  .view { padding-right: 24px; padding-left: 24px; }
  .topbar-title-row > span { max-width: 330px; }
}

@media (max-width: 900px) {
  .audit-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-title-row > span { display: none; }
}

@media (max-width: 800px) {
  .workspace-shell, .workspace-shell.sidebar-collapsed { display: block; }
  .workspace-main { grid-template-rows: 76px minmax(0, 1fr); }
  .workspace-body .sidebar, .workspace-body .sidebar-collapsed .sidebar { height: 100vh; height: 100dvh; position: fixed; inset: 0 auto 0 0; width: min(304px, 88vw); z-index: 50; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 20px 0 54px rgba(10,13,20,.28); }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open + .sidebar-scrim { display: block; position: fixed; z-index: 45; inset: 0; border: 0; background: rgba(17,20,29,.56); }
  .sidebar-brand, .sidebar-collapsed .sidebar-brand { min-height: 84px; padding: 14px 12px 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .sidebar-brand-copy, .sidebar-collapsed .sidebar-brand-copy { display: grid; }
  .sidebar-collapse { display: none !important; }
  .sidebar-collapsed .project-switcher { min-height: 0; padding: 13px 14px; display: grid; place-items: stretch; box-shadow: inset 3px 0 0 var(--blue); }
  .sidebar-collapsed .project-switcher strong, .sidebar-collapsed .project-switcher small { display: block; }
  .sidebar-collapsed .project-state { justify-content: flex-start; font-size: 9px; }
  .sidebar-collapsed .nav-group-label { display: block; }
  .sidebar-collapsed .sidebar-nav { padding: 10px 9px 18px; }
  .sidebar-collapsed .sidebar-nav button { justify-content: flex-start; padding: 0 12px; }
  .sidebar-collapsed .sidebar-nav button span { display: inline; }
  .sidebar-collapsed .sidebar-user { grid-template-columns: 34px 1fr auto; justify-items: stretch; padding: 11px 12px; }
  .sidebar-collapsed .sidebar-user > span:nth-child(2) { display: grid; }
  .workspace-topbar { padding: 12px 16px; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; }
  .workspace-topbar::before { display: none; }
  .workspace-topbar .mobile-menu { display: inline-flex; }
  .workspace-topbar h1 { max-width: 100%; font-size: 17px; }
  .topbar-actions { gap: 6px; }
  .connection { display: none; }
  .view { padding: 18px 16px 44px; }
  .view > .action-bar:first-child, .view > .operation-switcher + .action-bar { position: static; }
  .dashboard-brief { grid-template-columns: 1fr; align-items: stretch; gap: 15px; }
  .dashboard-brief-facts { width: 100%; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 0; }
  .dashboard-brief-facts > div { padding: 11px 12px 0; }
  .dashboard-command-deck .dashboard-brief-facts { border-top-color: #353d4d; }
  .dashboard-command-deck .dashboard-kpis .metric { border-bottom-color: #313846; }
}

@media (max-width: 560px) {
  .workspace-main { grid-template-rows: 70px minmax(0, 1fr); }
  .workspace-topbar { padding: 10px 12px; }
  .breadcrumb { font-size: 8px; }
  .workspace-topbar h1 { font-size: 15px; }
  .topbar-actions .data-safety-button { display: inline-flex; }
  .topbar-actions #refreshView { display: none; }
  .topbar-undo { width: 40px; min-width: 40px; height: 40px; padding: 0; display: inline-flex; justify-content: center; }
  .topbar-undo > span { display: none; }
  .view { padding: 14px 12px 38px; }
  .action-bar { padding: 10px; }
  .metrics-strip { box-shadow: none; }
  .metric { padding: 15px; }
  .metric strong { font-size: 24px; }
  .content-block, .profile-section { padding: 16px; }
  .dashboard-brief { margin-bottom: 14px; padding-bottom: 14px; }
  .dashboard-brief-title h2 { font-size: 20px; }
  .dashboard-brief-facts > div { padding-right: 9px; padding-left: 9px; }
  .dashboard-brief-facts strong { font-size: 12px; }
  .dashboard-trend-row { grid-template-columns: 42px minmax(0, 1fr) 66px; gap: 8px; }
  .dashboard-risk-item { grid-template-columns: 32px minmax(0, 1fr) auto 14px; gap: 8px; }
  .teacher-workbench { grid-template-columns: minmax(0, 1fr); }
  .workbench-pending-list { grid-template-columns: minmax(0, 1fr); }
  .workbench-pending-list > button span, .workbench-actions strong { overflow: visible; white-space: normal; text-overflow: clip; }
  .audit-detail-summary, .audit-detail-grid { grid-template-columns: 1fr; }
  .audit-detail-grid > div:nth-child(odd), .audit-detail-grid > div:nth-child(even) { padding: 11px 0; border-left: 0; }
  .audit-change-table { overflow-x: auto; }
  .audit-change-table table { min-width: 620px; }
}

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

/* Tech Vitality 2026: canonical UI */
:root {
  --bg: #F2F5FB;
  --surface: #FFFFFF;
  --surface-2: #EDF2FA;
  --ink: #0F172A;
  --muted: #5B6B82;
  --line: #E4EAF4;
  --line-strong: #CBD6E8;
  --blue: #2563EB;
  --blue-soft: #EAF1FF;
  --cyan: #06B6D4;
  --cyan-soft: #E6F9FC;
  --violet: #7C3AED;
  --violet-soft: #F1EAFE;
  --orange: #FF7A1A;
  --orange-soft: #FFF1E6;
  --green: #10B981;
  --green-2: #10B981;
  --green-soft: #E8F8F2;
  --red: #EF4444;
  --red-soft: #FEECEC;
  --amber: #7C3AED;
  --amber-soft: #F1EAFE;
  --coral: #EF4444;
  --coral-dark: #DC2626;
  --coral-soft: #FEECEC;
  --brand-gradient: linear-gradient(92deg, #2563EB 10%, #06B6D4 90%);
  --sidebar-gradient: linear-gradient(180deg, #0A1633, #0D1D45 55%, #122763);
  --shadow-card: 0 6px 24px rgba(15, 32, 80, .07);
  --shadow-float: 0 18px 48px rgba(15, 32, 80, .14);
  --radius-control: 10px;
  --radius-card: 16px;
  --radius-pill: 99px;
}

html { min-width: 320px; color-scheme: light; background: var(--bg); }
body {
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body, button, input, select, textarea { letter-spacing: 0; }
strong, b, code, time, td, th, [class*="score"], [class*="metric"], [class*="count"], [class*="rank"] { font-variant-numeric: tabular-nums; }
a, button, input, select, textarea, summary { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
::selection { color: #fff; background: var(--blue); }

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 760; }
small, .muted { color: var(--muted); }
.hidden { display: none !important; }
.eyebrow {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.btn, .icon-btn, .topbar-undo, .segmented button, .operation-switcher button, .student-tabs button {
  border-radius: var(--radius-control);
  font-weight: 700;
  transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.btn { min-height: 42px; padding: 0 16px; gap: 8px; border: 1px solid transparent; }
.btn svg, .icon-btn svg { width: 17px; height: 17px; stroke-width: 2; }
.btn-primary {
  color: #fff;
  border-color: transparent;
  background: var(--brand-gradient);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}
.btn-primary:hover { color: #fff; border-color: transparent; box-shadow: 0 10px 24px rgba(255, 122, 26, .24); transform: translateY(-1px); }
.btn-secondary { color: var(--blue); border-color: #B8C9EC; background: #fff; }
.btn-secondary:hover { color: #fff; border-color: var(--blue); background: var(--blue); }
.btn-quiet { color: var(--muted); border-color: transparent; background: transparent; box-shadow: none; }
.btn-quiet:hover { color: var(--blue); background: var(--blue-soft); }
.btn-danger { color: var(--red); border-color: #F5C2C2; background: var(--red-soft); }
.btn-danger:hover { color: #fff; border-color: var(--red); background: var(--red); }
.btn-block { width: 100%; justify-content: center; }
.icon-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
}
.icon-btn:hover { color: var(--blue); border-color: #AFC4F0; background: var(--blue-soft); }

label { color: #334155; font-size: 12px; font-weight: 700; }
input, select, textarea {
  min-height: 48px;
  padding: 9px 12px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
}
textarea { min-height: 104px; line-height: 1.65; resize: vertical; }
input::placeholder, textarea::placeholder { color: #94A3B8; }
input:hover, select:hover, textarea:hover { border-color: #AFC0DA; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
input[type="checkbox"], input[type="radio"] { width: 17px; min-height: 17px; padding: 0; accent-color: var(--blue); }

.alert, .matrix-notice, .deadline-submit-toggle { border-radius: var(--radius-control); }
.alert-error { color: #B91C1C; border-color: #F7CACA; background: var(--red-soft); }
.alert-success { color: #047857; border-color: #B9E8D6; background: var(--green-soft); }
.toast-region { right: auto; bottom: 24px; left: 50%; z-index: 200; transform: translateX(-50%); }
.toast { min-width: 280px; max-width: min(460px, calc(100vw - 32px)); color: #fff; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; background: #101B32; box-shadow: 0 18px 46px rgba(4, 12, 30, .3); animation: tech-toast-in .32s cubic-bezier(.2, .9, .3, 1.2); }
.toast.success { border-left: 4px solid var(--green); background: #101B32; }
.toast.error { border-left: 4px solid var(--red); background: #28161D; }
@keyframes tech-toast-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.status-dot, .status-badge, .pill, .tag, .schedule-status, [class^="status-"] {
  border-radius: var(--radius-pill);
  font-weight: 700;
}
.status-active, .status-graded, .status-completed, .status-attended, .status-badge.status-active { color: #047857; background: var(--green-soft); }
.status-pending, .status-scheduled, .status-submitted { color: #B45309; background: var(--orange-soft); }
.status-overdue, .status-cancelled, .status-inactive, .status-absent { color: #B91C1C; background: var(--red-soft); }
.pill, .tag { color: #2452B7; background: var(--blue-soft); }

.table-wrap, .timeline {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
table { border-collapse: separate; border-spacing: 0; }
th { height: 46px; padding: 0 14px; color: #52627A; border-bottom: 1px solid var(--line); background: #F6F8FC; font-size: 11px; font-weight: 800; }
td { min-height: 48px; padding: 12px 14px; border-bottom-color: var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #F7FAFF; }
.empty-state, .empty-row td, .loading-block { color: var(--muted); }
.empty-state svg { color: #8FADEB; }
.row-actions .icon-btn { width: 34px; min-width: 34px; height: 34px; border-color: transparent; background: transparent; }
.row-actions .icon-btn:hover { border-color: #C9D8F5; background: var(--blue-soft); }
.row-actions .icon-btn.danger:hover { color: var(--red); border-color: #F3C5C5; background: var(--red-soft); }

.app-dialog { max-width: min(760px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: 0 30px 90px rgba(8, 20, 50, .28); }
.app-dialog::backdrop { background: rgba(6, 18, 44, .58); backdrop-filter: blur(6px); }
.dialog-shell > header { min-height: 78px; padding: 18px 22px; border-top: 0; border-bottom: 1px solid var(--line); background: #fff; }
.dialog-shell > header::before { content: ""; width: 80px; height: 4px; position: absolute; top: 0; left: 22px; border-radius: 0 0 99px 99px; background: var(--brand-gradient); }
.dialog-body { padding: 22px; }
.dialog-shell > footer { min-height: 68px; padding: 12px 22px; border-top: 1px solid var(--line); background: #F8FAFD; }
.form-grid { gap: 16px; }
.segmented, .operation-switcher { padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.segmented button, .operation-switcher button { min-height: 34px; color: var(--muted); border: 0; background: transparent; }
.segmented button.active, .operation-switcher button.active { color: #fff; background: var(--brand-gradient); box-shadow: 0 5px 14px rgba(37, 99, 235, .18); }
.switch-control input:checked + span { background: var(--brand-gradient); }

/* Login */
.login-body { min-height: 100vh; min-height: 100dvh; overflow: auto; background: var(--surface); }
.login-layout { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(520px, 1.08fr) minmax(420px, .92fr); }
.login-visual {
  min-height: 680px;
  position: relative;
  overflow: hidden;
  color: #fff;
  background-color: #091531;
  background-image:
    linear-gradient(rgba(65, 116, 213, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 116, 213, .11) 1px, transparent 1px),
    linear-gradient(138deg, transparent 0 52%, rgba(6, 182, 212, .13) 52% 61%, transparent 61%),
    linear-gradient(180deg, #08142F 0%, #0D1D45 64%, #122763 100%);
  background-size: 46px 46px, 46px 46px, 100% 100%, 100% 100%;
}
.login-visual::before { content: ""; width: 62%; height: 9px; position: absolute; right: -12%; bottom: 18%; transform: rotate(-18deg); background: linear-gradient(90deg, transparent, rgba(6, 182, 212, .65), rgba(124, 58, 237, .55), transparent); }
.login-visual::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 0 74%, rgba(6, 182, 212, .09)); }
.login-hero-art { width: 100%; height: 100%; position: absolute; inset: 0; z-index: 0; object-fit: cover; object-position: center bottom; opacity: .7; mix-blend-mode: screen; }
.login-visual .login-brand, .login-visual .login-caption { position: absolute; }
.login-visual::after { z-index: 1; background: linear-gradient(180deg, rgba(5, 14, 36, .48) 0%, rgba(5, 14, 36, .28) 42%, rgba(5, 14, 36, .65) 100%); }
.login-brand { top: 42px; left: 48px; z-index: 2; gap: 12px; }
.login-brand .brand-mark, .mobile-brand .brand-mark, .brand-inline .brand-mark, .sidebar-brand .brand-mark { overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .16); }
.login-brand strong { color: #fff; font-size: 15px; }
.login-brand span { color: #9FC9FF; font-size: 11px; }
.login-caption { width: min(620px, calc(100% - 96px)); top: 138px; left: 48px; bottom: auto; z-index: 2; }
.login-kicker { display: inline-flex; min-height: 27px; padding: 0 11px; align-items: center; color: #6EE7F4; border: 1px solid rgba(110, 231, 244, .36); border-radius: var(--radius-pill); background: rgba(6, 182, 212, .09); font-size: 10px; font-weight: 800; }
.login-caption h2 { margin: 20px 0 18px; color: #fff; font-size: 44px; line-height: 1.18; }
.login-caption h2 em { color: transparent; background: var(--brand-gradient); background-clip: text; -webkit-background-clip: text; font-style: normal; }
.login-caption > p { max-width: 520px; margin: 0; color: #BED0EE; font-size: 15px; line-height: 1.8; }
.login-metrics { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.login-metrics > div { min-height: 82px; padding: 16px 18px; display: grid; align-content: center; gap: 5px; border: 1px solid rgba(158, 197, 255, .18); border-radius: 12px; background: rgba(255, 255, 255, .07); backdrop-filter: blur(10px); }
.login-metrics strong { color: #fff; font-size: 16px; }
.login-metrics span { color: #91A7CB; font-size: 10px; }
.login-panel { min-height: 680px; padding: 56px; display: grid; place-items: center; background: #fff; }
.login-panel::before { width: 96px; height: 4px; top: 0; right: 56px; background: var(--brand-gradient); }
.login-form-wrap { width: min(410px, 100%); }
.mobile-brand { display: none; }
.login-heading { margin-bottom: 28px; }
.login-heading h1 { margin: 4px 0 8px; font-size: 34px; line-height: 1.25; }
.login-heading p { color: var(--muted); }
.login-form { gap: 18px; }
.login-form label { gap: 8px; }
.login-form input { min-height: 52px; }
.password-field .icon-btn { border: 0; background: transparent; }
.login-form .btn { min-height: 48px; margin-top: 4px; border-radius: 12px; }
.student-entry { min-height: 54px; margin-top: 22px; padding: 0 4px; color: var(--muted); border-color: var(--line); }
.student-entry:hover { color: var(--blue); }
.demo-access { padding: 11px 13px; border-radius: 10px; background: var(--surface-2); }
.demo-access code { color: var(--blue); }
.login-panel footer { color: #94A3B8; }

/* Project picker */
.simple-header { height: 76px; padding: 0 max(24px, calc((100vw - 1160px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); }
.brand-inline { gap: 11px; }
.brand-inline .brand-mark { width: 40px; height: 40px; }
.brand-copy strong { color: var(--ink); }
.brand-copy small { color: var(--muted); }
.projects-page { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 72px; }
.page-heading { margin-bottom: 26px; align-items: end; }
.page-heading h1 { margin: 2px 0 8px; font-size: 30px; }
.page-heading p { margin: 0; color: var(--muted); }
.project-list { display: grid; gap: 14px; border: 0; }
.project-row { min-height: 96px; padding: 14px 20px; position: relative; overflow: hidden; grid-template-columns: 132px minmax(0, 1fr) auto 36px; gap: 18px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
.project-row::before { content: ""; width: 4px; position: absolute; inset: 0 auto 0 0; background: var(--brand-gradient); transform: scaleY(0); transform-origin: bottom; transition: transform .2s ease; }
.project-row:hover { border-color: #BBD0F7; background: #fff; box-shadow: 0 14px 34px rgba(37, 99, 235, .12); transform: translateY(-2px); }
.project-row:hover::before { transform: scaleY(1); }
.project-code { width: fit-content; max-width: 100%; padding: 7px 10px; overflow: hidden; color: #fff; border-radius: 8px; background: var(--brand-gradient); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-row > span:nth-child(2) { min-width: 0; display: grid; gap: 7px; }
.project-row > span:nth-child(2) strong { overflow: hidden; color: var(--ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.project-row > span:nth-child(2) small { color: var(--muted); }
.project-row > svg { color: var(--blue); }

/* Management shell */
.workspace-body { overflow: hidden; background: var(--bg); }
.workspace-shell { min-height: 100vh; min-height: 100dvh; grid-template-columns: 248px minmax(0, 1fr); background: var(--bg); }
.workspace-shell.sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
.sidebar { min-height: 100vh; min-height: 100dvh; color: #D7E4FB; border-right: 0; background: var(--sidebar-gradient); box-shadow: 8px 0 26px rgba(8, 20, 50, .12); }
.sidebar::after { content: ""; height: 1px; position: absolute; right: 16px; bottom: 72px; left: 16px; background: linear-gradient(90deg, transparent, rgba(101, 210, 237, .32), transparent); }
.sidebar-brand { min-height: 82px; padding: 15px 12px 14px 17px; border-bottom: 1px solid rgba(176, 205, 255, .1); }
.sidebar-brand-link { gap: 10px; }
.sidebar-brand .brand-mark { width: 40px; height: 40px; }
.sidebar-brand-copy strong { color: #fff; font-size: 13px; }
.sidebar-brand-copy small { color: #84A4D5; font-size: 9px; }
.sidebar .icon-btn { color: #92A9CF; border-color: rgba(171, 203, 255, .13); background: rgba(255, 255, 255, .04); }
.sidebar .icon-btn:hover { color: #fff; border-color: rgba(110, 231, 244, .4); background: rgba(6, 182, 212, .13); }
.project-switcher { min-height: 78px; margin: 12px 10px 4px; padding: 12px 13px; border: 1px solid rgba(155, 190, 246, .12); border-radius: 12px; background: rgba(255, 255, 255, .05); box-shadow: none; }
.project-switcher .project-state { color: #7FCDE3; }
.project-switcher .project-state i { background: var(--cyan); box-shadow: 0 0 0 4px rgba(6, 182, 212, .12); }
.project-switcher strong { color: #F8FBFF; }
.project-switcher small { color: #7E9BC8; }
.sidebar-nav { padding: 10px 10px 92px; gap: 16px; }
.nav-group { gap: 4px; }
.nav-group-label { padding: 0 12px 6px; color: #6F8BB9; font-size: 9px; font-weight: 800; }
.sidebar-nav button { min-height: 42px; padding: 0 12px; position: relative; color: #AFC1DF; border: 0; border-radius: 10px; background: transparent; font-size: 12px; }
.sidebar-nav button::before { content: ""; width: 4px; height: 20px; position: absolute; left: -10px; border-radius: 0 99px 99px 0; background: var(--cyan); opacity: 0; transform: scaleY(.3); transition: opacity .18s ease, transform .18s ease; }
.sidebar-nav button:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.sidebar-nav button.active { color: #fff; background: var(--brand-gradient); box-shadow: 0 8px 20px rgba(17, 85, 202, .26); }
.sidebar-nav button.active::before { opacity: 1; transform: scaleY(1); }
.sidebar-nav button svg { width: 17px; color: #7FA5DA; }
.sidebar-nav button.active svg, .sidebar-nav button:hover svg { color: #fff; }
.sidebar-user { min-height: 72px; padding: 10px 12px; border-top: 1px solid rgba(176, 205, 255, .1); background: rgba(7, 19, 46, .36); }
.sidebar-user .avatar { color: #fff; background: var(--brand-gradient); }
.sidebar-user strong { color: #F4F8FF; }
.sidebar-user small { color: #7793BE; }
.workspace-main { min-width: 0; grid-template-rows: 78px minmax(0, 1fr); }
.workspace-topbar { height: 78px; padding: 0 26px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .93); backdrop-filter: blur(14px); }
.workspace-topbar::before { content: ""; width: 84px; height: 3px; position: absolute; bottom: -1px; left: 26px; background: var(--brand-gradient); }
.breadcrumb { color: #8090A7; }
.breadcrumb b { color: var(--blue); }
.topbar-title-row { gap: 14px; }
.workspace-topbar h1 { color: var(--ink); font-size: 20px; }
.topbar-title-row > span { color: var(--muted); }
.connection { color: #56716B; border: 1px solid #CDEDE2; border-radius: var(--radius-pill); background: var(--green-soft); }
.connection > span { background: var(--green); }
.topbar-undo { min-height: 42px; color: #31568E; border-color: #CFDCF2; background: #F5F8FE; }
.topbar-undo:not(:disabled):hover { color: var(--blue); border-color: #AFC4F0; background: var(--blue-soft); }
.workspace-canvas { background: var(--bg); }
.view { max-width: 1680px; margin: 0 auto; padding: 24px 28px 52px; }
.view > .action-bar:first-child, .view > .operation-switcher + .action-bar { position: sticky; top: 0; z-index: 12; }
.action-bar { min-height: 66px; padding: 11px 14px; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow-card); backdrop-filter: blur(12px); }
.action-bar h2 { font-size: 16px; }
.search-input input { border-radius: var(--radius-pill); background: #F7F9FD; }
.search-input svg { color: #8292A9; }

.dashboard-summary { overflow: hidden; margin-bottom: 16px; border: 1px solid #DCE6F7; border-radius: var(--radius-card); background: #fff; box-shadow: var(--shadow-card); }
.dashboard-brief { min-height: 140px; margin: 0; padding: 24px 26px; position: relative; border: 0; background: linear-gradient(118deg, #FFFFFF 0%, #F7FAFF 72%, #E8F8FC 100%); }
.dashboard-brief::before { content: ""; width: 88px; height: 5px; position: absolute; top: 0; left: 26px; border-radius: 0 0 99px 99px; background: var(--brand-gradient); }
.dashboard-brief-title h2 { color: var(--ink); font-size: 24px; }
.dashboard-brief-copy p { color: var(--muted); }
.dashboard-health { color: #047857; border-radius: var(--radius-pill); background: var(--green-soft); }
.dashboard-brief-facts { border-color: var(--line); }
.dashboard-brief-facts span { color: var(--muted); }
.dashboard-brief-facts strong { color: var(--ink); }
.metrics-strip { overflow: hidden; min-height: 108px; margin: 0; border-width: 1px 0 0; border-radius: 0; background: #fff; box-shadow: none; }
.metric { min-height: 106px; padding: 20px 22px; border-right-color: var(--line); background: #fff; }
.metric::after { width: 3px; top: 23px; bottom: 23px; left: 0; border-radius: 99px; }
.metric:nth-child(1)::after { background: var(--blue); }
.metric:nth-child(2)::after { background: var(--green); }
.metric:nth-child(3)::after { background: var(--violet); }
.metric:nth-child(4)::after { background: var(--cyan); }
.metric span { color: var(--muted); }
.metric strong { color: var(--ink); font-size: 28px; }
.metric small { color: #8190A5; }

.teacher-workbench { margin-bottom: 16px; padding: 18px 20px; color: var(--ink); border: 1px solid #D8E4F7; border-radius: var(--radius-card); background: linear-gradient(110deg, #FFFFFF, #F4F8FF); box-shadow: var(--shadow-card); }
.workbench-heading h2 { color: var(--ink); }
.workbench-heading .muted { color: var(--muted); }
.workbench-pending-list > button, .workbench-actions button { min-height: 58px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.workbench-pending-list > button:hover, .workbench-actions button:hover { border-color: #B5C9ED; background: var(--blue-soft); transform: translateY(-1px); }
.workbench-pending-list > button strong { color: var(--orange); }
.workbench-actions button > svg { color: var(--blue); }
.workbench-actions button:nth-child(2) > svg { color: var(--green); }
.workbench-actions button:nth-child(3) > svg { color: var(--violet); }
.workbench-actions button:nth-child(4) > svg { color: var(--cyan); }

.overview-grid, .profile-grid { gap: 16px; }
.content-block, .profile-section {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.section-heading { min-height: 44px; margin-bottom: 10px; }
.section-heading h2, .workbench-heading h2 { padding-left: 13px; position: relative; color: var(--ink); font-size: 15px; }
.section-heading h2::before, .workbench-heading h2::before { content: ""; width: 5px; height: 16px; position: absolute; top: 50%; left: 0; border-radius: 99px; background: var(--brand-gradient); transform: translateY(-50%); }
.section-heading p { color: var(--muted); }
.schedule-item { min-height: 68px; border-top-color: var(--line); }
.schedule-mark { width: 4px; border-radius: 99px; background: var(--blue); }
.schedule-item:nth-child(2n) .schedule-mark { background: var(--cyan); }
.schedule-item.is-current, .timeline-event.is-current, .student-schedule-item.is-current { border-left-color: var(--blue); background: #F1F6FF; }
.schedule-item.is-current .pill { color: #fff; background: var(--blue); }
.rank-item { border-top-color: var(--line); }
.rank-item .rank-number, .dashboard-class-rank { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 7px; }
.rank-item:nth-child(1) .rank-number, .dashboard-class-row:nth-child(1) .dashboard-class-rank { color: #704300; background: linear-gradient(135deg, #FFEBA7, #F7B928); }
.rank-item:nth-child(2) .rank-number, .dashboard-class-row:nth-child(2) .dashboard-class-rank { color: #536277; background: linear-gradient(135deg, #F4F7FC, #B8C5D8); }
.rank-item:nth-child(3) .rank-number, .dashboard-class-row:nth-child(3) .dashboard-class-rank { color: #73401E; background: linear-gradient(135deg, #F6C79D, #C77B45); }
.schedule-item.is-current .pill, .student-schedule-item.is-current .status-active { color: #fff; background: linear-gradient(90deg, #FF7A1A, #FF4D6D); }
.mini-avatar { color: var(--blue); background: var(--blue-soft); }
.progress-track { background: #E7EDF7; }
.progress-track i { background: var(--blue); }
.progress-item:nth-child(2) .progress-track i { background: var(--green); }
.progress-item:nth-child(3) .progress-track i { background: var(--violet); }
.progress-item:nth-child(4) .progress-track i { background: var(--cyan); }
.dashboard-risk-count { color: #047857; border-radius: var(--radius-pill); background: var(--green-soft); }
.dashboard-risk-count.warning { color: #B45309; background: var(--orange-soft); }
.dashboard-risk-icon { color: var(--blue); border-radius: 10px; background: var(--blue-soft); }
.dashboard-risk-item.warning .dashboard-risk-icon { color: var(--orange); background: var(--orange-soft); }
.dashboard-risk-item.danger .dashboard-risk-icon { color: var(--red); background: var(--red-soft); }
.dashboard-trend-bars b { background: var(--blue); }
.dashboard-trend-bars i:nth-child(2) b { background: var(--cyan); }

.timeline-day { border-bottom-color: var(--line); }
.timeline-date { border-right-color: var(--line); background: #F5F8FD; }
.timeline-event { border-bottom-color: var(--line); }
.matrix-notice { color: #5F3EA7; border-color: #DED0F8; background: var(--violet-soft); }
.assignment-list { border-top-color: var(--line); }
.assignment-row { min-height: 96px; border-bottom-color: var(--line); }
.assignment-icon { width: 44px; height: 44px; color: var(--blue); border-radius: 12px; background: var(--blue-soft); }
.assignment-row:nth-child(3n + 2) .assignment-icon { color: var(--violet); background: var(--violet-soft); }
.assignment-row:nth-child(3n + 3) .assignment-icon { color: #07859B; background: var(--cyan-soft); }
.profile-benchmark-picker, .signal-grid { border-color: var(--line); border-radius: 12px; background: var(--surface-2); }
.profile-benchmark-option, .signal { background: #fff; }
.profile-benchmark-detail > span b { color: var(--blue); }
.profile-search-results { border-radius: 12px; box-shadow: var(--shadow-float); }
.profile-score-item:hover { background: var(--blue-soft); }
.profile-score-item > svg { color: var(--blue); }
.report-card, .settings-card, .ai-evaluation-card, .assessment-card, .learning-card { border-color: var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }

/* Review workbenches */
.assignment-review-body { min-height: 100vh; background: var(--bg); }
.assignment-review-header { min-height: 82px; padding: 14px 24px; border-top: 0; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); box-shadow: 0 6px 20px rgba(15, 32, 80, .05); backdrop-filter: blur(14px); }
.assignment-review-header::after { content: ""; width: 94px; height: 4px; position: absolute; bottom: -1px; left: 24px; background: var(--brand-gradient); }
.assignment-review-heading h1 { color: var(--ink); }
.assignment-review-heading p { color: var(--muted); }
.assignment-review-shell, .review-workbench-shell { gap: 16px; padding: 18px 22px 30px; }
.assignment-review-list, .assignment-review-preview, .assignment-review-grading, .review-workbench-panel { border-color: var(--line); border-radius: var(--radius-card); background: #fff; box-shadow: var(--shadow-card); }
.review-workbench-tabs { padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.review-workbench-tabs a { border-radius: 8px; }
.review-workbench-tabs a.active { color: #fff; background: var(--brand-gradient); }
.deadline-submit-toggle { padding: 12px 14px; border: 1px solid #C9DAF8; border-left: 4px solid var(--blue); background: var(--blue-soft); }

/* Student web */
.student-body { min-height: 100vh; background: var(--bg); }
.student-shell { width: min(1180px, 100%); min-height: 100vh; margin: 0 auto; background: transparent; }
.student-header { min-height: 72px; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); }
.student-login { max-width: 480px; margin: 72px auto; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-card); background: #fff; box-shadow: var(--shadow-card); }
.student-login::before { content: ""; width: 88px; height: 4px; position: absolute; top: 0; left: 32px; border-radius: 0 0 99px 99px; background: var(--brand-gradient); }
.student-login h1 { font-size: 28px; }
.student-dashboard { padding: 26px 24px 52px; }
.student-greeting { min-height: 142px; padding: 24px 26px; position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--sidebar-gradient); box-shadow: 0 14px 34px rgba(11, 27, 66, .2); }
.student-greeting::after { content: ""; height: 6px; position: absolute; right: 0; bottom: 0; left: 0; background: var(--brand-gradient); }
.student-greeting span, .student-greeting p { color: #AFC6E9; }
.student-greeting h1 { color: #fff; }
.student-score-band { overflow: hidden; margin: -20px 20px 0; position: relative; z-index: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-card); background: #fff; box-shadow: var(--shadow-card); }
.student-score-band > div { min-height: 92px; padding: 16px; border-right: 1px solid var(--line); background: #fff; }
.student-score-band > div:first-child { background: var(--brand-gradient); }
.student-score-band > div:first-child span { color: #DFF7FC; }
.student-score-band span { color: var(--muted); }
.student-score-band strong { color: var(--ink); }
.student-score-band > div:first-child strong { color: #fff; }
.student-tabs { margin: 20px 0 14px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-card); }
.student-tabs button { color: var(--muted); border: 0; background: transparent; }
.student-tabs button.active { color: #fff; border-color: transparent; background: var(--brand-gradient); }
.student-panel, .student-card, .student-task, .student-feed-item { border-color: var(--line); border-radius: var(--radius-card); background: #fff; box-shadow: var(--shadow-card); }
.student-task .task-check.done, .student-feed-icon { color: var(--blue); background: var(--blue-soft); }
.quest-action-btn { border-radius: var(--radius-pill); background: var(--brand-gradient); box-shadow: 0 8px 20px rgba(37, 99, 235, .2); }
.quest-action-btn:hover { background: var(--brand-gradient); box-shadow: 0 10px 24px rgba(255, 122, 26, .22); }

@media (max-width: 1180px) {
  .workspace-shell { grid-template-columns: 228px minmax(0, 1fr); }
  .workspace-shell.sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
  .view { padding-right: 22px; padding-left: 22px; }
  .login-layout { grid-template-columns: minmax(470px, 1fr) minmax(390px, .86fr); }
  .login-panel { padding: 42px; }
}

@media (max-width: 900px) {
  .login-layout { display: block; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; min-height: 100dvh; padding: 36px 24px; }
  .mobile-brand { margin-bottom: 54px; display: flex; align-items: center; gap: 10px; }
  .mobile-brand .brand-mark { width: 42px; height: 42px; }
  .projects-page { width: min(100% - 32px, 760px); padding-top: 34px; }
  .project-row { grid-template-columns: 112px minmax(0, 1fr) auto 30px; }
  .assignment-review-shell, .review-workbench-shell { grid-template-columns: 1fr; }
  .student-score-band { margin-right: 10px; margin-left: 10px; }
}

@media (max-width: 800px) {
  .workspace-shell, .workspace-shell.sidebar-collapsed { display: block; }
  .workspace-main { grid-template-rows: 72px minmax(0, 1fr); }
  .workspace-body .sidebar, .workspace-body .sidebar-collapsed .sidebar { width: min(304px, 88vw); position: fixed; inset: 0 auto 0 0; z-index: 50; transform: translateX(-100%); box-shadow: 22px 0 56px rgba(7, 18, 44, .35); }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open + .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 45; border: 0; background: rgba(7, 18, 44, .62); }
  .sidebar-brand, .sidebar-collapsed .sidebar-brand { min-height: 82px; padding: 14px 12px 14px 17px; grid-template-columns: minmax(0, 1fr); }
  .sidebar-brand-copy, .sidebar-collapsed .sidebar-brand-copy, .sidebar-collapsed .project-switcher strong, .sidebar-collapsed .project-switcher small, .sidebar-collapsed .nav-group-label, .sidebar-collapsed .sidebar-nav button span, .sidebar-collapsed .sidebar-user > span:nth-child(2) { display: grid; }
  .sidebar-collapse { display: none !important; }
  .sidebar-collapsed .project-switcher { min-height: 78px; padding: 12px 13px; place-items: stretch; }
  .sidebar-collapsed .sidebar-nav { padding: 10px 10px 92px; }
  .sidebar-collapsed .sidebar-nav button { padding: 0 12px; justify-content: flex-start; }
  .sidebar-collapsed .sidebar-user { grid-template-columns: 34px 1fr auto; padding: 10px 12px; }
  .workspace-topbar { height: 72px; padding: 0 14px; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
  .workspace-topbar::before { display: none; }
  .workspace-topbar .mobile-menu { display: inline-flex; }
  .topbar-title-row > span, .connection { display: none; }
  .view { padding: 18px 14px 42px; }
  .view > .action-bar:first-child, .view > .operation-switcher + .action-bar { position: static; }
  .dashboard-brief { grid-template-columns: 1fr; gap: 16px; }
  .dashboard-brief-facts { width: 100%; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 0; }
  .metrics-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 600px) {
  .simple-header { height: 66px; padding: 0 14px; }
  .simple-header .brand-copy small, .simple-header .btn svg + * { display: none; }
  .projects-page { width: calc(100% - 24px); padding: 26px 0 44px; }
  .page-heading { align-items: start; gap: 16px; }
  .page-heading h1 { font-size: 24px; }
  .project-row { min-height: 112px; padding: 14px; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; }
  .project-code { grid-column: 1; }
  .project-row > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .project-row .status-dot { grid-column: 2; grid-row: 1; }
  .project-row > svg { grid-column: 2; grid-row: 2; }
  .login-panel { padding: 24px 18px; }
  .mobile-brand { margin-bottom: 38px; }
  .login-heading h1 { font-size: 28px; }
  .workspace-main { grid-template-rows: 68px minmax(0, 1fr); }
  .workspace-topbar { height: 68px; padding: 0 10px; }
  .workspace-topbar h1 { font-size: 16px; }
  .topbar-actions #refreshView { display: none; }
  .topbar-undo { width: 40px; min-width: 40px; height: 40px; padding: 0; justify-content: center; }
  .topbar-undo > span { display: none; }
  .view { padding: 12px 10px 34px; }
  .action-bar { padding: 10px; }
  .content-block, .profile-section { padding: 15px; border-radius: 14px; }
  .dashboard-brief { min-height: 0; padding: 21px 17px 18px; }
  .dashboard-brief::before { left: 17px; }
  .dashboard-brief-title h2 { font-size: 20px; }
  .dashboard-brief-facts > div { padding: 11px 8px 0; }
  .dashboard-brief-facts strong { font-size: 12px; }
  .metric { min-height: 96px; padding: 16px; }
  .metric strong { font-size: 24px; }
  .teacher-workbench { padding: 15px; }
  .workbench-actions, .workbench-pending-list { grid-template-columns: 1fr; }
  .app-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .dialog-body { padding: 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }
  .assignment-review-header { padding: 10px 12px; }
  .assignment-review-header::after { left: 12px; }
  .assignment-review-heading .brand-mark { display: none; }
  .assignment-review-shell, .review-workbench-shell { padding: 12px 10px 24px; }
  .student-header { min-height: 66px; padding: 0 14px; }
  .student-login { margin: 30px 12px; padding: 24px 20px; }
  .student-dashboard { padding: 14px 10px 36px; }
  .student-greeting { min-height: 126px; padding: 20px; }
  .student-score-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-score-band > div { min-height: 78px; border-bottom: 1px solid var(--line); }
  .student-score-band > div:nth-child(2) { border-right: 0; }
  .student-tabs { overflow-x: auto; justify-content: start; }
  .student-tabs button { flex: 0 0 auto; min-width: 90px; }
}

@media (max-width: 360px) {
  .workspace-topbar { grid-template-columns: 38px minmax(0, 1fr) 40px; }
  .topbar-actions > :not(.topbar-undo) { display: none; }
  .breadcrumb { font-size: 8px; }
  .workspace-topbar h1 { max-width: 150px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .metrics-strip { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .dashboard-brief-facts { grid-template-columns: 1fr; }
  .dashboard-brief-facts > div { padding: 10px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .dashboard-brief-facts > div:last-child { border-bottom: 0; }
  .project-row .status-dot { max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.workspace-body .sidebar { color: #D7E4FB; border-right: 0; background: var(--sidebar-gradient); box-shadow: 8px 0 26px rgba(8, 20, 50, .12); }
.workspace-body .sidebar::after { background: linear-gradient(90deg, transparent, rgba(101, 210, 237, .32), transparent); }
.workspace-body .project-switcher { border-color: rgba(125, 227, 244, .25); background: linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(6, 182, 212, .04)); }
.workspace-body .sidebar-nav { scrollbar-width: thin; scrollbar-color: rgba(125, 227, 244, .24) transparent; }
.workspace-body .sidebar-nav::-webkit-scrollbar { width: 5px; }
.workspace-body .sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.workspace-body .sidebar-nav::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(125, 227, 244, .24); }
.workspace-body .sidebar-nav .nav-group button { color: #AFC1DF; border: 0; border-radius: 10px; background: transparent; }
.workspace-body .sidebar-nav .nav-group button:hover { color: #fff; border-color: transparent; background: rgba(255, 255, 255, .07); }
.workspace-body .sidebar-nav .nav-group button.active { color: #fff; border-color: transparent; background: var(--brand-gradient); box-shadow: 0 8px 20px rgba(17, 85, 202, .26); }
.workspace-body .sidebar-nav .nav-group button.active::before { width: 4px; top: 11px; bottom: 11px; left: -10px; background: var(--cyan); box-shadow: none; opacity: 1; transform: scaleY(1); }
.workspace-body .sidebar-nav .nav-group button.active svg { color: #fff; }
.workspace-body .sidebar-user .avatar { background: var(--brand-gradient); }
.assignment-review-header-actions .btn.btn-secondary { color: var(--blue); border-color: #B8C9EC; background: #fff; box-shadow: none; }
.assignment-review-header-actions .btn.btn-secondary:hover { color: #fff; border-color: var(--blue); background: var(--blue); }
.action-bar .btn, .action-bar .file-button { flex: 0 0 auto; white-space: nowrap; }
[data-view-panel="roster"] > .action-bar { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
[data-view-panel="roster"] > .action-bar > .filters { width: 100%; display: grid; grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(130px, 1fr)); }
[data-view-panel="roster"] > .action-bar > div:last-child { width: 100%; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 900px) {
  [data-view-panel="roster"] > .action-bar > .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  [data-view-panel="roster"] > .action-bar > .filters { grid-template-columns: minmax(0, 1fr); }
  [data-view-panel="roster"] > .action-bar > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-view-panel="roster"] > .action-bar > div:last-child > .btn, [data-view-panel="roster"] > .action-bar > div:last-child > .file-button { width: 100%; min-width: 0; }
}

/* Tech Vitality 2026: icon and typography refinement */
.brand-mark,
.login-brand .brand-mark,
.mobile-brand .brand-mark,
.brand-inline .brand-mark,
.sidebar-brand .brand-mark {
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

svg { stroke-width: 2; }
.btn svg,
.icon-btn svg,
.sidebar-nav button svg,
.operation-switcher button > svg,
.student-tabs button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.sidebar-nav button svg { color: #86A4D2; }
.sidebar-nav button:hover svg,
.sidebar-nav button.active svg,
.workspace-body .sidebar-nav .nav-group button.active svg { color: #FFFFFF; }

.btn {
  min-width: 0;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}
.btn-primary:hover,
.quest-action-btn:hover { box-shadow: 0 10px 24px rgba(37, 99, 235, .24); }
.btn-secondary svg,
.action-bar .icon-btn svg,
.assignment-review-header-actions .btn svg { color: currentColor; }
.btn-danger svg,
.row-actions .danger svg { color: currentColor; }
.btn-undo-outline { color: #B45309; border-color: #F0C997; background: #FFF9F0; }
.btn-undo-outline:hover { color: #FFFFFF; border-color: var(--orange); background: var(--orange); }

.workbench-actions button > svg,
.workbench-actions button:nth-child(2) > svg,
.workbench-actions button:nth-child(3) > svg,
.workbench-actions button:nth-child(4) > svg,
[data-view-panel="overview"] .workbench-actions button > svg,
[data-view-panel="overview"] .workbench-actions button:nth-child(2) > svg,
[data-view-panel="overview"] .workbench-actions button:nth-child(3) > svg,
[data-view-panel="overview"] .workbench-actions button:nth-child(4) > svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
}
.workbench-pending-list > button svg:first-child,
[data-view-panel="overview"] .workbench-pending-list > button svg:first-child {
  color: var(--orange);
}
.workbench-pending-list > button svg:last-child { color: #8A9AB2; }

.assignment-icon,
.assignment-row:nth-child(3n + 2) .assignment-icon,
.assignment-row:nth-child(3n + 3) .assignment-icon,
.audit-icon,
.point-task-admin-icon,
.quick-center-item > span:first-child,
.dashboard-risk-icon,
.quest-card-icon,
.student-achievement > span {
  color: var(--blue);
  border: 1px solid #D8E3F5;
  border-radius: 10px;
  background: #F5F8FD;
  box-shadow: none;
}
.assignment-icon svg,
.audit-icon svg,
.point-task-admin-icon svg,
.quick-center-item > span:first-child svg,
.dashboard-risk-icon svg,
.quest-card-icon svg,
.student-achievement > span svg { width: 18px; height: 18px; }
.dashboard-risk-item.warning .dashboard-risk-icon { color: var(--orange); border-color: #F5D7B5; background: var(--orange-soft); }
.dashboard-risk-item.danger .dashboard-risk-icon { color: var(--red); border-color: #F4C7C7; background: var(--red-soft); }

.student-learning-metric > svg,
.student-learning-metric:nth-child(1) > svg,
.student-learning-metric:nth-child(2) > svg,
.student-learning-metric:nth-child(3) > svg,
.student-learning-metric:nth-child(4) > svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
}
.student-feed-icon,
.student-feed-icon.blue { color: var(--blue); border: 1px solid #D8E3F5; background: var(--blue-soft); }
.student-feed-icon.amber { color: var(--orange); border-color: #F5D7B5; background: var(--orange-soft); }
.student-feed-icon.red { color: var(--red); border-color: #F4C7C7; background: var(--red-soft); }
.task-check { border: 1px solid var(--line); border-radius: 10px; }
.student-task .task-check.done { color: var(--green); border-color: #BFE8D9; background: var(--green-soft); }

.ai-config-layout svg,
.ai-quality-section svg,
.ai-assist-box > header svg,
.ai-suggestion-heading svg,
.profile-ai-analysis > header svg,
.exam-ai-analysis > header svg,
.content-review-launcher > span > svg,
.content-review-suggestion > header svg { color: var(--violet); }
.ai-safety-boundary svg,
.ai-policy-strip svg,
.ai-guide-boundary svg { color: var(--green); }
.manual-role-grid article > svg,
.manual-section > summary > span > svg,
.review-keyword-summary > div:first-child > svg { color: var(--blue); }

h1, h2, h3, h4,
.section-heading > div,
.section-heading > span,
.workbench-heading > div,
.topbar-heading,
.topbar-title-row,
.table-primary,
.assignment-copy,
.student-task-main,
.student-feed-item > div,
.manual-role-grid article {
  min-width: 0;
}
h1, h2, h3, h4,
.section-heading p,
.section-heading small,
.workbench-actions strong,
.workbench-actions small,
.manual-role-grid article span,
.form-note,
.ai-module-switches small {
  overflow-wrap: break-word;
  word-break: normal;
}
.topbar-heading,
.topbar-title-row { overflow: visible; }
.topbar-heading { align-content: center; }
.breadcrumb { line-height: 1.4; }
.topbar-title-row {
  display: grid;
  align-items: start;
  gap: 1px;
}
.workspace-topbar h1 { max-width: 100%; }
.topbar-title-row > span {
  width: 100%;
  max-width: 100%;
  line-height: 1.4;
}
.topbar-title-row > span,
.breadcrumb > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.section-heading {
  height: auto;
  align-items: center;
  gap: 12px 18px;
}
.section-heading > div:first-child { min-width: 0; }
.section-heading h2,
.workbench-heading h2 { margin-bottom: 0; line-height: 1.35; }
.section-heading p,
.section-heading small,
.workbench-heading .muted { line-height: 1.55; }
.status-badge,
.status-dot,
.pill,
.tag,
.button-count,
.schedule-status { white-space: nowrap; }

.action-bar {
  align-items: center;
  gap: 10px 14px;
}
.action-bar > div,
.action-bar > .filters {
  min-width: 0;
  flex-wrap: wrap;
}
.action-bar > .filters { flex: 1 1 420px; }
.action-bar > div:last-child { flex: 1 1 420px; justify-content: flex-end; }
.action-bar > .filters > *,
.action-bar > .filters .search-input { min-width: 132px; }
.action-bar > .filters .search-input { flex: 1 1 210px; }
.action-bar > .filters select,
.action-bar > .filters input[type="date"] { flex: 1 1 148px; }
.score-toolbar > .filters { display: grid; grid-template-columns: minmax(190px, 1.35fr) repeat(2, minmax(132px, .8fr)) minmax(210px, 1.2fr); }
.score-toolbar > .filters,
.score-toolbar > div:last-child { flex: 0 0 auto; }
.profile-selection-bar .search-select { min-width: 126px; }
.profile-selection-bar .search-input { min-width: 210px; }
.manual-toc { gap: 8px; padding: 11px 0; }
.manual-toc button { min-width: 76px; min-height: 34px; padding: 0 12px; color: #40516B; border-radius: 8px; font-size: 10px; }
.manual-toc button:hover { color: var(--blue); border-color: #B8C9EC; background: var(--blue-soft); }
.manual-layout { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.manual-layout > *,
.manual-hero > *,
.manual-section-heading > *,
.manual-actions { min-width: 0; }
.manual-layout > * { max-width: 100%; }
.manual-hero h2 { max-width: 100%; overflow-wrap: anywhere; }
.evaluation-header > div:first-child { min-width: 150px; }
.evaluation-header .learning-actions,
.ai-quality-controls { min-width: 0; flex-wrap: wrap; }
.evaluation-header .learning-actions .btn,
.ai-quality-controls .btn { flex: 0 0 auto; }

.table-wrap table { min-width: 100%; }
.table-wrap th { white-space: nowrap; }
.table-wrap td { min-width: 72px; }
.table-wrap .actions-col,
.table-wrap .row-actions,
.table-wrap .status-badge,
.table-wrap .status-dot { white-space: nowrap; }
.row-actions { min-width: max-content; flex-wrap: nowrap; }
.assignment-grade-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.assignment-grade-actions > span { display: none; }
.assignment-grade-actions .btn { width: 100%; min-width: 0; }
.assignment-grade-actions .btn:first-child { grid-column: 1 / -1; }

@media (max-width: 1180px) {
  .action-bar,
  .marketing-page-toolbar,
  .report-delivery-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  .action-bar > .filters,
  .action-bar > div:last-child,
  .report-action-copy,
  .report-action-buttons { width: 100%; }
  .action-bar > div:last-child,
  .report-action-buttons { justify-content: flex-end; }
  .profile-selection-bar { grid-template-columns: minmax(0, 1fr); }
  .profile-selection-bar > :first-child,
  .profile-selection-bar > .profile-selector-shell { grid-column: 1; }
  .profile-selection-bar > .profile-selection-actions { width: 100%; min-width: 0; justify-self: stretch; justify-content: flex-end; }
  .evaluation-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
  }
  .evaluation-header .learning-actions { width: 100%; justify-content: flex-start; }
}

@media (max-width: 800px) {
  .section-heading { align-items: flex-start; flex-wrap: wrap; }
  .section-heading > :last-child:not(:first-child) { margin-left: auto; }
  .score-toolbar > .filters,
  .profile-selection-bar .profile-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-section-heading > p { max-width: none; }
}

@media (max-width: 600px) {
  .action-bar > .filters,
  .score-toolbar > .filters,
  .profile-selection-bar { display: grid; grid-template-columns: minmax(0, 1fr); }
  .profile-selection-bar .profile-filters { grid-template-columns: minmax(0, 1fr); }
  .dashboard-progress-panel .progress-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-progress-panel .progress-item:nth-child(2n) { border-left: 0; }
  .action-bar > .filters > *,
  .action-bar > .filters .search-input,
  .profile-selection-bar > *,
  .profile-selection-bar > :first-child,
  .profile-selection-bar > .profile-selector-shell { width: 100%; min-width: 0; grid-column: 1; }
  .action-bar > div:last-child,
  [data-view-panel="roster"] > .action-bar > div:last-child,
  .report-action-buttons,
  .manual-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }
  .action-bar > div:last-child > .btn,
  .action-bar > div:last-child > .file-button,
  .action-bar > div:last-child > .icon-btn,
  .report-action-buttons > .btn,
  .manual-actions > .btn { width: 100%; min-width: 0; }
  .action-bar a.icon-btn[href*="/imports/templates/"] { gap: 7px; }
  .action-bar a.icon-btn[href*="/imports/templates/"]::after { content: "下载模板"; font-size: 12px; font-weight: 700; }
  .section-heading > :last-child:not(:first-child) { margin-left: 0; }
  .manual-toc button { min-width: 80px; }
  .manual-role-grid article { padding: 15px; }
  .table-wrap td { min-width: 88px; }
  .evaluation-header .learning-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .evaluation-header .learning-actions .btn,
  .evaluation-header .learning-actions .toggle-row,
  .ai-quality-controls .btn,
  .ai-quality-controls select { width: 100%; min-width: 0; }
}

@media (max-width: 360px) {
  .action-bar > div:last-child,
  [data-view-panel="roster"] > .action-bar > div:last-child,
  .report-action-buttons,
  .manual-actions { grid-template-columns: minmax(0, 1fr); }
  .btn { white-space: normal; }
  .evaluation-header .learning-actions { grid-template-columns: minmax(0, 1fr); }
}

/* Tech Vitality: readable business metrics and richer icon surfaces */
.camp-progress-grid {
  margin-bottom: 18px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.camp-progress-item {
  min-height: 96px;
  padding: 16px;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  border-color: #DCE5F3;
  border-radius: 14px;
  background: linear-gradient(145deg, #FFFFFF 0%, #F8FBFF 100%);
  box-shadow: 0 6px 20px rgba(15, 32, 80, .06);
}
.camp-progress-item:hover {
  transform: translateY(-2px);
  border-color: #BFD1EF;
  box-shadow: 0 12px 28px rgba(15, 32, 80, .11);
}
.camp-progress-icon,
.daily-score-export-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  color: var(--blue);
  border: 1px solid #CFE0F7;
  border-radius: 12px;
  background: linear-gradient(145deg, #F7FAFF, #E8F2FF);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 7px 16px rgba(37, 99, 235, .10);
}
.camp-progress-icon svg,
.daily-score-export-icon svg { width: 21px; height: 21px; stroke-width: 2.2; }
.camp-progress-copy { min-width: 0; display: grid; align-content: center; gap: 5px; }
.camp-progress-copy small {
  color: #465874;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 700;
  word-break: keep-all;
  overflow-wrap: normal;
}
.camp-progress-copy strong {
  color: var(--ink);
  font-size: 27px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.camp-progress-item.urgent {
  border-left: 1px solid #F3C8C8;
  border-color: #F3C8C8;
  background: linear-gradient(145deg, #FFFFFF 0%, #FFF7F7 100%);
}
.camp-progress-item.urgent .camp-progress-icon {
  color: var(--red);
  border-color: #F4C7C7;
  background: linear-gradient(145deg, #FFF8F8, var(--red-soft));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 7px 16px rgba(239, 68, 68, .10);
}
.camp-progress-item.urgent .camp-progress-copy strong { color: #C92F2F; }

.evaluation-rail button > svg,
.workbench-actions button > svg,
.student-learning-metric > svg,
.manual-role-grid article > svg,
.camp-center-list article > svg {
  box-sizing: border-box;
  color: var(--blue);
  border: 1px solid #D4E2F6;
  border-radius: 10px;
  background: linear-gradient(145deg, #F7FAFF, #EAF3FF);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.evaluation-rail button > svg {
  width: 32px;
  height: 32px;
  padding: 6px;
  flex: 0 0 32px;
}
.evaluation-rail button.active > svg {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .16);
}
.workbench-actions button > svg,
.student-learning-metric > svg,
.manual-role-grid article > svg,
.camp-center-list article > svg {
  width: 42px;
  height: 42px;
  padding: 10px;
  flex: 0 0 42px;
}
.camp-center-list article { grid-template-columns: 42px minmax(0, 1fr) 32px; }

.sidebar-nav button svg {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  padding: 5px;
  flex: 0 0 28px;
  color: #9DB8DF;
  border: 1px solid rgba(125, 227, 244, .13);
  border-radius: 9px;
  background: rgba(125, 227, 244, .06);
}
.sidebar-nav button:hover svg {
  color: #DFF9FF;
  border-color: rgba(125, 227, 244, .28);
  background: rgba(125, 227, 244, .12);
}
.sidebar-nav button.active svg,
.workspace-body .sidebar-nav .nav-group button.active svg {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.workspace-body .sidebar-nav .nav-group .sidebar-nav-link {
  width: 100%;
  min-height: 42px;
  padding: 0 10px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #AFC1DF;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.workspace-body .sidebar-nav .nav-group .sidebar-nav-link:hover {
  color: #FFFFFF;
  border-color: rgba(125, 227, 244, .18);
  background: rgba(255, 255, 255, .07);
}
.sidebar-nav-link > svg:first-child {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  padding: 5px;
  flex: 0 0 28px;
  color: #9DB8DF;
  border: 1px solid rgba(125, 227, 244, .13);
  border-radius: 9px;
  background: rgba(125, 227, 244, .06);
}
.sidebar-nav-link > span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav-link > .sidebar-nav-link-arrow { width: 15px; height: 15px; flex: 0 0 15px; color: #6F8BB9; }
.sidebar-nav-link:hover > svg:first-child { color: #DFF9FF; border-color: rgba(125, 227, 244, .28); background: rgba(125, 227, 244, .12); }
.sidebar-nav-link:hover > .sidebar-nav-link-arrow { color: #7DE3F4; }
.sidebar-collapsed .sidebar-nav .sidebar-nav-link { justify-content: center; padding: 0; }
.sidebar-collapsed .sidebar-nav .sidebar-nav-link > span,
.sidebar-collapsed .sidebar-nav .sidebar-nav-link > .sidebar-nav-link-arrow { display: none; }
.operation-switcher button > svg {
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  padding: 9px;
  flex: 0 0 38px;
  color: var(--blue);
  border: 1px solid #D4E2F6;
  border-radius: 11px;
  background: linear-gradient(145deg, #F7FAFF, #EAF3FF);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.operation-switcher button.active > svg {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, .36);
  background: rgba(255, 255, 255, .16);
}

.daily-score-export-panel {
  margin: 0 0 14px;
  scroll-margin-top: 88px;
  padding: 0;
  display: block;
  border: 1px solid #D7E4F5;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 6px 20px rgba(15, 32, 80, .06);
  overflow: hidden;
}
.daily-score-export-summary {
  min-height: 62px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(105deg, #FFFFFF 0%, #F5FAFF 72%, #EEF8FF 100%);
}
.daily-score-export-summary::-webkit-details-marker { display: none; }
.daily-score-export-summary:focus-visible { outline: 3px solid rgba(40, 104, 210, .2); outline-offset: -3px; }
.daily-score-export-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--blue); border: 1px solid #D4E2F6; border-radius: 10px; background: #FFFFFF; }
.daily-score-export-icon svg { width: 19px; height: 19px; }
.daily-score-export-copy { min-width: 0; display: grid; gap: 3px; }
.daily-score-export-copy strong { color: var(--ink); font-size: 14px; line-height: 1.3; }
.daily-score-export-copy small { color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: break-word; }
.daily-score-export-state { display: inline-flex; align-items: center; gap: 7px; color: #45658F; font-size: 11px; font-weight: 700; white-space: nowrap; }
.daily-score-export-state svg { width: 16px; height: 16px; transition: transform .18s ease; }
.daily-score-export-state .when-open { display: none; }
.daily-score-export-panel[open] .daily-score-export-state .when-closed { display: none; }
.daily-score-export-panel[open] .daily-score-export-state .when-open { display: inline; }
.daily-score-export-panel[open] .daily-score-export-state svg { transform: rotate(180deg); }
.daily-score-export-body { padding: 0 16px 13px; border-top: 1px solid #DCE6F4; }
.daily-score-export-intro { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #5D6E87; font-size: 11px; }
.daily-score-export-actions {
  min-width: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid #E5ECF6;
}
.daily-score-export-group {
  min-width: 0;
  padding: 13px 0;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
.daily-score-export-group + .daily-score-export-group { border-top: 1px solid #E5ECF6; }
.daily-score-export-group-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #31507D;
}
.daily-score-export-group-title > svg { width: 20px; height: 20px; color: var(--blue); flex: 0 0 auto; }
.daily-score-export-group-title > span { min-width: 0; display: grid; gap: 2px; }
.daily-score-export-group-title strong { color: #17233A; font-size: 13px; }
.daily-score-export-group-title small { color: #71809A; font-size: 10px; line-height: 1.35; }
.daily-score-export-buttons {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
  align-items: end;
  gap: 9px;
}
.daily-score-export-date { min-width: 154px; display: grid; gap: 4px; }
.daily-score-export-date > span { color: #40516B; font-size: 10px; font-weight: 700; }
.daily-score-export-date input,
.daily-score-export-date select { min-width: 154px; width: 100%; height: 42px; }
.daily-score-group-scope { min-width: 210px; }
.daily-score-export-panel .btn { width: 100%; height: 42px; white-space: nowrap; }
.daily-score-export-panel .btn svg { flex: 0 0 auto; }
.daily-score-image-buttons .daily-score-overview-button { grid-column: 1 / -1; }
.daily-score-image-buttons .daily-score-preview-button { grid-column: 1 / -1; }
.score-export-preview-shell { display: grid; gap: 14px; }
.score-export-preview-toolbar { min-width: 0; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(320px, auto); align-items: end; gap: 10px 16px; padding: 13px 14px; border: 1px solid #D7E4F5; border-radius: 12px; background: #F7FAFF; }
.score-export-preview-toolbar label { min-width: 220px; display: grid; gap: 5px; }
.score-export-preview-toolbar label > span { color: #40516B; font-size: 11px; font-weight: 800; }
.score-export-preview-toolbar select { min-width: 220px; height: 40px; }
.score-export-preview-zoom { min-width: 0; display: grid; gap: 5px; }
.score-export-preview-zoom > span { color: #40516B; font-size: 11px; font-weight: 800; }
.score-export-preview-zoom > div { min-width: 0; display: flex; align-items: center; gap: 7px; }
.score-export-preview-zoom .icon-btn { width: 36px; height: 36px; flex: 0 0 auto; }
.score-export-preview-zoom input[type="range"] { width: 110px; min-width: 70px; accent-color: var(--blue); }
.score-export-preview-zoom output { width: 44px; color: #23416B; font-size: 11px; font-weight: 800; text-align: center; }
.score-export-preview-zoom .btn { width: auto; height: 36px; padding: 0 10px; flex: 0 0 auto; }
.score-export-preview-meta { min-width: 0; grid-column: 1 / -1; color: #61728B; font-size: 11px; line-height: 1.45; text-align: right; overflow-wrap: break-word; }
.score-export-preview-viewport { min-height: 280px; max-height: min(62vh, 720px); display: block; overflow: auto; padding: 16px; border: 1px solid #D7E4F5; border-radius: 12px; background: #EAF0F8; }
.score-export-preview-canvas { display: block; width: 100%; max-width: none; height: auto; margin: 0 auto; border-radius: 8px; background: #FFFFFF; box-shadow: 0 12px 30px rgba(15, 32, 80, .14); }
.score-export-preview-state { width: 100%; min-height: 240px; display: grid; align-content: center; justify-items: center; gap: 8px; color: #6B7A92; text-align: center; }
.score-export-preview-state svg { width: 28px; height: 28px; color: var(--blue); }
.score-export-preview-state strong { color: #20314D; font-size: 15px; }
.score-export-preview-state span { max-width: 360px; font-size: 11px; line-height: 1.5; }
.score-export-preview-state.is-error svg { color: var(--red); }
.score-export-preview-state.is-error strong { color: #A32932; }
.score-toolbar { position: relative; z-index: 12; }
.score-toolbar .score-toolbar-commandbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.score-toolbar .score-advanced-tools {
  width: min(650px, calc(100% - 28px));
  padding: 12px;
  position: absolute;
  z-index: 40;
  right: 14px;
  top: calc(100% - 7px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid #D5E1F2;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 18px 42px rgba(15, 32, 80, .16);
}
.score-toolbar .score-advanced-tools.hidden { display: none; }
.score-toolbar .score-advanced-tools > * { width: 100%; min-width: 0; justify-content: flex-start; }
.score-toolbar .score-advanced-tools > .icon-btn { justify-content: center; }

/* Keep feedback above modal dialogs and make a scoped class explicit without another selector. */
.toast-region,
.toast-region[popover] {
  width: max-content;
  max-width: calc(100vw - 32px);
  inset: auto auto 24px 50%;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
}
.scope-lock {
  min-width: 170px;
  min-height: 42px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #23416B;
  border: 1px solid #C9D8EF;
  border-radius: 10px;
  background: #F4F8FF;
}
.scope-lock > svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--blue); }
.scope-lock > span { min-width: 0; display: grid; gap: 1px; }
.scope-lock small { color: #71829B; font-size: 10px; line-height: 1.2; }
.scope-lock strong { overflow: hidden; color: #20314D; font-size: 13px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.attendance-scope-lock { width: 100%; margin-top: 6px; }
.exam-template-editor { display: grid; gap: 16px; }
.exam-template-editor form { display: grid; gap: 12px; }
.exam-template-editor [data-exam-score-items] { display: grid; gap: 8px; }
.exam-score-item-row {
  min-width: 0;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, .55fr) minmax(190px, 1.2fr) 36px;
  align-items: end;
  gap: 10px;
  border: 1px solid #DCE6F5;
  border-radius: 10px;
  background: #F8FAFD;
}
.exam-score-item-row > label { min-width: 0; }
.exam-score-item-row input { width: 100%; min-width: 0; }
.exam-template-footer { min-width: 0; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #E1E8F2; }
.exam-template-footer strong { color: #23416B; font-size: 13px; }
@media (max-width: 700px) {
  .exam-score-item-row { grid-template-columns: minmax(0, 1fr) minmax(100px, .6fr) 36px; }
  .exam-score-item-row > label:nth-child(3) { grid-column: 1 / -1; }
  .exam-template-footer { align-items: stretch; flex-direction: column; }
  .exam-template-footer .btn { width: 100%; }
}
.score-toolbar #scoreToolsToggle[aria-expanded="true"] { border-color: #8db0f3; background: #eef4ff; color: #1d4ed8; }
.score-toolbar #scoreToolsToggle svg { transition: transform .18s ease; }
.score-toolbar #scoreToolsToggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.data-safety-status { min-width: 150px; display: grid; justify-items: start; gap: 4px; }
.data-safety-status small { color: var(--muted); font-size: 10px; line-height: 1.3; }
.audit-shortcut { min-width: 0; height: 42px; padding: 0 12px; white-space: nowrap; }
.audit-scope-control { flex: 0 0 auto; }

/* Growth profile: one coherent visual language for identity, metrics, charts and analysis. */
[data-view-panel="profiles"] .profile-layout { gap: 18px; }
[data-view-panel="profiles"] .profile-identity {
  min-height: 126px;
  padding: 24px 26px;
  grid-template-columns: 72px minmax(190px, .9fr) minmax(240px, 1.2fr) 150px;
  gap: 18px;
  color: #FFFFFF;
  border: 1px solid #1F61BC;
  border-radius: 16px;
  background: linear-gradient(115deg, #0C2457 0%, #123B84 64%, #087F9B 100%);
  box-shadow: 0 16px 36px rgba(12, 36, 87, .18);
}
[data-view-panel="profiles"] .profile-avatar {
  width: 64px;
  height: 64px;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 18px;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
.profile-identity-eyebrow { display: block; margin-bottom: 5px; color: #7DE3F4; font-size: 9px; font-weight: 800; }
[data-view-panel="profiles"] .profile-person h2 { margin-bottom: 6px; color: #FFFFFF; font-size: 22px; }
[data-view-panel="profiles"] .profile-person p { color: #CFDCF5; font-size: 11px; line-height: 1.55; }
[data-view-panel="profiles"] .profile-identity .tag { color: #F3F8FF; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .1); }
[data-view-panel="profiles"] .profile-total { min-width: 0; padding-left: 22px; border-left-color: rgba(255, 255, 255, .24); }
[data-view-panel="profiles"] .profile-total span,
[data-view-panel="profiles"] .profile-total small { color: #CFDCF5; }
[data-view-panel="profiles"] .profile-total strong { color: #FFFFFF; font-size: 34px; line-height: 1.05; }
[data-view-panel="profiles"] .profile-data { gap: 16px; }
[data-view-panel="profiles"] .profile-section,
[data-view-panel="profiles"] .profile-analysis-panel { border-radius: 14px; box-shadow: 0 8px 24px rgba(15, 32, 80, .07); }
[data-view-panel="profiles"] .profile-section > .section-heading { margin-bottom: 14px; }
[data-view-panel="profiles"] .profile-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; overflow: hidden; border-color: #DCE6F5; border-radius: 10px; background: #DCE6F5; }
[data-view-panel="profiles"] .profile-summary-grid .signal { min-height: 92px; padding: 16px; align-content: center; gap: 7px; background: #FFFFFF; }
[data-view-panel="profiles"] .profile-summary-grid .signal:last-child { grid-column: span 2; }
[data-view-panel="profiles"] .profile-summary-grid .signal span { color: #6B7A92; font-size: 10px; }
[data-view-panel="profiles"] .profile-summary-grid .signal strong { color: #17396F; font-size: 21px; line-height: 1.2; }
[data-view-panel="profiles"] .profile-benchmark-toolbar > .btn b { background: var(--blue); }
[data-view-panel="profiles"] .profile-benchmark-picker { border-color: #DCE6F5; border-radius: 10px; background: #F5F8FD; }
[data-view-panel="profiles"] .profile-benchmark-picker > div:first-child button { color: var(--blue); }
[data-view-panel="profiles"] .profile-secondary-grid { gap: 16px; }
[data-view-panel="profiles"] .profile-analysis-panel { padding: 22px; border: 1px solid #D7E4F5; border-top: 4px solid var(--blue); background: #FFFFFF; }
[data-view-panel="profiles"] .profile-analysis-item { border-bottom-color: #E4EAF4; }
[data-view-panel="profiles"] .profile-analysis-item > b { color: #7C9DD8; font-size: 22px; }
[data-view-panel="profiles"] .profile-analysis-item h3 { color: #17396F; }
[data-view-panel="profiles"] .profile-analysis-item p { color: #52627B; line-height: 1.8; }
[data-view-panel="profiles"] .profile-analysis-panel > p { border-top-color: #E4EAF4; }
[data-view-panel="profiles"] .profile-score-item b { color: var(--blue); }
[data-view-panel="profiles"] .profile-detail-actions .btn.active { border-color: var(--blue); background: var(--blue); }

@media (max-width: 1180px) {
  .daily-score-export-group { grid-template-columns: 130px minmax(0, 1fr); }
  [data-view-panel="profiles"] .profile-identity { grid-template-columns: 64px minmax(0, 1fr) 150px; }
  [data-view-panel="profiles"] .profile-identity > .tag-list { grid-column: 2; }
  [data-view-panel="profiles"] .profile-total { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 700px) {
  .camp-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-toolbar .score-toolbar-commandbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .score-toolbar .score-toolbar-commandbar .btn { width: 100%; min-width: 0; }
  .score-toolbar .score-advanced-tools { width: 100%; padding: 10px 0 0; position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 0; border-top: 1px solid #E5ECF6; border-radius: 0; box-shadow: none; }
  .score-toolbar .score-advanced-tools.hidden { display: none; }
  .score-toolbar .score-advanced-tools > * { width: 100%; min-width: 0; }
  .daily-score-export-summary { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .daily-score-export-state > span { display: none !important; }
  .daily-score-export-body { padding: 0 12px 12px; }
  .daily-score-export-intro { padding: 12px 0; align-items: stretch; flex-direction: column; }
  .daily-score-export-group { grid-template-columns: minmax(0, 1fr); }
  .daily-score-export-buttons { grid-template-columns: minmax(0, 1fr); }
  .daily-score-export-date input,
  .daily-score-export-date select { width: 100%; }
  .score-export-preview-toolbar { grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 10px; }
  .score-export-preview-toolbar label,
  .score-export-preview-toolbar select { min-width: 0; width: 100%; }
  .score-export-preview-zoom > div { display: grid; grid-template-columns: 36px minmax(80px, 1fr) 44px 36px; }
  .score-export-preview-zoom .btn { grid-column: 1 / -1; width: 100%; }
  .score-export-preview-meta { text-align: left; }
  .score-export-preview-viewport { min-height: 220px; max-height: 62vh; padding: 10px; }
  .audit-shortcut { width: 40px; padding: 0; }
  .audit-shortcut span { display: none; }
  .sidebar-collapsed .sidebar-nav .sidebar-nav-link { justify-content: flex-start; padding: 0 10px 0 12px; }
  .sidebar-collapsed .sidebar-nav .sidebar-nav-link > span,
  .sidebar-collapsed .sidebar-nav .sidebar-nav-link > .sidebar-nav-link-arrow { display: block; }
  [data-view-panel="profiles"] .profile-identity { padding: 18px; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; }
  [data-view-panel="profiles"] .profile-avatar { width: 52px; height: 52px; border-radius: 15px; }
  [data-view-panel="profiles"] .profile-identity > .tag-list { grid-column: 1 / -1; }
  [data-view-panel="profiles"] .profile-total { grid-column: 1 / -1; grid-row: auto; padding: 14px 0 0; grid-template-columns: minmax(0, 1fr) auto; border-top: 1px solid rgba(255, 255, 255, .24); border-left: 0; }
  [data-view-panel="profiles"] .profile-total strong { grid-column: 1; }
  [data-view-panel="profiles"] .profile-total small { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  [data-view-panel="profiles"] .profile-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .camp-progress-grid { grid-template-columns: minmax(0, 1fr); }
  .camp-progress-item { min-height: 88px; }
}

/* Narrow management screens: turn desktop data tables into readable field cards. */
@media (max-width: 700px) {
  body.workspace-body,
  body.workspace-body .workspace-shell,
  body.workspace-body .workspace-main,
  body.workspace-body .workspace-canvas,
  body.workspace-body .view {
    max-width: 100vw;
    overflow-x: hidden;
  }
  body.workspace-body .view > *,
  body.workspace-body .dialog-card > * { min-width: 0; max-width: 100%; }
  body.workspace-body .mobile-card-table-wrap {
    max-width: 100%;
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  body.workspace-body table[data-mobile-card-table="true"] {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    display: block;
    table-layout: fixed;
  }
  body.workspace-body table[data-mobile-card-table="true"] thead {
    display: none;
  }
  body.workspace-body table[data-mobile-card-table="true"] tbody {
    width: 100%;
    display: grid;
    gap: 12px;
  }
  body.workspace-body table[data-mobile-card-table="true"] tbody tr {
    width: 100%;
    min-width: 0;
    padding: 4px 12px;
    position: static;
    display: block;
    overflow: hidden;
    border: 1px solid #DCE6F5;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: 0 4px 14px rgba(15, 32, 80, .05);
  }
  body.workspace-body table[data-mobile-card-table="true"] tbody tr:hover { background: #FFFFFF; }
  body.workspace-body table[data-mobile-card-table="true"] tbody td,
  body.workspace-body table[data-mobile-card-table="true"] tbody td:first-child {
    width: 100%;
    min-width: 0 !important;
    min-height: 44px;
    height: auto;
    padding: 10px 0;
    position: static;
    display: grid;
    grid-template-columns: minmax(86px, .38fr) minmax(0, 1fr);
    align-items: start;
    gap: 6px 12px;
    color: #23324A;
    border-bottom: 1px solid #E8EEF7;
    background: transparent;
    text-align: left;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  body.workspace-body table[data-mobile-card-table="true"] tbody td:last-child { border-bottom: 0; }
  body.workspace-body table[data-mobile-card-table="true"] tbody td::before {
    content: attr(data-label);
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
    color: #64748B;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }
  body.workspace-body table[data-mobile-card-table="true"] tbody td > * {
    min-width: 0;
    max-width: 100%;
    grid-column: 2;
  }
  body.workspace-body table[data-mobile-card-table="true"] tbody td input:not([type="checkbox"]):not([type="radio"]),
  body.workspace-body table[data-mobile-card-table="true"] tbody td select,
  body.workspace-body table[data-mobile-card-table="true"] tbody td textarea { width: 100%; min-width: 0; }
  body.workspace-body table[data-mobile-card-table="true"] .row-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    white-space: normal;
  }
  body.workspace-body table[data-mobile-card-table="true"] .row-actions .btn,
  body.workspace-body table[data-mobile-card-table="true"] .row-actions .icon-btn { flex: 0 0 auto; }
  body.workspace-body table[data-mobile-card-table="true"] .mobile-table-empty-row { padding: 0; }
  body.workspace-body table[data-mobile-card-table="true"] .mobile-table-empty-row td {
    min-height: 96px;
    padding: 28px 16px;
    display: block;
    color: #71809A;
    text-align: center;
  }
  body.workspace-body table[data-mobile-card-table="true"] .mobile-table-empty-row td::before { display: none; }
  body.workspace-body .matrix-wrap th:first-child,
  body.workspace-body .matrix-wrap td:first-child { position: static; }
  body.workspace-body #scoreMatrix tbody tr { border-left: 4px solid #2563EB; }
  body.workspace-body #scoreMatrix tbody td:first-child {
    margin-bottom: 2px;
    border-bottom-color: #CBDCF5;
  }
  body.workspace-body #scoreMatrix .score-cell { min-width: 0; }
  body.workspace-body #scoreMatrix .score-option-set {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  body.workspace-body #scoreMatrix .score-option-button { width: 100%; min-width: 0; }
  body.workspace-body #scoreMatrix .score-option-summary { grid-column: 1 / -1; }
  body.workspace-body #scoreHint {
    min-height: 0;
    padding: 12px;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: start;
    gap: 3px 9px;
  }
  body.workspace-body #scoreHint > svg { grid-column: 1; grid-row: 1 / span 3; margin-top: 1px; }
  body.workspace-body #scoreHint > strong,
  body.workspace-body #scoreHint > span,
  body.workspace-body #scoreHint > b { min-width: 0; grid-column: 2; overflow-wrap: anywhere; }
  body.workspace-body #scoreHint > span { line-height: 1.5; }
  body.workspace-body .audit-change-table { overflow-x: hidden; }
  body.workspace-body .audit-change-table table { min-width: 0; }
  body.workspace-body .evaluation-rail {
    width: 100%;
    margin: 0;
    padding: 10px 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }
  body.workspace-body .evaluation-rail button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 7px 9px;
    flex: none;
    white-space: normal;
  }
  body.workspace-body .evaluation-rail button b { min-width: 0; overflow-wrap: anywhere; }
  body.workspace-body .manual-toc {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }
  body.workspace-body .manual-toc > span { grid-column: 1 / -1; margin: 0; }
  body.workspace-body .manual-toc button { width: 100%; min-width: 0; white-space: normal; }
  body.workspace-body .profile-benchmark-heading .segmented {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
  body.workspace-body .profile-benchmark-heading .segmented button { min-width: 0; white-space: normal; }
  body.workspace-body .file-preview-tabs { flex-wrap: wrap; overflow-x: hidden; }
  body.workspace-body .assignment-row {
    grid-template-columns: 40px minmax(0, 1fr) !important;
  }
  body.workspace-body .assignment-row .assignment-main { min-width: 0; }
  body.workspace-body .assignment-row .row-actions {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  body.workspace-body .assignment-row .assignment-review-entry {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 170px;
    white-space: normal;
  }
}

@media (max-width: 380px) {
  body.workspace-body table[data-mobile-card-table="true"] tbody tr { padding-right: 10px; padding-left: 10px; }
  body.workspace-body table[data-mobile-card-table="true"] tbody td,
  body.workspace-body table[data-mobile-card-table="true"] tbody td:first-child { grid-template-columns: 78px minmax(0, 1fr); gap: 6px 9px; }
}

@media (max-width: 700px) {
  body:not(.workspace-body) .student-tabs {
    height: auto;
    min-height: 104px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow-x: hidden;
  }
  body:not(.workspace-body) .student-tabs button { min-width: 0; width: 100%; }
}


/* Quiz bank lifecycle and exam quick selection. */
.quiz-quick-select { min-width: 0; display: grid; gap: 14px; }
.quiz-quick-select-list { max-height: min(58vh, 620px); overflow: auto; display: grid; gap: 6px; padding: 1px; }
.quiz-quick-select-item { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.quiz-quick-select-item:hover { border-color: var(--blue); background: #f8fbff; }
.quiz-quick-select-item.is-disabled { cursor: not-allowed; opacity: .62; }
.quiz-quick-select-item > input { margin-top: 3px; }
.quiz-quick-select-item > span { min-width: 0; display: grid; gap: 3px; }
.quiz-quick-select-item strong { color: var(--ink); font-size: 11px; }
.quiz-quick-select-item small { color: var(--muted); font-size: 9px; }
.quiz-quick-select-item em { color: var(--ink-soft); font-size: 11px; line-height: 1.5; font-style: normal; white-space: pre-wrap; overflow-wrap: anywhere; }
.quiz-quick-select-item i { color: #52657b; font-size: 10px; line-height: 1.45; font-style: normal; overflow-wrap: anywhere; }
.quiz-quick-select-item b { color: var(--red); font-size: 10px; font-weight: 600; }
.quick-select-filter-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.quick-select-score { display: grid; grid-template-columns: minmax(0, 1fr) 160px; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .quick-select-score { grid-template-columns: 1fr; } }


/* v178：题库题目管理（列表 / 图片 / 知识点） */
.quiz-question-pager { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.quiz-question-page-size { display: inline-flex; align-items: center; gap: 6px; color: var(--muted, #5b6573); font-size: 13px; white-space: nowrap; }
.quiz-question-page-size select { width: auto; padding: 4px 8px; }
.quiz-question-content { max-width: 420px; }
.quiz-question-content small { display: block; color: var(--muted, #5b6573); margin-top: 2px; }
.quiz-question-images { display: flex; gap: 6px; flex-wrap: wrap; }
.quiz-question-images img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid #e2e8f0; }
.quiz-knowledge-tags { display: flex; gap: 4px; flex-wrap: wrap; max-width: 260px; }
.quiz-knowledge-pill { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: #e8f0fb; color: #2f5f9e; font-size: 12px; line-height: 20px; white-space: nowrap; }
.quiz-knowledge-empty { color: #98a2b3; font-size: 12px; }
.quiz-image-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.quiz-image-card { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.quiz-image-card img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid #e2e8f0; cursor: zoom-in; }
.quiz-image-card small { color: #98a2b3; font-size: 12px; }
.quiz-image-actions { display: flex; gap: 4px; }
.quiz-image-empty { color: #98a2b3; font-size: 13px; }
.quiz-option-rows { display: flex; flex-direction: column; gap: 6px; }
.quiz-option-row { display: flex; gap: 8px; align-items: center; }
.quiz-option-row span { width: 20px; color: #5b6573; font-size: 13px; text-align: center; }
.quiz-option-row input { flex: 1; }
.btn-small { padding: 4px 10px; font-size: 13px; }

/* v179：批阅页「多维度评分」紧凑化 + 并入 review-workbench.css 独有样式
   （该文件未被任何页面引用，v175 起加入的 14 个类在线上从未生效；
   此处并入其独有类并把维度打分块压缩为紧凑行高——输入框 76×32、行距 2px、
   行 min-height 归零以抵消通用 td 规则的 48px 撑高；min-width 归零以抵消全局 table 的 720px 最小宽度。） */
.assignment-dimension-block { margin-top: 10px; border: 1px solid #dbeafe; background: #f8fbff; border-radius: 10px; padding: 10px 12px; }
.assignment-dimension-block > header strong { display: inline; margin-right: 6px; font-size: 13px; color: #0f172a; }
.assignment-dimension-block > header small { color: #64748b; font-size: 11.5px; }
.assignment-dimension-table { width: 100%; min-width: 0; border-collapse: collapse; margin-top: 6px; }
.assignment-dimension-table th { padding: 2px 4px; height: auto; font-size: 12px; color: #64748b; text-align: left; font-weight: 600; }
.assignment-dimension-table th:last-child, .assignment-dimension-table td:last-child { text-align: right; }
.assignment-dimension-table td { padding: 2px 4px; height: auto; min-height: 0; }
.assignment-dimension-table .dimension-name { color: #0f172a; font-weight: 500; }
.assignment-dimension-table .dimension-max { margin-left: 6px; color: #94a3b8; font-size: 11px; }
.assignment-dimension-table input { width: 76px; height: 32px; min-height: 32px; padding: 4px 8px; font-size: 13px; text-align: right; border: 1px solid #cbd5e1; border-radius: 6px; }
.assignment-dimension-total { margin-top: 4px; padding-top: 6px; border-top: 1px dashed #cbd5e1; font-size: 12px; color: #334155; }
.assignment-dimension-switch { display: flex; gap: 8px; align-items: center; margin: 6px 0; color: #0f172a; font-size: 13.5px; font-weight: 500; }
.review-dimension-scores { margin: 8px 0; }
.review-dimension-scores table { width: 100%; min-width: 0; border-collapse: collapse; }
.review-dimension-scores th { padding: 2px 4px; font-size: 12px; color: #64748b; text-align: left; font-weight: 600; }
.review-dimension-scores th:last-child, .review-dimension-scores td:last-child { text-align: right; }
.review-dimension-scores td { padding: 3px 4px; font-size: 13px; }
.assignment-ai-batch-failures { width: min(1580px, calc(100% - 36px)); margin: 12px auto 0; padding: 12px 16px; display: grid; gap: 8px; border: 1px solid #e3c88f; border-left: 4px solid var(--amber); background: var(--amber-soft); }
.batch-ai-failures-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.batch-ai-failures-head > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.batch-ai-failures-head strong { font-size: 12px; }
.batch-ai-failures-head small { font-size: 10px; }
.batch-ai-failures-actions { display: flex; gap: 8px; }
.batch-ai-failures-list { max-height: 148px; overflow: auto; display: grid; gap: 4px; border-top: 1px dashed #e3c88f; padding-top: 8px; }
.batch-ai-failure-item { display: flex; gap: 10px; font-size: 10px; line-height: 1.6; }
.batch-ai-failure-item b { flex: 0 0 auto; min-width: 60px; }
.batch-ai-failure-item span { color: #7a5716; word-break: break-all; }
.rotation-review-attachment { margin-top: 14px; padding: 14px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.rotation-review-attachment > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rotation-review-attachment > header strong { color: var(--ink); font-size: 12px; }
.rotation-review-attachment > header small { color: var(--muted); font-size: 10px; text-align: right; }
.rotation-attachment-picker { width: max-content; max-width: 100%; overflow: hidden; }
.rotation-attachment-picker span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rotation-attachment-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (max-width: 600px) {
  .rotation-review-attachment > header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .rotation-review-attachment > header small { text-align: left; }
  .rotation-attachment-picker { width: 100%; }
}

/* v180：作业批阅页右侧（评分与评语）整体紧凑化
   1) 全列纵向节奏压紧：区块间距 14→10、卡片内边距与输入高度微调、评语框 10 行→约 6 行；
   2) 「正式评分」行内联（原竖向堆叠 71px→46px）；
   3) 宽屏(≥1440px)底部操作栏由「上一名独占整行+按钮全宽两行」还原为单行三按钮（117px→63px），
      窄屏保持原两行堆叠以防按钮挤压。 */
.assignment-grade-editor { padding: 16px; }
.assignment-ai-status { min-height: 0; margin: 10px 0 8px; padding: 8px 11px; gap: 8px; }
.assignment-ai-status small { line-height: 1.35; }
.ai-scoring-guide { margin: 10px 0; }
.ai-scoring-guide > summary { min-height: 44px; padding: 8px 12px; }
.assignment-score-field { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.assignment-score-field > label { display: flex; align-items: center; gap: 10px; }
.assignment-score-field input { min-height: 42px; font-size: 19px; flex: 0 0 170px; }
.assignment-score-field > strong { padding-bottom: 0; }
.assignment-ai-requirement-toggle { margin-top: 10px; padding: 8px 11px; }
.assignment-ai-requirement-toggle small { line-height: 1.4; }
.review-keyword-selector { margin-top: 10px; padding: 10px 12px; gap: 8px; }
.review-keyword-selector > header button { min-height: 26px; }
.review-keyword-selector > div { gap: 6px; }
.review-keyword-selector > div button { min-height: 26px; padding: 3px 9px; }
.assignment-feedback-field { margin-top: 10px; }
.assignment-feedback-field textarea { min-height: 0; height: 148px; line-height: 1.6; }
.assignment-ai-actions { margin-top: 10px; }
.assignment-ai-result { margin: 10px -16px 0; }
.assignment-grade-actions { margin: 12px -16px -16px; padding: 10px 16px; }

@media (min-width: 1440px) {
  .assignment-grade-actions { grid-template-columns: auto minmax(10px, 1fr) auto auto; }
  .assignment-grade-actions > span { display: block; }
  .assignment-grade-actions .btn { width: auto; }
  .assignment-grade-actions .btn:first-child { grid-column: auto; }
}


/* v181：班主任评分明细块（独立类名，避免与多维度评分块的选择器冲突） */
.assignment-multi-scorer-block { margin-top: 10px; border: 1px solid #dbeafe; background: #f8fbff; border-radius: 10px; padding: 10px 12px; }
.assignment-multi-scorer-block > header strong { display: inline; margin-right: 6px; font-size: 13px; color: #0f172a; }
.assignment-multi-scorer-block > header small { color: #64748b; font-size: 11.5px; }

/* v184：AI 关闭时班主任页隐藏「作业关键词」卡后，让批阅进度卡补满右侧空位（仅 >1180px 的 7 列布局需要） */
@media (min-width: 1181px) {
  .assignment-review-overview.is-keywords-hidden .assignment-review-progress { grid-column: 6 / -1; }
}

/* v188：页脚悬挂工信部 ICP 备案号（皖ICP备2026024088号，工信部通用格式） */
.login-panel footer .beian-link { color: inherit; text-decoration: none; }
.login-panel footer .beian-link:hover { color: #2563eb; text-decoration: underline; }
