/* Classroom palette: blue, violet, mint and apricot. Shared by every page. */
:root {
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: #26344d;
  background: #f3f5fc;
  --green: #4263de;
  --line: #e3e8f4;
  --accent: #4263de;
  --accent-dark: #304bc3;
  --accent-soft: #eef2ff;
}
body { background: radial-gradient(ellipse at 95% 0, #e9e6fc 0, transparent 42%), #f3f5fc; min-height: 100vh; }
#workspace[data-page="timetable"] { --accent: #7751c9; --accent-dark: #6040ad; --accent-soft: #f4effe; }
#workspace[data-page="students"] { --accent: #167f89; --accent-dark: #106770; --accent-soft: #eaf8f7; }
#workspace[data-page="reports"] { --accent: #b85f32; --accent-dark: #9e4925; --accent-soft: #fff3e9; }
button, .button-link { border-radius: 10px; font-weight: 500; transition: background .16s, border-color .16s, box-shadow .16s; }
button:hover, .button-link:hover { background: var(--accent-soft); border-color: #cbd5ee; }
button:disabled { cursor: not-allowed; opacity: .46; }
button.primary, .primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 10px #263c7917; }
button.primary:hover, .primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.text { color: var(--accent); background: transparent; }
button.text:hover { background: var(--accent-soft); }
input, select { min-height: 42px; border-color: #dce2ee; border-radius: 9px; color: #2c3b54; background: #fcfdff; }
input:hover, select:hover { border-color: #a9b9d8; }
input:focus, select:focus { background: #fff; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #91a7f4; outline-offset: 3px; }
input::placeholder { color: #8793a9; }
input[type=checkbox] { accent-color: var(--accent); min-height: 0; }
input[type=file] { padding: 6px; }
input[type=file]::file-selector-button { border: 0; border-radius: 6px; padding: 8px 12px; margin-right: 10px; background: var(--accent-soft); color: var(--accent); font: inherit; cursor: pointer; }
label { color: #56647e; font-weight: 500; }
h1 { color: #23324c; font-size: 29px; letter-spacing: -.6px; font-weight: 750; }
h2 { color: #2a3953; font-size: 18px; font-weight: 700; }
.muted { color: #6c7b94; line-height: 1.75; }
.eyebrow { color: #7b88a3; font-size: 10px; font-weight: 600; letter-spacing: 2px; }
aside { width: 224px; padding: 34px 18px 22px; background: #1c2845; border: 0; color: #dce5fa; overflow-y: auto; }
aside::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, #8f8cff, #71d5d0 55%, #ffc19e); }
.brand { display: block; position: relative; padding-left: 48px; margin: 0 10px; color: #fff; font-size: 25px; letter-spacing: 2px; line-height: 1.3; }
.brand::before { content: "✓"; position: absolute; left: 0; top: 3px; width: 36px; height: 39px; display: grid; place-items: center; border-radius: 12px; background: #a6a3ff; color: #202b4b; font-size: 26px; box-shadow: 5px 5px 0 #354265; }
.brand span { color: #b8b6ff; }
.brand small { color: #9baaca; font-size: 8px; letter-spacing: 2.7px; margin-top: 7px; }
.side-caption { margin: 48px 16px 16px; color: #8f9cba; font-size: 10px; letter-spacing: 2px; }
nav { gap: 9px; }
nav button { display: flex; align-items: center; gap: 13px; color: #b8c5df; background: transparent; padding: 14px 16px; border-radius: 11px; font-size: 14px; }
nav button svg { width: 20px; height: 20px; flex-shrink: 0; opacity: .95; }
nav button:hover { background: #2b3a5c; border-color: transparent; color: #fff; }
nav button.selected { color: #fff; background: #526bea; box-shadow: 0 6px 18px #0d183539; font-weight: 600; }
nav button[data-page="timetable"].selected { background: #8260cf; }
nav button[data-page="students"].selected { background: #208c96; }
nav button[data-page="reports"].selected { background: #b96b48; }
.side-bottom { border: 1px solid #35415e; border-radius: 13px; margin-top: auto; padding: 16px; background: #23304d; color: #b5c3de; line-height: 1.7; }
.side-bottom p { color: #96a7c7; margin: 8px 0; }
.side-bottom .text { color: #a9c6ff; padding: 3px 0; font-size: 12px; }
.side-bottom .text:hover { background: transparent; color: #fff; }
.dot { background: #72d6b7; box-shadow: 0 0 0 3px #72d6b714; }
main { margin-left: 224px; padding: 32px 36px; max-width: 1700px; min-width: 0; }
header { margin-bottom: 26px; gap: 20px; }
#today { padding: 10px 15px; border-radius: 10px; color: #63718e; background: #ffffffb8; border: 1px solid #e2e7f4; font-size: 12px; white-space: nowrap; }
.panel { border: 1px solid #e2e7f2; border-radius: 17px; padding: 25px; box-shadow: 0 4px 18px #2d437006; margin-bottom: 22px; }
.panel > h2::before, .panel > .row > h2::before { content: ""; display: inline-block; height: 16px; width: 4px; border-radius: 2px; background: var(--accent); margin-right: 10px; vertical-align: -2px; }
.intro { position: relative; overflow: hidden; min-height: 133px; padding: 29px; background: linear-gradient(115deg, #3f5dce, #6a70d6); border: 0; color: #fff; box-shadow: 0 9px 22px #4e65c320; isolation: isolate; }
.intro::before, .intro::after { content: ""; position: absolute; z-index: -1; width: 210px; height: 210px; border: 32px solid #ffffff0b; border-radius: 50%; pointer-events: none; }
.intro::before { right: -68px; top: -145px; }
.intro::after { right: 90px; bottom: -213px; width: 270px; height: 270px; border-width: 46px; }
.intro h2 { color: #fff; font-size: 21px; letter-spacing: .2px; }
.intro p { color: #e1e8ff; font-size: 13px; line-height: 1.9; max-width: 670px; }
.intro > div { min-width: 0; }
.intro .tag { background: #ffffff1f; color: #fff; border: 1px solid #ffffff30; font-size: 11px; padding: 9px 12px; }
.intro button.primary { background: #fff; color: var(--accent-dark); border-color: #fff; box-shadow: 0 4px 12px #172c5620; flex-shrink: 0; }
.intro button.primary:hover { background: #eef3ff; }
#workspace[data-page="students"] .intro { background: linear-gradient(115deg, #217f8c, #45a2a6); box-shadow: 0 9px 22px #25828e20; }
#workspace[data-page="timetable"] .intro { background: linear-gradient(115deg, #7254b7, #9c7dce); box-shadow: 0 9px 22px #7856bd20; }
#workspace[data-page="reports"] .intro { background: linear-gradient(115deg, #a65739, #c47c55); box-shadow: 0 9px 22px #a6583920; }
.metrics { gap: 16px; }
.metric { position: relative; overflow: hidden; padding: 20px 22px; border-radius: 15px; border: 1px solid #dce5ff; background: #edf2ff; color: #3658bd; }
.metric::after { content: "↗"; position: absolute; right: 17px; top: 17px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #ffffffb5; color: inherit; font-size: 20px; }
.metric:nth-child(2) { background: #f3edfc; border-color: #e8dcf6; color: #8056b6; }
.metric:nth-child(2)::after { content: "▦"; }
.metric:nth-child(3) { background: #fff3e5; border-color: #f7e5cd; color: #a86a25; }
.metric:nth-child(3)::after { content: "◷"; }
.metric.accent { background: #e6f5f0; border-color: #cfebe1; color: #26806b; }
.metric.accent::after { content: "✓"; }
.metric small, .metric.accent small { color: inherit; font-size: 12px; font-weight: 500; }
.metric > small { display: block; padding-right: 32px; }
.metric strong { color: inherit; font-size: 33px; font-weight: 750; margin-top: 16px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.metric strong small { margin-left: 3px; }
.toolbar { gap: 13px; }
.toolbar label { min-width: 150px; }
.table-wrap { border: 1px solid #e8ecf4; border-radius: 11px; overflow: auto; }
th { background: #f4f6fc; color: #61718f; font-weight: 600; font-size: 12px; }
td, th { padding: 15px 14px; border-bottom-color: #edf0f7; }
td { color: #394761; font-variant-numeric: tabular-nums; }
tbody tr:nth-child(even) { background: #fcfdff; }
tbody tr:hover { background: #f1f5ff; }
tbody tr:last-child td { border-bottom: 0; }
.tag { border-radius: 6px; background: #e9f6f0; color: #25755d; padding: 5px 9px; font-weight: 500; }
.tag.draft { background: #fff1d9; color: #946015; }
.exception-count { color: #b76525; font-weight: 600; }
.rate { color: #14816e; }
.empty { padding: 47px 16px; color: #8290aa; font-size: 12px; }
.empty::before { content: ""; display: block; width: 42px; height: 35px; margin: 0 auto 18px; border: 2px solid #cbd6ef; border-radius: 9px; background: repeating-linear-gradient(0deg, #e2e9f8 0 2px, transparent 2px 8px) center / 22px 18px no-repeat, #f4f7ff; box-shadow: 5px 5px 0 #f0edfa; }
.empty strong { color: #5a6a88; font-size: 16px; font-weight: 600; }
.notice { border: 1px solid #e1e7f5; border-left: 3px solid #94a9e9; border-radius: 9px; background: #f5f7fd; color: #60718e; line-height: 1.9; }
.notice strong { color: #405580; }
.excel-attendance, .daily-schedule { background: #f5f9ff; border-color: #dee8f8; border-radius: 12px; }
.daily-schedule .row { gap: 16px; flex-wrap: wrap; }
.button-link { color: var(--accent); border-color: #d2dced; }
.selection-bar { border: 1px solid #e4e9f5; background: #f6f8fd; border-radius: 10px; }
.selection-bar #selectedCount { color: var(--accent); }
.pager { font-size: 12px; flex-wrap: wrap; }
.pager button { padding: 9px 14px; }
.tabs { width: fit-content; padding: 4px; border: 1px solid #e3e8f3; border-radius: 11px; background: #f2f5fa; }
.tabs button { background: transparent; border-color: transparent; color: #70819b; padding: 9px 15px; }
.tabs .selected { background: #fff; border-color: #e2e8f2; color: var(--accent); box-shadow: 0 2px 5px #24355d09; }
details.panel > summary { color: #52688a; font-size: 14px; }
.schedule-week th { background: #f6f2fd; color: #796195; }
.schedule-week td:nth-child(3n+2) .schedule-lesson { background: #eaf1ff; border-left: 3px solid #8ba5e8; }
.schedule-week td:nth-child(3n+3) .schedule-lesson { background: #f2ecfb; border-left: 3px solid #b098da; }
.schedule-week td:nth-child(3n+4) .schedule-lesson { background: #e8f5f0; border-left: 3px solid #86baa8; }
.schedule-lesson { background: #eaf1ff; color: #425576; }
.schedule-lesson small, .period-time { color: #687797; }
.empty-slot { border-color: #dce2ef; color: #8a96ae; border-radius: 9px; }
.empty-slot:hover { border-color: #b7a0de; background: #f5f0fd; color: #7751c9; }
.period-options label { border-radius: 10px; border-color: #e0e5f0; }
.period-options label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.text.danger { color: #bd5360; }
button.text.danger:hover { background: #fff0f2; }
.danger-button { background: #bc4f5f; border-color: #bc4f5f; }
.danger-button:hover { background: #a53c4b; border-color: #a53c4b; }
.error { color: #b54354; }
dialog { color: #2a3953; width: min(620px, 94vw); max-height: 90vh; overflow-y: auto; border: 1px solid #e0e6f4; border-radius: 20px; box-shadow: 0 28px 100px #14254633; padding: 30px; }
dialog::backdrop { background: #14244070; backdrop-filter: blur(4px); }
dialog h2 { padding-bottom: 14px; border-bottom: 1px solid #e9edf5; font-size: 21px; }
dialog label { font-size: 13px; }
#closeModal { margin-top: 12px; }
#toast { background: #263754; color: #f2f6ff; border: 1px solid #4c6080; box-shadow: 0 10px 30px #24345225; border-radius: 12px; }
.auth-card { border-radius: 22px; border: 1px solid #dfe5f2; border-top: 5px solid #8290e5; box-shadow: 0 20px 65px #43558d12; padding: 38px; }
.auth-card .eyebrow { color: #737bc6; }
footer { padding: 14px 20px 22px; color: #8896ae; font-size: 11px; letter-spacing: .5px; }
@media (prefers-reduced-motion: no-preference) { #content > .intro { animation: classroom-in .22s ease-out; } @keyframes classroom-in { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: none; } } }
@media (min-width: 1600px) { main { padding: 40px 52px; } .intro { min-height: 150px; } }
@media (max-width: 1100px) { main { padding: 28px 25px; } .intro { flex-wrap: wrap; gap: 16px; } .intro .tag { font-size: 11px; } .metric { padding: 20px 16px; } }
@media (max-width: 900px) { aside { width: 182px; padding: 30px 12px 18px; } .brand { font-size: 21px; margin: 0 6px; padding-left: 44px; } nav button { padding: 13px 12px; gap: 9px; font-size: 13px; } main { margin-left: 182px; padding: 25px 20px; } .side-bottom { padding: 12px; } .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } #today { font-size: 11px; padding: 8px 10px; } }
@media (max-width: 600px) {
  aside { position: static; width: auto; padding: 19px 16px 12px; overflow: visible; }
  .brand { font-size: 21px; padding-left: 40px; margin: 0; }
  .brand::before { top: -3px; width: 29px; height: 31px; font-size: 22px; border-radius: 9px; box-shadow: 3px 3px 0 #354265; }
  .brand small, .side-caption, .side-bottom { display: none; }
  nav { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; margin-top: 22px; }
  nav button { padding: 11px 2px; font-size: 11px; justify-content: center; gap: 5px; white-space: nowrap; }
  nav button svg { width: 15px; height: 15px; }
  main { margin: 0; padding: 22px 14px; }
  header { margin-bottom: 20px; } h1 { font-size: 25px; } .eyebrow { font-size: 9px; }
  .panel { padding: 19px 16px; border-radius: 13px; }
  .intro { min-height: 125px; padding: 23px 20px; } .intro h2 { font-size: 18px; } .intro p { font-size: 12px; }
  .intro .tag { display: none; } .metrics { gap: 10px; } .metric { border-radius: 12px; padding: 18px 16px; }
  .metric strong { font-size: 28px; } .metric::after { width: 28px; height: 28px; right: 12px; top: 13px; }
  .toolbar { gap: 12px; } .toolbar label, .toolbar label.search { min-width: min(140px,100%); } .toolbar label.search { flex-basis: 100%; }
  .row { flex-wrap: wrap; } .row > div { min-width: 0; } .actions { flex-wrap: wrap; } .pager { justify-content: center; gap: 9px; }
  .form-grid { grid-template-columns: 1fr; } dialog { padding: 22px 18px; border-radius: 16px; } .auth-card { padding: 28px 22px; }
  #toast { left: 14px; right: 14px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { button, .button-link { transition: none; } }
