:root {
  --navy: #0b1f3a;
  --blue: #155eef;
  --blue-dark: #004eeb;
  --blue-soft: #eff4ff;
  --green: #087a57;
  --green-soft: #ecfdf3;
  --red: #c4320a;
  --amber: #b54708;
  --ink: #17202f;
  --muted: #667085;
  --line: #e4e7ec;
  --surface: #fff;
  --canvas: #f5f7fb;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 24px auto 64px; }
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 42px; color: white; border: 1px solid rgba(255,255,255,.16); border-radius: 26px; background: radial-gradient(circle at 82% 8%, rgba(99,157,255,.46), transparent 31%), radial-gradient(circle at 102% 106%, rgba(118,177,255,.2), transparent 28%), linear-gradient(132deg, #0a2342 0%, #123b70 52%, #2865c4 100%); box-shadow: 0 22px 58px rgba(13,42,84,.17); }
.hero::before { content: ""; position: absolute; z-index: -1; width: 360px; height: 360px; top: -260px; right: 12%; border: 70px solid rgba(255,255,255,.055); border-radius: 50%; }
.hero::after { content: ""; position: absolute; z-index: -1; width: 290px; height: 290px; right: -145px; bottom: -190px; border: 46px solid rgba(255,255,255,.07); border-radius: 50%; }
.hero-main { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.hero-title-group { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 17px; color: #c9dcff; font-size: 13px; font-weight: 700; letter-spacing: .055em; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8ab8ff; box-shadow: 0 0 0 5px rgba(138,184,255,.12); }
.hero h1 { margin: 0; font-size: clamp(36px, 5vw, 52px); font-weight: 780; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.direction-link { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 12px; padding: 11px 13px 11px 17px; color: #f4f8ff; text-decoration: none; font-size: 13px; font-weight: 650; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 1px rgba(255,255,255,.12); backdrop-filter: blur(12px); transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.direction-link:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.16); }
.link-arrow { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: rgba(255,255,255,.14); }
.window-notice { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 38px; padding: 10px; color: #eaf2ff; border: 1px solid rgba(255,255,255,.12); border-radius: 17px; background: rgba(5,26,54,.3); box-shadow: inset 0 1px rgba(255,255,255,.06); backdrop-filter: blur(16px); }
.window-notice.is-message { display: block; padding: 17px 18px; color: #d9e7ff; font-size: 13px; }
.window-item { min-width: 0; padding: 15px 17px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.075); }
.window-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.window-category { color: #fff; font-size: 14px; font-weight: 750; }
.window-time { margin: 0; color: #d8e6fb; font-size: 12px; line-height: 1.65; font-variant-numeric: tabular-nums; }
.window-time i { margin: 0 7px; color: #8fb2e8; font-style: normal; }
.window-status { flex: 0 0 auto; padding: 4px 8px; font-size: 11px; font-weight: 700; border-radius: 999px; }
.window-status.open { color: #d1fae5; background: rgba(16,185,129,.2); }
.window-status.before { color: #fef0c7; background: rgba(245,158,11,.2); }
.window-status.after, .window-status.closed { color: #d0d5dd; background: rgba(255,255,255,.1); }
.banner { margin: 18px 0; padding: 13px 16px; border-radius: 10px; }
.banner-warning { color: #7a2e0e; background: #fffaeb; border: 1px solid #fedf89; }
.tabs { display: flex; width: fit-content; gap: 4px; margin: 24px 0 16px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #eaecf0; }
.tab { min-width: 130px; padding: 10px 18px; color: var(--muted); font-weight: 700; border: 0; border-radius: 8px; background: transparent; }
.tab.active { color: var(--blue); background: white; box-shadow: 0 1px 4px rgba(16,24,40,.12); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.stats article { display: flex; align-items: baseline; gap: 12px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.stats strong { color: var(--blue); font-size: 30px; }
.stats span { color: var(--muted); font-size: 13px; }
.panel-stack { display: grid; gap: 16px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 8px rgba(16,24,40,.035); }
.card.narrow { width: min(100%, 480px); margin: 24px auto; }
.section-heading, .section-heading > div, .toolbar, .toolbar-actions, .form-actions, .dialog-actions { display: flex; align-items: center; gap: 12px; }
.section-heading { justify-content: space-between; margin-bottom: 20px; }
.section-heading h2, .toolbar h2 { margin: 0; font-size: 19px; }
.step { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--blue); font-size: 12px; font-weight: 800; border-radius: 9px; background: var(--blue-soft); }
.status-badge { padding: 5px 10px; color: #475467; font-size: 12px; border-radius: 999px; background: #f2f4f7; }
.status-badge.ok { color: var(--green); background: var(--green-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-stack { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #475467; font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; padding: 10px 12px; color: var(--ink); border: 1px solid #d0d5dd; border-radius: 9px; background: white; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #84adff; box-shadow: 0 0 0 3px #eff4ff; }
textarea { resize: vertical; line-height: 1.55; }
.full { grid-column: 1 / -1; }
.form-actions { justify-content: space-between; flex-wrap: wrap; margin-top: 4px; }
.button { padding: 10px 16px; color: #344054; font-weight: 700; font-size: 13px; border: 1px solid #d0d5dd; border-radius: 9px; background: white; }
.button:hover { filter: brightness(.97); }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button.primary { color: white; border-color: var(--blue); background: var(--blue); }
.button.ghost { color: var(--blue); border-color: #b2ccff; background: #fff; }
.button.danger-outline { color: var(--red); border-color: #fda29b; }
.button.small { padding: 7px 11px; font-size: 12px; }
.filters { display: grid; grid-template-columns: 1fr 190px 190px; gap: 10px; margin-bottom: 16px; }
.teacher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 12px; }
.teacher-card { display: grid; min-height: 190px; padding: 17px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: white; transition: .18s ease; }
.teacher-card:hover:not(:disabled) { transform: translateY(-2px); border-color: #84adff; box-shadow: 0 8px 24px rgba(21,94,239,.1); }
.teacher-card:disabled { cursor: not-allowed; opacity: .52; }
.teacher-card.selected { border-color: #6ce9a6; background: #f6fef9; }
.teacher-name { font-size: 17px; font-weight: 800; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; align-content: start; }
.tag { padding: 3px 7px; color: #475467; font-size: 11px; border-radius: 5px; background: #f2f4f7; }
.tag.blue { color: #1849a9; background: #eff4ff; }
.tag.green { color: #067647; background: #ecfdf3; }
.slots { display: flex; align-items: end; justify-content: space-between; margin-top: auto; color: var(--muted); font-size: 12px; }
.slots strong { color: var(--green); font-size: 17px; }
.slots strong.low { color: var(--amber); }
.slots strong.zero { color: var(--red); }
.selection-card { color: #065f46; border-color: #a6f4c5; background: linear-gradient(135deg, #f6fef9, #ecfdf3); }
.selection-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.selection-summary h2 { margin: 0 0 5px; color: #054f31; font-size: 18px; }
.muted { margin: 5px 0; color: var(--muted); font-size: 13px; }
.toolbar { justify-content: space-between; }
.toolbar-actions { flex-wrap: wrap; justify-content: end; }
.window-editor { display: grid; gap: 12px; }
.window-row { display: grid; grid-template-columns: 130px 1fr 1fr auto auto; gap: 10px; align-items: end; padding: 12px; border-radius: 10px; background: #f9fafb; }
.check { display: flex; grid-auto-flow: column; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid #eaecf0; }
th { color: #475467; font-size: 12px; background: #f9fafb; }
td .compact { width: 76px; padding: 6px 8px; }
.empty { grid-column: 1 / -1; padding: 45px 15px; color: #98a2b3; text-align: center; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(16,24,40,.55); }
.dialog-card { width: min(100%, 430px); padding: 24px; border-radius: 14px; background: white; box-shadow: 0 24px 60px rgba(0,0,0,.22); }
.dialog-card h3 { margin: 0 0 10px; }
.dialog-card p { color: var(--muted); line-height: 1.7; white-space: pre-line; }
.dialog-actions { justify-content: end; margin-top: 22px; }
.toast { position: fixed; z-index: 120; right: 22px; top: 22px; max-width: min(430px, calc(100% - 44px)); padding: 12px 16px; color: white; font-size: 13px; border-radius: 10px; background: var(--navy); box-shadow: var(--shadow); transform: translateY(-120px); opacity: 0; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #b42318; }
.toast.success { background: #067647; }
@media (max-width: 760px) {
  .shell { width: min(100% - 20px, 1180px); margin-top: 10px; }
  .hero, .card { padding: 20px; }
  .hero { border-radius: 20px; }
  .hero-main { align-items: stretch; flex-direction: column; gap: 24px; }
  .hero h1 { font-size: clamp(34px, 11vw, 44px); }
  .eyebrow { align-items: flex-start; line-height: 1.5; }
  .eyebrow::before { flex: 0 0 auto; margin-top: 6px; }
  .direction-link { align-self: flex-start; }
  .window-notice { grid-template-columns: 1fr; margin-top: 28px; }
  .stats { grid-template-columns: 1fr; gap: 8px; }
  .stats article { padding: 13px 16px; }
  .form-grid, .filters { grid-template-columns: 1fr; }
  .window-row { grid-template-columns: 1fr; }
  .selection-summary, .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { justify-content: start; }
  .tab { min-width: 0; }
}
