/* Compact blue workspace. Business logic and school artwork remain in their own files. */
:root {
  --ink: #1d304b;
  --muted: #64748b;
  --line: #e2e8f0;
  --green: #3469c9;
  font-size: 14px;
}
body { background: #f3f6fa; color: var(--ink); }
button, .button-link { border-radius: 8px; min-height: 40px; }
button { font-weight: 600; }
button.primary, .primary { box-shadow: none; }
button:disabled { cursor: not-allowed; }
input, select { min-height: 40px; border-radius: 8px; background: #fff; }
input[type=checkbox] { min-height: 0; }
label { font-size: 12px; color: #53647a; gap: 7px; }
label input, label select { font-size: 14px; }
input::placeholder { color: #8b97a8; }
aside { width: 216px; padding: 30px 16px 20px; }
aside::before { background: #3469c9; height: 3px; }
.brand { margin: 0 12px; padding-left: 46px; font-size: 24px; letter-spacing: 1px; }
.brand::before { border-radius: 10px; box-shadow: none; height: 38px; }
.brand small { letter-spacing: 2.2px; }
.side-caption { margin: 40px 14px 14px; letter-spacing: 1px; }
nav { gap: 6px; }
nav button { min-height: 48px; gap: 12px; padding: 13px 15px; border-radius: 9px; }
nav button[data-page].selected { box-shadow: none; background: #eaf1ff; color: #2454a8; }
nav button.selected svg { color: #3469c9; }
.side-bottom { border-radius: 10px; padding: 14px; margin-top: auto; font-size: 11px; }
.side-bottom p { color: #405572; overflow-wrap: anywhere; font-size: 12px; }
.side-bottom .text { min-height: 32px; }
main { margin-left: 216px; padding: 24px 32px; max-width: 1800px; }
.school-masthead {
  margin-bottom: 24px; padding: 14px 22px; min-height: 82px;
  border-radius: 12px; border: 0; box-shadow: none;
  background: linear-gradient(110deg, #254e91, #3469bc);
}
.school-logo { flex-basis: 340px; width: 340px; }
.school-masthead-caption { padding-left: 20px; font-size: 12px; letter-spacing: 1px; }
.school-masthead-caption span { font-size: 8px; }
header { margin-bottom: 22px; gap: 20px; }
.eyebrow { font-size: 10px; letter-spacing: 1.4px; }
h1 { font-size: 27px; line-height: 1.3; margin-top: 6px; letter-spacing: -.5px; }
.page-description { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.65; }
#today { display: inline-flex; align-items: center; gap: 8px; background: #fff; padding: 10px 12px; border-radius: 8px; color: #54657d; }
#today::before { content: ''; width: 14px; height: 14px; border: 1.5px solid #879bb6; border-radius: 3px; background: linear-gradient(#879bb6,#879bb6) 0 3px / 100% 1px no-repeat; }
.panel { border-color: var(--line); border-radius: 12px; padding: 22px; margin-bottom: 18px; box-shadow: 0 2px 4px #17314d03; }
.panel h2 { font-size: 17px; }
.panel > h2::before, .panel > .row > h2::before { display: none; }
#workspace[data-page] .intro { padding: 20px 22px; min-height: 0; border-color: #dce7f6; border-left: 4px solid #3469c9; background: #edf3fd; border-radius: 10px; }
.intro h2 { font-size: 18px; line-height: 1.55; }
.intro p { margin-top: 4px; line-height: 1.75; }
.intro .tag { padding: 7px 10px; border-radius: 7px; }
.intro button.primary { background: #3469c9; border-color: #3469c9; color: #fff; }
.intro button.primary:hover { background: #2454a8; }
.metrics { gap: 14px; margin-bottom: 18px; }
.metric, .metric:nth-child(2), .metric:nth-child(3), .metric.accent {
  padding: 18px 20px; border-color: var(--line); border-radius: 12px;
  background: #fff; color: var(--ink);
}
.metric small, .metric.accent small { color: #66778e; font-weight: 500; }
.metric strong { font-size: 30px; margin-top: 12px; letter-spacing: -.7px; }
.metric strong small { font-size: 12px; letter-spacing: 0; }
.metric::after { color: #3469c9; background: #edf3ff; border-radius: 8px; top: 16px; right: 16px; width: 30px; height: 30px; font-size: 18px; }
.metric:nth-child(2)::after { background: #eef6f6; color: #237f87; }
.metric:nth-child(3)::after { background: #fff5e7; color: #ac7322; }
.metric.accent::after { background: #edf7f1; color: #26805e; }
.workflow { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; list-style: none; margin: 20px 0 22px; padding: 0; }
.workflow li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #f8fafc; border: 1px solid #e7edf5; border-radius: 8px; min-width: 0; }
.workflow .step-number { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: #eaf1ff; color: #3469c9; font-weight: 700; font-size: 12px; }
.workflow strong { display: block; font-size: 13px; font-weight: 600; }
.workflow small { display: block; color: #6a7d94; font-size: 11px; line-height: 1.6; margin-top: 3px; }
.toolbar { gap: 12px; margin-bottom: 18px; }
.toolbar label { min-width: 145px; }
.toolbar button, .toolbar .button-link { white-space: nowrap; }
.table-wrap { border-color: #e3e9f1; border-radius: 9px; scrollbar-color: #c6d3e3 #f4f7fa; }
table { line-height: 1.6; }
td, th { padding: 12px 14px; }
th { background: #f5f8fc; color: #607189; }
td { color: #30435e; }
tbody tr:nth-child(even) { background: #fcfdff; }
tbody tr:hover { background: #f0f5fc; }
td button.text { min-height: 32px; padding: 6px 9px; }
.tag { padding: 4px 8px; font-size: 11px; border-radius: 5px; }
.notice { background: #f5f8fd; border-color: #e0e9f5; border-left-color: #8daddc; padding: 12px 14px; color: #5a6f8b; line-height: 1.8; margin: 14px 0; }
.daily-schedule { margin: 16px 0; padding: 16px; background: #f9fbff; border-radius: 9px; }
.daily-schedule .row { margin-bottom: 10px; }
.daily-schedule .row strong { font-size: 13px; }
.selection-bar { padding: 10px 12px; background: #f8fafc; border-color: #e5ebf3; border-radius: 8px; }
.tabs { border-radius: 8px; }
.tabs button { border-radius: 6px; }
.pager { padding-top: 16px; }
.schedule-week th { background: #f3f7fd; }
.schedule-lesson { border-radius: 7px; min-height: 80px; }
.schedule-week td { padding: 10px 7px; }
.schedule-week td:nth-child(3n+2) .schedule-lesson { background: #edf3ff; border-left-color: #83a6df; }
.schedule-week td:nth-child(3n+3) .schedule-lesson { background: #f1effa; border-left-color: #b5a4d2; }
.schedule-week td:nth-child(3n+4) .schedule-lesson { background: #edf6f2; border-left-color: #8fbfae; }
details.panel > summary { padding: 2px 0; color: #47617f; }
details.panel[open] > summary { margin-bottom: 15px; }
dialog { border-radius: 14px; padding: 26px; }
dialog h2 { font-size: 19px; }
.auth-card { border-radius: 14px; border-top: 3px solid #3469c9; box-shadow: 0 12px 40px #253f7410; padding: 30px; }
.auth-card h1 { font-size: 25px; }
.login-school-brand { width: min(520px,calc(100% - 32px)); margin: 8vh auto 0; padding: 20px 26px; min-height: 100px; }
.login-school-brand .school-logo { flex-basis: 440px; }
footer { padding: 16px 12px; font-size: 11px; color: #8593a6; }
@media (min-width: 1600px) { main { padding: 28px 40px; } }
@media (max-width: 1100px) {
  main { padding: 24px; }
  .school-masthead-caption { display: none; }
  .workflow { gap: 8px; }
  .workflow li { padding: 10px; }
}
@media (max-width: 900px) {
  aside { width: 180px; padding: 26px 12px 18px; }
  main { margin-left: 180px; padding: 22px 20px; }
  .brand { padding-left: 40px; margin: 0 6px; font-size: 21px; }
  .brand::before { width: 32px; height: 34px; }
  nav button { font-size: 13px; padding: 12px 10px; gap: 9px; }
  .side-bottom { padding: 12px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workflow li { align-items: flex-start; }
  .workflow small { font-size: 10px; }
}
@media (max-width: 650px) {
  aside { position: relative; inset: auto; width: auto; padding: 18px 14px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .brand { font-size: 21px; margin: 0; padding-left: 38px; }
  .brand::before { width: 28px; height: 30px; top: -2px; font-size: 21px; }
  .brand small, .side-caption { display: none; }
  nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; margin-top: 16px; }
  nav button { flex-direction: column; min-height: 56px; padding: 8px 2px; gap: 5px; justify-content: center; font-size: 11px; white-space: nowrap; }
  nav button svg { width: 18px; height: 18px; }
  .side-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; padding: 8px 0 0; margin-top: 8px; background: none; border: 0; border-radius: 0; }
  .side-bottom > .dot, .storage-label { display: none; }
  .side-bottom p { margin: 0; flex: 1; font-size: 11px; }
  #logout { display: inline-block; min-height: 32px; padding: 6px 8px; }
  main { margin-left: 0; padding: 18px 12px; }
  .school-masthead { padding: 12px 16px; min-height: 64px; margin-bottom: 18px; border-radius: 9px; }
  .school-logo { flex-basis: 300px; width: min(300px,100%); }
  header { margin-bottom: 18px; gap: 12px; }
  h1 { font-size: 24px; }
  .page-description { font-size: 12px; margin-top: 7px; }
  #today { display: none; }
  .panel { padding: 16px; border-radius: 10px; }
  #workspace[data-page] .intro { padding: 16px; }
  .intro h2 { font-size: 16px; }
  .intro .tag { display: none; }
  .intro button.primary { width: 100%; }
  .metrics { gap: 10px; }
  .metric, .metric:nth-child(2), .metric:nth-child(3), .metric.accent { padding: 16px; border-radius: 10px; }
  .metric::after { width: 26px; height: 26px; right: 12px; top: 13px; }
  .metric strong { font-size: 27px; }
  .workflow { grid-template-columns: 1fr; margin: 16px 0; gap: 7px; }
  .workflow li { align-items: center; padding: 10px 12px; }
  .workflow small { font-size: 11px; margin-top: 0; }
  .workflow li > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
  .toolbar label, .toolbar label.search { min-width: 0; flex-basis: calc(50% - 12px); }
  .toolbar label.search, .toolbar label:has(input[type=file]) { flex-basis: 100%; }
  .toolbar label:has(input[type=file]) { flex: 1 1 100% !important; min-width: 0 !important; }
  .toolbar label:has(input[type=file]) { flex: 1 1 100% !important; min-width: 0 !important; }
  .toolbar label:has(input[type=file]) input { max-width: 100% !important; width: 100%; }
  .toolbar { align-items: flex-end; gap: 12px; }
  .toolbar > button, .toolbar > .button-link, .toolbar > a { max-width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; }
  .row > div { max-width: 100%; }
  .selection-bar .muted { flex-basis: 100%; }
  .daily-schedule { padding: 12px; }
  .table-wrap { max-width: 100%; }
  .table-wrap::before { content: '左右滑动查看完整表格'; display: block; position: sticky; left: 0; width: fit-content; padding: 9px 12px; font-size: 11px; color: #72859e; }
  .table-wrap::before { content: '左右滑动查看完整表格'; display: block; position: sticky; left: 0; width: fit-content; padding: 9px 12px; font-size: 11px; color: #72859e; }
  td, th { padding: 11px 12px; }
  .tabs { max-width: 100%; }
  .tabs button { padding: 8px 10px; font-size: 12px; }
  .actions { flex-wrap: wrap; }
  dialog { padding: 20px 16px; max-width: calc(100vw - 24px); }
  .login-school-brand { margin-top: 28px; padding: 20px; }
  .auth-card { padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) { #content > .intro { animation: none; } }
.all-present-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; margin: 16px 0; background: #f0f6ff; border: 1px solid #d9e6fb; border-radius: 10px; }
.all-present-action strong { color: #234b88; }
.all-present-action p { margin: 6px 0 0; line-height: 1.6; }
.all-present-action button { flex-shrink: 0; }
.daily-excel-tools { margin: 18px 0 0; }
.daily-excel-tools summary { cursor: pointer; color: #41618a; font-weight: 600; padding: 8px 0; }
#dailyPreview { scroll-margin-top: 24px; }
@media (max-width: 650px) { .all-present-action { align-items: stretch; flex-direction: column; gap: 12px; padding: 16px; } }
.lesson-pick { display: flex; align-items: center; justify-content: center; min-height: 32px; min-width: 32px; cursor: pointer; }
.lesson-pick input { margin: 0; accent-color: #3469c9; }
.all-present-action button:disabled { cursor: not-allowed; }
.lesson-pick:has(input:disabled) { cursor: default; opacity: .45; }
#dailySchedule .selected-lesson, #dailySchedule .selected-lesson:hover { background: #e9f1ff; }
.schedule-selection-help { margin: 12px 0; }
.school-masthead-identity { flex-shrink: 0; padding-left: 20px; border-left: 1px solid #b9d3ff66; }
.class-export-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 0 0 18px; padding: 16px 18px; border: 1px solid #dce7f8; border-radius: 9px; background: #f4f8ff; }
.class-export-bar > div { flex: 1 1 300px; }
.class-export-bar strong { color: #294e82; font-size: 14px; }
.class-export-bar p { margin: 5px 0 0; font-size: 12px; line-height: 1.7; }
.class-export-option { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.class-export-bar button:disabled { cursor: not-allowed; }
.school-department { color: #dceaff; font-size: 15px; font-weight: 500; letter-spacing: 1px; line-height: 1.6; }
.school-masthead-identity .school-masthead-caption { border-left: 0; padding-left: 0; margin-top: 5px; font-size: 11px; color: #c6dcff; }
.school-masthead-identity .school-masthead-caption span { margin-top: 4px; color: #bdd3f5; }
.deletion-protection-entry { margin: 18px 0 12px; padding: 0 13px; }
#workspace:not([data-account-role="admin"]) .deletion-protection-entry,
.deletion-protection-entry[hidden] { display: none; }
.deletion-protection-entry > button { display: flex; align-items: center; gap: 10px; color: #536b8d; padding: 9px 0; }
.deletion-protection-entry svg { width: 19px; height: 19px; }
.deletion-protection-entry small { display: block; margin-left: 29px; color: #7a8da8; font-size: 11px; line-height: 1.5; }
.deletion-protection-entry .needs-setup { color: #a16c24; }
.deletion-protection-entry [hidden] { display: none; }
.deletion-key-field { margin-top: 18px; }
.deletion-key-help { margin: 6px 0 16px; font-size: 12px; line-height: 1.7; }
.deletion-key-help button { padding: 0 4px; font-size: inherit; }
.deletion-security-dialog { width: 440px; box-sizing: border-box; }
.deletion-security-dialog form > label { margin-bottom: 14px; }
.deletion-security-dialog h2 { margin: 0 0 16px; }
.deletion-protection-state { margin-bottom: 14px; }
@media (max-width: 700px) {
  main > .school-masthead { flex-direction: column; align-items: flex-start; gap: 8px; }
  main > .school-masthead .school-logo { flex-basis: auto; width: min(300px, 100%); }
  .school-masthead-identity { border-left: 0; padding-left: 0; }
  .school-department { font-size: 13px; letter-spacing: .8px; }
}
