:root {
  color-scheme: light;
  --blue: #1677d2;
  --blue-deep: #0b4d8c;
  --blue-pale: #eaf5ff;
  --ink: #102c47;
  --muted: #71869a;
  --line: #dce8f2;
  --surface: #fff;
  --bg: #edf6fc;
  --green: #16a878;
  --orange: #f39a38;
  --shadow: 0 14px 36px rgba(21, 81, 132, .11);
}
* { box-sizing: border-box; }
html { background: #dfeef8; }
body { margin: 0; color: var(--ink); background: linear-gradient(135deg, #e7f3fb, #f6fbff); font-family: "Microsoft YaHei", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--blue-deep); }
.boot span, .brand-seal { display: grid; place-items: center; width: 44px; height: 44px; margin: auto; border-radius: 50%; background: var(--blue); color: #fff; font: italic 25px Georgia, serif; }
.shell { width: min(100%, 720px); min-height: 100vh; margin: auto; background: var(--bg); box-shadow: 0 0 50px rgba(27, 84, 127, .14); padding-bottom: 84px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; min-height: 74px; padding: 12px 22px; color: #fff; background: linear-gradient(120deg, var(--blue-deep), var(--blue)); }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-seal { width: 40px; height: 40px; margin: 0; background: #fff; color: var(--blue-deep); }
.brand strong { display: block; font-size: 17px; }
.brand small { display: block; margin-top: 3px; opacity: .78; letter-spacing: .12em; font-size: 9px; }
.avatar-button { width: 42px; height: 42px; padding: 0; overflow: hidden; border: 2px solid rgba(255,255,255,.7); border-radius: 50%; color: var(--blue-deep); background: #fff; font-weight: 800; }
.avatar-button img, .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; width: 100%; height: 100%; }
.avatar-fallback[hidden] { display: none; }
.page { padding: 20px 18px; }
.hero { position: relative; overflow: hidden; padding: 24px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, #0f5ba0, #2492e6); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: -50px; top: -66px; width: 190px; height: 190px; border: 28px solid rgba(255,255,255,.09); border-radius: 50%; }
.eyebrow { margin: 0 0 7px; color: #90cfff; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.hero h1 { position: relative; z-index: 1; margin: 0; font-size: 27px; }
.hero > p:last-of-type { position: relative; z-index: 1; margin: 9px 0 22px; opacity: .84; font-size: 13px; }
.stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 15px; background: rgba(255,255,255,.12); backdrop-filter: blur(5px); }
.stat strong { display: block; font-size: 22px; }
.stat span { font-size: 11px; opacity: .78; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin: 24px 2px 12px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.text-btn { border: 0; color: var(--blue); background: none; font-weight: 700; font-size: 12px; }
.card { border: 1px solid rgba(214,228,240,.86); border-radius: 20px; background: var(--surface); box-shadow: 0 8px 24px rgba(23, 79, 124, .07); }
.course-list { display: grid; gap: 10px; }
.course { display: grid; grid-template-columns: 62px 1fr auto; gap: 14px; align-items: center; padding: 15px; }
.course-button { width: 100%; color: inherit; text-align: left; }
.course-time { padding-right: 13px; border-right: 1px solid var(--line); text-align: center; }
.course-time strong { display: block; font-size: 18px; }
.course-time span { color: var(--muted); font-size: 10px; }
.course-main strong { display: block; margin-bottom: 5px; }
.course-main span { color: var(--muted); font-size: 12px; }
.status { padding: 5px 9px; border-radius: 999px; color: var(--blue); background: var(--blue-pale); font-size: 10px; font-weight: 800; white-space: nowrap; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; margin-bottom: 6px; color: var(--ink); }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.quick { display: flex; align-items: center; gap: 13px; min-height: 78px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: #fff; text-align: left; }
.quick i { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 12px; color: var(--blue); background: var(--blue-pale); font-style: normal; font-size: 20px; }
.quick strong, .quick small { display: block; }
.quick small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.task-banner { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; margin-top: 13px; padding: 13px 15px; border: 1px solid #b9dcf7; border-radius: 16px; background: #f7fcff; cursor: pointer; }
.task-banner > span { display: grid; place-items: center; height: 36px; border-radius: 11px; color: #fff; background: var(--blue); font-weight: 900; }
.task-banner strong, .task-banner small { display: block; }
.task-banner small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.task-banner > b { color: var(--blue); font-size: 23px; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); width: min(100%, 720px); min-height: 68px; transform: translateX(-50%); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.bottom-nav button { border: 0; color: #8295a6; background: transparent; font-size: 10px; }
.bottom-nav b { display: block; margin-bottom: 3px; font-size: 19px; font-weight: 500; }
.bottom-nav button.active { color: var(--blue); font-weight: 800; }
.page-title { margin: 2px 2px 18px; }
.page-title h1 { margin: 0; font-size: 25px; }
.page-title p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 10px; }
.day { padding: 10px 2px; border: 0; border-radius: 13px; color: var(--muted); background: transparent; text-align: center; }
.day span, .day strong { display: block; }
.day span { margin-bottom: 7px; font-size: 10px; }
.day strong { font-size: 15px; }
.day.active { color: #fff; background: var(--blue); box-shadow: 0 6px 14px rgba(22,119,210,.25); }
.day.today:not(.active) { color: var(--blue); background: var(--blue-pale); }
.filter-tabs { display: flex; gap: 7px; margin: 14px 0; overflow-x: auto; }
.filter-tabs button { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; white-space: nowrap; font-size: 11px; }
.filter-tabs button.active { border-color: var(--blue); color: var(--blue); background: var(--blue-pale); font-weight: 800; }
.period-switch { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin: -4px 0 12px; }
.period-switch button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--blue); background: #fff; font-size: 11px; }
.period-switch strong { text-align: center; font-size: 11px; }
.slot-panel { padding: 17px; }
.slot-panel h3 { margin: 0 0 13px; font-size: 15px; }
.slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { position: relative; min-height: 54px; padding: 8px 3px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; font-size: 13px; font-weight: 700; }
.slot small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 500; }
.slot.selected { border-color: var(--blue); color: var(--blue); background: var(--blue-pale); }
.slot.opened { border-color: #a9e6d0; color: #087d59; background: #ecfbf6; }
.slot.booked { border-color: #ffddb8; color: #ad5b04; background: #fff6eb; }
.slot.mismatch { border-color: #f0b9b9; color: #b23a3a; background: #fff5f5; }
.slot.close-selected { border-color: #e15858; color: #b72f2f; background: #fff0f0; box-shadow: inset 0 0 0 1px #e15858; }
.actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 16px; }
.availability-actions { grid-template-columns: 1fr 1fr 1.35fr; }
.batch-close-actions { grid-template-columns: 1fr 1.4fr; }
.btn { min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; font-weight: 800; }
.btn.primary { border-color: var(--blue); color: #fff; background: var(--blue); box-shadow: 0 7px 16px rgba(22,119,210,.2); }
.btn.danger-primary { border-color: #d84d4d; color: #fff; background: #d84d4d; box-shadow: 0 7px 16px rgba(195,54,54,.18); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.permission-note { margin: 13px 0 0; padding: 11px 13px; border-radius: 12px; color: #6e7e8e; background: #f4f7fa; font-size: 11px; line-height: 1.6; }
.availability-tools { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.availability-tools label { color: var(--muted); font-size: 10px; }
.availability-tools select { display: block; min-width: 120px; height: 36px; margin-top: 5px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.btn.compact { min-height: 38px; font-size: 11px; }
.materials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.material { min-height: 130px; padding: 18px; overflow: hidden; }
.material::before { content: "BOOK"; display: block; width: fit-content; margin-bottom: 24px; padding: 5px 8px; border-radius: 6px; color: var(--blue); background: var(--blue-pale); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.material strong { display: block; font-size: 14px; }
.material p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.profile-card { overflow: hidden; }
.profile-cover { height: 105px; background: linear-gradient(125deg, var(--blue-deep), #32a0ed); }
.profile-info { padding: 0 20px 20px; text-align: center; }
.profile-avatar { display: grid; place-items: center; width: 78px; height: 78px; margin: -39px auto 9px; overflow: hidden; border: 4px solid #fff; border-radius: 50%; color: #fff; background: var(--blue); font-size: 26px; font-weight: 800; }
.profile-info h1 { margin: 0; font-size: 22px; }
.profile-info p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.info-list { margin-top: 14px; overflow: hidden; }
.info-row { display: flex; justify-content: space-between; gap: 18px; padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); }
.logout { width: 100%; margin-top: 16px; color: #d54646; }
.profile-form, .lesson-form { display: grid; gap: 13px; margin-top: 14px; padding: 18px; }
.profile-form h2, .lesson-form h2, .detail-section h2 { margin: 0 0 4px; font-size: 16px; }
.profile-form label, .lesson-form label { color: var(--ink); font-size: 11px; font-weight: 800; }
.profile-form input, .profile-form textarea, .lesson-form input, .lesson-form textarea, .lesson-form select {
  width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: #fafdff; resize: vertical;
}
.back-link { margin: 0 0 12px; border: 0; color: var(--blue); background: none; font-weight: 800; }
.workbench-back { display: inline-flex; align-items: center; min-height: 36px; margin-bottom: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.lesson-hero { display: flex; align-items: center; justify-content: space-between; padding: 20px; color: #fff; background: linear-gradient(125deg, var(--blue-deep), var(--blue)); }
.lesson-hero p { margin: 0 0 5px; color: #a9d8ff; font-size: 11px; }
.lesson-hero h1 { margin: 0 0 10px; font-size: 25px; }
.student-monogram { display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid rgba(255,255,255,.5); border-radius: 50%; background: rgba(255,255,255,.14); font-size: 24px; font-weight: 900; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin-top: 12px; }
.detail-section { padding: 17px; }
.detail-row { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.detail-row span { color: var(--muted); }
.detail-row strong { text-align: right; }
.info-note { margin: 11px 0 0; padding: 10px; border-radius: 9px; color: var(--muted); background: #f4f8fb; font-size: 10px; line-height: 1.6; }
.lesson-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 9px; margin-top: 12px; padding: 14px; }
.link-btn { display: grid; place-items: center; text-decoration: none; }
.danger-zone { margin-top: 14px; padding: 14px; text-align: center; }
.cancel-btn { width: 100%; color: #cf4545; border-color: #f0caca; }
.danger-zone p { color: var(--muted); font-size: 9px; }
.task-item { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 14px; color: inherit; text-align: left; }
.task-item p, .fixed-item p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.task-icon { display: grid; place-items: center; height: 38px; border-radius: 11px; color: var(--blue); background: var(--blue-pale); font-weight: 900; }
.stats-board { display: grid; grid-template-columns: repeat(3, 1fr); padding: 10px; }
.stats-board div { padding: 22px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.stats-board div:nth-child(3n) { border-right: 0; }
.stats-board div:nth-last-child(-n+3) { border-bottom: 0; }
.stats-board strong, .stats-board span { display: block; }
.stats-board strong { color: var(--blue); font-size: 24px; }
.stats-board span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.fixed-item { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 15px; }
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.login-art { position: relative; overflow: hidden; padding: 54px 48px; color: #fff; background: linear-gradient(150deg, #073e70, #1686dc); }
.login-art::after { content: ""; position: absolute; right: -90px; bottom: -90px; width: 280px; height: 280px; border: 44px solid rgba(255,255,255,.09); border-radius: 50%; }
.login-art h1 { max-width: 390px; margin: 80px 0 18px; font-size: clamp(32px, 5vw, 56px); line-height: 1.22; }
.login-art p { max-width: 390px; opacity: .8; line-height: 1.8; }
.login-box { display: grid; place-content: center; padding: 44px; }
.login-form { width: min(100%, 370px); }
.login-form .eyebrow { color: var(--blue); }
.login-form h2 { margin: 6px 0 30px; font-size: 30px; }
.login-form label { display: block; margin: 0 0 16px; font-size: 12px; font-weight: 800; }
.login-form input { width: 100%; height: 52px; margin-top: 8px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: #f9fcff; }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,119,210,.1); }
.login-error { margin: 4px 0 15px; padding: 11px; border-radius: 10px; color: #b93232; background: #fff0f0; font-size: 12px; }
.login-form .btn { width: 100%; }
.toast { position: fixed; left: 50%; bottom: 88px; z-index: 50; max-width: calc(100% - 40px); transform: translateX(-50%); padding: 11px 16px; border-radius: 999px; color: #fff; background: rgba(13, 43, 67, .92); font-size: 12px; box-shadow: var(--shadow); }
@media (max-width: 820px) {
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 210px; padding: 24px 26px; }
  .login-art::after { right: -55px; bottom: -115px; width: 230px; height: 230px; }
  .login-art .brand-seal { width: 38px; height: 38px; margin: 0; font-size: 22px; }
  .login-art h1 { max-width: 470px; margin: 24px 0 8px; font-size: 30px; line-height: 1.28; }
  .login-art p { max-width: 520px; margin: 0; font-size: 12px; line-height: 1.65; }
  .login-box { min-height: calc(100vh - 210px); padding: 30px 26px 40px; place-content: start center; }
  .login-form { width: min(100%, 460px); }
  .login-form h2 { margin: 4px 0 22px; font-size: 26px; }
  .login-form input { height: 50px; }
  .stats { gap: 7px; }
  .stat { padding: 11px 9px; }
  .stat strong { font-size: 19px; }
  .course { grid-template-columns: 55px 1fr; }
  .course .status { grid-column: 2; width: fit-content; }
  .slot-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .shell { padding-bottom: 76px; }
  .topbar { min-height: 64px; padding: 10px 15px; }
  .brand { gap: 9px; }
  .brand-seal { width: 35px; height: 35px; font-size: 20px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 8px; }
  .avatar-button { width: 36px; height: 36px; }
  .page { padding: 15px 12px; }
  .hero { padding: 20px 17px; border-radius: 20px; }
  .hero h1 { font-size: 23px; }
  .hero > p:last-of-type { margin-bottom: 17px; }
  .stat span { font-size: 9px; }
  .quick { min-height: 72px; padding: 11px; gap: 10px; }
  .quick i { flex-basis: 34px; height: 34px; }
  .bottom-nav { min-height: 64px; }
  .login-art { min-height: 176px; padding: 19px 20px; }
  .login-art h1 { max-width: 330px; margin: 18px 0 6px; font-size: 25px; }
  .login-art p { max-width: 330px; font-size: 11px; }
  .login-box { min-height: calc(100vh - 176px); padding: 24px 20px 30px; }
  .login-form .eyebrow { margin-bottom: 5px; font-size: 9px; }
  .login-form h2 { margin-bottom: 18px; font-size: 24px; }
  .login-form label { margin-bottom: 13px; }
  .login-form input { height: 48px; }
  .login-form .btn { min-height: 48px; }
  .availability-tools { align-items: stretch; flex-direction: column; }
  .availability-tools select { width: 100%; }
  .availability-actions { grid-template-columns: 1fr 1fr; }
  .availability-actions .primary { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  .login-art p { display: none; }
  .login-art { min-height: 150px; }
  .login-box { min-height: calc(100vh - 150px); }
  .quick-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding-inline: 6px; }
}
