:root {
  --navy: #24486c;
  --navy-2: #356d98;
  --ink: #26384e;
  --muted: #718399;
  --line: #dbe5ee;
  --paper: #f4f7fb;
  --white: #ffffff;
  --purple: #4d79b7;
  --purple-soft: #e9f1fb;
  --blue: #2f8bb8;
  --blue-soft: #e7f6fc;
  --orange: #d9873c;
  --orange-soft: #fff2e3;
  --green: #329b7b;
  --green-soft: #e8f7f1;
  --red: #d96065;
  --shadow: 0 16px 38px rgba(41, 76, 110, .10);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

body {
  background: var(--paper);
  background-image: linear-gradient(rgba(67, 126, 164, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(67, 126, 164, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
}

body::after { display: none; }
.eyebrow { color: #4c88ae; }
.button { border-radius: 9px; text-transform: none; letter-spacing: 0; }
.button-primary { background: #3f78ad; border: 1px solid #3f78ad; color: #fff; box-shadow: 0 8px 18px rgba(63, 120, 173, .20); }
.button-primary:hover { background: #326896; box-shadow: 0 10px 22px rgba(63, 120, 173, .24); }
.button-secondary { background: #fff; border-color: var(--line); color: var(--navy); }
.button-dark { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.button-dark:hover, .button-secondary:hover { background: #edf4fa; border-color: #aac4d8; color: var(--navy); }
.text-button { color: #3974a6; text-transform: none; letter-spacing: 0; }
.mini-button { border-radius: 8px; background: #fff; color: var(--navy); border-color: #cad9e5; }
.mini-button.primary { color: #fff; background: #3f78ad; border-color: #3f78ad; }
.mini-button.is-done { color: var(--green); background: var(--green-soft); border-color: #c8e9dc; }
.tag { border: 0; border-radius: 999px; text-transform: none; letter-spacing: 0; }
.tag-purple { background: var(--purple-soft); color: #4d79b7; }
.tag-blue { background: var(--blue-soft); color: #2f8bb8; }
.tag-orange { background: var(--orange-soft); color: #c77831; }
.tag-green { background: var(--green-soft); color: #2f946f; }
.toast { background: var(--navy); border: 0; border-left: 4px solid #74c4bd; border-radius: 9px; color: #fff; box-shadow: var(--shadow); font-family: inherit; }
.toast[data-kind="error"] { background: #a9444d; border-color: #f3b1ae; }

.login-screen { background: #fff; }
.login-art { background: linear-gradient(145deg, #eaf4fb 0%, #deedf7 56%, #d8f0eb 100%); border-right: 1px solid #cbdde9; color: #23415f; }
.login-art::before { color: #4b8bae; }
.login-art::after { border-color: rgba(47, 110, 165, .20); }
.login-art h1 { color: #1e4263; text-shadow: none; }
.login-art p { color: #59738a; }
.login-art .eyebrow { color: #287da3; }
.login-art-note { color: #2d8b70; }
.orb { border-color: rgba(54, 125, 167, .25); box-shadow: none; }
.orb-one { box-shadow: 0 0 0 28px rgba(54, 125, 167, .045), 0 0 0 84px rgba(54, 125, 167, .025), inset 0 0 35px rgba(54, 125, 167, .06); }
.orb-two { background: rgba(102, 190, 166, .08); border-color: rgba(54, 125, 167, .20); }
.pulse-dot, .status-dot, .warning-dot { box-shadow: 0 0 0 4px rgba(50, 155, 123, .12); }
.warning-dot { box-shadow: 0 0 0 4px rgba(217, 135, 60, .12); }
.login-panel { background: #fff; border-left: 1px solid var(--line); }
.brand-mark span, .brand-symbol { background: #3f78ad; color: #fff; border-radius: 10px; box-shadow: none; }
.brand-mark strong, .sidebar-brand strong { color: #24486c; text-transform: none; letter-spacing: .02em; }
.brand-mark small, .sidebar-brand small { color: #758aa0; text-transform: none; letter-spacing: .02em; }
.login-heading h2 { color: #24486c; font-family: inherit; text-shadow: none; }
.login-heading p { color: var(--muted); }
.stack-form label, .inline-form label, .compact-form label, .form-row label { color: #5b6f84; text-transform: none; letter-spacing: 0; }
.stack-form input, .inline-form input, .inline-form select, .inline-form textarea, .compact-form input, .compact-form select, .form-row input, .form-row select, .date-input { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: none; }
.stack-form input:focus, .inline-form input:focus, .inline-form select:focus, .inline-form textarea:focus, .compact-form input:focus, .compact-form select:focus, .form-row input:focus, .form-row select:focus { border-color: #78a9c6; box-shadow: 0 0 0 3px rgba(63, 120, 173, .12); }
.demo-box { background: #f7fafc; border-color: var(--line); border-radius: 12px; }
.demo-box::before { background: #f7fafc; color: #4c88ae; }
.demo-box > div:first-child { color: var(--ink); }
.demo-box > div:first-child span:last-child { color: #8a9aac; }
.demo-buttons button { background: #fff; border-color: #d6e1ea; color: var(--navy); border-radius: 7px; }
.demo-buttons button:hover { background: #edf5fb; color: #2e6d9c; border-color: #a9c7db; }
.privacy-note, .form-error { color: #8696a8; }

.app-shell { background: transparent; }
.sidebar { background: rgba(255, 255, 255, .96); border-right: 1px solid var(--line); box-shadow: 10px 0 28px rgba(41, 76, 110, .06); }
.sidebar::after { background: #63b6bd; box-shadow: none; }
.sidebar-brand { border-bottom-color: var(--line); }
.user-badge { background: #f7fafc; border-color: var(--line); border-radius: 11px; box-shadow: none; }
.avatar, .student-avatar { background: linear-gradient(145deg, #76b8d3, #4c79ad); color: #fff; border-radius: 10px; box-shadow: none; }
.user-badge strong { color: var(--navy); }
.user-badge small, .secure-label { color: #7c8ea2; }
.chevron { color: #6a9ab9; }
.nav-section { color: #97a5b5; font-family: inherit; letter-spacing: .12em; }
.nav-item { color: #667b91; border-radius: 9px; border-left-color: transparent; text-transform: none; letter-spacing: 0; }
.nav-item:hover { background: #f0f6fb; color: #2f6f9d; border-left-color: #8ebbd2; }
.nav-item.active { color: #2f6f9d; background: #eaf3fb; border-left-color: #4c8db8; box-shadow: none; }
.nav-icon, .nav-item.active .nav-icon { color: #5e9bbb; text-shadow: none; }
.nav-item b { background: #f1b56e; color: #fff; border-radius: 999px; }
.sidebar-footer { border-top-color: var(--line); }
.logout-button { color: #71859a; text-transform: none; letter-spacing: 0; }
.logout-button:hover { color: #3974a6; }
.topbar { background: rgba(255, 255, 255, .94); border-bottom-color: var(--line); color: #71859a; }
.topbar::after { background: linear-gradient(90deg, #4f89b4 0 25%, #7bc2b0 25% 65%, #e5ae65 65% 80%, transparent 80%); box-shadow: none; opacity: .85; }
.sync-status { color: #4f91a6; }
.page-heading::after { color: #7ca6bd; }
.page-heading h1 { color: #24486c; font-family: inherit; text-shadow: none; text-transform: none; letter-spacing: -.03em; }
.page-heading p { color: #718399; }
.quick-action { border-color: var(--line); background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(41, 76, 110, .06); }
.quick-action::after { border-color: rgba(63, 120, 173, .16); }
.quick-action:hover { border-color: #9fc2d7; background: #f8fbfd; box-shadow: 0 10px 28px rgba(41, 76, 110, .10); }
.quick-action > span { background: #e8f2fa; color: #3f78ad; border-radius: 10px; box-shadow: none; }
.quick-action strong { color: #2c4663; text-transform: none; letter-spacing: 0; }
.quick-action small { color: #7b8da0; }
.metric-card { background: #fff; border-color: var(--line); border-radius: 12px; box-shadow: 0 8px 22px rgba(41, 76, 110, .06); }
.metric-card::before { box-shadow: none; }
.metric-card strong { color: #24486c; font-family: inherit; }
.metric-card > span { color: #7b8da0; }
.metric-label { color: #60819c; text-transform: none; letter-spacing: 0; }
.metric-navy { color: #4f81b3; }
.metric-blue { color: #3d9abd; }
.metric-orange { color: #d9873c; }
.metric-purple { color: #7b71c5; }
.metric-green { color: #329b7b; }
.panel { background: #fff; border-color: var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(41, 76, 110, .07); }
.panel::before { border-color: #9dc7d9; }
.panel-header h2, .panel-header h3 { color: #2b4663; font-family: inherit; letter-spacing: 0; text-transform: none; }
.date-chip, .count-pill { background: #edf5fb; color: #4c88ae; border-color: #c9dfeb; border-radius: 999px; }
.count-pill { background: #fff2df; color: #c77a31; border-color: #f3d5ac; }
.attendance-summary div { background: #f7fafc; border-color: var(--line); border-radius: 10px; }
.attendance-summary strong { color: #2b4663; font-family: inherit; }
.attendance-summary span { color: #7b8da0; }
.section-divider { border-top-color: var(--line); }
.task-card { border-color: var(--line); background: #fbfdff; border-radius: 10px; }
.task-card:hover { border-color: #9fc2d7; background: #f7fbfd; }
.task-card.compact { border-bottom-color: var(--line); background: transparent; }
.task-card-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.task-delete-button { padding: 7px 10px; }
.task-check { border-color: #b8cfde; border-radius: 7px; }
.task-check.checked { background: #68b99b; border-color: #68b99b; color: #fff; box-shadow: none; }
.task-main h3 { color: #2c4663; font-family: inherit; letter-spacing: 0; }
.task-main p, .task-due, .task-audience { color: #7b8da0; }
.announcement-card { border-bottom-color: var(--line); }
.announcement-icon { background: #fff2df; color: #ce8339; border-color: #f3d5ac; border-radius: 9px; }
.announcement-card span, .announcement-card p { color: #7b8da0; }
.announcement-card h3 { color: #2c4663; font-family: inherit; }
.student-focus { background: #f6fafc; border-color: var(--line); border-radius: 11px; }
.focus-ring { border-color: #c8dae5; border-top-color: #4f89b4; color: #3f78ad; }
.student-focus strong { color: #2c4663; }
.student-focus span { color: #7b8da0; }
.report-card { border-bottom-color: var(--line); }
.report-icon { background: #fff2df; color: #ce8339; border-color: #f3d5ac; border-radius: 9px; }
.report-card strong { color: #2c4663; }
.report-card p, .empty-state, .filter-row, .legend, .panel-note { color: #7b8da0; }
.empty-state strong { color: #57728e; }
.empty-icon { color: #7cabc3; }
.inline-form { background: #f7fafc; border-color: var(--line); border-radius: 11px; }
.attendance-row { border-bottom-color: var(--line); }
.attendance-row.table-head { color: #7190a6; }
.attendance-row strong { color: #2c4663; }
.attendance-row select { border-color: #cbdbe6; border-radius: 8px; background: #fff; color: var(--ink); }
.attendance-row small, .event-list small { color: #7b8da0; }
.seat-number { color: #4f81b3; }
.event-list { border-top-color: var(--line); }
.student-check { border-color: var(--line); background: #fbfdff; border-radius: 9px; color: #506b85; }
.student-check:has(input:checked) { border-color: #8cb9cf; background: #edf7fb; box-shadow: none; }
.student-check input { accent-color: #4f89b4; }
.privacy-banner { background: #edf8f4; border-color: #c7e8dc; border-radius: 11px; color: #329b7b; }
.privacy-banner p { color: #6d9a8d; }
.student-card { background: #fff; border-color: var(--line); border-radius: 12px; }
.student-card:hover { border-color: #9fc2d7; }
.seat-label { color: #7b9ab0; }
.student-card h3 { color: #2c4663; font-family: inherit; }
.private-note { background: #f7fafc; border-color: var(--line); border-radius: 9px; }
.private-note span { color: #7390a3; }
.private-note p { color: #5f7488; }
.student-card-footer { color: #8798a8; }
.audit-row { border-bottom-color: var(--line); }
.audit-time { color: #7d97aa; }
.audit-action { color: #4f81b3; }
.loading-line { color: #7b8da0; }
.profile-list div { background: #f7fafc; border-color: var(--line); border-radius: 9px; }
.profile-list span { color: #7b8da0; }
.profile-list strong { color: #2c4663; }
.profile-form { display: grid; gap: 18px; }
.profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-form label { display: grid; gap: 7px; color: #5b6f84; font-size: 12px; font-weight: 800; }
.profile-form input { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 11px 12px; color: var(--ink); font-size: 13px; font-weight: 500; box-sizing: border-box; }
.profile-form input:focus { outline: none; border-color: #78a9c6; box-shadow: 0 0 0 3px rgba(63, 120, 173, .12); }
.backup-list { display: grid; gap: 0; margin-top: 14px; border: 1px solid #cfe0ea; border-radius: 8px; overflow: hidden; }
.backup-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #e1ebf1; background: #fbfdff; }
.backup-row:last-child { border-bottom: 0; }
.backup-row time { color: #4d7089; font: 800 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.backup-row small { min-width: 0; overflow: hidden; color: #7890a2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.backup-row .button { min-height: 34px; padding: 7px 10px; font-size: 11px; white-space: nowrap; }
@media (max-width: 760px) { .backup-row { grid-template-columns: 1fr auto; gap: 8px; } .backup-row small { grid-column: 1 / -1; grid-row: 2; } .backup-row .button { min-width: 74px; } }
.settings-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.settings-save-bar span { color: #7b8da0; font-size: 11px; line-height: 1.6; }
.settings-save-bar button:disabled { cursor: wait; opacity: .65; }
.setting-action { background: #f7fafc; border-color: var(--line); border-radius: 10px; color: #506b85; }
.setting-action:hover { border-color: #9fc2d7; background: #eef6fb; }
.setting-action > span { color: #4f89b4; }
.setting-action strong { color: #2c4663; }
.setting-action small { color: #7b8da0; }
.account-policy div { border-bottom-color: var(--line); }
.account-policy b { color: #4f81b3; }
.account-policy span { color: #7b8da0; }
.import-details { margin: 18px 0 22px; border: 1px solid var(--line); background: rgba(255, 255, 255, .92); box-shadow: 0 10px 24px rgba(41, 76, 110, .06); }
.import-details summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; padding: 15px 17px; color: #2f6f9d; }
.import-details summary::-webkit-details-marker { display: none; }
.import-details summary > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 3px; background: #e6f2f8; color: #3f78ad; font-size: 18px; }
.import-details summary strong { font-size: 14px; }
.import-details summary small { margin-left: auto; color: #8295a7; font-size: 11px; font-weight: 500; }
.import-body { display: grid; gap: 14px; border-top: 1px solid var(--line); padding: 16px 17px 18px; }
.import-body form { display: grid; gap: 14px; }
.import-file-label { display: grid; gap: 8px; color: #5b6f84; font-size: 12px; font-weight: 800; }
.import-file-label input { width: 100%; box-sizing: border-box; padding: 10px; border: 1px dashed #a9c4d6; border-radius: 4px; background: #f8fbfd; color: #526f86; font: inherit; }
.import-preview { display: grid; gap: 11px; overflow: hidden; border: 1px solid #cfe0ea; background: #fbfdff; padding: 12px; }
.import-preview-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 12px; }
.import-preview-summary strong { color: #2c4663; font-size: 13px; overflow-wrap: anywhere; }
.import-preview-summary span, .import-hint { color: #7b8da0; font-size: 11px; }
.import-field-list { display: flex; flex-wrap: wrap; gap: 5px; }
.import-field-list span { padding: 4px 7px; border: 1px solid #cce2e8; border-radius: 3px; background: #eff8fa; color: #398293; font-size: 10px; }
.import-table-wrap { max-width: 100%; overflow-x: auto; }
.import-table { width: 100%; min-width: 510px; border-collapse: collapse; color: #4f687f; font-size: 11px; }
.import-table th, .import-table td { padding: 7px 8px; border-bottom: 1px solid #e5edf2; text-align: left; white-space: nowrap; }
.import-table th { background: #edf5fb; color: #4f81b3; font-size: 10px; }
.import-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.import-actions button:disabled { cursor: not-allowed; opacity: .45; }
.import-empty { border: 1px dashed #d4e2eb; padding: 12px; color: #8295a7; font-size: 12px; line-height: 1.7; }
.student-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0; color: #6e879a; font-size: 11px; }
.student-facts span { padding: 4px 6px; border: 1px solid #dbe8ef; border-radius: 3px; background: #f7fafc; }
.student-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 10px; color: #2c4663; }
.student-list-toolbar span { color: #7b8da0; font-size: 11px; }
.student-list { display: grid; gap: 10px; }
.student-edit-form { display: grid; gap: 12px; border: 1px solid var(--line); border-left: 3px solid #b9d5e3; border-radius: 4px; background: #fff; padding: 14px; box-shadow: 0 8px 20px rgba(41, 76, 110, .045); }
.student-edit-form:focus-within { border-left-color: var(--hud-cyan); box-shadow: 0 10px 24px rgba(41, 76, 110, .08); }
.student-edit-heading { display: flex; align-items: center; gap: 12px; }
.student-edit-identity { display: flex; align-items: center; gap: 9px; min-width: 170px; }
.student-edit-identity strong { display: block; color: #2c4663; font-size: 14px; }
.student-edit-identity small { display: block; margin-top: 3px; color: #7b8da0; font-size: 11px; }
.student-account-note { display: flex; align-items: baseline; gap: 7px; margin-left: auto; color: #6f8798; font-size: 11px; }
.student-account-note strong { color: #4f81b3; }
.student-account-note small { color: #8799a8; }
.student-edit-form label { display: grid; gap: 5px; color: #71859a; font-size: 10px; font-weight: 800; }
.student-edit-form input, .student-edit-form textarea { width: 100%; box-sizing: border-box; border: 1px solid #d5e2ea; border-radius: 3px; background: #fbfdff; color: var(--ink); padding: 8px 9px; font: 500 12px/1.4 inherit; }
.student-edit-form textarea { resize: vertical; min-height: 42px; }
.student-edit-form input:focus, .student-edit-form textarea:focus { outline: none; border-color: #78a9c6; box-shadow: 0 0 0 3px rgba(63, 120, 173, .12); background: #fff; }
.student-edit-primary { display: grid; grid-template-columns: .8fr .7fr 1.2fr 1.2fr .8fr; gap: 9px; }
.student-edit-secondary { display: grid; grid-template-columns: 1.2fr 1fr .7fr 1fr 1.25fr 1fr; gap: 9px; }
.student-note-field { max-width: 700px; }
.student-save-button { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }

@media (max-width: 760px) {
  .login-art { min-height: 260px; }
  .sidebar { position: fixed; z-index: 10; left: 0; top: 0; bottom: 0; width: min(82vw, 280px); transform: translateX(-105%); transition: .25s; background: #fff; box-shadow: var(--shadow); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-area { width: 100%; min-width: 0; }
  .topbar { padding: 0 16px; }
  .mobile-brand, .icon-button { color: #3f78ad; }
  .page-content { overflow-x: hidden; }
  .page-heading h1 { font-size: 26px; line-height: 1.3; }
  .page-heading p { line-height: 1.7; }
  .quick-action, .panel, .metric-card { min-width: 0; }
  .task-card { align-items: flex-start; }
  .task-card .mini-button { margin-left: auto; }
  .task-card-actions .mini-button { margin-left: 0; }
  .report-card { gap: 10px; }
  .report-actions { padding-left: 0; }
  .audit-row { overflow-wrap: anywhere; }
  .topbar-actions { gap: 10px; }
  .sync-status { max-width: 125px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Tactical HUD skin: Gundam-inspired navy, cobalt, cyan and warning amber. */
:root {
  --navy: #071321;
  --navy-2: #0c2034;
  --ink: #dceaf8;
  --muted: #86a4bc;
  --line: #234764;
  --paper: #040b14;
  --white: #0a1828;
  --purple: #7893ff;
  --purple-soft: #142653;
  --blue: #35d9ff;
  --blue-soft: #0d3049;
  --orange: #f0bf45;
  --orange-soft: #3c2e0d;
  --green: #39dfaa;
  --green-soft: #0b382d;
  --red: #ff5964;
  --hud-cyan: #35d9ff;
  --shadow: 0 18px 42px rgba(0, 0, 0, .38);
  color-scheme: dark;
}

html, body {
  background: var(--paper);
  color: var(--ink);
}

body {
  background-image: linear-gradient(rgba(53, 217, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(53, 217, 255, .055) 1px, transparent 1px), radial-gradient(circle at 80% 0%, rgba(29, 89, 139, .24), transparent 34rem);
  background-size: 32px 32px, 32px 32px, auto;
}

.login-screen, .login-panel, .app-shell, .main-area {
  background: var(--paper);
  color: var(--ink);
}

.login-art {
  background: radial-gradient(circle at 75% 24%, rgba(42, 157, 207, .28), transparent 16rem), linear-gradient(145deg, #07182a 0%, #0b2942 55%, #071321 100%);
  border-right-color: #245778;
  color: #dceaf8;
}

.login-art::before { color: #5cddff; }
.login-art::after { border-color: rgba(53, 217, 255, .22); }
.login-art h1, .login-heading h2, .page-heading h1 { color: #f2f8ff; text-shadow: 0 0 22px rgba(53, 217, 255, .12); }
.login-art p, .login-heading p, .page-heading p { color: #8aa9c4; }
.login-art .eyebrow, .eyebrow { color: #5cddff; }
.login-art-note { color: #f0c44f; }
.orb { border-color: rgba(53, 217, 255, .28); box-shadow: 0 0 30px rgba(53, 217, 255, .08); }
.orb-one { box-shadow: 0 0 0 28px rgba(53, 217, 255, .05), 0 0 0 84px rgba(53, 217, 255, .025), inset 0 0 35px rgba(53, 217, 255, .08); }
.orb-two { background: rgba(240, 191, 69, .07); border-color: rgba(240, 191, 69, .24); }
.pulse-dot, .status-dot { box-shadow: 0 0 0 4px rgba(57, 223, 170, .13), 0 0 16px rgba(57, 223, 170, .55); }
.warning-dot { box-shadow: 0 0 0 4px rgba(240, 191, 69, .13), 0 0 14px rgba(240, 191, 69, .45); }
.login-panel { border-left-color: #234764; }
.brand-mark span, .brand-symbol { background: linear-gradient(145deg, #188bb7, #164e83); color: #fff; border-radius: 4px; box-shadow: 0 0 18px rgba(53, 217, 255, .18); }
.brand-mark strong, .sidebar-brand strong { color: #e4f2ff; text-transform: uppercase; letter-spacing: .08em; }
.brand-mark small, .sidebar-brand small, .user-badge small, .secure-label { color: #7897b0; }
.login-heading h2 { font-family: inherit; }
.stack-form label, .inline-form label, .compact-form label, .form-row label { color: #91abc0; text-transform: uppercase; letter-spacing: .08em; }
.stack-form input, .inline-form input, .inline-form select, .inline-form textarea, .compact-form input, .compact-form select, .form-row input, .form-row select, .date-input, .profile-form input {
  background: #071522;
  border-color: #2a5b7a;
  color: #e1f3ff;
  box-shadow: inset 0 0 0 1px rgba(53, 217, 255, .035);
}
.stack-form input:focus, .inline-form input:focus, .inline-form select:focus, .inline-form textarea:focus, .compact-form input:focus, .compact-form select:focus, .form-row input:focus, .form-row select:focus, .profile-form input:focus { border-color: #35d9ff; box-shadow: 0 0 0 3px rgba(53, 217, 255, .12); }
.demo-box, .import-details, .import-preview { background: #071522; border-color: #234764; }
.demo-box::before { background: #071522; color: #5cddff; }
.demo-box > div:first-child { color: #dceaf8; }
.demo-box > div:first-child span:last-child, .privacy-note, .form-error { color: #7f9bb5; }
.demo-buttons button, .button-secondary, .mini-button { background: #0b1a2b; border-color: #2c5c7e; color: #c7e7fa; }
.demo-buttons button:hover, .button-secondary:hover, .mini-button:hover { background: #10324b; border-color: #35d9ff; color: #fff; }
.button-primary, .button-dark, .mini-button.primary { background: linear-gradient(135deg, #147ba6, #0b4f78); border-color: #35d9ff; color: #fff; box-shadow: 0 0 16px rgba(53, 217, 255, .13); }
.button-primary:hover, .button-dark:hover, .mini-button.primary:hover { background: linear-gradient(135deg, #1b9bc6, #12618f); }

.sidebar { background: rgba(7, 19, 33, .97); border-right-color: #1c405c; box-shadow: 10px 0 30px rgba(0, 0, 0, .28); }
.sidebar::after { background: linear-gradient(#35d9ff 0 42%, #f0bf45 42% 58%, #ff5964 58%); box-shadow: 0 0 12px rgba(53, 217, 255, .35); }
.sidebar-brand { border-bottom-color: #1e405c; }
.user-badge, .quick-action, .metric-card, .panel, .student-card, .inline-form, .setting-action, .task-card {
  background: #0a1a2b;
  border-color: #234764;
  color: #dceaf8;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
}
.avatar, .student-avatar { background: linear-gradient(145deg, #158db7, #174d83); color: #fff; box-shadow: 0 0 14px rgba(53, 217, 255, .16); }
.user-badge strong, .quick-action strong, .metric-card strong, .panel-header h2, .panel-header h3, .task-main h3, .student-card h3, .profile-list strong, .setting-action strong { color: #e4eff8; }
.nav-section, .student-list-toolbar span, .task-main p, .task-due, .task-audience, .announcement-card span, .announcement-card p, .report-card p, .empty-state, .filter-row, .legend, .panel-note, .loading-line { color: #7897b0; }
.nav-item { color: #86a2ba; border-radius: 3px; }
.nav-item:hover, .nav-item.active { background: linear-gradient(90deg, #0e324b, #0a1a2b); color: #53d9ff; border-left-color: #35d9ff; }
.nav-item.active::after { background: #35d9ff; box-shadow: 0 0 9px #35d9ff; }
.nav-icon, .nav-item.active .nav-icon { color: #4fbad8; }
.topbar { background: rgba(4, 14, 25, .94); border-bottom-color: #234764; color: #92b1c9; }
.topbar::before { content: "TACTICAL DATA BUS // ONLINE"; color: #6687a1; }
.topbar::after { background: linear-gradient(90deg, #35d9ff 0 28%, #2b79b4 28% 68%, #f0bf45 68% 82%, #ff5964 82%); box-shadow: 0 0 10px rgba(53, 217, 255, .2); }
.sync-status { color: #53dfb0; }
.page-heading::after { color: #7098b2; }
.quick-action:hover, .task-card:hover, .student-card:hover, .setting-action:hover { border-color: #35d9ff; background: #0c2237; }
.quick-action > span { background: #0d3049; color: #5cddff; border-color: #286488; }
.metric-card::before { background: #35d9ff; box-shadow: 0 0 12px rgba(53, 217, 255, .5); }
.metric-label { color: #68b8d4; }
.metric-navy, .metric-blue { color: #54d8ff; }
.metric-orange { color: #f0bf45; }
.metric-purple { color: #91a5ff; }
.metric-green { color: #43e0af; }
.panel::before { border-color: #3a83a7; }
.panel-header { border-bottom-color: #21435e; }
.date-chip, .count-pill { background: #0d3049; color: #6adfff; border-color: #2c698d; }
.count-pill { background: #3a2b0d; color: #f5cf67; border-color: #78602b; }
.attendance-summary div, .profile-list div, .student-focus, .private-note { background: #071522; border-color: #234764; }
.attendance-summary strong, .student-focus strong, .student-card h3, .student-card-footer { color: #dceaf8; }
.attendance-summary span, .student-focus span, .profile-list span, .student-card-footer { color: #7897b0; }
.section-divider, .announcement-card, .report-card, .audit-row, .event-list { border-color: #1e405c; }
.task-card.compact { background: transparent; border-bottom-color: #1e405c; }
.task-check { border-color: #2d6686; background: #071522; }
.task-check.checked { background: #159b77; border-color: #39dfaa; }
.announcement-icon, .report-icon { background: #3a2b0d; color: #f0bf45; border-color: #78602b; }
.focus-ring { border-color: #2d6686; border-top-color: #35d9ff; color: #5cddff; }
.student-check { border-color: #234764; background: #071522; color: #a4bed1; }
.student-check:has(input:checked) { border-color: #2c8497; background: #0b302f; box-shadow: inset 0 0 0 1px rgba(57, 223, 170, .2); }
.student-check input { accent-color: #35d9ff; }
.privacy-banner { background: #0b302a; border-color: #1d6a58; color: #53e2b0; }
.privacy-banner p { color: #87cbb7; }
.private-note span { color: #70a6ba; }
.private-note p { color: #abc4d3; }
.import-details summary { color: #5cddff; }
.import-details summary > span { background: #0d3049; color: #5cddff; }
.import-details summary small, .import-preview-summary span, .import-hint, .import-empty { color: #7897b0; }
.import-body, .import-table th, .import-table td { border-color: #1e405c; }
.import-file-label { color: #91abc0; }
.import-file-label input { background: #071522; border-color: #2a5b7a; color: #abc4d3; }
.import-table { color: #b5cbd9; }
.import-table th { background: #0c2a42; color: #6adfff; }
.import-table td { border-bottom-color: #1e405c; }
.import-field-list span { background: #0d3049; color: #78dfff; border-color: #286488; }
.student-list-toolbar { color: #e4eff8; }
.toast { background: #0b2337; border-color: #35d9ff; color: #e5f6ff; box-shadow: var(--shadow); }
.toast[data-kind="error"] { background: #401d2a; border-color: #ff5964; }

/* Excel-like student data grid. The desktop width is intentionally wide; phones scroll horizontally. */
.student-sheet-wrap { overflow-x: auto; border: 1px solid #234764; background: #071321; box-shadow: 0 16px 34px rgba(0, 0, 0, .24); -webkit-overflow-scrolling: touch; }
.student-sheet-header, .student-sheet-row { display: grid; grid-template-columns: .55fr 1.25fr .9fr 1.25fr .7fr 1fr .7fr; min-width: 960px; }
.student-sheet-header { position: sticky; top: 0; z-index: 2; padding: 0 12px; background: #0c2a42; border-bottom: 1px solid #2c698d; color: #74dbff; font: 800 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.student-sheet-header span { padding: 11px 8px; }
.student-list { display: block; }
.student-edit-form { display: block; min-width: 960px; border: 0; border-bottom: 1px solid #1d3d58; border-left: 3px solid transparent; border-radius: 0; background: #071522; padding: 0 12px; box-shadow: none; }
.student-edit-form:hover, .student-edit-form:focus-within { background: #0a2033; border-left-color: #35d9ff; box-shadow: none; }
.student-sheet-row { align-items: stretch; gap: 0; }
.student-sheet-row .sheet-cell { display: flex; flex-direction: column; justify-content: center; gap: 0; padding: 8px; border-right: 1px solid #173a56; }
.student-sheet-row .sheet-cell > span { display: none; }
.student-sheet-row input { min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 7px 2px; color: #dceaf8; }
.student-sheet-row input:focus { background: #0c2a42; border-color: #35d9ff; box-shadow: inset 0 0 0 1px #35d9ff; }
.student-sheet-row .student-save-button { align-self: center; min-width: 64px; margin: 8px; }
.student-sheet-detail { border-top: 1px dashed #21435e; padding: 10px 8px 12px; }
.student-account-note { justify-content: flex-start; margin: 0 0 9px; color: #7fa6be; }
.student-account-note strong { color: #5cddff; }
.student-account-note small { color: #879fb3; }
.student-edit-secondary { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 8px; }
.student-edit-secondary .sheet-cell { display: grid; gap: 4px; }
.student-edit-secondary .sheet-cell > span, .student-note-field > span { display: block; color: #6e9ab6; font-size: 10px; }
.student-edit-form input, .student-edit-form textarea { background: #0a1b2a; border-color: #244c68; color: #dceaf8; }
.student-edit-form input:focus, .student-edit-form textarea:focus { border-color: #35d9ff; box-shadow: 0 0 0 3px rgba(53, 217, 255, .12); background: #0d263b; }
.student-note-field { color: #6e9ab6; }

@media (max-width: 760px) {
  .student-sheet-wrap { margin-inline: -2px; }
  .student-sheet-header, .student-sheet-row, .student-edit-form { min-width: 900px; }
  .student-sheet-header { position: sticky; top: 0; }
  .student-edit-detail { min-width: 900px; }
}

/* Light HUD command interface layer */
:root {
  --hud-blue: #3d83b4;
  --hud-cyan: #4ba9b0;
  --hud-amber: #d69a4b;
  --hud-grid: rgba(61, 131, 180, .075);
}

body {
  background-color: #f1f6fa;
  background-image:
    linear-gradient(var(--hud-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hud-grid) 1px, transparent 1px),
    radial-gradient(circle at 88% 2%, rgba(83, 177, 182, .13), transparent 28%),
    radial-gradient(circle at 8% 92%, rgba(73, 132, 190, .09), transparent 30%);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.login-art {
  background-image:
    linear-gradient(rgba(61, 131, 180, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 131, 180, .08) 1px, transparent 1px),
    linear-gradient(145deg, #eaf4fb 0%, #deedf7 56%, #d8f0eb 100%);
  background-size: 30px 30px, 30px 30px, auto;
}

.login-art::after {
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, .16), 0 0 0 1px rgba(61, 131, 180, .05);
}

.login-panel {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.login-panel::before {
  content: "SECURE ACCESS // 01";
  position: absolute;
  top: 24px;
  right: 30px;
  color: #8eafc1;
  font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .14em;
}

.brand-mark span, .brand-symbol {
  border-radius: 3px;
  background: linear-gradient(145deg, #4a88b8, #316b9c);
  box-shadow: 0 0 0 3px rgba(75, 169, 176, .10);
}

.brand-mark strong, .sidebar-brand strong {
  letter-spacing: .06em;
}

.login-heading h2, .page-heading h1, .panel-header h2, .panel-header h3 {
  letter-spacing: -.02em;
}

.stack-form input, .inline-form input, .inline-form select, .inline-form textarea, .compact-form input, .compact-form select, .form-row input, .form-row select, .date-input {
  border-radius: 3px;
  background: rgba(255, 255, 255, .88);
}

.button-primary, .button-dark, .mini-button.primary {
  border-radius: 3px;
  background: linear-gradient(135deg, #4383b4, #326e9e);
}

.demo-box, .user-badge, .quick-action, .metric-card, .panel, .task-card, .student-card, .inline-form, .setting-action {
  border-radius: 4px;
}

.app-shell {
  background-image: linear-gradient(90deg, rgba(61, 131, 180, .018) 1px, transparent 1px);
  background-size: 42px 42px;
}

.sidebar {
  background-image: linear-gradient(rgba(61, 131, 180, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(61, 131, 180, .025) 1px, transparent 1px);
  background-size: 22px 22px;
}

.sidebar::after {
  width: 3px;
  height: 112px;
  background: linear-gradient(#4ba9b0 0 42%, #d69a4b 42% 58%, #4f89b4 58%);
}

.sidebar-brand {
  position: relative;
  padding-bottom: 26px;
}

.sidebar-brand::after {
  content: "CMD // CLASSROOM LINK";
  position: absolute;
  right: 0;
  bottom: 8px;
  color: #9ab1c0;
  font: 800 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .08em;
}

.nav-section {
  font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .18em;
}

.nav-item {
  border-radius: 3px;
  position: relative;
}

.nav-item.active {
  background: linear-gradient(90deg, #e7f3fa, #f7fbfd);
  box-shadow: inset 0 0 0 1px rgba(79, 137, 180, .10);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hud-cyan);
  box-shadow: 0 0 0 3px rgba(75, 169, 176, .12);
}

.topbar {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, .84);
}

.topbar::before {
  content: "TACTICAL DATA BUS // ONLINE";
  position: absolute;
  left: 24px;
  top: 7px;
  color: #9ab1c0;
  font: 800 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .12em;
}

.topbar::after {
  height: 3px;
  background: linear-gradient(90deg, #4f89b4 0 18%, transparent 18% 19%, #7bc2b0 19% 56%, transparent 56% 58%, #e5ae65 58% 67%, transparent 67% 100%);
}

.sync-status {
  font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .08em;
}

.page-heading {
  border-bottom: 1px solid rgba(113, 144, 166, .22);
  padding-bottom: 18px;
}

.page-heading::before {
  content: "COMMAND MODULE // 01";
  display: block;
  margin-bottom: 8px;
  color: #8aaaba;
  font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .14em;
}

.page-heading::after {
  color: #4ba9b0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.quick-action, .metric-card, .panel {
  box-shadow: 0 12px 26px rgba(41, 76, 110, .065), inset 0 0 0 1px rgba(255, 255, 255, .65);
}

.quick-action::before, .metric-card::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: 9px;
  right: 10px;
  border-top: 1px solid rgba(75, 169, 176, .42);
  border-right: 1px solid rgba(75, 169, 176, .42);
}

.quick-action > span {
  border-radius: 3px;
  background: linear-gradient(145deg, #e4f3f7, #eaf0fa);
  box-shadow: inset 0 0 0 1px rgba(75, 169, 176, .15);
}

.metric-card {
  overflow: hidden;
}

.metric-card::before {
  height: 2px;
}

.panel {
  overflow: hidden;
}

.panel::before {
  width: 28px;
  height: 28px;
  border-top-width: 2px;
  border-left-width: 2px;
}

.panel-header {
  border-bottom: 1px solid rgba(113, 144, 166, .15);
  padding-bottom: 12px;
}

.date-chip, .count-pill {
  border-radius: 3px;
  font: 800 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.task-card, .student-card, .setting-action {
  position: relative;
  border-left: 3px solid #b9d5e3;
}

.task-card:hover, .student-card:hover, .setting-action:hover {
  border-left-color: var(--hud-cyan);
}

.task-check, .student-avatar, .announcement-icon, .report-icon {
  border-radius: 3px;
}

.text-button {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

@media (max-width: 760px) {
  .login-panel::before { top: 15px; right: 22px; font-size: 8px; }
  .topbar::before { left: 16px; top: 5px; font-size: 7px; }
  .topbar-actions { padding-top: 7px; }
  .page-heading { padding-bottom: 14px; }
  .page-heading::before { font-size: 8px; }
  .page-heading::after { margin-top: 8px; }
  .panel-header { gap: 8px; }
  .profile-fields { grid-template-columns: 1fr; }
  .settings-save-bar { align-items: stretch; flex-direction: column; }
  .settings-save-bar .button { width: 100%; justify-content: center; }
  .import-details summary { align-items: flex-start; }
  .import-details summary small { width: 100%; margin: 2px 0 0 34px; }
  .import-body { padding: 14px 12px 15px; }
  .import-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .import-actions .button { justify-content: center; padding-inline: 8px; }
  .student-list-toolbar { align-items: flex-start; flex-direction: column; }
  .student-edit-heading { align-items: stretch; flex-wrap: wrap; }
  .student-edit-identity { min-width: 0; flex: 1 1 180px; }
  .student-account-note { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .student-save-button { width: 100%; margin-left: 0; justify-content: center; }
  .student-edit-primary, .student-edit-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-edit-primary label:nth-child(3), .student-edit-secondary label:first-child, .student-edit-secondary label:nth-child(5), .student-note-field { grid-column: 1 / -1; }
}

/* Final theme lock: this block intentionally comes after the legacy light HUD layer. */
html, body { background: #040b14; color: #dceaf8; }
body {
  background-color: #040b14;
  background-image: linear-gradient(rgba(53, 217, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(53, 217, 255, .055) 1px, transparent 1px), radial-gradient(circle at 80% 0%, rgba(29, 89, 139, .24), transparent 34rem);
  background-size: 32px 32px, 32px 32px, auto;
}
.login-screen, .login-panel, .app-shell, .main-area { background: #040b14; color: #dceaf8; }
.login-art {
  background-image: radial-gradient(circle at 75% 24%, rgba(42, 157, 207, .28), transparent 16rem), linear-gradient(145deg, #07182a 0%, #0b2942 55%, #071321 100%);
  background-size: auto;
  border-right-color: #245778;
}
.login-art h1, .login-heading h2, .page-heading h1 { color: #f2f8ff; }
.login-art p, .login-heading p, .page-heading p { color: #8aa9c4; }
.login-art .eyebrow, .eyebrow { color: #5cddff; }
.login-art-note { color: #f0c44f; }
.login-panel { background: #071321; border-left-color: #234764; }
.brand-mark span, .brand-symbol, .avatar, .student-avatar { background: linear-gradient(145deg, #188bb7, #164e83); color: #fff; }
.brand-mark strong, .sidebar-brand strong, .user-badge strong { color: #e4f2ff; }
.brand-mark small, .sidebar-brand small, .user-badge small, .secure-label { color: #7897b0; }
.stack-form label, .inline-form label, .compact-form label, .form-row label { color: #91abc0; }
.stack-form input, .inline-form input, .inline-form select, .inline-form textarea, .compact-form input, .compact-form select, .form-row input, .form-row select, .date-input, .profile-form input { background: #071522; border-color: #2a5b7a; color: #e1f3ff; }
.stack-form input:focus, .inline-form input:focus, .inline-form select:focus, .inline-form textarea:focus, .compact-form input:focus, .compact-form select:focus, .form-row input:focus, .form-row select:focus, .profile-form input:focus { border-color: #35d9ff; box-shadow: 0 0 0 3px rgba(53, 217, 255, .12); }
.demo-box, .import-details, .import-preview { background: #071522; border-color: #234764; }
.demo-box::before { background: #071522; color: #5cddff; }
.demo-box > div:first-child { color: #dceaf8; }
.demo-box > div:first-child span:last-child, .privacy-note, .form-error { color: #7f9bb5; }
.demo-buttons button, .button-secondary, .mini-button { background: #0b1a2b; border-color: #2c5c7e; color: #c7e7fa; }
.button-primary, .button-dark, .mini-button.primary { background: linear-gradient(135deg, #147ba6, #0b4f78); border-color: #35d9ff; color: #fff; }
.sidebar { background: rgba(7, 19, 33, .97); background-image: linear-gradient(rgba(53, 217, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(53, 217, 255, .025) 1px, transparent 1px); border-right-color: #1c405c; }
.sidebar::after { background: linear-gradient(#35d9ff 0 42%, #f0bf45 42% 58%, #ff5964 58%); }
.user-badge, .quick-action, .metric-card, .panel, .student-card, .inline-form, .setting-action, .task-card { background: #0a1a2b; border-color: #234764; color: #dceaf8; box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
.nav-item { color: #86a2ba; }
.nav-item:hover, .nav-item.active { background: linear-gradient(90deg, #0e324b, #0a1a2b); color: #53d9ff; border-left-color: #35d9ff; }
.nav-item.active::after { background: #35d9ff; box-shadow: 0 0 9px #35d9ff; }
.nav-icon, .nav-item.active .nav-icon { color: #4fbad8; }
.topbar { background: rgba(4, 14, 25, .94); border-bottom-color: #234764; color: #92b1c9; }
.topbar::after { background: linear-gradient(90deg, #35d9ff 0 28%, #2b79b4 28% 68%, #f0bf45 68% 82%, #ff5964 82%); }
.sync-status { color: #53dfb0; }
.page-heading::after { color: #7098b2; }
.page-heading h1, .panel-header h2, .panel-header h3, .task-main h3, .student-card h3, .metric-card strong, .profile-list strong, .setting-action strong { color: #e4eff8; }
.quick-action > span { background: #0d3049; color: #5cddff; }
.metric-label { color: #68b8d4; }
.metric-navy, .metric-blue { color: #54d8ff; }
.metric-orange { color: #f0bf45; }
.metric-purple { color: #91a5ff; }
.metric-green { color: #43e0af; }
.panel::before { border-color: #3a83a7; }
.panel-header { border-bottom-color: #21435e; }
.date-chip, .count-pill { background: #0d3049; color: #6adfff; border-color: #2c698d; }
.count-pill { background: #3a2b0d; color: #f5cf67; border-color: #78602b; }
.attendance-summary div, .profile-list div, .student-focus, .private-note { background: #071522; border-color: #234764; }
.attendance-summary strong, .student-focus strong { color: #dceaf8; }
.attendance-summary span, .student-focus span, .profile-list span, .student-card-footer, .task-main p, .task-due, .task-audience, .announcement-card span, .announcement-card p, .report-card p, .empty-state, .filter-row, .legend, .panel-note, .loading-line { color: #7897b0; }
.section-divider, .announcement-card, .report-card, .audit-row, .event-list { border-color: #1e405c; }
.task-check { border-color: #2d6686; background: #071522; }
.task-check.checked { background: #159b77; border-color: #39dfaa; }
.announcement-icon, .report-icon { background: #3a2b0d; color: #f0bf45; border-color: #78602b; }
.focus-ring { border-color: #2d6686; border-top-color: #35d9ff; color: #5cddff; }
.student-check { border-color: #234764; background: #071522; color: #a4bed1; }
.student-check:has(input:checked) { border-color: #2c8497; background: #0b302f; }
.student-check input { accent-color: #35d9ff; }
.privacy-banner { background: #0b302a; border-color: #1d6a58; color: #53e2b0; }
.privacy-banner p { color: #87cbb7; }
.student-list-toolbar { color: #e4eff8; }
.toast { background: #0b2337; border-color: #35d9ff; color: #e5f6ff; }
.toast[data-kind="error"] { background: #401d2a; border-color: #ff5964; }

/* Final light command-deck layer. Keep the technical grid while restoring a light workspace. */
:root {
  --navy: #193b5b;
  --navy-2: #2f6f9d;
  --ink: #25445f;
  --muted: #6f8498;
  --line: #d2e1eb;
  --paper: #f4f8fb;
  --white: #ffffff;
  --purple: #397bb2;
  --purple-soft: #e8f2fa;
  --blue: #2e9cc4;
  --blue-soft: #e4f5fa;
  --orange: #d58a36;
  --orange-soft: #fff2df;
  --green: #2b9a7a;
  --green-soft: #e7f7f1;
  --red: #c9535b;
  --hud-cyan: #4ba9b0;
  --shadow: 0 14px 34px rgba(41, 76, 110, .10);
  color-scheme: light;
}
html, body { background: #f4f8fb; color: #25445f; }
body {
  background-color: #f4f8fb;
  background-image: linear-gradient(rgba(61, 131, 180, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(61, 131, 180, .07) 1px, transparent 1px), radial-gradient(circle at 88% 2%, rgba(83, 177, 182, .13), transparent 28%), radial-gradient(circle at 8% 92%, rgba(73, 132, 190, .09), transparent 30%);
  background-size: 28px 28px, 28px 28px, auto, auto;
}
.login-screen, .login-panel, .app-shell, .main-area { background: #f4f8fb; color: #25445f; }
.login-art { background-image: linear-gradient(rgba(61, 131, 180, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(61, 131, 180, .08) 1px, transparent 1px), linear-gradient(145deg, #eaf4fb 0%, #deedf7 56%, #d8f0eb 100%); background-size: 30px 30px, 30px 30px, auto; border-right-color: #cbdde9; color: #23415f; }
.login-art h1, .login-heading h2, .page-heading h1 { color: #1e4263; text-shadow: none; }
.login-art p, .login-heading p, .page-heading p { color: #59738a; }
.login-art .eyebrow, .eyebrow { color: #287da3; }
.login-art-note { color: #2d8b70; }
.login-panel { background: #fff; border-left-color: #d2e1eb; }
.brand-mark span, .brand-symbol, .avatar, .student-avatar { background: linear-gradient(145deg, #76b8d3, #4c79ad); color: #fff; box-shadow: none; }
.brand-mark strong, .sidebar-brand strong, .user-badge strong { color: #24486c; }
.brand-mark small, .sidebar-brand small, .user-badge small, .secure-label { color: #758aa0; }
.stack-form label, .inline-form label, .compact-form label, .form-row label { color: #5b6f84; }
.stack-form input, .inline-form input, .inline-form select, .inline-form textarea, .compact-form input, .compact-form select, .form-row input, .form-row select, .date-input, .profile-form input { background: #fff; border-color: #d2e1eb; color: #25445f; }
.stack-form input:focus, .inline-form input:focus, .inline-form select:focus, .inline-form textarea:focus, .compact-form input:focus, .compact-form select:focus, .form-row input:focus, .form-row select:focus, .profile-form input:focus { border-color: #78a9c6; box-shadow: 0 0 0 3px rgba(63, 120, 173, .12); }
.demo-box, .import-details, .import-preview { background: #fff; border-color: #d2e1eb; }
.demo-box::before { background: #fff; color: #4c88ae; }
.demo-box > div:first-child, .student-list-toolbar { color: #2c4663; }
.demo-box > div:first-child span:last-child, .privacy-note, .form-error { color: #8696a8; }
.demo-buttons button, .button-secondary, .mini-button { background: #fff; border-color: #d2e1eb; color: #24486c; }
.demo-buttons button:hover, .button-secondary:hover, .mini-button:hover { background: #edf5fb; border-color: #a9c7db; color: #2e6d9c; }
.button-primary, .button-dark, .mini-button.primary { background: linear-gradient(135deg, #4383b4, #326e9e); border-color: #4383b4; color: #fff; box-shadow: 0 8px 18px rgba(63, 120, 173, .18); }
.sidebar { background: rgba(255, 255, 255, .97); background-image: linear-gradient(rgba(61, 131, 180, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(61, 131, 180, .025) 1px, transparent 1px); border-right-color: #d2e1eb; box-shadow: 10px 0 28px rgba(41, 76, 110, .06); }
.sidebar::after { background: linear-gradient(#4ba9b0 0 42%, #d69a4b 42% 58%, #4f89b4 58%); box-shadow: none; }
.user-badge, .quick-action, .metric-card, .panel, .student-card, .inline-form, .setting-action, .task-card { background: #fff; border-color: #d2e1eb; color: #25445f; box-shadow: 0 8px 24px rgba(41, 76, 110, .06); }
.nav-item { color: #667b91; }
.nav-item:hover, .nav-item.active { background: #eaf3fb; color: #2f6f9d; border-left-color: #4c8db8; }
.nav-item.active::after { background: #4ba9b0; box-shadow: none; }
.nav-icon, .nav-item.active .nav-icon { color: #5e9bbb; }
.topbar { background: rgba(255, 255, 255, .94); border-bottom-color: #d2e1eb; color: #71859a; }
.topbar::after { background: linear-gradient(90deg, #4f89b4 0 28%, #7bc2b0 28% 68%, #e5ae65 68% 82%, #c9535b 82%); box-shadow: none; }
.sync-status { color: #4f91a6; }
.page-heading::after { color: #7ca6bd; }
.page-heading h1, .panel-header h2, .panel-header h3, .task-main h3, .student-card h3, .metric-card strong, .profile-list strong, .setting-action strong { color: #24486c; }
.quick-action > span { background: #e8f2fa; color: #3f78ad; }
.quick-action:hover, .task-card:hover, .student-card:hover, .setting-action:hover { border-color: #9fc2d7; background: #f8fbfd; }
.metric-label { color: #60819c; }
.metric-navy, .metric-blue { color: #4f81b3; }
.metric-orange { color: #d9873c; }
.metric-purple { color: #7b71c5; }
.metric-green { color: #329b7b; }
.metric-card::before { background: #4f89b4; box-shadow: none; }
.panel::before { border-color: #9dc7d9; }
.panel-header { border-bottom-color: #dbe5ee; }
.date-chip, .count-pill { background: #edf5fb; color: #4c88ae; border-color: #c9dfeb; }
.count-pill { background: #fff2df; color: #c77a31; border-color: #f3d5ac; }
.attendance-summary div, .profile-list div, .student-focus, .private-note { background: #f7fafc; border-color: #d2e1eb; }
.attendance-summary strong, .student-focus strong { color: #2b4663; }
.attendance-summary span, .student-focus span, .profile-list span, .student-card-footer, .task-main p, .task-due, .task-audience, .announcement-card span, .announcement-card p, .report-card p, .empty-state, .filter-row, .legend, .panel-note, .loading-line { color: #7b8da0; }
.section-divider, .announcement-card, .report-card, .audit-row, .event-list { border-color: #dbe5ee; }
.task-check { border-color: #b8cfde; background: #fff; }
.task-check.checked { background: #68b99b; border-color: #68b99b; }
.announcement-icon, .report-icon { background: #fff2df; color: #ce8339; border-color: #f3d5ac; }
.focus-ring { border-color: #c8dae5; border-top-color: #4f89b4; color: #3f78ad; }
.student-check { border-color: #d2e1eb; background: #fbfdff; color: #506b85; }
.student-check:has(input:checked) { border-color: #8cb9cf; background: #edf7fb; box-shadow: none; }
.student-check input { accent-color: #4f89b4; }
.privacy-banner { background: #edf8f4; border-color: #c7e8dc; color: #329b7b; }
.privacy-banner p { color: #6d9a8d; }
.import-details summary { color: #2f6f9d; }
.import-details summary > span { background: #e6f2f8; color: #3f78ad; }
.import-body, .import-table th, .import-table td { border-color: #dbe5ee; }
.import-file-label { color: #5b6f84; }
.import-file-label input { background: #f8fbfd; border-color: #a9c4d6; color: #526f86; }
.import-table { color: #4f687f; }
.import-table th { background: #edf5fb; color: #4f81b3; }
.import-table td { border-bottom-color: #e5edf2; }
.import-field-list span { background: #eff8fa; color: #398293; border-color: #cce2e8; }
.toast { background: #193b5b; border-color: #74c4bd; color: #fff; }
.toast[data-kind="error"] { background: #a9444d; border-color: #f3b1ae; }

/* One-line-per-student Excel grid. The wide sheet scrolls horizontally on phones. */
.students-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.student-roster-form { display: block; min-width: 0; }
.student-list-toolbar { align-items: center; }
.student-list-toolbar > div { display: grid; gap: 4px; }
.student-list-toolbar span { color: #7b8da0; font-size: 11px; }
.student-save-hint { margin-left: auto; }
.student-sheet-wrap { max-width: 100%; overflow-x: auto; overflow-y: visible; border: 1px solid #cfe0ea; background: #fff; box-shadow: 0 10px 24px rgba(41, 76, 110, .06); -webkit-overflow-scrolling: touch; }
.student-sheet-header, .student-sheet-row { grid-template-columns: 54px 88px 102px 140px 54px 120px 104px 64px 92px 130px 130px 180px; min-width: 1370px; }
.student-sheet-header { background: #eaf4fb; border-bottom-color: #b9d5e3; color: #2f6f9d; }
.student-sheet-header span { white-space: nowrap; }
.student-list { display: block; }
.student-sheet-row { min-height: 56px; border-bottom: 1px solid #e5edf2; border-left: 3px solid transparent; background: #fff; }
.student-sheet-row:hover, .student-sheet-row:focus-within { background: #f6fbfe; border-left-color: #4ba9b0; }
.student-sheet-row .sheet-cell { min-width: 0; padding: 7px 8px; border-right-color: #e5edf2; }
.student-sheet-row .sheet-cell > span { display: none; }
.student-sheet-row input { min-width: 0; width: 100%; border: 1px solid transparent; border-radius: 3px; background: transparent; padding: 7px 5px; color: #294762; }
.student-sheet-row input:hover { border-color: #d2e1eb; background: #fbfdff; }
.student-sheet-row input:focus { background: #fff; border-color: #78a9c6; box-shadow: 0 0 0 3px rgba(63, 120, 173, .12); }

@media (max-width: 760px) {
  .students-heading-actions { justify-content: stretch; }
  .students-heading-actions .button { flex: 1 1 160px; justify-content: center; }
  .student-list-toolbar { align-items: flex-start; flex-direction: column; }
  .student-save-hint { margin-left: 0; }
  .student-sheet-wrap { width: 100%; }
  .student-sheet-header, .student-sheet-row { min-width: 1370px; }
}

/* Requested roster simplification: hide 年班 from the visible grid but keep it in each row's hidden form value. */
.student-list-toolbar > div > strong { font-size: 12px; }
.student-list-toolbar > div > span, .student-save-hint { font-size: 10px; }
.student-sheet-header { font-size: 9px; }
.student-sheet-header, .student-sheet-row { grid-template-columns: 56px 100px 140px 56px 84px 124px 116px 108px 68px 100px 132px 170px 170px 120px 200px; min-width: 1744px; }
.student-sheet-row input { font-size: 11px; }
.role-sheet-cell { display: flex; align-items: center; }
.role-sheet-cell strong { color: #385d76; font-size: 11px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .student-sheet-header, .student-sheet-row { min-width: 1744px; }
}

/* Class data modules: light, tactile control surfaces that remain usable on phones. */
.seat-planner, .organization-panel {
  border: 1px solid #cfe0ea;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 24px rgba(41, 76, 110, .06);
}
.seat-planner { padding: 18px; overflow-x: auto; }
.seat-toolbar, .assignment-toolbar, .seat-bottom-panel, .seat-panel-heading { display: flex; align-items: center; gap: 10px; }
.seat-toolbar { flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid #dbe7ee; }
.seat-toolbar label { display: inline-flex; align-items: center; gap: 7px; color: #5f788e; font-size: 12px; font-weight: 700; }
.seat-toolbar input { width: 72px; border: 1px solid #cddfe9; border-radius: 4px; background: #fff; color: #25445f; padding: 8px; font: inherit; }
.seat-plan-count { margin-left: auto; color: #5b899d; font: 800 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .05em; }
.seat-selection-status { margin: 14px 0 10px; border-left: 3px solid #6fb6c2; background: #eff8fa; color: #497188; padding: 10px 12px; font-size: 12px; }
.podium-label { min-width: 660px; margin: 0 auto 12px; border: 1px solid #bdd4e3; border-bottom: 3px solid #5791ba; background: linear-gradient(90deg, #e5f2f8, #f6fbfd, #e5f2f8); color: #3e7294; padding: 10px; text-align: center; font: 800 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .15em; }
.seat-grid { display: grid; grid-template-columns: repeat(var(--seat-columns), minmax(96px, 1fr)); min-width: 660px; gap: 10px; padding: 8px 2px 16px; }
.seat-cell { position: relative; min-height: 132px; border: 1px solid #cddfe9; background: #fbfdff; transition: .18s ease; }
.seat-cell:hover { border-color: #79a8c2; box-shadow: 0 6px 14px rgba(46, 112, 157, .10); }
.seat-cell.is-selected { border-color: #4a98ae; box-shadow: 0 0 0 3px rgba(75, 169, 176, .18); }
.seat-cell.is-disabled { border-color: #e3c6aa; background: repeating-linear-gradient(135deg, #fff9f0 0 7px, #fff4e4 7px 14px); }
.seat-cell-button { display: grid; width: 100%; min-height: 132px; align-content: center; gap: 5px; border: 0; background: transparent; color: #294a67; cursor: pointer; padding: 14px 8px 30px; text-align: center; }
.seat-cell-button strong { font-size: 15px; }
.seat-cell-button small, .seat-code { color: #7d94a5; font-size: 10px; }
.seat-role-list { display: grid; gap: 2px; min-width: 0; margin-top: 2px; }
.seat-role { display: block; overflow: hidden; color: #44738f; font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.seat-role-tutor { color: #765c96; }
.seat-code { position: absolute; top: 8px; left: 9px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.seat-disable-toggle { position: absolute; right: 7px; bottom: 7px; border: 0; background: #eef5f8; color: #5b8399; padding: 4px 6px; font-size: 10px; cursor: pointer; }
.is-disabled .seat-disable-toggle { background: #f9e9d3; color: #a76b2e; }
.seat-bottom-panel { justify-content: space-between; margin-top: 4px; padding-top: 16px; border-top: 1px solid #dbe7ee; }
.seat-bottom-panel > div:first-child { min-width: 0; flex: 1; }
.seat-panel-heading { justify-content: space-between; color: #395c77; font-size: 12px; }
.seat-panel-heading span { color: #7b95a7; font-size: 11px; }
.seat-student-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.seat-student-chip { display: inline-flex; align-items: baseline; gap: 7px; border: 1px solid #cddfe9; background: #fff; color: #365673; padding: 8px 10px; cursor: grab; }
.seat-student-chip strong { font-size: 12px; }
.seat-student-chip span { color: #7c94a4; font-size: 10px; }
.seat-student-chip.is-selected { border-color: #55a4b2; background: #eaf8f8; box-shadow: 0 0 0 2px rgba(75, 169, 176, .14); }
.seat-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; color: #7890a2; font-size: 10px; }
.seat-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.seat-dot { width: 8px; height: 8px; border-radius: 99px; background: #fff; border: 1px solid #a9c8d9; }
.seat-dot.occupied { background: #68a8c3; border-color: #68a8c3; }
.seat-dot.disabled { background: #e4ad72; border-color: #e4ad72; }
.seat-empty-note { color: #7d94a5; font-size: 12px; }

.organization-panel { padding: 18px; }
.assignment-toolbar { justify-content: space-between; flex-wrap: wrap; padding-bottom: 15px; border-bottom: 1px solid #dbe7ee; }
.assignment-toolbar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.assignment-toolbar strong { color: #315c7e; }
.assignment-toolbar span { color: #8097a8; font-size: 11px; }
.assignment-head, .assignment-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.2fr) minmax(200px, 1.5fr) 36px; gap: 8px; align-items: center; }
.assignment-head { color: #6f8ea4; padding: 14px 8px 7px; font: 800 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
.assignment-head.cadre-head { grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.15fr) minmax(160px, 1.35fr) 58px 54px; }
.assignment-list { display: grid; gap: 7px; }
.assignment-row { border: 1px solid #d4e3ec; background: #fbfdff; padding: 8px; }
.assignment-row input, .assignment-row select, .cleaning-fields input { min-width: 0; width: 100%; border: 1px solid #d0e0ea; border-radius: 3px; background: #fff; color: #294963; padding: 9px; font: inherit; font-size: 12px; }
.assignment-row input:focus, .assignment-row select:focus, .cleaning-fields input:focus { outline: 0; border-color: #78a9c6; box-shadow: 0 0 0 3px rgba(63, 120, 173, .12); }
.icon-button { width: 30px; height: 30px; border: 1px solid #d4e1e8; background: #fff; color: #6c879c; cursor: pointer; font-size: 19px; line-height: 1; }
.icon-button.danger:hover { border-color: #e5b7b7; background: #fff4f4; color: #be5b63; }
.cleaning-list { display: grid; gap: 12px; margin-top: 14px; }
.cleaning-row { border: 1px solid #d4e3ec; background: #fbfdff; padding: 10px; }
.cleaning-fields { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(180px, 1.7fr) 90px 34px; gap: 8px; align-items: center; }
.assignment-student-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #d7e6ee; }
.assignment-student-chip { border: 1px solid #d3e2eb; background: #fff; color: #52718a; padding: 6px 8px; cursor: pointer; font-size: 11px; }
.assignment-student-chip span { display: inline-block; margin-right: 4px; color: #7f9aab; font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.assignment-student-chip.is-selected { border-color: #75aeba; background: #e9f7f5; color: #2e7776; }

.cleaning-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 16px; }
.cleaning-zones { display: grid; gap: 16px; min-width: 0; }
.cleaning-zone { min-width: 0; border: 1px solid #cfe0ea; background: rgba(255, 255, 255, .94); box-shadow: 0 10px 24px rgba(41, 76, 110, .06); padding: 16px; }
.cleaning-zone[data-cleaning-zone-panel="indoor"] { border-top: 3px solid #2d91b2; }
.cleaning-zone[data-cleaning-zone-panel="outdoor"] { border-top: 3px solid #e1aa23; }
.cleaning-zone-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #dbe7ee; }
.cleaning-zone-header h3 { margin: 5px 0 0; color: #234d6b; font-size: 20px; }
.cleaning-responsible { color: #51788f; border: 1px solid #c9e0e8; background: #eef8fa; padding: 7px 9px; font-size: 11px; white-space: nowrap; }
.cleaning-zone[data-cleaning-zone-panel="outdoor"] .cleaning-responsible { border-color: #ead8a5; background: #fff9e8; color: #86631e; }
.cleaning-zone .assignment-toolbar { margin-bottom: 2px; }
.cleaning-zone .empty-state { margin-top: 12px; }
.cleaning-layout > .unassigned-panel { position: sticky; top: 16px; }

@media (max-width: 760px) {
  .seat-planner, .organization-panel { padding: 13px; }
  .seat-toolbar .button { flex: 1 1 130px; justify-content: center; }
  .seat-plan-count { width: 100%; margin-left: 0; }
  .seat-bottom-panel { align-items: flex-start; flex-direction: column; }
  .seat-legend { justify-content: flex-start; }
  .assignment-toolbar { align-items: flex-start; }
  .assignment-toolbar > div:last-child { width: 100%; }
  .assignment-toolbar .button { flex: 1 1 145px; justify-content: center; padding-inline: 8px; }
  .assignment-head { display: none; }
  .assignment-row { grid-template-columns: 1fr 32px; }
  .assignment-row input, .assignment-row select { grid-column: 1; }
  .assignment-row .icon-button { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .cleaning-fields { grid-template-columns: 1fr 32px; }
  .cleaning-fields input { grid-column: 1; }
  .cleaning-fields .icon-button { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}

/* Allocation layout: keep all unassigned students visible in a seat-numbered right rail. */
.planning-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 16px; }
.planning-layout > .seat-planner, .planning-layout > .organization-panel { min-width: 0; }
.unassigned-panel { position: sticky; top: 16px; border: 1px solid #cfe0ea; background: rgba(255, 255, 255, .96); box-shadow: 0 10px 24px rgba(41, 76, 110, .06); padding: 14px; }
.unassigned-heading { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid #dbe7ee; }
.unassigned-heading h2 { margin: 0; color: #315c7e; font-size: 18px; }
.unassigned-heading small, .unassigned-panel > p { color: #7b93a4; font-size: 11px; }
.unassigned-panel > p { margin: 10px 0; line-height: 1.55; }
.vertical-list, .available-student-list { display: grid; gap: 7px; max-height: min(62vh, 620px); overflow-y: auto; padding-right: 3px; }
.vertical-list .seat-student-chip { justify-content: space-between; width: 100%; cursor: pointer; }
.available-student-card { display: grid; grid-template-columns: 30px 1fr 16px; align-items: center; gap: 7px; width: 100%; border: 1px solid #d2e1eb; background: #fbfdff; color: #385b75; padding: 9px; text-align: left; cursor: pointer; }
.available-student-card:hover { border-color: #78a9c6; background: #eff8fa; }
.available-student-card.is-selected { border-color: #55a4b2; background: #eaf8f8; box-shadow: 0 0 0 2px rgba(75, 169, 176, .14); }
.seat-available-student-card { cursor: grab; }
.available-student-card > span { color: #6194aa; font: 800 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.available-student-card strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.available-student-card i { color: #4a9b9e; font-size: 16px; font-style: normal; }
.assignment-row { grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.15fr) minmax(160px, 1.35fr) 58px 54px; }
.assignment-row.is-selected, .cleaning-row.is-selected { border-color: #69aab8; background: #f0f9fa; box-shadow: 0 0 0 2px rgba(75, 169, 176, .12); }
.assignment-select-control { border: 1px solid #bdd8e4; background: #edf7fa; color: #447994; min-height: 34px; padding: 7px 6px; cursor: pointer; font-size: 11px; }
.assignment-select-control:hover { border-color: #78a9c6; background: #e1f2f7; }
.assignment-delete-control { min-height: 34px; border: 1px solid #edc2c2; background: #fff6f6; color: #b25962; padding: 7px 5px; cursor: pointer; font-size: 11px; }
.assignment-delete-control:hover { border-color: #de9197; background: #ffeaea; }
.cleaning-head { grid-template-columns: minmax(120px, .8fr) minmax(160px, 1.7fr) 58px 84px 58px 54px; }
.cleaning-fields { grid-template-columns: minmax(120px, .8fr) minmax(160px, 1.7fr) 58px 84px 58px 54px; }
.assigned-student-chip { border: 1px solid #bcdde2; background: #edf8f5; color: #347973; padding: 6px 8px; cursor: pointer; font-size: 11px; }
.assigned-student-chip span { margin-right: 4px; color: #66959b; font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }

@media (max-width: 980px) {
  .planning-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 12px; }
}
@media (max-width: 760px) {
  .planning-layout { grid-template-columns: 1fr; }
  .unassigned-panel { position: static; order: 2; }
  .vertical-list, .available-student-list { max-height: 360px; }
  .assignment-row { grid-template-columns: 1fr 58px 52px; }
  .assignment-row input, .assignment-row select { grid-column: 1; }
  .assignment-row .assignment-select-control { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .assignment-row .icon-button { grid-column: 3; grid-row: 1 / span 3; align-self: center; }
  .assignment-row .assignment-delete-control { grid-column: 3; grid-row: 1 / span 3; align-self: center; }
  .cleaning-fields { grid-template-columns: 1fr 58px 52px; }
  .cleaning-fields input { grid-column: 1; }
  .cleaning-fields .assignment-select-control { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .cleaning-fields .icon-button { grid-column: 3; grid-row: 1 / span 3; align-self: center; }
  .cleaning-fields .assignment-delete-control { grid-column: 3; grid-row: 1 / span 3; align-self: center; }
  .cleaning-layout { grid-template-columns: 1fr; }
  .cleaning-layout > .unassigned-panel { position: static; order: 2; }
  .cleaning-zone { padding: 13px; }
  .cleaning-zone-header { align-items: flex-start; flex-direction: column; }
  .cleaning-responsible { align-self: stretch; }
}

/* Daily blackboard: projector-friendly, light tactical display. */
.blackboard-layout { display: grid; grid-template-columns: minmax(300px, .84fr) minmax(420px, 1.16fr); gap: 18px; align-items: start; }
.blackboard-editor { display: grid; gap: 16px; padding: 18px; }
.blackboard-form { display: grid; gap: 14px; }
.blackboard-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(116px, .34fr); gap: 12px; }
.blackboard-form label { display: grid; gap: 7px; color: #57728a; font-size: 12px; font-weight: 800; }
.blackboard-form input, .blackboard-form textarea { min-width: 0; box-sizing: border-box; width: 100%; border: 1px solid #cddfe9; border-radius: 7px; background: #fbfdff; color: #1d415d; padding: 10px 11px; font: 500 13px/1.55 inherit; }
.blackboard-form textarea { min-height: 228px; resize: vertical; }
.blackboard-form input:focus, .blackboard-form textarea:focus { outline: none; border-color: #58a2c4; background: #fff; box-shadow: 0 0 0 3px rgba(59, 130, 173, .12); }
.blackboard-form label small { color: #7c94a8; font-size: 11px; font-weight: 500; }
.blackboard-carry { display: grid; gap: 10px; border: 1px solid #cbe1e8; border-left: 3px solid #33a2b5; background: linear-gradient(135deg, #effbfa, #f8fcff); padding: 12px; }
.blackboard-carry > div:first-child { display: grid; gap: 3px; }
.blackboard-carry strong { color: #275b75; font-size: 14px; }
.blackboard-carry small { color: #7590a0; font-size: 11px; }
.blackboard-carry-list { display: flex; flex-wrap: wrap; gap: 7px; }
.blackboard-carry-list span { border: 1px solid #b9dce0; background: #fff; color: #387b83; padding: 6px 8px; font-size: 11px; line-height: 1.35; }
.blackboard-carry-list .is-empty { border-style: dashed; color: #7890a0; }
.blackboard-editor-actions, .button-group { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.blackboard-date-field { grid-column: 1 / -1; display: grid; grid-template-columns: max-content minmax(170px, 1fr) max-content; align-items: end; gap: 8px; min-width: 0; }
.blackboard-date-field label { min-width: 170px; white-space: nowrap; }
.blackboard-date-field input[type="date"] { min-width: 170px; }
.blackboard-date-shift { border: 1px solid #c6dce6; border-radius: 6px; background: #f4fafc; color: #2c6884; padding: 10px 9px; font: 800 11px/1.1 inherit; cursor: pointer; white-space: nowrap; }
.blackboard-date-shift:hover, .blackboard-date-shift:focus-visible { border-color: #44a6c0; background: #e9f7fb; color: #12516e; outline: none; }
.blackboard-preview-panel { min-width: 0; }
.blackboard-stage { --blackboard-font-size: 28px; position: relative; overflow: hidden; display: grid; min-height: 560px; grid-template-rows: auto auto 1fr auto; border: 1px solid #7fc0d2; border-left: 5px solid #e1b128; background: radial-gradient(circle at 89% 16%, rgba(77, 204, 227, .19), transparent 23%), linear-gradient(135deg, #063b56 0%, #0b5872 50%, #073d5c 100%); color: #f3fcff; box-shadow: 0 18px 38px rgba(24, 75, 105, .2); }
.blackboard-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .42; background-image: linear-gradient(rgba(142, 225, 239, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(142, 225, 239, .12) 1px, transparent 1px); background-size: 34px 34px; }
.blackboard-stage::after { content: ""; position: absolute; right: -100px; top: -160px; width: 430px; height: 430px; border: 1px solid rgba(141, 228, 239, .55); border-radius: 50%; box-shadow: 0 0 0 48px rgba(141, 228, 239, .055), 0 0 0 96px rgba(141, 228, 239, .035); pointer-events: none; }
.blackboard-stage > * { position: relative; z-index: 1; }
.blackboard-topline { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid rgba(151, 228, 240, .34); color: #9de7f4; font: 800 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .16em; }
.blackboard-topline-actions { display: flex; align-items: center; gap: 12px; }
.blackboard-fullscreen-button { border: 1px solid rgba(157, 231, 244, .62); border-radius: 4px; background: rgba(3, 43, 63, .42); color: #e5fbff; padding: 7px 10px; font: 800 10px/1.1 inherit; letter-spacing: .04em; cursor: pointer; }
.blackboard-fullscreen-button:hover { border-color: #f5d34a; background: rgba(246, 211, 74, .16); color: #fff7c9; }
.blackboard-fullscreen-button:focus-visible { outline: 2px solid #f5d34a; outline-offset: 3px; }
.blackboard-topline b { color: #f5ce3e; font-size: 10px; }
.blackboard-topline b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #53e0b4; box-shadow: 0 0 10px #53e0b4; }
.blackboard-title-row { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 28px 30px 20px; border-bottom: 1px solid rgba(151, 228, 240, .3); }
.blackboard-title-row .eyebrow { color: #8de4f4; }
.blackboard-title-row h2 { margin: 7px 0 0; color: #fff; font-size: clamp(28px, 3.2vw, 46px); letter-spacing: .03em; }
.blackboard-title-row time { flex: 0 0 auto; color: #f6d74e; font: 800 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: right; }
.blackboard-title-meta { display: grid; justify-items: end; gap: 10px; }
.blackboard-public-date-controls { display: flex; align-items: center; gap: 5px; }
.blackboard-public-date-controls label { display: block; }
.blackboard-public-date-controls input { border: 1px solid rgba(157, 231, 244, .62); border-radius: 4px; background: rgba(3, 43, 63, .42); color: #e5fbff; padding: 6px 7px; font: 700 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; color-scheme: dark; }
.blackboard-public-date-controls input:focus-visible { outline: 2px solid #f5d34a; outline-offset: 2px; }
.blackboard-date-shift { min-height: 30px; }
.blackboard-content { display: grid; align-content: center; padding: 32px 42px; }
.blackboard-content ol { display: grid; gap: .65em; margin: 0; padding-left: 1.5em; }
.blackboard-content li { padding-left: .1em; color: #f8feff; font-size: var(--blackboard-font-size); font-weight: 750; line-height: 1.5; text-shadow: 0 2px 0 rgba(3, 44, 64, .35); }
.blackboard-item-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; }
.blackboard-item-text { min-width: 0; overflow-wrap: anywhere; }
.blackboard-item-delete { flex: 0 0 auto; border: 1px solid rgba(255, 190, 190, .65); border-radius: 4px; background: rgba(96, 26, 38, .34); color: #ffd7d7; padding: 6px 9px; font: 800 11px/1.1 inherit; cursor: pointer; }
.blackboard-item-delete:hover, .blackboard-item-delete:focus-visible { border-color: #fff; background: rgba(167, 48, 64, .58); color: #fff; outline: none; }
.blackboard-content li::marker { color: #f6ce3b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.blackboard-empty { border: 1px dashed rgba(169, 235, 245, .55); background: rgba(4, 43, 64, .32); color: #b7eaf3; padding: 28px; text-align: center; font-size: 17px; }
.blackboard-stage footer { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px; border-top: 1px solid rgba(151, 228, 240, .32); color: #a3d9e5; font: 700 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
.blackboard-status { margin: 10px 0 0; color: #7790a1; font-size: 11px; text-align: right; }
.public-blackboard-panel { margin: 20px 0; }
.public-blackboard-panel .blackboard-stage { min-height: 350px; }
.public-blackboard-panel .blackboard-content { padding-block: 22px; }
.public-blackboard-panel .blackboard-content li { font-size: clamp(18px, 2vw, 28px); }
.blackboard-stage:fullscreen { box-sizing: border-box; width: 100vw; height: 100vh; min-height: 100vh; border: 0; padding: min(4vh, 44px) min(6vw, 88px); }
.blackboard-stage:fullscreen .blackboard-content li { font-size: clamp(28px, 3.6vw, 60px); }
.blackboard-stage:fullscreen .blackboard-item-delete { display: none; }
@media (max-width: 980px) { .blackboard-layout { grid-template-columns: 1fr; } .blackboard-stage { min-height: 480px; } }
@media (max-width: 760px) { .blackboard-form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .blackboard-form-grid > label:nth-child(2) { grid-column: 1 / -1; grid-row: 1; } .blackboard-date-field { grid-column: 1 / -1; grid-row: 2; } .blackboard-date-field .blackboard-date-shift { padding-inline: 6px; } .blackboard-editor-actions, .button-group { justify-content: stretch; } .blackboard-editor-actions .button, .button-group .button { flex: 1 1 150px; } .blackboard-stage { min-height: 430px; } .blackboard-title-row { align-items: flex-start; flex-direction: column; padding: 22px 22px 16px; } .blackboard-title-meta { justify-items: start; } .blackboard-title-row time { text-align: left; } .blackboard-content { padding: 24px 28px; } .blackboard-content li { font-size: max(18px, calc(var(--blackboard-font-size) * .82)); } .blackboard-item-line { align-items: flex-start; flex-direction: column; gap: 8px; } }
@media print { body * { visibility: hidden !important; } .blackboard-stage, .blackboard-stage * { visibility: visible !important; } .blackboard-stage { position: fixed; inset: 0; min-height: 100vh; width: 100vw; border: 0; box-shadow: none; } }
