:root {
    --navy: #14253d;
    --navy-deep: #0d1b2d;
    --navy-soft: #213750;
    --primary: #176b5b;
    --primary-dark: #115448;
    --text: #1b2735;
    --muted: #6d7a89;
    --subtle: #94a0ad;
    --surface: #fff;
    --canvas: #f4f6f8;
    --line: #dfe4e9;
    --line-strong: #cdd4dc;
    box-sizing: border-box;
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: inherit; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button, a { transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
a { color: var(--primary); }

/* 正式管理后台 */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 248px; display: flex; flex-direction: column; padding: 0 14px 18px; color: #dce5ee; background: var(--navy-deep); border-right: 1px solid rgba(255,255,255,.06); }
.brand { height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 10px; color: inherit; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; color: #fff; background: var(--primary); border: 1px solid rgba(255,255,255,.18); border-radius: 6px; font-size: 18px; font-weight: 800; }
.brand > span:last-child { min-width: 0; display: grid; gap: 2px; }
.brand strong { color: #fff; font-size: 17px; letter-spacing: .04em; }
.brand small { color: #8293a5; font-size: 9px; letter-spacing: .16em; }
.nav-section-label { padding: 20px 13px 8px; color: #6f8194; font-size: 11px; letter-spacing: .12em; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { position: relative; min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 13px; color: #aebdca; border-radius: 4px; text-decoration: none; font-size: 14px; }
.side-nav a:hover { color: #fff; background: rgba(255,255,255,.055); }
.side-nav a.active { color: #fff; background: var(--navy-soft); font-weight: 700; }
.side-nav a.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; background: #43a58d; }
.side-nav i { width: 17px; height: 17px; border: 1.5px solid currentColor; border-radius: 3px; opacity: .85; }
.side-nav a:nth-child(1) i { background: linear-gradient(90deg, transparent 45%, currentColor 45%, currentColor 55%, transparent 55%), linear-gradient(transparent 45%, currentColor 45%, currentColor 55%, transparent 55%); }
.side-nav a:nth-child(2) i { border-radius: 50%; box-shadow: inset 0 0 0 4px var(--navy-deep); background: currentColor; }
.side-nav a.active:nth-child(2) i { box-shadow: inset 0 0 0 4px var(--navy-soft); }
.sidebar-account { margin-top: auto; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 15px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.account-avatar { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: #28415e; border-radius: 50%; font-size: 14px; font-weight: 800; }
.account-copy { min-width: 0; display: grid; gap: 2px; }
.account-copy strong { overflow: hidden; color: #eef3f7; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { color: #8394a5; font-size: 11px; }
.logout-button { padding: 5px; color: #8fa0b0; background: transparent; border: 0; cursor: pointer; font-size: 12px; }
.logout-button:hover { color: #fff; }
.workspace { grid-column: 2; min-width: 0; }
.workspace-header { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: #fff; border-bottom: 1px solid var(--line); }
.workspace-header > div:first-child { display: flex; align-items: baseline; gap: 14px; }
.workspace-header strong { font-size: 15px; }
.workspace-header span { color: var(--subtle); font-size: 12px; }
.system-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.system-state i, .status-dot { width: 7px; height: 7px; display: inline-block; background: #36a173; border-radius: 50%; box-shadow: 0 0 0 3px rgba(54,161,115,.13); }
.workspace-header-tools { display: flex; align-items: center; }
.realtime-health { display: inline-flex; align-items: center; gap: 5px; padding: 3px 5px; color: #9aa7b5 !important; font: 600 9px/1 Arial, sans-serif !important; letter-spacing: .06em; cursor: default; }
.realtime-health i { width: 5px; height: 5px; display: block; background: #d65757; border-radius: 50%; box-shadow: 0 0 0 2px rgba(214,87,87,.09); }
.realtime-health b { font: inherit; }
.realtime-health[data-state="connected"] i { background: #31a477; box-shadow: 0 0 0 2px rgba(49,164,119,.09); }
.page-wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 30px 34px 64px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; }
.page-heading h1, .login-card h1 { margin: 4px 0 0; color: var(--text); font-size: 27px; line-height: 1.25; letter-spacing: -.02em; }
.page-heading .muted { margin: 8px 0 0; }
.eyebrow { margin: 0; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.7; }
.flash { margin-bottom: 18px; padding: 12px 15px; border: 1px solid; border-radius: 5px; font-size: 13px; }
.flash.success { color: #175c48; background: #edf8f4; border-color: #cbe6dc; }
.flash.error { color: #913434; background: #fff3f2; border-color: #f0cecb; }
.flash ul { margin: 0; padding-left: 18px; }

/* 数据与表单 */
.panel, .class-card, .stat-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 2px rgba(24,39,56,.025); }
.panel { padding: 22px; }
.panel h2 { margin: 0 0 20px; font-size: 17px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-grid article { position: relative; min-height: 118px; padding: 22px 22px 20px 27px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.stat-grid article::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--primary); }
.stat-grid strong { color: var(--text); font-size: 31px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-grid span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid #e9edf0; font-size: 13px; }
th { color: #637181; background: #f8f9fa; font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfc; }
.two-column { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack-form { display: grid; gap: 15px; }
.stack-form label { display: grid; gap: 7px; color: #3e4b59; font-size: 13px; font-weight: 700; }
.stack-form input, .stack-form textarea, .inline-form input { width: 100%; padding: 10px 11px; color: var(--text); background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; }
.stack-form input:hover, .stack-form textarea:hover, .inline-form input:hover { border-color: #aeb8c1; }
.stack-form input:focus, .stack-form textarea:focus, .inline-form input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(23,107,91,.1); }
fieldset { margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 4px; }
legend { padding: 0 5px; color: var(--muted); font-size: 12px; }
.checkbox { display: flex !important; grid-template-columns: auto 1fr !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.checkbox input { width: auto; accent-color: var(--primary); }
.primary-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; color: #fff !important; background: var(--primary); border: 1px solid var(--primary); border-radius: 4px; text-decoration: none; font-size: 13px; font-weight: 700; cursor: pointer; }
.primary-button:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 2px 5px rgba(17,84,72,.18); }
.card-list { display: grid; gap: 10px; }
.card-list article { display: grid; gap: 6px; padding: 15px 16px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.card-list article:hover { background: #fcfdfd; border-color: #c7d0d8; }
.card-list article > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-list article strong { font-size: 14px; }
.card-list span, .card-list small { color: var(--muted); font-size: 12px; }
.card-list a { width: fit-content; color: var(--primary); font-size: 13px; font-weight: 700; text-decoration: none; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 5px; }
.inline-form button { padding: 8px 13px; color: var(--primary); background: #edf6f3; border: 1px solid #b8d5ce; border-radius: 4px; cursor: pointer; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 16px; }
.class-card { min-height: 205px; padding: 21px; }
.class-card > div:first-child { color: #27705b; font-size: 12px; }
.class-card h2 { margin: 24px 0 5px; font-size: 21px; }
.class-card p { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.empty-state { padding: 42px; color: var(--muted); background: rgba(255,255,255,.55); border: 1px dashed #c9d0d7; border-radius: 5px; text-align: center; }

/* 教师工作台 */
.role-teacher { --primary: #2878ef; --primary-dark: #1f65cc; --canvas: #f3f7fd; --line: #e1e8f2; --line-strong: #cfd9e7; }
.role-teacher .sidebar { color: #51627a; background: rgba(255,255,255,.96); border-right: 1px solid #e1e9f4; box-shadow: 8px 0 30px rgba(64,94,139,.04); }
.role-teacher .brand-mark { background: linear-gradient(145deg, #3888ff, #1c67e4); border: 0; border-radius: 11px; box-shadow: 0 8px 22px rgba(35,112,234,.18); }
.role-teacher .brand strong { color: #1f6fdc; letter-spacing: 0; }
.role-teacher .brand small { color: #7692b8; letter-spacing: .12em; }
.role-teacher .nav-section-label { color: #a0adbd; }
.role-teacher .side-nav a { color: #63738a; border-radius: 9px; }
.role-teacher .side-nav a:hover { color: #236edc; background: #f1f6fe; }
.role-teacher .side-nav a.active { color: #1e6de0; background: #eaf2ff; }
.role-teacher .side-nav a.active::before { left: -14px; background: #2f7ef3; border-radius: 0 4px 4px 0; }
.role-teacher .side-nav a:nth-child(2) i { box-shadow: inset 0 0 0 4px #fff; }
.role-teacher .side-nav a.active:nth-child(2) i { box-shadow: inset 0 0 0 4px #eaf2ff; }
.role-teacher .sidebar-account { border-top-color: #e8edf4; }
.role-teacher .account-avatar { background: linear-gradient(145deg, #4a8df3, #286fd8); }
.role-teacher .account-copy strong { color: #23344b; }
.role-teacher .account-copy small, .role-teacher .logout-button { color: #8b9aae; }
.role-teacher .logout-button:hover { color: #246edc; }
.role-teacher .workspace-header { background: rgba(255,255,255,.9); border-bottom-color: #e5ebf4; backdrop-filter: blur(12px); }
.role-teacher .workspace-header strong { color: #28384f; }
.teacher-home-page { background: radial-gradient(circle at 72% 5%, rgba(105,163,250,.13), transparent 28%), #f3f7fd; }
.teacher-home-page .page-wrap { max-width: 1380px; padding-top: 42px; }
.teacher-home-heading { min-height: 116px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; padding: 26px 30px; background: linear-gradient(120deg, rgba(255,255,255,.98), rgba(245,250,255,.96)); border: 1px solid #dfe8f5; border-radius: 18px; box-shadow: 0 16px 44px rgba(66,101,151,.08); }
.teacher-home-title { display: flex; align-items: center; gap: 17px; }
.teacher-home-title > span { width: 58px; height: 58px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #3f8cff, #216adf); border-radius: 16px; box-shadow: 0 12px 28px rgba(39,116,232,.2); }
.teacher-home-title > span svg { width: 28px; height: 28px; }
.teacher-home-title h1 { margin: 0; color: #1d2c42; font-size: 28px; letter-spacing: -.03em; }
.teacher-home-title p { margin: 7px 0 0; color: #8391a5; font-size: 13px; }
.teacher-home-heading > a { height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 17px; color: #fff; background: linear-gradient(90deg, #347ff0, #246cd9); border-radius: 9px; box-shadow: 0 10px 22px rgba(35,107,218,.17); text-decoration: none; font-size: 13px; font-weight: 700; }
.teacher-home-heading > a:hover { transform: translateY(-1px); box-shadow: 0 13px 26px rgba(35,107,218,.23); }
.teacher-home-heading > a svg { width: 17px; height: 17px; }
.teacher-class-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.teacher-class-card { min-height: 238px; display: flex; flex-direction: column; padding: 23px; border-color: #dde6f2; border-radius: 15px; box-shadow: 0 10px 30px rgba(62,92,133,.06); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.teacher-class-card:hover { transform: translateY(-3px); border-color: #c9daf0; box-shadow: 0 17px 40px rgba(62,92,133,.11); }
.teacher-class-card > div:first-child { color: inherit; }
.teacher-class-card-top { display: flex; align-items: center; justify-content: space-between; }
.teacher-class-icon { width: 46px; height: 46px; display: grid; place-items: center; color: #2777e9; background: #edf4ff; border: 1px solid #dbe9fd; border-radius: 12px; }
.teacher-class-icon svg { width: 22px; height: 22px; }
.teacher-class-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; color: #348268; background: #eff9f5; border-radius: 20px; font-size: 10px; font-weight: 700; }
.teacher-class-status i { width: 6px; height: 6px; background: #39a67d; border-radius: 50%; }
.teacher-class-copy { margin: 21px 0 24px; }
.teacher-class-card .teacher-class-copy h2 { margin: 0 0 11px; color: #1b2a40; font-size: 21px; letter-spacing: -.02em; }
.teacher-class-card .teacher-class-copy p { display: flex; flex-wrap: wrap; gap: 9px 16px; margin: 0; }
.teacher-class-copy p span { display: inline-flex; align-items: center; gap: 6px; color: #8190a3; font-size: 12px; }
.teacher-class-copy p svg { width: 14px; height: 14px; color: #6594d3; }
.teacher-class-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: auto; }
.teacher-class-actions a { height: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; text-decoration: none; font-size: 12px; font-weight: 700; }
.teacher-class-actions svg { width: 16px; height: 16px; }
.teacher-enter-class { color: #fff; background: linear-gradient(90deg, #347ff0, #246cda); box-shadow: 0 7px 16px rgba(36,108,218,.14); }
.teacher-enter-class:hover { color: #fff; background: linear-gradient(90deg, #2a74e6, #1e5fca); }
.teacher-manage-class { color: #47617f; background: #f5f8fc; border: 1px solid #dae3ef; }
.teacher-manage-class:hover { color: #236ddc; background: #eef5ff; border-color: #c5daf6; }
.teacher-home-empty { grid-column: 1 / -1; min-height: 230px; display: grid; place-items: center; align-content: center; gap: 8px; background: rgba(255,255,255,.72); border-color: #d4e0ef; border-radius: 15px; }
.teacher-home-empty svg { width: 34px; height: 34px; color: #7ca4d9; }
.teacher-home-empty strong { color: #344860; }
.teacher-home-empty span { font-size: 12px; }

/* 登录与初始化 */
.guest-shell { min-height: 100vh; background: #eef1f4; }
.guest-header { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1120px) / 2)); color: #81909d; background: #fff; border-bottom: 1px solid var(--line); font-size: 12px; }
.guest-header .brand { height: 68px; padding: 0; color: var(--text); }
.guest-header .brand strong { color: var(--navy); }
.auth-wrap { max-width: 1120px; padding-top: 70px; }
.login-card { max-width: 860px; min-height: 430px; margin: 0 auto; display: grid; grid-template-columns: 42% 58%; overflow: hidden; background: #fff; border: 1px solid #d8dee4; border-radius: 7px; box-shadow: 0 14px 38px rgba(23,38,54,.09); }
.login-card > div { position: relative; padding: 48px 38px; color: #d9e2eb; background: var(--navy); overflow: hidden; }
.login-card > div::after { content: ""; position: absolute; right: -105px; bottom: -110px; width: 220px; height: 220px; border: 42px solid rgba(255,255,255,.04); border-radius: 50%; }
.login-card > div .eyebrow { color: #6fc0a9; }
.login-card h1 { margin-top: 18px; color: #fff; font-size: 28px; }
.login-card > div .muted { color: #aebbc8; }
.login-card form { align-self: center; padding: 42px 52px; }
.login-card .primary-button { margin-top: 4px; }

/* 登录门户 */
.guest-shell.login-page { min-height: 100vh; overflow-x: hidden; background: #eef4ff; }
.login-page .guest-header { position: relative; z-index: 5; height: 76px; padding: 0 clamp(24px, 4vw, 72px); background: rgba(238,244,255,.88); border-bottom: 0; backdrop-filter: blur(14px); }
.login-page .guest-header .brand { height: 76px; gap: 11px; }
.login-page .guest-header .brand-mark { width: 42px; height: 42px; flex-basis: 42px; background: linear-gradient(145deg, #3888ff, #1c67e4); border: 0; border-radius: 11px; box-shadow: 0 8px 22px rgba(35,112,234,.2); }
.login-page .guest-header .brand strong { color: #266fe8; font-size: 18px; letter-spacing: 0; }
.login-page .guest-header .brand small { color: #6092e6; font-size: 8px; letter-spacing: .12em; }
.login-navigation { display: flex; align-items: center; gap: clamp(25px, 3.2vw, 52px); }
.login-navigation a { color: #52627a; font-size: 14px; text-decoration: none; }
.login-navigation a:hover { color: #2472ec; }
.login-page .auth-wrap { position: relative; max-width: none; min-height: calc(100vh - 76px); padding: 18px clamp(24px, 5vw, 84px) 62px; overflow: hidden; }
.login-page .auth-wrap::before { content: ""; position: absolute; left: 15%; top: 8%; width: 620px; height: 620px; background: radial-gradient(circle, rgba(255,255,255,.92), rgba(255,255,255,0) 67%); pointer-events: none; }
.login-page .auth-wrap > .flash { position: relative; z-index: 8; width: min(780px, calc(100vw - 48px)); margin: 0 auto 12px; }
.login-portal { position: relative; z-index: 2; width: min(1380px, 100%); min-height: 720px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr); align-items: center; gap: clamp(38px, 5vw, 88px); }
.login-hero { min-width: 0; display: grid; justify-items: center; }
.education-visual { width: min(650px, 100%); margin-top: -20px; }
.education-visual svg { width: 100%; height: auto; display: block; }
.login-hero-copy { max-width: 690px; margin-top: -38px; text-align: center; }
.login-hero-copy > p { margin: 0 0 11px; color: #6b96d9; font-size: 11px; font-weight: 800; letter-spacing: .24em; }
.login-hero-copy h1 { margin: 0; color: #293a55; font-size: clamp(26px, 2.2vw, 38px); letter-spacing: .02em; }
.login-hero-copy > span { display: block; margin-top: 14px; color: #65748b; font-size: 15px; line-height: 1.8; }
.login-feature-list { display: flex; justify-content: center; gap: 28px; margin-top: 24px; }
.login-feature-list span { display: inline-flex; align-items: center; gap: 7px; color: #46638e; font-size: 13px; font-weight: 700; }
.login-feature-list svg { width: 17px; height: 17px; color: #2d7df4; }
.login-panel { width: min(580px, 100%); justify-self: center; padding: 48px 56px 42px; background: rgba(255,255,255,.97); border: 1px solid rgba(207,220,240,.85); border-radius: 18px; box-shadow: 0 25px 70px rgba(74,106,158,.14); }
.login-panel-heading { text-align: center; }
.login-panel-heading > span { color: #2d7df4; font-size: 10px; font-weight: 900; letter-spacing: .28em; }
.login-panel-heading h2 { margin: 10px 0 7px; color: #17243a; font-size: 30px; line-height: 1.3; }
.login-panel-heading p { margin: 0; color: #8996a9; font-size: 13px; }
.login-method { height: 52px; display: flex; align-items: end; justify-content: flex-start; margin: 25px 0 21px; border-bottom: 1px solid #e8edf5; }
.login-method strong { position: relative; padding-bottom: 13px; color: #1d2c43; font-size: 15px; }
.login-method strong::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: #2b78f3; border-radius: 3px 3px 0 0; }
.login-method span { padding-bottom: 13px; color: #9aa6b7; font-size: 12px; }
.login-form { display: grid; gap: 18px; }
.login-field { display: grid; gap: 8px; color: #42516a; font-size: 12px; font-weight: 700; }
.login-field > div { height: 54px; display: grid; grid-template-columns: 43px 1fr; align-items: center; background: #f7f9fc; border: 1px solid #e5ebf3; border-radius: 7px; transition: .16s ease; }
.login-field > div:focus-within { background: #fff; border-color: #4a8cf2; box-shadow: 0 0 0 3px rgba(42,119,242,.1); }
.login-field.has-error > div { background: #fffafa; border-color: #e45a58; }
.login-field.has-error > div:focus-within { border-color: #d84240; box-shadow: 0 0 0 3px rgba(216,66,64,.1); }
.login-field.has-error svg { color: #d84a47; }
.login-field-error { margin-top: -2px; color: #cf3f3c; font-size: 11px; font-weight: 500; line-height: 1.55; }
.setup-form-errors { padding: 10px 12px; color: #c73f3c; background: #fff7f6; border: 1px solid #efcac8; border-radius: 4px; font-size: 12px; }
.setup-form-errors ul { margin: 0; padding-left: 18px; }
.login-field svg { width: 18px; height: 18px; justify-self: center; color: #8493a8; }
.login-field input { min-width: 0; height: 100%; padding: 0 15px 0 0; color: #1c2b42; background: transparent; border: 0; outline: 0; font-size: 14px; }
.login-field input::placeholder { color: #b2bcc9; }
.login-options { display: flex; align-items: center; justify-content: flex-start; gap: 12px; color: #8995a6; font-size: 11px; }
.login-options label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.login-options input { width: 15px; height: 15px; margin: 0; accent-color: #2878f3; }
.login-submit { height: 52px; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 2px; color: #fff; background: linear-gradient(90deg, #2e80fa, #1f6eea); border: 0; border-radius: 7px; box-shadow: 0 10px 24px rgba(35,112,235,.2); font-size: 15px; font-weight: 800; cursor: pointer; }
.login-submit:hover { background: linear-gradient(90deg, #2477f2, #185fd2); box-shadow: 0 13px 29px rgba(35,112,235,.27); transform: translateY(-1px); }
.login-submit:disabled { opacity: .72; cursor: wait; transform: none; box-shadow: none; }
.login-submit svg { width: 17px; height: 17px; }
.login-security { display: flex; align-items: center; gap: 10px; margin-top: 25px; padding: 13px 15px; color: #77869a; background: #f6f9fd; border: 1px solid #e7edf5; border-radius: 7px; font-size: 11px; }
.login-security svg { width: 21px; height: 21px; flex: 0 0 auto; color: #2c81ef; }
.login-security span { display: grid; gap: 2px; }
.login-security strong { color: #4b5d76; }
.login-footer { position: absolute; z-index: 3; left: 50%; bottom: 20px; width: min(1380px, calc(100% - 48px)); display: flex; justify-content: center; gap: 18px; transform: translateX(-50%); color: #a1aec0; font-size: 10px; }

/* 课堂大屏，独立的黑板视觉 */
.classroom-shell { height: 100vh; overflow: hidden; color: #edf4f0; background: #0a2821; }
.classroom-header { height: 88px; display: flex; align-items: center; justify-content: space-between; padding: 15px 28px; background: #102f28; border-bottom: 1px solid rgba(255,255,255,.11); }
.classroom-header h1 { margin: 2px 0; color: #fff; font-size: 28px; font-weight: 700; }
.classroom-header .eyebrow { color: #81aa9c; }
.classroom-clock { display: grid; text-align: right; }
.classroom-clock strong { color: #fff; font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; }
.classroom-clock span { margin-top: 5px; color: #9cb7ae; font-size: 12px; }
.classroom-main { height: calc(100vh - 152px); display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 14px; padding: 14px; }
.blackboard, .schedule-panel { min-height: 0; background: #123c31; border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 0 42px rgba(0,0,0,.12); }
.blackboard { display: flex; flex-direction: column; padding: 18px; }
.daily-message { margin-bottom: 14px; color: #f4e7b5; font-family: KaiTi, "STKaiti", serif; font-size: clamp(21px, 1.8vw, 32px); text-align: center; }
.score-toolbar { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 15px; }
.score-toolbar span { font-weight: 700; }
.score-toolbar em { color: #a8c0b7; font-size: 12px; }
.delta-button { min-width: 46px; padding: 8px; color: #fff; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.22); border-radius: 4px; cursor: pointer; }
.delta-button.positive { color: #b8e6d3; }
.delta-button.negative { color: #efbbb7; }
.delta-button.active { color: #102f28; background: #e6cf83; border-color: #e6cf83; box-shadow: 0 0 0 2px rgba(230,207,131,.18); }
.student-grid { display: grid; grid-template-columns: repeat(6, minmax(100px, 1fr)); gap: 9px; padding: 2px; overflow: auto; }
.student-card { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 11px 10px; color: #fff; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.14); border-radius: 4px; cursor: pointer; }
.student-card:hover:not(:disabled) { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.24); }
.student-card:disabled { cursor: default; opacity: .8; }
.student-card span { font-size: 17px; font-weight: 700; }
.student-card strong { min-width: 40px; height: 35px; display: grid; place-items: center; color: #154c3d; background: #e9f2ee; border-radius: 4px; font-size: 20px; }
.schedule-panel { padding: 18px; overflow: auto; }
.schedule-panel h2 { margin: 0 0 16px; color: #fff; font-size: 18px; }
.schedule-list { display: grid; gap: 8px; }
.schedule-list article { display: grid; gap: 3px; padding: 10px 11px; background: rgba(255,255,255,.055); border-left: 2px solid #d8bd68; }
.schedule-list span, .schedule-list small { color: #9eb9b0; font-size: 12px; }
.random-result { margin-top: 18px; padding: 21px 9px; color: #ead891; border: 1px dashed rgba(255,255,255,.25); font-size: 21px; font-weight: 700; text-align: center; }
.classroom-tools { height: 64px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; background: #0c241f; border-top: 1px solid rgba(255,255,255,.1); }
.classroom-tools button { padding: 9px 15px; color: #eaf1ee; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.16); border-radius: 4px; cursor: pointer; }
.classroom-tools button:hover { background: rgba(255,255,255,.11); }
.classroom-tools label { color: #b8c9c3; font-size: 13px; }
.tool-modal, .whiteboard { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(4,14,12,.78); }
.tool-modal[hidden], .whiteboard[hidden], .toast[hidden] { display: none; }
.tool-card { position: relative; min-width: 520px; padding: 30px; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 6px; text-align: center; box-shadow: 0 18px 55px rgba(0,0,0,.25); }
.close-tool { position: absolute; right: 14px; top: 10px; background: none; border: 0; font-size: 26px; }
.timer-display { margin: 24px; font-size: 80px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tool-card button { margin: 4px; padding: 9px 13px; }
.whiteboard { display: block; background: rgba(0,0,0,.08); }
.whiteboard-bar { height: 62px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #222; background: #fff; border-bottom: 1px solid var(--line); }
.whiteboard-bar button { padding: 8px 14px; }
.whiteboard canvas { width: 100vw; height: calc(100vh - 62px); display: block; touch-action: none; }
.toast { position: fixed; left: 50%; top: 104px; z-index: 80; padding: 13px 20px; transform: translateX(-50%); color: #17382c; background: #fff; border: 1px solid #d9dfdc; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: 20px; font-weight: 700; }

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
    .sidebar { width: 76px; padding-inline: 9px; }
    .sidebar .brand { justify-content: center; padding: 0; }
    .sidebar .brand > span:last-child, .nav-section-label, .side-nav span, .account-copy, .logout-button { display: none; }
    .side-nav a { justify-content: center; padding: 0; }
    .side-nav a.active::before { left: -9px; }
    .sidebar-account { display: flex; justify-content: center; padding: 15px 0 0; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .two-column { grid-template-columns: 1fr; }
    .classroom-main { grid-template-columns: 1fr; }
    .schedule-panel { display: none; }
    .student-grid { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
    .login-portal { grid-template-columns: minmax(0, 1fr) minmax(400px, .95fr); gap: 24px; }
    .login-panel { padding: 38px 36px 34px; }
    .education-visual { margin-top: 0; }
}
@media (max-width: 620px) {
    .app-shell { display: block; }
    .sidebar { position: static; width: 100%; height: 62px; flex-direction: row; align-items: center; padding: 0 12px; }
    .sidebar .brand { height: 62px; }
    .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
    .side-nav { margin-left: auto; display: flex; }
    .side-nav a { width: 42px; min-height: 42px; }
    .side-nav a.active::before, .sidebar-account { display: none; }
    .workspace-header { display: none; }
    .page-wrap { padding: 24px 14px 50px; }
    .stat-grid { gap: 10px; }
    .stat-grid article { min-height: 105px; padding: 18px; }
    .stat-grid strong { font-size: 27px; }
    .login-card { grid-template-columns: 1fr; }
    .login-card > div, .login-card form { padding: 30px 26px; }
    .guest-header { padding: 0 16px; }
    .guest-header > span { display: none; }
    .inline-form { grid-template-columns: 1fr; }
    .student-grid { grid-template-columns: repeat(3, minmax(84px, 1fr)); }
    .student-card span { font-size: 14px; }
    .score-toolbar span, .score-toolbar em { display: none; }
    .classroom-tools { justify-content: flex-start; overflow-x: auto; }
    .tool-card { min-width: calc(100vw - 28px); }
    .timer-display { font-size: 58px; }
    .login-page .guest-header { height: 68px; padding: 0 18px; }
    .login-page .guest-header .brand { height: 68px; }
    .login-page .guest-header .brand strong { font-size: 15px; }
    .login-navigation { display: none; }
    .login-page .auth-wrap { min-height: calc(100vh - 68px); padding: 22px 16px 76px; }
    .login-portal { min-height: 0; grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .login-panel { padding: 34px 24px 28px; border-radius: 13px; }
    .login-panel-heading h2 { font-size: 25px; }
    .login-options { align-items: flex-start; flex-direction: column; }
    .login-footer { bottom: 18px; width: calc(100% - 32px); flex-direction: column; align-items: center; gap: 4px; }
}

/* 备课中心 */
.material-heading { align-items: flex-end; }
.material-summary { min-width: 92px; display: grid; justify-items: end; }
.material-summary strong { color: var(--navy); font-size: 26px; }
.material-summary span { color: var(--muted); font-size: 11px; }
.material-upload-panel { padding-bottom: 22px; }
.material-upload-row { display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 14px; }
.material-drop-zone { position: relative; min-height: 118px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 16px; padding: 18px 22px; background: #f8fafb; border: 1px dashed #aebbc5; border-radius: 6px; cursor: pointer; transition: .15s ease; }
.material-drop-zone:hover,.material-drop-zone.dragging { background: #eff7f5; border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.material-drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--primary); background: #e6f2ef; border-radius: 6px; }
.upload-icon svg { width: 25px; height: 25px; }
.material-drop-zone > span:nth-child(3) { display: grid; gap: 5px; }
.material-drop-zone strong { color: var(--text); font-size: 15px; }
.material-drop-zone small { color: var(--muted); font-size: 11px; }
.material-drop-zone em { padding: 8px 13px; color: var(--primary); background: #fff; border: 1px solid #b8d5ce; border-radius: 4px; font-size: 12px; font-style: normal; font-weight: 700; }
.material-class-field { display: grid; align-content: center; gap: 7px; padding: 17px; background: #f8fafb; border: 1px solid var(--line); border-radius: 6px; }
.material-class-field > span { color: #43515f; font-size: 12px; font-weight: 700; }
.material-class-field select,.material-filters select { height: 38px; padding: 0 10px; color: var(--text); background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; }
.material-class-field small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.upload-queue { display: grid; gap: 7px; margin-top: 13px; }
.upload-item { display: grid; grid-template-columns: 34px 1fr minmax(55px,auto); gap: 10px; align-items: center; padding: 9px 11px; background: #fafbfc; border: 1px solid var(--line); border-radius: 5px; }
.upload-file-icon { color: #597186; }.upload-file-icon svg { width: 20px; height: 20px; }
.upload-copy { min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; }
.upload-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.upload-copy small,.upload-item em { color: var(--muted); font-size: 10px; font-style: normal; }
.upload-copy i { grid-column: 1/-1; height: 3px; overflow: hidden; background: #e3e8ec; border-radius: 2px; }.upload-copy b { width: 0; height: 100%; display: block; background: var(--primary); transition: width .15s; }
.upload-item.complete em { color: #258060; font-weight: 700; }.upload-item.failed em { max-width: 260px; color: #ad3b36; }
.material-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.material-filters { display: flex; align-items: center; gap: 7px; }
.material-filters label { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 10px; background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; }
.material-filters label svg { width: 15px; color: var(--muted); }.material-filters input { width: 160px; border: 0; outline: 0; }
.material-table-wrap { overflow-x: auto; }.material-table { min-width: 760px; }
.material-file { min-width: 220px; display: flex; align-items: center; gap: 11px; }.material-file > span:last-child { min-width: 0; display: grid; gap: 3px; }.material-file strong { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }.material-file small { color: var(--muted); font-size: 9px; }
.file-type-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; color: #607487; background: #edf1f4; border-radius: 5px; }.file-type-icon svg { width: 19px; }.file-type-icon.ppt { color:#c95836;background:#fff0eb}.file-type-icon.word {color:#356bb2;background:#edf4ff}.file-type-icon.excel {color:#27815a;background:#eaf7f0}.file-type-icon.pdf {color:#ba3d3d;background:#fff0ef}.file-type-icon.video {color:#7354a9;background:#f2edfb}.file-type-icon.audio {color:#3d7598;background:#eaf5fa}.file-type-icon.image {color:#9a6b22;background:#fff6df}.file-type-icon.archive {color:#616b75;background:#eef1f3}
.material-actions { display: flex; align-items: center; gap: 3px; }.material-actions a,.material-actions button { display: inline-flex; align-items: center; gap: 4px; padding: 6px 7px; color: #466075; background: transparent; border: 0; border-radius: 4px; cursor: pointer; text-decoration: none; font-size: 11px; }.material-actions a:hover { color: var(--primary); background: #edf6f3; }.material-actions button:hover { color:#a33e3b;background:#fff0ef}.material-actions svg { width: 14px; height: 14px; }
.material-empty { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: var(--muted); }.material-empty svg { width: 38px; height: 38px; color: #a6b2bc; }.material-empty strong { color: #566472; font-size: 14px; }.material-empty span { font-size: 11px; }
.material-preview-shell { height: 100vh; overflow: hidden; background:#20262c; }.material-preview-shell header { height: 62px; display:grid; grid-template-columns:180px 1fr 180px; align-items:center; padding:0 18px; color:#eaf0f4; background:#101c28; }.material-preview-shell header a { display:inline-flex; align-items:center; gap:7px; color:#d8e1e8; text-decoration:none;font-size:12px}.material-preview-shell header svg{width:16px}.material-preview-shell header div { display:grid; justify-items:center; gap:2px }.material-preview-shell header strong{font-size:13px}.material-preview-shell header span{color:#8495a5;font-size:9px}.material-preview-shell .preview-download{justify-self:end}.material-preview-shell main{height:calc(100vh - 62px);display:grid;place-items:center}.material-preview-shell iframe{width:100%;height:100%;border:0;background:#fff}.material-preview-shell main>img,.material-preview-shell main>video{max-width:100%;max-height:100%}.audio-preview{min-width:420px;display:grid;justify-items:center;gap:20px;padding:35px;color:#e5edf2;background:#162430;border:1px solid #314250;border-radius:7px}.audio-preview>svg{width:55px;height:55px;color:#6fb19e}.audio-preview audio{width:360px}
@media(max-width:900px){.material-upload-row{grid-template-columns:1fr}.material-toolbar{align-items:stretch;flex-direction:column}.material-filters{flex-wrap:wrap}.material-filters label{flex:1}.material-filters input{width:100%}}
@media(max-width:620px){.material-drop-zone{grid-template-columns:44px 1fr}.material-drop-zone em{display:none}.material-filters select{max-width:48%}.material-preview-shell header{grid-template-columns:auto 1fr auto}.material-preview-shell header a span{display:none}}

/* 备课中心视觉优化 */
.material-heading { margin-bottom:18px; padding-bottom:17px; border-bottom:1px solid #d7dde2; }
.material-heading h1 { letter-spacing:-.02em; }
.material-summary { min-width:110px; padding:10px 14px; background:#fff; border:1px solid var(--line); border-left:3px solid var(--primary); border-radius:3px; }
.material-upload-panel { padding:0; overflow:hidden; border-color:#cfd8de; box-shadow:0 3px 10px rgba(23,38,54,.04); }
.material-upload-panel>.panel-heading { margin:0; padding:15px 19px; background:#f6f8f9; border-bottom:1px solid var(--line); }
.material-upload-panel>.panel-heading h2 { font-size:15px; }.material-upload-panel>.panel-heading p { margin:3px 0 0; font-size:10px; }
.material-upload-row { padding:16px 18px; background:#fff; }
.material-drop-zone { min-height:92px; padding:13px 18px; background:#fbfcfc; border-radius:4px; }
.upload-icon { width:44px; height:44px; border-radius:4px; }.upload-icon svg{width:22px;height:22px}.material-drop-zone strong{font-size:13px}.material-drop-zone em{border-radius:3px}
.material-class-field { padding:12px 14px; border-radius:4px; }.upload-queue{margin:0;padding:0 18px 16px}.upload-item{border-radius:3px}
.material-toolbar { min-height:54px; margin:-18px -18px 12px; padding:10px 18px; background:#f7f9fa; border-bottom:1px solid var(--line); }.material-toolbar .panel-heading{margin:0}.material-toolbar .panel-heading h2{font-size:15px}.material-filters label,.material-filters select{height:34px;border-radius:3px}.material-filters .secondary-button{min-height:34px}
.material-table thead th { padding-top:10px; padding-bottom:10px; color:#687686; background:#f4f6f8; border-bottom:1px solid #d6dde2; font-size:10px; letter-spacing:.03em; }.material-table tbody tr:hover{background:#f7fbfa}.material-table td{padding-top:11px;padding-bottom:11px}.file-type-icon{border-radius:4px}.material-actions a,.material-actions button{border-radius:3px}.material-actions form{margin:0}

/* 扩展管理工作台 */
.side-nav svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .9; }
.logout-button { display: inline-flex; align-items: center; gap: 4px; }
.logout-button svg { width: 15px; height: 15px; }
.primary-button svg, .secondary-button svg, .danger-button svg, .danger-link svg { width: 16px; height: 16px; flex: 0 0 16px; }
.button-row { display: flex !important; align-items: center !important; justify-content: flex-start !important; flex-wrap: wrap; gap: 8px !important; }
.secondary-button, .danger-button, .danger-link {
    min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 7px 11px; border-radius: 4px; text-decoration: none; font-size: 12px; font-weight: 700; cursor: pointer;
}
.secondary-button { color: #36536d; background: #f3f6f8; border: 1px solid #cdd7df; }
.secondary-button:hover { color: var(--primary); background: #edf6f3; border-color: #b8d5ce; }
.danger-button { color: #a23f3f; background: #fff7f6; border: 1px solid #ebc6c2; }
.danger-button:hover { color: #fff; background: #b64b47; border-color: #b64b47; }
.danger-link { min-height: 0; padding: 5px 7px; color: #a34643; background: transparent; border: 0; }
.danger-link:hover { color: #8f2926; background: #fff1f0; }
.record-count, .save-state { color: var(--muted); font-size: 12px; }
.save-state.error { color: #ad3b36; }
.top-gap { margin-top: 20px; }
.compact-stats article { min-height: 98px; }
.compact-stats strong { font-size: 25px; }
.panel-heading > svg { width: 20px; height: 20px; color: var(--primary); }
.panel-heading > div h2 { margin-bottom: 3px; }
.panel-heading > div .muted { margin: 0 0 18px; }
.stacked-panels { display: grid; gap: 16px; }
.class-manage-grid { grid-template-columns: minmax(300px, 370px) minmax(0, 1fr); }
.form-divider { position: relative; height: 22px; text-align: center; }
.form-divider::before { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); content: ""; }
.form-divider span { position: relative; padding: 0 9px; color: var(--subtle); background: #fff; font-size: 11px; }
.file-drop { position: relative; min-height: 78px; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 6px !important; color: var(--muted) !important; background: #f8fafb; border: 1px dashed #b8c4cd; border-radius: 5px; cursor: pointer; text-align: center; }
.file-drop:hover { color: var(--primary) !important; border-color: var(--primary); background: #f2f9f7; }
.file-drop svg { width: 23px; height: 23px; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.form-help { margin: -5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.empty-cell { padding: 42px; color: var(--muted); text-align: center; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; font-size: 12px; }
.pager a { min-width: 68px; padding: 7px 10px; color: var(--primary); background: #fff; border: 1px solid var(--line); border-radius: 4px; text-align: center; text-decoration: none; }
.pager a:hover:not(.disabled) { border-color: var(--primary); }
.pager a.disabled { color: #b1bac2; pointer-events: none; }
.pager span { color: var(--muted); }

.workspace-tabs { background: transparent; }
.tab-list { display: flex; gap: 4px; padding: 5px; background: #e9edf1; border-radius: 6px; }
.tab-list button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; color: #687686; background: transparent; border: 0; border-radius: 4px; font-size: 13px; font-weight: 700; cursor: pointer; }
.tab-list button svg { width: 17px; height: 17px; }
.tab-list button.active { color: var(--primary); background: #fff; box-shadow: 0 1px 3px rgba(24,39,56,.08); }
.tab-panel { display: none; margin-top: 16px; }
.tab-panel.active { display: block; }

.schedule-editor { display: grid; grid-template-columns: 88px repeat(5, minmax(105px, 1fr)); overflow: auto; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.schedule-editor > * { min-height: 52px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.schedule-corner, .schedule-day, .schedule-period { display: grid; place-items: center; background: #f6f8f9; color: #536272; font-size: 12px; font-weight: 700; }
.schedule-day { color: var(--text); }
.schedule-editor select { min-width: 105px; padding: 0 10px; color: var(--text); background: #fff; outline: 0; text-align: center; cursor: pointer; }
.schedule-editor select:focus { box-shadow: inset 0 0 0 2px var(--primary); }

.assignment-list { display: grid; gap: 10px; }
.assignment-list article { display: grid; gap: 7px; padding: 14px; border: 1px solid var(--line); border-radius: 5px; }
.assignment-list article > div { display: flex; justify-content: space-between; gap: 12px; }
.assignment-list strong { font-size: 14px; }
.assignment-list span, .assignment-list small { color: var(--muted); font-size: 11px; }
.assignment-list p { margin: 0; color: #526170; font-size: 12px; line-height: 1.6; }
.class-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.class-shortcuts a { display: grid; grid-template-columns: 35px 1fr; gap: 2px 9px; align-items: center; padding: 13px; color: var(--text); background: #f8fafb; border: 1px solid var(--line); border-radius: 5px; text-decoration: none; }
.class-shortcuts a:hover { border-color: #a9cfc5; background: #f1f8f6; }
.class-shortcuts svg { grid-row: 1 / 3; width: 25px; height: 25px; color: var(--primary); }
.class-shortcuts span { font-size: 13px; font-weight: 700; }
.class-shortcuts small { color: var(--muted); font-size: 11px; }

.teacher-score-edit { min-width: 175px; display: grid; grid-template-columns: 72px auto; gap: 5px; align-items: center; }
.teacher-score-edit input { width: 72px; height: 34px; padding: 0 8px; color: var(--text); background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; font-weight: 700; }
.teacher-score-edit button { height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 9px; color: var(--primary); background: #edf6f3; border: 1px solid #b8d5ce; border-radius: 4px; cursor: pointer; }
.teacher-score-edit button svg { width: 14px; height: 14px; }
.teacher-score-edit small { grid-column: 1 / -1; min-height: 14px; color: #2c846c; font-size: 10px; }
.teacher-score-edit small.error { color: #b14440; }

.broadcast-workspace { display: grid; grid-template-columns: minmax(420px, 1.15fr) minmax(330px, .85fr); gap: 16px; align-items: start; }
.call-panel { grid-row: 1 / 3; }
.broadcast-field { display: grid; gap: 7px; margin-top: 16px; color: #3e4b59; font-size: 13px; font-weight: 700; }
.broadcast-field input, .broadcast-field textarea, .template-add-form input, .broadcast-setting-grid input, .broadcast-setting-grid select { width: 100%; padding: 10px 11px; color: var(--text); background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; outline: 0; }
.broadcast-field input:focus, .broadcast-field textarea:focus, .template-add-form input:focus, .broadcast-setting-grid input:focus, .broadcast-setting-grid select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(23,107,91,.1); }
.broadcast-search { height: 40px; display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 6px; margin: 13px 0 10px; padding: 0 10px; background: #f7f9fa; border: 1px solid var(--line); border-radius: 5px; }
.broadcast-search svg { width: 17px; height: 17px; color: var(--muted); }
.broadcast-search input { min-width: 0; border: 0; outline: 0; background: transparent; }
.call-student-grid { max-height: 470px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding-right: 3px; overflow: auto; }
.call-student-grid > button { position: relative; min-height: 65px; display: grid; grid-template-columns: 1fr 18px; grid-template-rows: auto auto; gap: 2px 5px; align-items: center; padding: 10px 10px 9px 12px; color: var(--text); background: #f8fafb; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; text-align: left; transition: .15s ease; }
.call-student-grid > button:hover { color: #fff; background: var(--primary); border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(23,107,91,.16); }
.call-student-grid > button.sent { color: #fff; background: #30906f; border-color: #30906f; }
.call-student-grid > button:disabled { cursor: wait; opacity: .72; }
.call-student-grid button span { align-self: end; font-size: 13px; font-weight: 800; }
.call-student-grid button small { align-self: start; color: var(--muted); font-size: 10px; }
.call-student-grid button:hover small { color: rgba(255,255,255,.72); }
.call-student-grid button svg { grid-column: 2; grid-row: 1 / 3; width: 16px; height: 16px; }
.compact-file-drop { min-height: 62px; margin-top: 12px; }
.broadcast-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
.broadcast-submit-row > span { color: var(--muted); font-size: 11px; }
.broadcast-submit-row > span.error { color: #b14440; }
.display-mode-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 14px 0; }
.display-mode-options label { cursor: pointer; }
.display-mode-options input { position: absolute; opacity: 0; }
.display-mode-options label > span { min-height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: #607080; background: #f8fafb; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; }
.display-mode-options svg { width: 20px; height: 20px; }
.display-mode-options input:checked + span { color: var(--primary); background: #edf7f4; border-color: #9dc9bd; box-shadow: inset 0 0 0 1px #9dc9bd; }
.broadcast-setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.broadcast-setting-grid > label:not(.toggle-setting) { position: relative; display: grid; gap: 6px; color: #536272; font-size: 11px; font-weight: 700; }
.broadcast-setting-grid > label small { color: var(--subtle); font-weight: 400; }
.toggle-setting { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 8px; min-height: 42px; padding: 7px 9px; background: #f8fafb; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.toggle-setting input { position: absolute; opacity: 0; }
.toggle-setting > span { position: relative; width: 36px; height: 20px; background: #c7d0d7; border-radius: 11px; transition: .15s ease; }
.toggle-setting > span::after { position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); content: ""; transition: .15s ease; }
.toggle-setting input:checked + span { background: var(--primary); }
.toggle-setting input:checked + span::after { transform: translateX(16px); }
.toggle-setting strong { color: #445362; font-size: 11px; }
.schedule-send-field { grid-column: 1 / -1; }
.broadcast-bottom-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; margin-top: 16px; align-items: start; }
.phrase-categories { display: grid; gap: 15px; margin-top: 14px; }
.phrase-categories > div > strong { display: block; margin-bottom: 7px; color: #465565; font-size: 12px; }
.phrase-categories > div > div { display: flex; flex-wrap: wrap; gap: 7px; }
.phrase-categories button { padding: 7px 10px; color: #2e6f5e; background: #f4faf8; border: 1px solid #c9dfd8; border-radius: 4px; cursor: pointer; font-size: 12px; }
.phrase-categories button:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.custom-template-chip { display: inline-flex; align-items: stretch; }
.custom-template-chip > button { border-radius: 4px 0 0 4px; }
.custom-template-chip form { display: flex; }
.custom-template-chip form button { width: 30px; display: grid; place-items: center; padding: 0; color: #9d4945; background: #fff5f4; border-color: #edcbc8; border-left: 0; border-radius: 0 4px 4px 0; }
.custom-template-chip form button:hover { color: #fff; background: #b84e49; }
.custom-template-chip svg { width: 13px; height: 13px; }
.template-add-form { display: grid; grid-template-columns: 90px 1fr auto; gap: 7px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.broadcast-history { max-height: 590px; display: grid; gap: 8px; margin-top: 14px; overflow: auto; }
.broadcast-history article { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; }
.broadcast-history article > div:first-child { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; }
.broadcast-history article strong { font-size: 12px; line-height: 1.6; }
.broadcast-history article p { margin: 0; color: var(--muted); font-size: 10px; }
.panel-heading-actions { display:flex; align-items:center; gap:8px; }
.panel-heading-actions form { margin:0; }
.compact-action { min-height:30px; padding:5px 9px; font-size:11px; }
.compact-action:disabled,.danger-link:disabled { cursor:wait; opacity:.55; }

/* 教师账号管理 */
.teacher-admin-grid { display:grid; grid-template-columns:350px minmax(0,1fr); gap:18px; align-items:start; }
.teacher-create-panel { position:sticky; top:86px; }.teacher-create-panel .panel-heading,.teacher-list-panel>.panel-heading{margin-bottom:17px}.stack-form label>small{display:block;margin-top:5px;color:var(--muted);font-size:10px;font-weight:400}.classroom-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;max-height:170px;overflow:auto}.teacher-account-list{display:grid;gap:10px}.teacher-account-card{position:relative;padding:16px 17px;background:#fff;border:1px solid var(--line);border-left:3px solid #b7c4cc;border-radius:4px}.teacher-account-card:hover{border-color:#b7c9c3;border-left-color:var(--primary)}.teacher-account-summary{display:grid;grid-template-columns:42px 1fr auto;gap:11px;align-items:center}.teacher-avatar{width:40px;height:40px;display:grid;place-items:center;color:#fff;background:#315a76;border-radius:4px;font-weight:800}.teacher-account-summary>div{display:grid;gap:4px}.teacher-account-summary strong{font-size:14px}.teacher-account-summary>div>span{display:flex;align-items:center;gap:5px;color:#5d6d7b;font-size:11px}.teacher-account-summary svg,.teacher-account-meta svg{width:13px;height:13px}.teacher-account-summary em{padding:4px 7px;border-radius:3px;font-size:10px;font-style:normal;font-weight:700}.teacher-account-summary em.active{color:#21775b;background:#e8f5f0}.teacher-account-summary em.inactive{color:#a44440;background:#fff0ef}.teacher-account-meta{display:flex;flex-wrap:wrap;gap:8px 16px;margin:13px 0 11px;padding:9px 10px;color:#6f7e8a;background:#f7f9fa;border-radius:3px;font-size:10px}.teacher-account-meta span{display:inline-flex;align-items:center;gap:5px}.teacher-editor{border-top:1px solid var(--line)}.teacher-editor summary{height:38px;display:flex;align-items:center;gap:6px;color:#356d5e;cursor:pointer;font-size:11px;font-weight:700;list-style:none}.teacher-editor summary::-webkit-details-marker{display:none}.teacher-editor summary svg{width:14px;height:14px}.teacher-editor summary svg:last-child{margin-left:auto;transition:transform .15s}.teacher-editor[open] summary svg:last-child{transform:rotate(180deg)}.teacher-edit-form{display:grid;grid-template-columns:1fr 1fr;gap:11px 13px;padding:14px;background:#f7f9fa;border:1px solid var(--line);border-radius:4px}.teacher-edit-form>label:not(.account-status-toggle){display:grid;gap:5px;color:#485766;font-size:11px;font-weight:700}.teacher-edit-form input[type=email],.teacher-edit-form input[type=password],.teacher-edit-form input:not([type]){width:100%;height:36px;padding:0 9px;background:#fff;border:1px solid var(--line-strong);border-radius:3px}.teacher-edit-form fieldset{grid-column:1/-1}.account-status-toggle{display:flex;align-items:center;gap:8px;padding-top:19px;cursor:pointer}.account-status-toggle input{position:absolute;opacity:0}.account-status-toggle>span{position:relative;width:36px;height:20px;background:#c8d0d6;border-radius:11px}.account-status-toggle>span::after{position:absolute;left:3px;top:3px;width:14px;height:14px;background:#fff;border-radius:50%;box-shadow:0 1px 3px rgba(0,0,0,.2);content:"";transition:.15s}.account-status-toggle input:checked+span{background:var(--primary)}.account-status-toggle input:checked+span::after{transform:translateX(16px)}.account-status-toggle strong{font-size:11px}.teacher-edit-actions{grid-column:1/-1;display:flex;justify-content:flex-end}.teacher-delete{position:absolute;right:10px;bottom:8px}.teacher-editor[open]~form .teacher-delete{position:static;margin-top:7px}.teacher-list-panel .pager{margin-bottom:0}
@media(max-width:1050px){.teacher-admin-grid{grid-template-columns:1fr}.teacher-create-panel{position:static}.teacher-edit-form{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.classroom-check-grid,.teacher-edit-form{grid-template-columns:1fr}.account-status-toggle{padding-top:0}}

@media (max-width: 620px) {
    .teacher-home-page .page-wrap { padding-top: 22px; }
    .teacher-home-heading { align-items: stretch; flex-direction: column; padding: 20px; border-radius: 14px; }
    .teacher-home-title > span { width: 50px; height: 50px; border-radius: 13px; }
    .teacher-home-title h1 { font-size: 24px; }
    .teacher-home-heading > a { justify-content: center; }
    .teacher-class-grid { grid-template-columns: 1fr; }
    .teacher-class-card { min-height: 225px; }
}

/* 大数据量筛选 */
.admin-filter-bar{display:flex;align-items:center;gap:7px;margin:0 0 14px;padding:10px;background:#f6f8f9;border:1px solid var(--line);border-radius:4px}.admin-filter-bar label{height:36px;min-width:180px;flex:1;display:flex;align-items:center;gap:7px;padding:0 9px;background:#fff;border:1px solid var(--line-strong);border-radius:3px}.admin-filter-bar label svg{width:15px;color:var(--muted)}.admin-filter-bar input{min-width:0;width:100%;border:0;outline:0}.admin-filter-bar select{height:36px;max-width:180px;padding:0 9px;background:#fff;border:1px solid var(--line-strong);border-radius:3px}.filter-reset{color:#6a7884;font-size:11px;text-decoration:none}.class-teacher-line{display:flex;align-items:center;gap:6px;margin:7px 0;color:#536675;font-size:11px}.class-teacher-line svg{width:14px;height:14px;color:var(--primary)}
@media(max-width:800px){.admin-filter-bar{align-items:stretch;flex-wrap:wrap}.admin-filter-bar label{flex-basis:100%}.admin-filter-bar select{max-width:none;flex:1}}
.broadcast-type { padding: 3px 6px; color: #2d6a59; background: #e9f5f1; border-radius: 3px; font-size: 10px; font-weight: 800; }
.broadcast-type.call { color: #805d15; background: #fff6d9; }
.history-status { display: flex; align-items: center; justify-content: space-between; }
.history-status > span { color: #7a8996; font-size: 10px; }
.history-status > span.acknowledged { color: #27805f; font-weight: 700; }

@media (max-width: 980px) {
    .class-manage-grid { grid-template-columns: 1fr; }
    .schedule-editor { grid-template-columns: 75px repeat(5, 105px); }
    .broadcast-workspace, .broadcast-bottom-grid { grid-template-columns: 1fr; }
    .call-panel { grid-row: auto; }
}

@media (max-width: 620px) {
    .call-student-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .display-mode-options { grid-template-columns: 1fr; }
    .broadcast-setting-grid, .template-add-form { grid-template-columns: 1fr; }
}
