:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --line: #e4e9f1;
  --surface: #fff;
  --page: #f4f7fb;
  --accent: #2156d9;
  --accent-dark: #1744b0;
  --success: #087443;
  --error: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 10% 0, #e9f0ff 0, transparent 34%), var(--page); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif; }
.shell, .monitor-shell, .timetable-shell, .account-shell { width: min(1080px, calc(100% - 32px)); max-width: 1080px; margin: 0 auto; padding: 36px 0 64px; }
.shell.narrow { max-width: 520px; }
header { margin-bottom: 24px; min-height: 110px; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 28px; margin-bottom: 8px; }
.header-top .eyebrow { margin: 0; line-height: 1; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 0; font-size: clamp(28px, 4.5vw, 38px); letter-spacing: -.03em; line-height: 1.2; }
h2 { margin: 4px 0 18px; font-size: 20px; }
.lead, .hint, .muted { color: var(--muted); line-height: 1.5; }
.lead { margin: 8px 0 0; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.login-card { grid-column: 1 / -1; }
.closed-card { text-align: center; padding: 42px 24px; margin-bottom: 24px; }
.closed-card h2 { margin-bottom: 12px; }
.closed-card .lead { margin: 14px auto 24px; max-width: 480px; }
.closed-card .button-link { display: inline-flex; align-items: center; justify-content: center; width: auto; padding: 0 32px; }
.card { position: relative; padding: 25px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 14px 40px rgb(35 55 90 / 7%); }
.step { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #eaf0ff; color: var(--accent); font-weight: 800; }
form { display: grid; gap: 15px; }
label { display: grid; gap: 7px; color: #344054; font-size: 13px; font-weight: 700; }
.field-help { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
input { width: 100%; min-width: 0; border: 1px solid #cfd6e2; border-radius: 11px; padding: 12px 13px; background: #fff; color: var(--ink); font: inherit; }
input:focus { outline: 3px solid rgb(33 86 217 / 15%); border-color: var(--accent); }
.otp-input { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 18px; font-weight: 700; letter-spacing: .24em; text-align: center; }
.otp-input::placeholder { letter-spacing: .24em; font-weight: 400; opacity: .45; }
button { min-height: 45px; border: 0; border-radius: 11px; padding: 0 18px; background: var(--accent); color: #fff; font: inherit; font-weight: 750; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
button:hover { background: var(--accent-dark); }
button:disabled { opacity: .55; cursor: wait; }
button.secondary, .button-link.secondary { border: 1px solid #dce4ef; background: #eef2f7; color: #273754; }
button.secondary:hover, .button-link.secondary:hover { background: #dde5f0; color: #172338; }
button.danger, .danger-button { border: 1px solid #f1b5b0; background: #fff; color: var(--error); }
button.danger:hover, .danger-button:hover { background: #fff2f0; }
.text-button { background: transparent; color: var(--accent); }
.text-button:hover { background: #edf2ff; }
.button-link { display: inline-grid; place-items: center; min-height: 45px; margin-top: 14px; padding: 0 18px; border-radius: 11px; background: var(--accent); color: #fff; font-weight: 750; text-decoration: none; transition: background .15s ease, color .15s ease; }
.button-link:hover { background: var(--accent-dark); }
.hint { margin: 14px 0 0; font-size: 13px; }
.warning { padding: 11px 13px; background: #fff8e7; border-radius: 10px; color: #7a4b00; }
.notice { margin-bottom: 18px; padding: 13px 16px; border: 1px solid #a7d7bd; border-radius: 12px; background: #edfdf3; color: var(--success); font-size: 14px; }
.notice.error { border-color: #f1b5b0; background: #fff2f0; color: var(--error); }
body[data-page] .shell > .notice { position:fixed; right:24px; bottom:24px; z-index:1200; width:min(420px,calc(100% - 32px)); margin:0; box-shadow:0 16px 40px rgb(35 55 90 / 18%); }
.profile-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.profile-card h2 { margin: 2px 0 8px; }
.profile-card .muted { margin: 0; font-size: 12px; }
.badge { display: inline-block; margin: 0; padding: 5px 9px; border-radius: 999px; background: #edf2ff; color: var(--accent); font-size: 12px; font-weight: 750; }
#member-view > .card + .card { margin-top: 18px; }
.bound-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.bound-actions .button-link { margin-top: 0; }
.confirm-dialog { width: min(460px, calc(100% - 32px)); max-width: none; border: 0; padding: 0; background: transparent; color: var(--ink); }
.confirm-dialog::backdrop { background: rgb(15 23 42 / 45%); backdrop-filter: blur(3px); }
.confirm-card { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 24px 70px rgb(15 23 42 / 24%); }
.confirm-card h2 { margin: 0 0 12px; }
.confirm-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
dl { margin: 0; }
dl div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 700; text-align: right; }
[hidden] { display: none !important; }
.app-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 24px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: rgb(255 255 255 / 85%); box-shadow: 0 6px 20px rgb(35 55 90 / 4%); }
.app-nav a { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 56px; padding: 10px 14px; border-radius: 11px; color: var(--muted); text-decoration: none; transition: background .16s ease, color .16s ease; }
.app-nav a:hover { color: var(--accent); background: #f3f6fc; }
.app-nav a[aria-current="page"] { color: var(--accent); background: #eaf0ff; box-shadow: inset 0 0 0 1px #d5e0ff; }
.app-nav .nav-index { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #6e7d98; background: #eef2f7; font-size: 11px; font-weight: 800; }
.app-nav a[aria-current="page"] .nav-index { color: #fff; background: var(--accent); }
.app-nav strong, .app-nav small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-nav strong { color: inherit; font-size: 13px; }
.app-nav small { margin-top: 2px; color: #8792a5; font-size: 10px; font-weight: 500; }
.page-switch { margin: 22px 0 0; color: var(--muted); text-align: center; }
.page-switch a { color: var(--accent); font-weight: 750; }
@media (max-width: 680px) { .shell { padding-top: 28px; } .grid { grid-template-columns: 1fr; } .login-card { grid-column: auto; } .card { padding: 21px; } .app-nav { gap: 4px; padding: 4px; } .app-nav a { justify-content: center; min-height: 37px; padding: 9px 4px; text-align: center; } .app-nav .nav-index { display: none; } .app-nav small { display: none; } }
@media (max-width: 520px) { body[data-page] .shell > .notice { right:16px; bottom:16px; } }
.lang-switcher-bar { display: inline-flex; align-items: center; gap: 4px; padding: 0; margin: 0; }
.lang-switcher-bar button { background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; font-size: 12px; min-height: 28px; height: 28px; color: var(--muted); cursor: pointer; font-weight: 500; transition: background .14s, color .14s, border-color .14s; }
.lang-switcher-bar button.active { background: var(--accent); color: #fff; border-color: var(--accent); cursor: default; }
.lang-switcher-bar button:hover:not(.active) { background: #f3f6fc; color: var(--accent); border-color: #c5d4f0; }
