:root { color-scheme: light; font-family: system-ui, 'Microsoft YaHei', sans-serif; color: #183047; background: #f3f6f8; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #0b6285; }
.topbar { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1.2rem; color: white; background: #153f5c; }
.topbar a { color: white; }
.page { max-width: 1440px; margin: 0 auto; padding: 1rem; }
.page-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card, .panel { padding: 1rem; margin-bottom: 1rem; background: white; border: 1px solid #d7e0e6; border-radius: .7rem; }
.muted { color: #697985; opacity: .8; }
.actions, .inline-form { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; margin: .55rem 0; }
.stack-form { display: grid; gap: .8rem; }
input, select, button, .button { min-height: 42px; padding: .55rem .75rem; border: 1px solid #9db0bd; border-radius: .45rem; font: inherit; }
textarea { width: 100%; padding: .55rem .75rem; border: 1px solid #9db0bd; border-radius: .45rem; font: inherit; }
button, .button { display: inline-flex; align-items: center; justify-content: center; color: white; background: #0b6f91; border-color: #0b6f91; cursor: pointer; text-decoration: none; }
.button.secondary { color: #16445d; background: #e9f2f6; border-color: #aac2cf; }
.danger { background: #a93a3a; border-color: #a93a3a; }
.data-table { width: 100%; border-collapse: collapse; background: white; }
.data-table th, .data-table td { padding: .65rem; text-align: left; border-bottom: 1px solid #dce4e9; vertical-align: top; }
.data-table th { color: white; background: #255a78; }
.errors { color: #a52222; font-weight: 600; }
.warning { color: #8a5a00; }
.hint { color: #526875; }
.knowledge-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .7rem; margin: .8rem 0; padding: .8rem; border: 1px solid #cbd8df; border-radius: .5rem; }
.knowledge-card label, .filter-grid label { display: grid; gap: .3rem; }
.filter-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.stage { width: min(70%, 600px); margin: 1rem auto; padding: .6rem; text-align: center; color: white; background: #566979; border-radius: .45rem; }
.seat-scroll { overflow-x: auto; padding-bottom: .7rem; }
.seat-grid { display: grid; grid-template-columns: repeat(8, minmax(132px, 1fr)); gap: .55rem; min-width: 1120px; }
.seat-column { padding: .55rem; background: #eaf1f5; border-radius: .6rem; }
.seat-column h2 { margin: .2rem 0 .65rem; text-align: center; font-size: 1rem; }
.seat-card { display: grid; grid-template-columns: auto 1fr; gap: .35rem; align-items: center; min-height: 48px; margin: .42rem 0; padding: .5rem; background: white; border: 1px solid #b8c8d2; border-radius: .45rem; }
.seat-card input { min-height: auto; }
.seat-card small { grid-column: 1 / -1; color: #8a5a00; }
.summary-list { display: grid; grid-template-columns: minmax(9rem, auto) 1fr; gap: .45rem 1rem; }
.summary-list dt { font-weight: 700; }
.summary-list dd { margin: 0; }
.student-name { min-height: 44px; margin: .42rem 0; padding: .65rem .4rem; text-align: center; background: white; border: 1px solid #b8c8d2; border-radius: .45rem; font-weight: 650; }
.student-name span { display: block; margin-top: .2rem; color: #8a5a00; font-size: .72rem; }
.student-name.leader { border-color: #d59b28; background: #fff8dd; }
.compact-head, .check-sticky { display: flex; gap: .7rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.check-sticky { position: sticky; top: 0; z-index: 5; padding: .65rem; color: white; background: #153f5c; border-radius: .45rem; }
.choice-bar { display: flex; gap: .45rem; overflow-x: auto; margin: .65rem 0; }
.choice { flex: 0 0 auto; padding: .6rem .8rem; color: #16445d; background: #e9f2f6; border: 1px solid #aac2cf; border-radius: .45rem; text-decoration: none; }
.choice.active { color: white; background: #0b6f91; border-color: #0b6f91; }
.attendance-list { display: flex; gap: .4rem; flex-wrap: wrap; margin: .6rem 0; }
.student-toggle { padding: .45rem .6rem; background: #eef3f6; border-radius: .4rem; }
.summary-box { margin: .7rem 0; padding: .7rem; background: #fff8dd; border: 1px solid #e3bd66; border-radius: .45rem; }
.student-check { display: block; min-height: 48px; margin: .42rem 0; padding: .55rem; text-align: center; background: white; border: 2px solid #b8c8d2; border-radius: .45rem; font-weight: 650; }
.student-check input { position: absolute; opacity: 0; pointer-events: none; }
.student-check:has(.failed-box:checked) { color: white; background: #b33b3b; border-color: #8c2222; }
.student-check:has(.participant-box:checked) { background: #e4f4e7; border-color: #379657; }
.student-check.absent { color: #66556e; background: #eee7f2; border-color: #9c86a8; }
.student-check.not-participating { opacity: .38; }
.student-check.selected { background: #e4f4e7; border-color: #379657; }
.student-check small { display: block; margin-top: .2rem; color: #526875; }
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; background: white; }
.table-wrap th, .table-wrap td { padding: .6rem; border-bottom: 1px solid #dce4e9; text-align: left; }
.failure-choice { display: block; margin-top: .3rem; color: #a52222; font-size: .8rem; }
.score-grid { display: grid; grid-template-columns: repeat(8, minmax(120px, 1fr)); gap: .55rem; min-width: 1024px; overflow-x: auto; margin: .8rem 0; }
.score-card { display: grid; gap: .45rem; padding: .8rem; text-align: center; color: #183047; background: white; border: 1px solid #b8c8d2; border-radius: .55rem; text-decoration: none; }
.score-card b { color: #0b6f91; font-size: 1.5rem; }
.student-action { display: block; width: 100%; min-height: 58px; margin: .42rem 0; padding: .5rem; color: #183047; background: white; border: 2px solid #b8c8d2; font-weight: 650; }
.student-action:hover { border-color: #0b6f91; background: #e8f6fb; }
.student-action span, .student-action small { display: block; font-size: .72rem; }
.student-action.absent { color: #66556e; background: #eee7f2; border-color: #9c86a8; }
.award { display: inline-block; margin: .1rem; padding: .25rem .45rem; color: #765100; background: #fff1ae; border-radius: .35rem; font-weight: 700; }
.award.progress { color: #165c38; background: #d9f3e5; }
@media (orientation: portrait) and (max-width: 800px) { .seat-scroll::before { content: '建议将手机横屏查看8列座次'; display: block; margin-bottom: .6rem; color: #8a5a00; font-weight: 700; } }
.warning,.danger-panel,.error-box,.success { padding:1rem; border-radius:.6rem; margin:1rem 0; }
.warning { background:#fff4cc; border:1px solid #d5a900; }
.danger-panel,.error-box { background:#fff0f0; border:1px solid #b42318; }
.success { background:#e9f8ef; border:1px solid #18864b; }
.summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:.7rem; }
.summary-grid>div { display:flex; flex-direction:column; background:#f4f7fa; padding:.75rem; border-radius:.5rem; }
.wrap-actions { display:flex; flex-wrap:wrap; gap:.6rem; }
.button-link { display:inline-block; padding:.55rem .8rem; background:#1f4e78; color:white; text-decoration:none; border-radius:.4rem; }
.danger,.danger-link { background:#b42318!important; color:white!important; }
.actions-cell { display:flex; flex-wrap:wrap; gap:.35rem; min-width:220px; }
.actions-cell form { display:inline; }
.table-scroll { overflow-x:auto; }
.filters { display:flex; gap:.6rem; flex-wrap:wrap; align-items:end; margin:1rem 0; }
.filters label { display:flex; flex-direction:column; }
.status-正常 { color:#16784a; }
.status-有警告 { color:#9a6700; }
.status-严重错误 { color:#b42318; }
.auth-page { min-height:100vh; display:grid; place-items:center; }
.auth-card { max-width:32rem; margin:2rem auto; width:min(92vw,32rem); }
.muted { color:#64748b; font-size:.92rem; }
