:root {
    --primary: #1677ff;
    --primary-soft: #e8f3ff;
    --bg: #ffffff;
    --bg-page: #ffffff;
    --sidebar-bg: #f5f7fa;
    --card-bg: #fafafa;
    --text: #333333;
    --muted: #666666;
    --hint: #999999;
    --border: #eeeeee;
    --card: #ffffff;
    --success: #52c41a;
    --success-soft: #f6ffed;
    --warning: #fa8c16;
    --warning-soft: #fff7e6;
    --error: #ff4d4f;
    --error-soft: #fff2f0;
    --info: #1677ff;
    --info-soft: #e8f3ff;
    --radius: 6px;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    --topbar-h: 56px;
    --sidebar-w: 220px;
    --sidebar-w-collapsed: 64px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", Inter, "Segoe UI", sans-serif;
    background: var(--bg-page);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

/* ========== 三分区布局：顶栏 + 侧栏 + 主内容 ========== */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-page);
}
.layout-guest {
    display: block;
}
.layout-body {
    display: flex;
    flex: 1;
    min-height: 0;
    min-width: 0;
}

/* ----- 顶部通栏 ----- */
.topbar {
    height: var(--topbar-h);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.topbar-right {
    flex-shrink: 0;
    gap: 8px 14px;
}
.topbar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--muted);
    cursor: pointer;
}
.topbar-toggle:hover {
    color: var(--primary);
    border-color: #91caff;
    background: var(--primary-soft);
}
.topbar-toggle svg { width: 18px; height: 18px; }
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: var(--text);
}
.topbar-brand:hover { color: var(--primary); text-decoration: none; }
.topbar-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    flex-shrink: 0;
}
.topbar-brand-icon svg { width: 18px; height: 18px; }
.topbar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.topbar-brand-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-brand-sub {
    font-size: 12px;
    color: var(--hint);
    line-height: 1.2;
    white-space: nowrap;
}
.topbar-link {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 0;
}
.topbar-link:hover { color: var(--primary); }
.topbar-logout:hover { color: var(--error); }
.topbar-switch-form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}
.topbar-switch-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
    line-height: inherit;
    color: inherit;
}
.topbar-switch-btn:hover { color: var(--primary); }
.topbar-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    padding: 0 4px;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding-left: 14px;
    padding-right: 14px;
    max-width: 160px;
}
.topbar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.topbar-user-role {
    font-size: 12px;
    color: var(--hint);
    white-space: nowrap;
}
.topbar-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--muted);
    text-decoration: none;
    border-radius: var(--radius);
}
.topbar-action svg { width: 18px; height: 18px; }
.topbar-action:hover { color: var(--primary); background: var(--primary-soft); }
.topbar-notice.is-empty { opacity: 0.55; cursor: default; }
.topbar-notice-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--error);
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    font-weight: 600;
}

/* ----- 左侧浅灰侧栏 ----- */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    padding: 12px 10px;
    border-right: 1px solid var(--border);
    transition: width 0.2s ease;
    /* 须 visible：小程序二维码 popover 向右侧展开，hidden 会被裁切 */
    overflow: visible;
}
.layout.is-sidebar-collapsed .sidebar {
    width: var(--sidebar-w-collapsed);
    padding-left: 8px;
    padding-right: 8px;
}
.layout.is-sidebar-collapsed .sidebar-nav-label,
.layout.is-sidebar-collapsed .topbar-brand-sub {
    display: none;
}
.layout.is-sidebar-collapsed .sidebar-nav-link,
.layout.is-sidebar-collapsed .sidebar-foot-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}
.layout.is-sidebar-collapsed .sidebar-nav-icon {
    margin: 0;
}
.brand {
    display: none; /* 品牌已上移至顶栏 */
}
.sidebar .brand-link,
.sidebar .brand-static {
    display: none;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    padding: 0;
    overflow-y: auto;
}
.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.4;
    transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav-link:hover {
    background: #eef2f7;
    color: var(--text);
}
.sidebar-nav-link.is-active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
    box-shadow: none;
}
.sidebar-nav-link.is-active .sidebar-nav-icon {
    background: transparent;
    color: var(--primary);
}
.sidebar-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 0;
    background: transparent;
    color: var(--hint);
    flex-shrink: 0;
}
.sidebar-nav-link:hover .sidebar-nav-icon {
    background: transparent;
    color: var(--text);
}
.sidebar-nav-icon svg { width: 18px; height: 18px; }
.sidebar-nav-label { min-width: 0; white-space: nowrap; }
.sidebar-foot {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 80;
    overflow: visible;
}
.sidebar-foot-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 0;
}
.sidebar-foot-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 13px;
}
.sidebar-foot-link:hover {
    background: #eef2f7;
    color: var(--primary);
    text-decoration: none;
}
.sidebar-foot-link.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}
.sidebar-foot-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    opacity: 1;
    color: inherit;
}
.sidebar-foot-icon svg { width: 16px; height: 16px; }
.sidebar-help-link { margin: 0; }
.sidebar-logout-link { display: none; } /* 退出已上移至顶栏 */
.sidebar-user { display: none; } /* 用户信息已上移至顶栏 */
.sidebar-mp-qrcode {
    position: relative;
    overflow: visible;
}
.sidebar-mp-qrcode-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    user-select: none;
}
.sidebar-mp-qrcode-trigger:hover,
.sidebar-mp-qrcode:focus-within .sidebar-mp-qrcode-trigger,
.sidebar-mp-qrcode.is-open .sidebar-mp-qrcode-trigger {
    background: #eef2f7;
    color: var(--primary);
    text-decoration: none;
}
.sidebar-mp-qrcode-popover {
    display: none;
    position: absolute;
    left: calc(100% + 10px);
    bottom: -8px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 300;
    text-align: center;
    line-height: 1.4;
}
.sidebar-mp-qrcode-popover::before {
    content: '';
    position: absolute;
    right: 100%;
    bottom: 20px;
    border: 8px solid transparent;
    border-right-color: #fff;
}
.sidebar-mp-qrcode:hover .sidebar-mp-qrcode-popover,
.sidebar-mp-qrcode:focus-within .sidebar-mp-qrcode-popover,
.sidebar-mp-qrcode.is-open .sidebar-mp-qrcode-popover {
    display: block;
}
.sidebar-mp-qrcode-popover img {
    display: block;
    width: 160px;
    height: 160px;
    object-fit: contain;
    border-radius: var(--radius);
}
.sidebar-mp-qrcode-caption {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--hint);
    white-space: nowrap;
}
.muted { color: var(--hint); font-size: 12px; margin-top: 4px; }

.main {
    flex: 1;
    padding: 20px 24px 28px;
    min-width: 0;
    background: var(--bg-page);
}
.main:has(.score-batch-form),
.main:has(.score-batch-view) {
    padding-top: 12px;
    padding-bottom: 12px;
}
.main-full { width: 100%; }

.page-header { margin-bottom: 20px; }
.main:has(.score-batch-form) .page-header,
.main:has(.score-batch-view) .page-header {
    margin-bottom: 10px;
}
.page-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}
.page-header p { margin: 0; color: var(--muted); font-size: 13px; }
.page-header-row {
    align-items: flex-start;
    margin-bottom: 8px;
}
.page-header-row h2 {
    margin: 0;
    flex: 1;
    min-width: 0;
}
.page-header-row .btn-group {
    flex-shrink: 0;
    justify-content: flex-end;
}
.page-header-with-actions {
    position: relative;
}
.page-header-with-actions .page-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}
.page-header-with-actions h2 {
    margin: 0;
}
.page-header-back {
    flex-shrink: 0;
    white-space: nowrap;
}
.page-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}
.page-header-actions form {
    margin: 0;
}
.identity-switch-current {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}
.sidebar-identity-hint {
    font-size: 12px;
    margin-top: 2px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.stat-card, .panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
}
.stat-label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}
.stat-value {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
}
.stats-actions {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.export-filter-panel .export-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 20px;
}
.export-filter-panel .export-filter-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.export-filter-panel .export-filter-row label {
    font-size: 14px;
    color: var(--text);
}
.export-filter-panel .export-filter-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.export-filter-panel .export-filter-full {
    grid-column: 1 / -1;
}
.export-item-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.export-item-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.export-item-grid label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}
.export-mode-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.export-mode-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    cursor: pointer;
}
@media (max-width: 900px) {
    .export-filter-panel .export-filter-grid {
        grid-template-columns: 1fr;
    }
}
.stats-section {
    margin-bottom: 20px;
}
.stats-section-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
}
.stats-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--muted);
}
.stats-scope-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft);
}
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.stats-table {
    font-size: 13px;
    min-width: 720px;
}
.stats-table th,
.stats-table td {
    white-space: nowrap;
}
.text-muted {
    color: var(--muted);
    text-align: center;
}

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
}
.table thead th {
    background: #fafafa;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}
.table tbody tr:hover {
    background: #f7f9fc;
}
.todo-list { margin: 0; padding-left: 20px; line-height: 1.9; }
.todo-list .done { color: var(--success); }

.dashboard-plans .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.dashboard-plans .panel-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.dashboard-empty {
    margin: 0;
    padding: 12px 0 4px;
}
.plan-overview-block + .plan-overview-block {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.plan-overview-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
}
.plan-overview-meta {
    margin: 0;
    font-size: 13px;
}
.plan-overview-links {
    font-size: 13px;
    white-space: nowrap;
}
.plan-overview-links a {
    color: var(--primary);
    text-decoration: none;
}
.plan-overview-links a:hover {
    text-decoration: underline;
}
.stats-grid-compact {
    margin-top: 14px;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}
.stats-grid-compact .stat-card {
    padding: 12px 14px;
    background: var(--card-bg);
}
.stats-grid-compact .stat-value {
    font-size: 20px;
}
.plan-class-table-wrap {
    margin-top: 14px;
    overflow-x: auto;
}
.table-compact th,
.table-compact td {
    padding: 8px 10px;
    font-size: 13px;
}

.btn {
    display: inline-block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    text-align: center;
    line-height: 1.4;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.btn:hover {
    opacity: 1;
    border-color: #91caff;
    color: var(--primary);
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: #4096ff;
    border-color: #4096ff;
    color: #fff;
}
.btn-secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    color: var(--primary);
    border-color: #91caff;
}
.btn-block { width: 100%; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.form-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-inline input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 160px;
}
.form-inline input:focus {
    outline: none;
    border-color: #91caff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    border: 1px solid transparent;
    font-size: 13px;
}
.alert-success { background: var(--success-soft); color: #389e0d; border-color: #b7eb8f; }
.alert-error { background: var(--error-soft); color: #cf1322; border-color: #ffccc7; }
.alert-warn { background: var(--warning-soft); color: #d46b08; border: 1px solid #ffd591; }
.alert-info { background: var(--info-soft); color: #0958d9; border: 1px solid #91caff; }

@media (max-width: 900px) {
    .topbar-brand-sub { display: none; }
    .topbar-user { display: none; }
    .layout-body { flex-direction: column; }
    .sidebar {
        width: 100% !important;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 8px;
    }
    .sidebar-nav {
        flex-direction: row;
        flex: 1;
    }
    .sidebar-foot { display: none; }
    .layout.is-sidebar-collapsed .sidebar-nav-label { display: inline; }
}

.promote-confirm-modal {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0, 0, 0, 0.35);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.promote-confirm-modal[hidden] { display: none !important; }
.promote-confirm-dialog {
    background: #fff; border-radius: var(--radius); max-width: 640px; width: 100%;
    max-height: 85vh; overflow: auto; padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.promote-confirm-dialog h3 { margin: 0 0 16px; }
.promote-confirm-body { font-size: 14px; line-height: 1.65; color: var(--muted); }
.promote-confirm-list { margin: 8px 0 16px 18px; padding: 0; }
.promote-confirm-list li { margin-bottom: 4px; }
.promote-confirm-warn {
    margin: 0 0 12px;
    padding: 10px 12px;
    background: var(--warning-soft);
    border: 1px solid #ffd591;
    border-radius: var(--radius);
    color: #d46b08;
}
.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.school-reset-dialog {
    max-width: 560px;
}
.school-reset-confirm-input {
    width: 100%;
    margin: 8px 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    box-sizing: border-box;
}
.school-reset-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--muted);
}
.school-reset-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin: 12px 0 16px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: var(--radius);
    font-size: 13px;
}
.school-reset-stats strong {
    color: var(--text);
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}
.login-card {
    width: 420px;
    max-width: 92vw;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
}
.login-card h1 { margin: 0 0 8px; font-size: 22px; }
.subtitle { color: var(--muted); margin: 0 0 24px; }
.login-card label { display: block; margin: 12px 0 6px; font-size: 14px; }
.login-card input, .login-card select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 4px;
}
.register-card { width: 480px; }
.register-card select { margin-bottom: 8px; }
.hint { margin-top: 16px; font-size: 12px; color: var(--muted); }

/* —— 登录页左右分（对齐主站 wechat_login 风格） —— */
.auth-body {
    --auth-ink: #2a2d2b;
    --auth-muted: #7a7f7c;
    --auth-line: #e5e3de;
    --auth-page: #e4e2dd;
    --auth-left: #f3f1ec;
    --auth-right: #ffffff;
    --auth-accent: #4a5c52;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--auth-ink);
    background: var(--auth-page);
    -webkit-font-smoothing: antialiased;
}
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 3rem);
}
.auth-card {
    width: 100%;
    max-width: 980px;
    min-height: 560px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    border-radius: 18px;
    overflow: hidden;
    background: var(--auth-right);
    box-shadow:
        0 1px 2px rgba(42, 45, 43, 0.04),
        0 18px 48px rgba(42, 45, 43, 0.08);
    border: 1px solid rgba(42, 45, 43, 0.06);
}
.brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 2rem 1.75rem;
    background: var(--auth-left);
}
.brand-title {
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.03em;
    margin: 0 0 0.7rem;
    color: var(--auth-ink);
}
.brand-desc {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--auth-muted);
    max-width: 22em;
    margin: 0 0 1.25rem;
}
.brand-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0;
    border-top: 1px solid var(--auth-line);
}
.brand-points li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.8rem;
    color: var(--auth-ink);
    font-weight: 500;
    line-height: 1.45;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--auth-line);
}
.brand-points li span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--auth-accent);
    opacity: 0.55;
    flex-shrink: 0;
    margin-top: 0.4em;
}
.brand-visual { padding-top: 1.25rem; }
.brand-trial {
    margin: 0;
    font-size: 0.75rem;
    color: var(--auth-muted);
    line-height: 1.55;
}
.brand-trial a {
    color: var(--auth-accent);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(74, 92, 82, 0.35);
}
.brand-trial a:hover { border-bottom-color: var(--auth-accent); }
.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.35rem 1.75rem 1.5rem;
    background: var(--auth-right);
}
.form-panel-inner {
    width: 100%;
    max-width: 340px;
}
.form-heading {
    text-align: center;
    margin-bottom: 0.15rem;
}
.form-heading h1 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
    color: var(--auth-ink);
}
.form-sub {
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.75rem;
    line-height: 1.5;
    margin: 0.35rem 0 1rem;
}
.admin-gate {
    border-radius: 10px;
    border: 1px solid var(--auth-line);
    background: #f7f6f3;
    padding: 0.75rem 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
}
.admin-gate p {
    margin: 0 0 0.55rem;
    font-size: 0.75rem;
    color: var(--auth-muted);
    line-height: 1.45;
}
.btn-main-site {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    background: var(--auth-accent);
    color: #fff !important;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none !important;
    border: none;
}
.btn-main-site:hover {
    background: #3d4d44;
    color: #fff !important;
}
.password-login-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-ink);
    margin: 0 0 0.35rem;
}
.password-login-form input[type="text"],
.password-login-form input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #d8d4cc;
    margin-bottom: 0.85rem;
    font-size: 0.9rem;
    background: #fafaf8;
    color: var(--auth-ink);
}
.password-login-form input:focus {
    outline: none;
    border-color: var(--auth-accent);
    background: #fff;
    box-shadow: 0 0 0 0.2rem rgba(74, 92, 82, 0.15);
}
.password-login-form .btn-login {
    margin-top: 0.25rem;
    border-radius: 10px;
    background: var(--auth-accent);
    border-color: var(--auth-accent);
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
}
.password-login-form .btn-login:hover {
    background: #3d4d44;
    border-color: #3d4d44;
}
.auth-body .alert {
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
}
.form-nav-hint {
    text-align: center;
    margin-top: 1rem;
}
.form-nav-hint a {
    color: var(--auth-accent);
    text-decoration: none;
}
.form-nav-hint a:hover { text-decoration: underline; }
@media (max-width: 900px) {
    .auth-page {
        padding: 1rem;
        align-items: flex-start;
    }
    .auth-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .brand-panel {
        padding: 1.6rem 1.35rem 1.25rem;
    }
    .brand-title { font-size: 1.35rem; }
    .form-panel {
        padding: 1.25rem 1.25rem 1.5rem;
        border-top: 1px solid var(--auth-line);
    }
}

.pagination { margin-top: 20px; }
.pagination ul, .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}
.pagination li { display: inline-flex; }
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active span, .pagination .current span, .pagination span.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pagination .disabled span { color: var(--muted); background: #f8fafc; }

.class-grade-panel { padding-top: 0; overflow: hidden; }
.grade-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 16px 0;
    border-bottom: 1px solid var(--border);
    margin: 0 -20px 0;
    padding-left: 20px;
    padding-right: 20px;
}
.grade-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: -1px;
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    transition: color .15s, background .15s;
}
.grade-tab:hover { color: var(--primary); background: #f8fbff; }
.grade-tab.is-active {
    color: var(--primary);
    background: #fff;
    border-color: var(--border);
    border-bottom-color: #fff;
    font-weight: 600;
}
.grade-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 600;
}
.grade-tab.is-active .grade-tab-count {
    background: #dbeafe;
    color: var(--primary);
}
.grade-panel { padding-top: 16px; }
.grade-panel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.btn-sm { padding: 6px 12px; font-size: 13px; }
.class-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.class-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    background: #fafafa;
    transition: border-color .15s, box-shadow .15s;
}
.class-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 12px rgba(22, 119, 255, .08);
}
.class-card-name { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.class-card-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.class-card-link { font-size: 13px; color: var(--primary); text-decoration: none; }
.class-card-link:hover { text-decoration: underline; }
.empty-grade { text-align: center; padding: 40px 16px; }

.class-batch-panel { padding: 24px; }
.class-batch-form { max-width: 720px; }
.class-batch-meta {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.class-batch-meta .form-row { margin-bottom: 0; }
.class-batch-mode-tabs {
    display: inline-flex;
    gap: 0;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.class-batch-mode-tab {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}
.class-batch-mode-tab:hover { color: var(--primary); }
.class-batch-mode-tab.is-active {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.class-batch-mode-pane { margin-bottom: 4px; }
.class-batch-hint { margin-top: 8px; }
.class-batch-hint code {
    padding: 1px 6px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 12px;
}
.class-batch-preview-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: #475569;
}
.class-batch-preview-split { color: #cbd5e1; }
.class-batch-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    max-height: 160px;
    overflow-y: auto;
    padding: 2px;
}
.class-batch-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 13px;
    line-height: 1.4;
}
.class-batch-chip.is-dup {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #b45309;
    text-decoration: line-through;
    text-decoration-color: rgba(180, 83, 9, .45);
}
.class-batch-range-grid {
    display: grid;
    grid-template-columns: 120px 120px 1fr;
    gap: 12px;
    align-items: end;
}
.class-batch-range-field { display: flex; flex-direction: column; gap: 6px; }
.class-batch-range-field input { width: 100%; }
.class-batch-range-label { font-size: 13px; color: var(--muted); }
.class-batch-options {
    margin-top: 8px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.class-batch-options .checkbox-item { margin: 0; }
.class-batch-actions { align-items: center; flex-wrap: wrap; }
.class-batch-submit-hint { font-size: 13px; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 640px) {
    .class-batch-meta { grid-template-columns: 1fr; }
    .class-batch-range-grid { grid-template-columns: 1fr 1fr; }
    .class-batch-range-field-wide { grid-column: 1 / -1; }
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: #f8fafc; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-bar form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-bar select, .filter-bar input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.form-grid { max-width: 640px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; margin-bottom: 6px; font-size: 14px; }
.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.form-row textarea { min-height: 120px; resize: vertical; font-family: inherit; }
.radio-group { display: flex; flex-wrap: wrap; gap: 16px; }
.range-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.range-preview {
    margin-top: 10px; padding: 10px 12px; background: #f8fafc;
    border: 1px solid var(--border); border-radius: 8px; white-space: pre-wrap; font-size: 13px;
}
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.text-error { color: var(--error); font-size: 13px; }
.text-warn { color: #d97706; font-size: 13px; }
.row-error { background: #fff7f7; }
.checkbox-list { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.checkbox-item { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.checkbox-item-disabled { color: #9ca3af; cursor: not-allowed; }

.test-plan-form-panel { padding: 20px 24px; }
.test-plan-form { max-width: 920px; }
.test-plan-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.test-plan-section:last-of-type { border-bottom: none; padding-bottom: 0; }
.test-plan-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.test-plan-section-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}
.test-plan-section-head .test-plan-section-title { margin-bottom: 0; }
.test-plan-class-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.test-plan-class-toolbar .muted { font-size: 13px; }
.test-plan-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
}
.test-plan-field-full { grid-column: 1 / -1; }
.test-plan-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #374151;
}
.test-plan-field input,
.test-plan-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}
.test-plan-field input:focus,
.test-plan-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.test-plan-field input[readonly] {
    background: #f9fafb;
    color: #374151;
    cursor: default;
}
.test-plan-readonly {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    font-size: 14px;
    color: #374151;
}
.test-plan-hint {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280;
}
.test-plan-class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 10px;
}
.test-plan-class-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.test-plan-class-card:hover:not(.is-disabled) {
    border-color: #93c5fd;
    background: #f8fbff;
}
.test-plan-class-card input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--primary);
}
.test-plan-class-card:has(input:checked) {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}
.test-plan-class-name {
    font-size: 14px;
    color: #111827;
    line-height: 1.2;
}
.test-plan-class-tag {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    white-space: nowrap;
}
.test-plan-class-card.is-disabled {
    cursor: not-allowed;
    background: #f9fafb;
    border-style: dashed;
    color: #9ca3af;
}
.test-plan-class-card.is-disabled .test-plan-class-name { color: #9ca3af; }
.test-plan-class-card.is-readonly {
    cursor: default;
    border-color: #bfdbfe;
    background: #eff6ff;
}
.test-plan-class-card.is-readonly:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.test-plan-class-card.is-readonly.is-disabled,
.test-plan-class-card.is-readonly.is-disabled:hover {
    border-color: var(--border);
    background: #f9fafb;
    border-style: dashed;
}
.test-plan-class-card.is-year-hidden {
    display: none !important;
}
.test-plan-class-preview {
    display: block;
    width: 100%;
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.35;
}
.test-plan-class-card.is-invalid-grade {
    border-color: #f59e0b;
    background: #fffbeb;
}
.test-plan-class-card.is-invalid-grade .test-plan-class-preview {
    color: #b45309;
}
.test-plan-class-grade-select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
}
.test-plan-grade-modes {
    display: grid;
    gap: 10px;
    margin: 12px 0;
}
.test-plan-grade-mode {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
}
.test-plan-grade-mode:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}
.test-plan-grade-mode input {
    margin-top: 3px;
}
.test-plan-grade-mode span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.test-plan-grade-mode strong {
    font-size: 14px;
    color: #111827;
}
.test-plan-grade-mode em {
    font-style: normal;
    font-size: 12px;
    color: #6b7280;
}
.test-plan-refresh-flag {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 8px;
    font-size: 13px;
    color: #374151;
}
.test-plan-actions {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* 体测计划列表：状态筛选分段按钮 + 计划卡片 */
.test-plan-status-tabs {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    margin: 0 0 16px;
    padding: 4px;
    flex-wrap: wrap;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.test-plan-status-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 9px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: none;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.test-plan-status-tab:hover {
    background: #fff;
    color: var(--primary);
    border-color: #bfdbfe;
}
.test-plan-status-tab.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(22, 119, 255, 0.35);
}
.test-plan-status-tab.is-active:hover {
    background: #0958d9;
    border-color: #0958d9;
    color: #fff !important;
}
.test-plan-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.test-plan-list-pager {
    margin-top: 16px;
}
.test-plan-list-pager .pagination {
    margin-top: 0;
}
.test-plan-card {
    padding: 20px 22px;
}
.test-plan-card-head {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.test-plan-card-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}
.test-plan-card-meta {
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}
.tag-active {
    background: #ecfdf5;
    color: #047857;
    font-weight: 500;
}
.tag-muted {
    background: #f3f4f6;
    color: #6b7280;
}
.test-plan-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 10px;
}
.test-plan-action-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafbfc;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    min-height: 72px;
}
.test-plan-action-card:hover {
    border-color: #93c5fd;
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.08);
}
.test-plan-action-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.35;
}
.test-plan-action-desc {
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
}
.test-plan-action-card-form {
    padding: 0;
    overflow: hidden;
}
.test-plan-action-card-form:hover {
    border-color: #fca5a5;
    background: #fef2f2;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}
.test-plan-action-card-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    min-height: 72px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.test-plan-action-card-form .test-plan-action-title {
    color: #dc2626;
}
.test-plan-action-card-form:hover .test-plan-action-title {
    color: #b91c1c;
}

@media (max-width: 720px) {
    .test-plan-fields { grid-template-columns: 1fr; }
    .test-plan-class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .test-plan-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.export-list { display:flex; flex-direction:column; gap:12px; }
.export-item {
    display:flex; justify-content:space-between; align-items:center; gap:16px;
    padding:14px; border:1px solid var(--border); border-radius:8px; background:#fafafa;
}
.export-item p { margin:4px 0 0; }
.tag-warn { background:#fff7ed; color:#c2410c; }
.text-success { color:#15803d; }

.import-preview-table .import-score-details { min-width: 220px; max-width: 420px; }
.import-score-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.import-score-list li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    line-height: 1.35;
}
.import-score-name { color: var(--muted); flex-shrink: 0; }
.import-score-value { font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 720px) {
    .import-score-list { grid-template-columns: 1fr; }
}

.student-sort-panel {
    margin-bottom: 12px;
    padding: 12px 16px;
}
.student-sort-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}
.student-sort-title {
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}
.student-sort-options {
    margin: 0;
}
.student-sort-gender {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
.student-sort-gender input {
    margin: 0;
}
.student-sort-hint {
    font-size: 13px;
    flex: 1 1 220px;
}
.student-sort-status {
    font-size: 13px;
    white-space: nowrap;
}
.student-workspace {
    display: flex;
    gap: 0;
    min-height: 520px;
    padding: 0;
    overflow: hidden;
}
.student-sidebar {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: 16px 12px;
    background: #fafafa;
}
.student-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.sidebar-section-title {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
}
.sidebar-grade-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.sidebar-grade-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
}
.sidebar-grade-tab:hover { border-color: #93c5fd; color: var(--primary); }
.sidebar-grade-tab.is-active {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
    font-weight: 600;
}
.sidebar-grade-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e5e7eb;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sidebar-grade-tab.is-active .sidebar-grade-count {
    background: #dbeafe;
    color: var(--primary);
}
.class-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 420px;
    overflow-y: auto;
}
.class-nav-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}
.class-nav-item:hover { background: #eff6ff; color: var(--primary); }
.class-nav-item.is-opened { background: #f0f9ff; }
.class-nav-item.is-active {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}
.class-nav-empty { padding: 12px 8px; font-size: 13px; }
.work-tab-bar {
    display: flex;
    gap: 4px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    overflow-x: auto;
    min-height: 44px;
    align-items: flex-end;
}
.work-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #eef2f7;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
    margin-bottom: -1px;
}
.work-tab.is-active {
    background: #fff;
    color: var(--primary);
    border-color: var(--border);
    font-weight: 600;
}
.work-tab-close {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
}
.work-tab-close:hover { color: var(--error); }
.work-panels {
    flex: 1;
    padding: 16px;
    position: relative;
}
.work-panel { display: none; }
.work-panel.is-active { display: block; }
.work-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}
.work-panel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.work-search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.work-search-form input {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 180px;
}
.work-loading { padding: 40px 16px; text-align: center; }
.work-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}
.work-panel-toolbar .btn-sm + .btn-sm { margin-left: 8px; }

.student-workspace .table.student-list-table {
    font-size: 13px;
}
.student-workspace .table.student-list-table th,
.student-workspace .table.student-list-table td {
    padding: 4px 8px;
    line-height: 1.35;
}
.student-workspace .table.student-list-table .col-check {
    width: 36px;
    text-align: center;
}
.student-workspace .table.student-list-table .col-actions {
    width: 52px;
    text-align: center;
}
.student-workspace .table.student-list-table .row-actions {
    white-space: nowrap;
    width: 52px;
    text-align: center;
    position: relative;
    overflow: visible;
}
.student-workspace .table.student-list-table .student-row-menu {
    position: relative;
    display: inline-block;
}
.student-workspace .table.student-list-table .student-row-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 24px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 1px;
    cursor: pointer;
}
.student-workspace .table.student-list-table .student-row-menu-toggle:hover,
.student-workspace .table.student-list-table .student-row-menu.is-open .student-row-menu-toggle {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #eff6ff;
}
.student-workspace .table.student-list-table .student-row-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1200;
    min-width: 120px;
    padding: 6px 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    text-align: left;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.student-workspace .table.student-list-table .student-row-menu-panel a,
.student-workspace .table.student-list-table .student-row-menu-panel button.student-change-action,
.student-workspace .table.student-list-table .student-row-menu-panel .pending-tag {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 14px;
    margin: 0;
    border: 0;
    background: none;
    color: #1e293b;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.student-workspace .table.student-list-table .student-row-menu-panel a:hover,
.student-workspace .table.student-list-table .student-row-menu-panel button.student-change-action:hover {
    background: #f1f5f9;
}
.student-workspace .table.student-list-table .student-row-menu-panel .student-change-action {
    color: #2563eb;
}
.student-workspace .table.student-list-table .student-row-menu-panel .student-change-action.is-warn {
    color: #ea580c;
}
.student-workspace .table.student-list-table .student-row-menu-panel .link-danger {
    color: #dc2626;
}
.student-workspace .table.student-list-table .student-row-menu-panel .pending-tag {
    color: #92400e;
    font-size: 12px;
    cursor: default;
}
.student-workspace .table.student-list-table .row-actions .student-change-action {
    background: none;
    border: none;
    padding: 0;
    color: #2563eb;
    cursor: pointer;
    font: inherit;
}
.student-workspace .table.student-list-table .row-actions .student-change-action.is-warn {
    color: #ea580c;
}
.student-workspace .table.student-list-table .row-actions .pending-tag {
    color: #92400e;
    font-size: 12px;
}
.student-workspace .work-search-form .student-enroll-filter {
    min-width: 108px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 8px;
    background: #fff;
    color: #334155;
}
.student-workspace .enroll-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 18px;
    vertical-align: middle;
}
.student-workspace .enroll-tag.is-suspend {
    background: #fff7ed;
    color: #c2410c;
}
.student-workspace .enroll-tag.is-withdraw {
    background: #fef2f2;
    color: #b91c1c;
}
.student-workspace .table.student-list-table .student-row-menu-panel .student-change-action.is-ok {
    color: #15803d;
}

.student-change-modal {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(15, 23, 42, 0.45);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.student-change-modal[hidden] { display: none !important; }
.student-change-dialog {
    background: #fff; border-radius: 10px; max-width: 480px; width: 100%;
    max-height: 85vh; overflow: auto; padding: 20px 22px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.student-change-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 8px;
}
.student-change-head h3 { margin: 0; font-size: 18px; }
.student-change-close {
    border: none; background: transparent; font-size: 22px; line-height: 1;
    color: #64748b; cursor: pointer; padding: 0 4px;
}
.student-change-hint { margin: 0 0 12px; font-size: 13px; }
.student-change-label {
    display: block; margin: 10px 0 6px; font-size: 13px; color: #334155;
}
.student-change-input {
    width: 100%; box-sizing: border-box;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    font: inherit;
}
.student-change-subhint { margin: 8px 0 0; font-size: 12px; }
.student-change-foot {
    display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px;
}

.student-batch-form textarea {
    min-height: 280px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}
.batch-format-hint {
    margin-top: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
}
.batch-format-hint ul { margin: 8px 0 8px 18px; }
.batch-format-hint code {
    background: #eef2ff;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.student-entry-panel { padding: 16px 18px; }
.student-entry-form { max-width: 860px; }

/* 列表式新增学生 */
.student-list-add-panel .student-entry-form { max-width: none; }
.student-list-add-class {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: flex-end;
    margin: 0 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.student-list-add-class .form-row {
    margin: 0;
    min-width: 180px;
}
.student-list-add-class .form-row label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}
.student-list-add-class .form-row select {
    display: block;
    min-width: 200px;
    width: 100%;
}
.student-list-add-class-locked {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: baseline;
    font-size: 14px;
    color: #64748b;
}
.student-list-add-class-locked strong {
    color: #0f172a;
    font-weight: 600;
    margin-right: 8px;
}
.student-list-add-scroll {
    margin: 0 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: auto;
}
.student-list-add-table {
    margin: 0;
    min-width: 980px;
}
.student-list-add-table th,
.student-list-add-table td {
    padding: 8px 6px;
    vertical-align: middle;
    white-space: nowrap;
}
.student-list-add-table thead th {
    background: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    position: sticky;
    top: 0;
    z-index: 1;
}
.student-list-add-table .col-idx {
    width: 36px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}
.student-list-add-table .col-name { min-width: 96px; }
.student-list-add-table .col-gender { min-width: 88px; }
.student-list-add-table .col-school-no { min-width: 110px; }
.student-list-add-table .col-student-no { min-width: 140px; }
.student-list-add-table .col-id-card { min-width: 160px; }
.student-list-add-table .col-birth { min-width: 140px; }
.student-list-add-table .col-seq { min-width: 80px; }
.student-list-add-table .col-act { width: 72px; text-align: center; }
.student-list-add-table input[type="text"],
.student-list-add-table input[type="number"],
.student-list-add-table input[type="date"],
.student-list-add-table select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 34px;
    padding: 5px 8px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
}
.student-list-add-table input:focus,
.student-list-add-table select:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15);
}
.student-list-add-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    margin: 0 0 16px;
}
.student-list-add-toolbar .hint { margin: 0; }

.student-form-legend {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--muted);
}
.student-form-legend .req-mark { margin-right: 2px; }
.student-form-grid {
    display: grid;
    gap: 10px 14px;
    margin-bottom: 0;
}
.student-form-grid .form-row { margin-bottom: 0; }
.student-entry-form .form-row label {
    margin-bottom: 4px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}
.student-entry-form .form-row.is-required label {
    color: #0f766e;
}
.student-entry-form .req-mark {
    color: #dc2626;
    font-weight: 700;
    margin-left: 2px;
}
.student-entry-form .form-row input,
.student-entry-form .form-row select {
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 13px;
}
.student-entry-form .form-row.is-required input,
.student-entry-form .form-row.is-required select,
.student-entry-form .form-row.is-required .readonly-field {
    border-color: #99f6e4;
    background: #f0fdfa;
}
.student-entry-form .form-row.is-required input:focus,
.student-entry-form .form-row.is-required select:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.18);
}
.student-mask-hint {
    margin: 4px 0 0 !important;
    font-size: 12px;
    line-height: 1.4;
}
.student-form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.student-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.student-form-grid-full { grid-column: 1 / -1; }
@media (max-width: 768px) {
    .student-form-grid-2,
    .student-form-grid-3 { grid-template-columns: 1fr; }
}
.student-entry-meta {
    display: block;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.student-batch-filters {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: flex-end;
    width: 100%;
}
.student-batch-filters .student-batch-filter-item {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}
.student-batch-filters .student-batch-filter-item label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}
.student-batch-filters .student-batch-filter-item select {
    display: block;
    width: 100%;
    box-sizing: border-box;
}
.student-batch-filter-hint {
    margin: 10px 0 0;
}
@media (max-width: 640px) {
    .student-batch-filters {
        flex-direction: column !important;
        align-items: stretch;
    }
}
.student-entry-hint-panel {
    margin-top: 20px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.65;
}
.student-entry-hint-panel h4 {
    margin: 0 0 10px;
    font-size: 14px;
}
.student-entry-hint-panel ul {
    margin: 8px 0 10px 18px;
}
.student-entry-hint-panel li + li { margin-top: 4px; }
.student-entry-hint-panel .hint-note {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    color: var(--muted);
    font-size: 12px;
}
.student-mode-banner {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.55;
}
.student-mode-banner ul {
    margin: 8px 0 0 18px;
}
.student-mode-banner li + li { margin-top: 4px; }
.student-entry-mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}
.student-mode-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 14px;
}
.student-mode-option:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 600;
}
.student-import-steps {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.student-import-step-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.student-import-step-head p {
    margin: 4px 0 0;
    font-size: 13px;
}
.student-import-step-num {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1677ff;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.student-import-mode-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
@media (max-width: 720px) {
    .student-import-mode-cards { grid-template-columns: 1fr; }
}
.student-import-mode-card {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.student-import-mode-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.student-import-mode-card-body {
    padding: 16px 16px 14px;
}
.student-import-mode-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}
.student-import-mode-card-body > p {
    margin: 0 0 10px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}
.student-import-mode-card-body ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #334155;
    line-height: 1.55;
}
.student-import-mode-badge {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
    font-style: normal;
}
.student-import-mode-badge.is-privacy {
    background: #fef3c7;
    color: #b45309;
}
.student-import-mode-card.is-active,
.student-import-mode-card:has(input:checked) {
    border-color: #1677ff;
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, .12);
}
.student-import-tpl-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}
.batch-column-map-panel {
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #f8fbff;
}
.batch-column-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 12px 0;
}
.batch-column-map-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.batch-column-map-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}
.batch-column-map-title .muted {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.batch-column-map-select {
    width: 100%;
    box-sizing: border-box;
}
.report-match-guide {
    font-size: 13px;
    line-height: 1.6;
}
.report-match-guide code {
    display: inline-block;
    margin: 2px 0;
    padding: 2px 6px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 12px;
}
.report-match-guide pre {
    margin: 8px 0 12px;
    padding: 10px 12px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
}
.report-missing-banner {
    margin-bottom: 16px;
}
.student-form-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.student-form-section:last-of-type { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.student-form-section-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}
.student-form-options {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.student-form-options .checkbox-item { margin: 0; font-size: 13px; }
.student-form-actions { margin-top: 12px; }
.student-import-upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 20px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
    transition: border-color .15s, background .15s;
}
.student-import-upload-box:hover,
.student-import-upload-box.is-dragover {
    border-color: #93c5fd;
    background: #eff6ff;
}
.student-import-upload-box input[type="file"] {
    max-width: 100%;
}
.student-import-upload-icon {
    font-size: 28px;
    line-height: 1;
    color: #64748b;
}
.student-import-upload-text { font-size: 14px; color: #475569; }
.student-import-upload-sub { font-size: 12px; color: var(--muted); }
.student-import-guide {
    margin-top: 16px;
}
.student-import-guide h3 {
    margin: 0 0 12px;
    font-size: 15px;
}
.student-import-field-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 12px 0 16px;
}
.student-import-field-table th,
.student-import-field-table td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}
.student-import-field-table th {
    background: #eff6ff;
    font-weight: 600;
}
.student-import-field-table .col-required { white-space: nowrap; width: 88px; }
.student-import-warn-list {
    margin: 0;
    padding-left: 18px;
    color: #b45309;
}
.student-import-warn-list li + li { margin-top: 6px; }

.form-row-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-row-inline > div label { display: block; margin-bottom: 6px; font-size: 14px; }
.form-row-inline > div select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.readonly-field {
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
}

.score-batch-toolbar { margin-bottom: 8px; padding: 10px 14px; }
.score-batch-toolbar .muted { margin-top: 6px; }
.score-batch-pager-bar {
    margin-bottom: 8px;
    align-items: center;
    gap: 8px 12px;
    padding: 6px 12px;
}
.score-batch-pager-bar > .muted,
.score-batch-pager-bar .scores-page-size-line {
    margin: 0;
    line-height: 1.3;
}
.score-batch-pager-bar .pagination { margin-top: 0; }
.score-batch-pager-bar .pagination a,
.score-batch-pager-bar .pagination span {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
}
.score-batch-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    flex-wrap: wrap;
    margin-top: 8px;
    margin-bottom: 0;
    padding: 8px 14px;
    background: #fff;
    position: sticky;
    bottom: 0;
    z-index: 5;
}
.score-batch-footer-pager {
    min-width: 0;
    flex: 1;
}
.score-batch-footer-pager .muted {
    margin: 0 0 4px;
}
.score-batch-footer .score-batch-pager .pagination {
    margin-top: 0;
}
.score-batch-footer .form-actions {
    margin: 0;
    flex-shrink: 0;
}
.score-batch-footer .pagination a,
.score-batch-footer .pagination span {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
}
.scores-view-pager { margin-top: 0; }
.scores-page-size-line {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 4px;
}
.scores-page-size-select {
    min-width: 56px;
    height: 24px;
    padding: 0 4px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    color: var(--text);
    line-height: 1.2;
}

.teacher-assign-intro ul { margin: 8px 0 0 18px; line-height: 1.7; }
.teacher-scope-panel { margin-bottom: 16px; }
.teacher-scope-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.teacher-scope-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
}
.teacher-scope-switch input { width: 18px; height: 18px; margin: 0; }
.assign-tab-bar { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid #e5e7eb; padding-bottom: 12px; }
.assign-tab { border: 1px solid #e5e7eb; background: #fff; padding: 8px 16px; border-radius: 6px; cursor: pointer; }
.assign-tab.active { background: var(--primary, #2563eb); color: #fff; border-color: var(--primary, #2563eb); }
.assign-tab-pane { display: none; }
.assign-tab-pane.active { display: block; }
.assign-grade-block { margin-bottom: 20px; }
.assign-grade-block h4 { margin: 0 0 10px; font-size: 15px; }
.assign-class-grid { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.assign-class-item { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.assign-class-item.is-disabled { opacity: 0.55; cursor: not-allowed; }
.assign-gender-table { max-width: 720px; }
.assign-elective-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.assign-elective-list { min-height: 80px; }
.tag { font-style: normal; font-size: 12px; padding: 1px 6px; border-radius: 4px; }
.tag-warn { background: #fef3c7; color: #92400e; }
.tag-ok { background: #dcfce7; color: #166534; }
.tag-admin { background: #dbeafe; color: #1d4ed8; font-weight: 600; }
.row-admin { background: #f8fbff; }
.btn-sm { padding: 4px 10px; font-size: 13px; }

.teacher-manage-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.teacher-manage-header-main { flex: 1; min-width: 240px; }
.teacher-manage-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.teacher-manage-header-actions .hint { text-align: right; max-width: 220px; }

.homeroom-perm-panel {
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid #dbeafe;
    background: #f8fbff;
}
.homeroom-perm-master {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.homeroom-perm-master-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.homeroom-perm-master-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}
.homeroom-perm-master-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}
.homeroom-perm-master-status {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #166534;
    background: #dcfce7;
    white-space: nowrap;
}
.homeroom-perm-master-status.is-mixed {
    color: #92400e;
    background: #fef3c7;
}
.homeroom-slide-switch {
    flex-shrink: 0;
    width: 72px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.homeroom-slide-switch:disabled {
    opacity: 0.6;
    cursor: wait;
}
.homeroom-slide-track {
    position: relative;
    display: block;
    width: 72px;
    height: 34px;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.18);
    transition: background .2s ease;
    overflow: hidden;
}
.homeroom-slide-switch.is-on .homeroom-slide-track {
    background: #2563eb;
}
.homeroom-slide-on,
.homeroom-slide-off {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    user-select: none;
}
.homeroom-slide-on { left: 10px; opacity: 0; }
.homeroom-slide-off { right: 10px; opacity: 1; }
.homeroom-slide-switch.is-on .homeroom-slide-on { opacity: 1; }
.homeroom-slide-switch.is-on .homeroom-slide-off { opacity: 0; }
.homeroom-slide-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.28);
    transition: transform .2s ease;
}
.homeroom-slide-switch.is-on .homeroom-slide-knob {
    transform: translateX(38px);
}
.homeroom-slide-switch:focus-visible .homeroom-slide-track {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.teacher-list-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.teacher-list-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.homeroom-perm-cell {
    min-width: 128px;
}
.homeroom-perm-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 6px 10px 6px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: inherit;
    font: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background .15s ease, border-color .15s ease;
}
.homeroom-perm-switch:hover { border-color: #cbd5e1; }
.homeroom-perm-switch.is-on {
    border-color: #86efac;
    background: #ecfdf5;
}
.homeroom-perm-switch.is-off {
    border-color: #fcd34d;
    background: #fffbeb;
}
.homeroom-perm-switch-track {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: background .15s ease;
}
.homeroom-perm-switch.is-on .homeroom-perm-switch-track { background: #22c55e; }
.homeroom-perm-switch.is-off .homeroom-perm-switch-track { background: #f59e0b; }
.homeroom-perm-switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
    transition: left .15s ease;
}
.homeroom-perm-switch.is-on .homeroom-perm-switch-knob { left: 20px; }
.homeroom-perm-switch-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}
.homeroom-perm-switch.is-on .homeroom-perm-switch-label { color: #166534; }
.homeroom-perm-switch.is-off .homeroom-perm-switch-label { color: #92400e; }
.homeroom-perm-switch:disabled { opacity: 0.6; cursor: wait; }

@media (max-width: 720px) {
    .teacher-manage-header-actions { align-items: flex-start; }
    .teacher-manage-header-actions .hint { text-align: left; }
    .homeroom-perm-master {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .homeroom-perm-master-status {
        display: block;
        margin: 6px 0 0;
        width: fit-content;
    }
}

.stats-target-panel .target-input { width: 90px; padding: 6px 8px; }
.stats-subtitle { margin: 20px 0 10px; font-size: 15px; }
.text-warn { color: #b45309; font-weight: 600; }
.stats-compare-panel h3 { margin-top: 0; }
.adjust-change-line { font-size: 13px; line-height: 1.5; }
.adjust-failure-list { margin: 0; padding-left: 18px; color: #64748b; }
.adjust-progress {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0 8px;
}
.adjust-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #1677ff, #36cfc9);
    border-radius: 999px;
    transition: width 0.35s ease;
}
.student-import-result-summary{
    margin:0 0 12px;padding:12px 14px;border-radius:8px;font-size:13px;
    background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;
}
.student-import-result-summary.is-warn{
    background:#fffbeb;border-color:#fde68a;color:#92400e;
}
.student-import-result-summary p{margin:0 0 8px}
.student-import-result-summary p:last-child{margin-bottom:0}
.student-import-result-table .text-success{color:#059669}
.student-import-result-table .text-error{color:#dc2626}
.adjust-result-area[hidden],
#applyPanel[hidden],
#applyProgressWrap[hidden] {
    display: none !important;
}

.score-paste-busy {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}
.score-paste-busy[hidden] {
    display: none !important;
}
.score-paste-busy.is-open {
    display: flex !important;
}
.score-paste-busy-card {
    width: min(420px, 100%);
    padding: 28px 24px 22px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
    text-align: center;
}
.score-paste-busy-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}
.score-paste-busy-desc {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
}
.score-paste-busy-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}
.score-paste-busy-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #1677ff, #36cfc9);
    transition: width 0.35s ease;
}
.score-paste-busy.is-indeterminate .score-paste-busy-bar-fill {
    width: 40% !important;
    transition: none;
    animation: score-paste-busy-slide 1.2s ease-in-out infinite;
}
.score-paste-busy-pct {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    font-variant-numeric: tabular-nums;
}
@keyframes score-paste-busy-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}
body.score-paste-busy-lock {
    overflow: hidden;
}

.score-paste-panel { margin-bottom: 16px; }
.score-paste-summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
    padding: 4px 0;
}
.score-paste-body { margin-top: 12px; }
.score-paste-body textarea {
    width: 100%;
    min-height: 140px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
}
.score-paste-body .form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}
.score-paste-form.form-grid { max-width: none; }
.score-paste-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 16px;
    align-items: stretch;
}
.score-paste-input-row > label {
    grid-column: 1 / -1;
}
.score-paste-limit-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 8px;
    font-size: 13px;
    color: #9a3412;
}
.score-paste-limit-banner strong {
    color: #c2410c;
    font-size: 14px;
}
.score-paste-input-main {
    min-width: 0;
}
.score-paste-row-counter {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--muted, #6b7280);
}
.score-paste-row-counter.is-over {
    color: #dc2626;
    font-weight: 600;
}
.score-paste-input-row > .score-paste-input-main > textarea {
    min-width: 0;
    width: 100%;
    min-height: 280px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}
.score-paste-side-hint {
    margin-top: 0;
    height: 100%;
    max-height: 420px;
    overflow-y: auto;
    font-size: 12px;
}
.score-paste-side-hint ul {
    margin: 8px 0 0 16px;
    padding: 0;
}
.score-paste-side-hint li {
    margin-bottom: 6px;
}
@media (max-width: 960px) {
    .score-paste-input-row {
        grid-template-columns: 1fr;
    }
    .score-paste-side-hint {
        max-height: none;
    }
}
.batch-preview-panel {
    min-width: 0;
    overflow: hidden;
}
.score-paste-map-panel {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}
.score-paste-map-summary {
    margin-bottom: 12px;
}
.score-paste-map-summary p {
    margin: 0 0 8px;
    font-size: 13px;
}
.score-paste-header-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
}
.score-paste-confirm-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 14px 0 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.score-paste-confirm-options .score-paste-header-check {
    margin: 0;
}
.import-upload-form.form-grid { max-width: none; }
.import-upload-inline {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 960px;
}
.import-upload-field .import-upload-file {
    width: 100%;
    max-width: 260px;
    box-sizing: border-box;
    padding: 8px 10px;
}
.import-upload-field .import-upload-replace-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    min-width: 0;
}
.import-upload-replace-text {
    font-size: 13px;
    color: #374151;
}
.score-paste-normalize-panel {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}
.score-paste-normalize-panel h3 {
    margin: 0 0 8px;
    font-size: 16px;
}
.score-paste-normalize-table th,
.score-paste-normalize-table td {
    white-space: nowrap;
    vertical-align: middle;
}
.score-paste-norm-status.is-ok { color: #15803d; }
.score-paste-norm-status.is-bad { color: #b91c1c; }
.score-paste-map-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}
.score-paste-map-wrap:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 1px;
}
.score-paste-map-table {
    width: max-content;
    min-width: 100%;
    margin: 0;
    font-size: 13px;
    border-collapse: separate;
    border-spacing: 0;
}
.score-paste-map-table th,
.score-paste-map-table td {
    vertical-align: top;
    padding: 8px 10px;
    min-width: 96px;
    max-width: 140px;
    border-bottom: 1px solid var(--border);
}
.score-paste-map-table th:first-child,
.score-paste-map-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 72px;
    max-width: 88px;
    background: #fff;
    box-shadow: 1px 0 0 var(--border);
}
.score-paste-map-table thead th {
    background: #f8fafc;
}
.score-paste-map-table thead th:first-child {
    z-index: 3;
}
.score-paste-map-table .paste-col-map select {
    width: 100%;
    min-width: 108px;
    max-width: 132px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
}
.score-paste-map-table .paste-col-header {
    font-size: 12px;
    color: var(--muted, #666);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.score-paste-map-table .paste-col-sample {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-secondary, #444);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.score-class-switch {
    display: flex;
    align-items: center;
    gap: 6px 8px;
    flex-wrap: nowrap;
}
.score-class-switch label {
    flex: 0 0 auto;
    margin: 0;
    font-size: 13px;
    white-space: nowrap;
    color: var(--text-secondary, #444);
}
.score-class-switch select {
    flex: 1 1 0;
    min-width: 0;
    max-width: 132px;
    width: auto;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
}
@media (max-width: 1100px) {
    .score-class-switch { flex-wrap: wrap; }
    .score-class-switch select {
        flex: 1 1 120px;
        max-width: none;
    }
}
.test-record-students-wrap { padding: 0; }
.test-record-students-table { font-size: 13px; }
.test-record-students-table th,
.test-record-students-table td {
    padding: 8px 12px;
}
.test-record-students-table td a { font-size: 13px; }
.page-header-compact h2 { font-size: 1.25rem; margin-bottom: 4px; }
.page-header-compact p { font-size: 13px; margin: 2px 0; }
.score-entry-panel { padding: 14px 18px; }
.score-entry-form.form-grid { max-width: none; }
.score-entry-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.score-entry-row-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 16px;
}
.score-entry-row-bmi {
    max-width: 280px;
}
.score-entry-row-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
}
.score-entry-field { margin-bottom: 0; }
.score-entry-form label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #374151;
}
.score-entry-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: #111827;
    -moz-appearance: textfield;
    appearance: textfield;
}
.score-entry-input::-webkit-outer-spin-button,
.score-entry-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.score-entry-input.is-invalid {
    border-color: #dc2626;
    background: #fef2f2;
}
.score-entry-readonly {
    padding: 6px 8px;
    font-size: 13px;
    min-height: 31px;
    box-sizing: border-box;
}
.score-entry-hint {
    font-size: 12px;
    margin: 0;
}
.score-entry-actions {
    margin-top: 4px;
    margin-bottom: 0;
}
@media (max-width: 640px) {
    .score-entry-row-3,
    .score-entry-row-2 {
        grid-template-columns: 1fr;
    }
    .score-entry-row-bmi { max-width: none; }
}
.score-grid-wrap { overflow-x: auto; padding: 0; }
.score-grid-table { min-width: 960px; font-size: 13px; }
.score-grid-table th, .score-grid-table td {
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
}
.score-grid-table .sticky-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
    box-shadow: 2px 0 4px rgba(0,0,0,.04);
}
.score-grid-table thead .sticky-col { background: #fafafa; }
.score-grid-table .col-seq {
    width: 56px;
    color: #6b7280;
}
.score-grid-input {
    width: 72px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: #111827;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}
.score-grid-input::placeholder {
    color: #cbd5e1;
    opacity: 1;
}
.score-grid-input::-webkit-input-placeholder {
    color: #cbd5e1;
}
.score-grid-input::-moz-placeholder {
    color: #cbd5e1;
    opacity: 1;
}
.score-grid-input::-webkit-outer-spin-button,
.score-grid-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.score-grid-input.is-invalid {
    border-color: #dc2626;
    background: #fef2f2;
}
.score-na {
    display: inline-block;
    width: 72px;
    text-align: center;
    color: #cbd5e1;
}
.score-cell-wrap {
    min-width: 96px;
    vertical-align: top;
}
.score-attempt-hint {
    font-size: 11px;
    line-height: 1.35;
    color: #059669;
    margin-top: 4px;
    max-width: 120px;
    word-break: break-all;
}
.score-attempt-hint.muted {
    color: #9ca3af;
}
.score-best-readonly {
    display: inline-block;
    min-width: 72px;
    padding: 6px 8px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* 按班/按场表格录入：紧凑列宽，尽量一屏显示全部项目 */
.score-batch-form .score-grid-table,
.score-batch-view .score-grid-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
    font-size: 12px;
    border-collapse: separate;
    border-spacing: 0;
}
.score-batch-form .score-grid-table th,
.score-batch-form .score-grid-table td,
.score-batch-view .score-grid-table th,
.score-batch-view .score-grid-table td {
    padding: 4px 2px;
    white-space: nowrap;
}
.score-batch-form .score-grid-table th,
.score-batch-view .score-grid-table th {
    white-space: normal;
    line-height: 1.2;
    font-size: 11px;
    font-weight: 600;
    vertical-align: bottom;
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fafafa;
    box-shadow: 0 1px 0 var(--border);
}
.score-batch-form .score-grid-table th .muted,
.score-batch-view .score-grid-table th .muted {
    font-size: 10px;
    font-weight: 400;
}
.score-batch-form .score-grid-table .col-class,
.score-batch-view .score-grid-table .col-class {
    width: 34px;
    max-width: 38px;
    font-size: 11px;
    padding-left: 4px;
    padding-right: 4px;
}
.score-batch-form .score-grid-table .col-seq,
.score-batch-view .score-grid-table .col-seq {
    width: 28px;
    font-size: 11px;
    color: #6b7280;
}
.score-batch-form .score-grid-table .sticky-col,
.score-batch-view .score-grid-table .sticky-col {
    left: 0;
    width: 48px;
    min-width: 0;
    max-width: 48px;
    padding-left: 4px;
    padding-right: 2px;
    font-size: 12px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}
.score-batch-form .score-grid-table thead .sticky-col,
.score-batch-view .score-grid-table thead .sticky-col {
    z-index: 4;
    background: #fafafa;
}
.score-batch-form .score-grid-table tbody .sticky-col,
.score-batch-view .score-grid-table tbody .sticky-col {
    z-index: 2;
}
.score-batch-form .score-grid-table .col-gender {
    width: 24px;
    padding-left: 1px;
    padding-right: 1px;
    font-size: 11px;
}
.score-batch-form .score-grid-table .score-col-item {
    width: 48px;
    max-width: 52px;
}
.score-batch-form .score-grid-table .col-meta {
    font-size: 11px;
    padding-left: 2px;
    padding-right: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.score-batch-form .score-grid-table .col-meta.col-score {
    width: 36px;
    max-width: 40px;
}
.score-batch-form .score-grid-table .col-meta.col-grade {
    width: 32px;
    max-width: 36px;
}
.score-batch-form .score-grid-table th.col-meta:not(.col-score):not(.col-grade),
.score-batch-form .score-grid-table td.col-meta:not(.col-score):not(.col-grade) {
    width: 40px;
    max-width: 44px;
}
.score-batch-form .score-grid-input {
    width: 46px;
    max-width: 100%;
    padding: 3px 1px;
    font-size: 12px;
    border-radius: 4px;
    scroll-margin-top: 48px;
    scroll-margin-left: 56px;
}
.score-batch-form .score-na {
    width: 46px;
    font-size: 12px;
}
.score-batch-form .score-cell-wrap {
    min-width: 0;
    width: 50px;
    max-width: 52px;
    padding: 2px 1px;
}
.score-batch-form .score-best-readonly {
    min-width: 0;
    width: 46px;
    padding: 3px 1px;
    font-size: 12px;
    border-radius: 4px;
}
.score-batch-form .score-grid-wrap,
.score-batch-view .score-grid-wrap {
    padding: 0;
    overflow: auto;
    max-height: calc(100vh - var(--topbar-h) - 140px);
}

.scores-view-header {
    margin-bottom: 8px;
    align-items: flex-start;
    gap: 10px;
}
.scores-view-header h2 {
    font-size: 17px;
    margin-bottom: 2px;
}
.scores-view-header p {
    font-size: 12px;
    line-height: 1.35;
}
.scores-view-tabs {
    padding: 8px 12px;
    margin-bottom: 10px;
}
.scores-view-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
}
.scores-students-filter {
    margin-bottom: 8px;
    padding: 8px 12px;
}
.scores-students-filter .score-class-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0;
}
.scores-students-filter .muted { display: none; }
.main:has(.scores-view-header) {
    padding-top: 14px;
    padding-bottom: 16px;
}
.scores-export-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
}
.scores-export-modal[hidden] { display: none !important; }
body.scores-export-open { overflow: hidden; }
.scores-export-dialog {
    width: min(860px, 100%);
    max-height: min(90vh, 920px);
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
    padding: 18px 20px 16px;
}
.scores-export-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.scores-export-dialog-head h3 {
    margin: 0;
    font-size: 18px;
}
.scores-export-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.scores-export-close:hover { background: #e2e8f0; color: #334155; }
.scores-export-hint { margin: 0 0 14px; font-size: 13px; }
.scores-export-form {
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}
.scores-export-form .export-filter-grid {
    gap: 12px 16px;
}
.scores-export-actions {
    margin-top: 16px;
    margin-bottom: 0;
    justify-content: flex-end;
}
.scores-view-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.scores-tab-bar {
    display: inline-flex;
    gap: 0;
    padding: 3px;
    background: #f1f5f9;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.scores-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 34px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    transition: all .15s ease;
}
.scores-tab:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.7);
}
.scores-tab.active {
    color: #fff;
    font-weight: 600;
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.28);
}
.scores-completion-panel {
    padding: 0;
    overflow: hidden;
}
.scores-completion-table {
    min-width: 860px;
    font-size: 13px;
}
.scores-completion-table th,
.scores-completion-table td {
    padding: 8px 10px;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}
.scores-completion-table .sticky-col {
    position: sticky;
    left: 0;
    z-index: 1;
    text-align: left;
    min-width: 120px;
    background: #fff;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.04);
}
.scores-completion-table thead .sticky-col {
    background: #fafafa;
}
.scores-comp-class {
    font-weight: 600;
    color: #0f172a;
}
.scores-completion-table .col-num {
    width: 52px;
    color: var(--muted);
}
.scores-completion-table .col-status {
    width: 96px;
}
.scores-comp-cell {
    min-width: 72px;
}
.scores-comp-ratio {
    display: inline-block;
    font-weight: 700;
    font-size: 13px;
}
.scores-comp-ratio.is-done {
    color: #059669;
}
.scores-comp-ratio.is-pending {
    color: #1677ff;
}
.scores-comp-pending {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #ea580c;
}
.scores-pending-badge,
.scores-done-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.scores-pending-badge {
    color: #c2410c;
    background: #ffedd5;
}
.scores-done-badge {
    color: #047857;
    background: #d1fae5;
}
.scores-student-panel {
    padding: 0;
}
.scores-student-table th,
.scores-student-table td {
    padding: 6px 8px;
    line-height: 1.25;
}
.scores-student-table .col-seq {
    width: 56px;
}
.scores-student-table .col-grade {
    width: 72px;
}
.scores-student-table .col-class {
    width: 72px;
}
.scores-student-table .col-gender {
    width: 44px;
}
.scores-score-cell {
    min-width: 68px;
    vertical-align: middle;
}
.scores-score-cell .scores-cell-value {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}
.scores-score-cell .scores-cell-points {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 600;
    color: #059669;
    line-height: 1.2;
}
.scores-score-cell .scores-cell-bonus {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 600;
    color: #2563eb;
    line-height: 1.2;
}
.scores-score-cell.is-missing .scores-cell-value {
    color: #ea580c;
}
.scores-score-cell.is-missing {
    background: #fffbeb;
}
.scores-score-cell.is-filled {
    background: #f8fafc;
}
@media (max-width: 900px) {
    .scores-view-toolbar {
        align-items: stretch;
    }
    .scores-tab-bar {
        display: flex;
        width: 100%;
    }
    .scores-tab {
        flex: 1;
        min-width: 0;
        padding: 0 12px;
    }
    .scores-view-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
.batch-preview-summary { margin-bottom: 16px; }
.batch-preview-summary h3 { margin: 0 0 8px; }
.batch-preview-summary p { margin: 0; }
.batch-preview-table { font-size: 13px; }
.batch-preview-table .raw-line-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 12px;
}
.batch-preview-table .hint-cell { min-width: 220px; }

.batch-class-map-panel {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fbff;
}
.batch-class-map-head h4 { margin: 0 0 6px; }
.batch-class-map-head .hint { margin: 0 0 12px; }
.batch-class-map-table { margin-bottom: 12px; background: #fff; }
.batch-class-map-table th,
.batch-class-map-table td { vertical-align: middle; }
.batch-class-map-select {
    min-width: 220px;
    max-width: 100%;
}
.batch-class-map-current { margin-top: 4px; font-size: 12px; }
.batch-class-map-actions {
    margin: 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    align-items: center;
    flex-wrap: wrap;
}
.batch-class-map-apply-btn {
    min-width: 160px;
    font-weight: 600;
}
.batch-class-map-actions .hint {
    margin: 0;
    font-size: 13px;
}
.teacher-share-dialog {
    max-width: 560px;
}
.teacher-share-grid .form-row {
    margin-bottom: 12px;
}
.teacher-share-password-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.teacher-share-password-row input {
    flex: 1;
}
.teacher-share-qr-box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.teacher-share-qr-box img {
    display: block;
    width: 160px;
    height: 160px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.teacher-share-qr-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#shareTextPreview {
    width: 100%;
    min-height: 140px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    box-sizing: border-box;
}
.table-actions .teacher-share-btn {
    margin-right: 6px;
}
.teacher-share-all-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.teacher-share-all-bar .hint {
    margin: 0;
    flex: 1;
    min-width: 220px;
}

.batch-lines-limit { margin: 0 0 8px; }
.batch-preview-actions {
    margin: 0 0 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.teacher-entry-panel { padding-top: 0; }
.teacher-entry-tabs {
    display: flex;
    gap: 0;
    margin: 0;
    border-bottom: 1px solid var(--border, #e5e7eb);
    padding: 0;
}
.teacher-tab {
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted, #64748b);
    border-radius: 0;
    padding: 12px 20px;
    margin-bottom: -1px;
    cursor: pointer;
    font-size: 14px;
}
.teacher-tab:hover {
    color: var(--text, #334155);
    background: #f8fafc;
}
.teacher-tab.is-active {
    background: #fff;
    border-bottom-color: #2563eb;
    color: #2563eb;
    font-weight: 600;
}
.teacher-entry-body {
    padding: 16px 0 4px;
}
.teacher-entry-panel .teacher-entry-section {
    display: none;
}
.teacher-entry-panel .teacher-entry-section.is-active {
    display: block;
}
.teacher-entry-panel .teacher-entry-section[hidden] {
    display: none !important;
}
.teacher-batch-intro { margin: 0 0 12px; }
.teacher-batch-form textarea {
    width: 100%;
    min-height: 180px;
    font-family: inherit;
}
.teacher-batch-meta input[type="text"] {
    width: 120px;
    max-width: 100%;
}
.teacher-homeroom-board-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0 0;
}
.teacher-single-form input[type="text"],
.teacher-single-form input[type="password"] {
    min-width: 140px;
}

/* 班主任点选配对看板（紧凑） */
.hr-board-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 12px;
    margin-bottom: 12px;
}
.hr-board-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--muted, #64748b);
}
.hr-board-stats strong { color: #2563eb; font-size: 14px; }
.hr-board {
    display: grid;
    grid-template-columns: minmax(200px, 240px) 1fr;
    gap: 12px;
    align-items: start;
}
.hr-board-side,
.hr-board-main {
    margin: 0;
    min-width: 0;
    padding: 12px;
}
.hr-board-side-head,
.hr-board-main-head {
    margin-bottom: 8px;
}
.hr-board-side-head h3,
.hr-board-main-head h3 {
    margin: 0 0 6px;
    font-size: 14px;
}
.hr-board-main-head .hint { margin: 0; font-size: 12px; }
.hr-filter {
    width: 100%;
    box-sizing: border-box;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 4px;
    font-size: 12px;
}
.hr-filter-tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 8px;
}
.hr-filter-tab {
    border: 1px solid var(--border, #e5e7eb);
    background: #fff;
    color: var(--muted, #64748b);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
}
.hr-filter-tab.is-active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}
.hr-teacher-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
}
.hr-teacher-item {
    padding: 6px 8px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 4px;
    margin-bottom: 4px;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s, background .15s;
}
.hr-teacher-item:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}
.hr-teacher-item.is-selected {
    border-color: #2563eb;
    background: #eff6ff;
}
.hr-teacher-name {
    font-weight: 600;
    font-size: 13px;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hr-teacher-meta {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.3;
}
.hr-teacher-bound {
    color: #059669;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
}
.hr-teacher-free { color: #d97706; }
.hr-teacher-empty { padding: 8px; list-style: none; font-size: 12px; }
.hr-grade-block { margin-bottom: 10px; }
.hr-grade-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 6px;
}
.hr-grade-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
}
.hr-class-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hr-class-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 8px 6px 10px;
    background: #fff;
    font-size: 13px;
    line-height: 1.35;
    cursor: default;
    box-shadow: none;
    opacity: .72;
}
.hr-class-chip.is-pickable {
    cursor: pointer;
    opacity: 1;
    border-color: #60a5fa;
    background: #eff6ff;
}
.hr-class-chip.is-pickable:hover {
    border-color: #2563eb;
    background: #dbeafe;
}
.hr-class-chip.is-occupied {
    background: #fff;
    border-color: #e2e8f0;
}
.hr-class-chip.is-mine {
    opacity: 1;
    border: 2px solid #059669;
    background: #d1fae5;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .22);
    padding: 5px 7px 5px 9px;
}
.hr-class-name {
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
    flex-shrink: 0;
}
.hr-class-chip.is-mine .hr-class-name {
    color: #065f46;
}
.hr-class-homeroom {
    font-size: 12px;
    color: #64748b;
    max-width: 88px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hr-class-chip.is-mine .hr-class-homeroom {
    color: #047857;
    font-weight: 600;
}
.hr-class-homeroom.is-free {
    color: #64748b;
}
.hr-class-chip.is-pickable .hr-class-homeroom.is-free {
    color: #2563eb;
}
.hr-unbind-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #94a3b8;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.hr-unbind-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
}
.hr-class-chip.is-mine .hr-unbind-btn {
    color: #059669;
}
.hr-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2000;
    max-width: 320px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #0f172a;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .25);
}
.hr-toast.is-error { background: #b91c1c; }
@media (max-width: 900px) {
    .hr-board { grid-template-columns: 1fr; }
    .hr-teacher-list { max-height: 220px; }
}

.coverage-panel { margin-top: 16px; }
.coverage-stats { grid-template-columns: repeat(4, minmax(120px, 1fr)); margin-bottom: 16px; }
.coverage-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.coverage-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.coverage-table { min-width: 920px; margin: 0; font-size: 12px; }
.coverage-table th, .coverage-table td { text-align: center; padding: 6px 4px; }
.coverage-table .cov-sticky {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    text-align: left;
    min-width: 96px;
    box-shadow: 2px 0 4px rgba(0,0,0,.04);
}
.coverage-table thead .cov-sticky { background: #fafafa; }
.coverage-table .cov-subhead th { font-size: 11px; font-weight: 500; color: var(--muted); padding-top: 0; }
.coverage-table .cov-item-name { font-weight: 600; white-space: nowrap; }
.cov-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: default;
}
.cov-ok { background: #dcfce7; color: #15803d; }
.cov-partial { background: #fef9c3; color: #a16207; }
.cov-missing { background: #fee2e2; color: #dc2626; }
.cov-na { background: #f1f5f9; color: #94a3b8; }
.coverage-missing { margin-top: 12px; }
.coverage-missing summary { cursor: pointer; font-weight: 600; color: #b45309; }
.coverage-missing-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.coverage-missing-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    font-size: 12px;
    color: #9a3412;
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.btn-danger:hover { background: #fecaca; }
.score-manage-table { font-size: 13px; }
.score-manage-actions { white-space: nowrap; }
.score-manage-actions a { margin-right: 10px; }
.inline-form { display: inline; }
.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}
.btn-link.text-error { color: var(--error); }
.btn-link:hover { text-decoration: underline; }
.table-actions form.inline-form { margin: 0; }
.link-btn {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    font-size: 13px;
    color: #1677ff;
}
.link-danger { color: #dc2626; }
.cov-link { text-decoration: none; }
.cov-link:hover .cov-cell { box-shadow: 0 0 0 2px rgba(22,119,255,.25); }

.feature-notice-modal {
    position: fixed; inset: 0; z-index: 1100;
    background: rgba(0, 0, 0, 0.35);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.feature-notice-modal[hidden] { display: none !important; }
.feature-notice-dialog {
    background: #fff; border-radius: 6px; max-width: 680px; width: 100%;
    max-height: 85vh; overflow: auto; padding: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    border: 1px solid #eee;
}
.feature-notice-dialog h3 { margin: 0 0 16px; font-size: 18px; }
.feature-notice-body { font-size: 14px; line-height: 1.7; color: #666; }
.feature-notice-list { margin: 0; padding-left: 1.25em; }
.feature-notice-list li { margin-bottom: 10px; }
.feature-notice-list li:last-child { margin-bottom: 0; }
.feature-notice-dialog .form-actions { margin-top: 20px; justify-content: flex-end; align-items: center; gap: 16px; }
.feature-notice-guide-link {
    color: #1677ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}
.feature-notice-guide-link:hover { text-decoration: underline; }
.feature-notice-dialog .btn[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
}

.membership-card {
    margin-bottom: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.membership-card__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 55%, #f8fafc 100%);
    border-bottom: 1px solid var(--border);
}
.membership-card__hero-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.membership-card__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 8px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981, #0d9488);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.membership-card__hero-text { min-width: 0; }
.membership-card__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}
.membership-card__desc {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}
.membership-card__desc strong { color: #0f172a; }
.membership-card__dot { margin: 0 4px; }
.membership-card__upgrade { flex-shrink: 0; }
.membership-card__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border-bottom: 1px solid var(--border);
}
.membership-mini-stat {
    padding: 14px 16px;
    background: #fff;
    text-align: center;
}
.membership-mini-stat__value {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.membership-mini-stat__label {
    margin-top: 4px;
    font-size: 12px;
    color: #94a3b8;
}
.membership-card__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px 0;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}
.membership-card__warn {
    font-size: 12px;
    font-weight: 600;
    color: #d97706;
    background: #fffbeb;
    padding: 3px 10px;
    border-radius: 999px;
}
.membership-grade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 14px 20px 20px;
}
.membership-grade-item {
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.membership-grade-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.membership-grade-item--warn {
    border-color: #fde68a;
    background: #fffbeb;
}
.membership-grade-item--danger {
    border-color: #fecaca;
    background: #fef2f2;
}
.membership-grade-item__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.membership-grade-item__name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}
.membership-grade-item__count {
    font-size: 14px;
    color: #0f172a;
    white-space: nowrap;
}
.membership-grade-item__limit {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
}
.membership-grade-item__track {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.membership-grade-item__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #34d399, #10b981);
    min-width: 2px;
    transition: width 0.3s ease;
}
.membership-grade-item--warn .membership-grade-item__fill {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}
.membership-grade-item--danger .membership-grade-item__fill {
    background: linear-gradient(90deg, #f87171, #ef4444);
}
.membership-grade-item__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #94a3b8;
}
.membership-grade-item__status {
    color: #dc2626;
    font-weight: 600;
}
.membership-card__empty {
    margin: 0;
    padding: 8px 20px 20px;
    font-size: 13px;
}
@media (max-width: 768px) {
    .membership-card__hero {
        flex-direction: column;
        align-items: stretch;
    }
    .membership-card__upgrade { width: 100%; text-align: center; }
    .membership-card__stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .membership-grade-grid {
        grid-template-columns: 1fr;
    }
}


/* 体测计划：历年成绩录入说明弹窗 */
.history-score-guide-modal {
    position: fixed; inset: 0; z-index: 1100;
    background: rgba(15, 23, 42, 0.45);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.history-score-guide-modal[hidden] { display: none !important; }
.history-score-guide-dialog {
    background: #fff; border-radius: 12px; max-width: 720px; width: 100%;
    max-height: 88vh; overflow: auto; padding: 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.history-score-guide-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: #fff; z-index: 1;
}
.history-score-guide-head h3 { margin: 0; font-size: 18px; }
.history-score-guide-close {
    border: none; background: transparent; font-size: 24px; line-height: 1;
    color: #64748b; cursor: pointer; padding: 0 4px;
}
.history-score-guide-close:hover { color: #0f172a; }
.history-score-guide-body {
    padding: 18px 22px 8px; font-size: 14px; line-height: 1.7; color: #334155;
}
.history-score-guide-lead {
    margin: 0 0 16px; padding: 12px 14px;
    background: #eff6ff; border-radius: 8px; color: #1e3a8a;
}
.history-score-guide-body h4 {
    margin: 18px 0 10px; font-size: 15px; color: #0f172a;
}
.history-score-guide-steps { margin: 0; padding-left: 1.25em; }
.history-score-guide-steps > li { margin-bottom: 14px; }
.history-score-guide-steps p { margin: 6px 0 0; }
.history-score-guide-steps code {
    background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: 13px;
}
.history-score-guide-example {
    margin: 0 0 12px; padding: 12px 14px;
    background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
}
.history-score-guide-example p { margin: 0 0 8px; }
.history-score-guide-example ul,
.history-score-guide-notes {
    margin: 0; padding-left: 1.2em;
}
.history-score-guide-example li,
.history-score-guide-notes li { margin-bottom: 6px; }
.history-score-guide-actions {
    padding: 12px 22px 20px; justify-content: flex-end; margin: 0;
    position: sticky; bottom: 0; background: #fff;
    border-top: 1px solid var(--border);
}

/* ========== 政务极简风全局收敛（表单/通用控件） ========== */
.form-row input,
.form-row select,
.form-row textarea,
.form-inline input,
.form-inline select {
    border-radius: 6px !important;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.form-inline input:focus {
    outline: none;
    border-color: #91caff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}
.panel,
.stat-card,
.work-panel {
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.btn,
.btn-sm,
.btn-primary,
.btn-secondary {
    border-radius: 6px;
}
.required-star,
.form-row label .req,
label .required {
    color: #ff4d4f;
}

