/* ===================== 基础 ===================== */
:root {
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #FAFBFD;
  --ink: #161B26;
  --ink-2: #57616F;
  --ink-3: #8B95A6;
  --line: #E6EAF1;
  --line-soft: #F0F3F8;
  --brand: #2B5CE6;
  --brand-2: #4C7BFF;
  --brand-soft: #EDF2FF;
  --gold: #C8952F;
  --pos: #17A34A;
  --pos-soft: #E8F7EE;
  --neg: #E0443E;
  --neg-soft: #FDECEB;
  --violet: #7A5AF8;
  --amber: #D98324;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 1px 2px rgba(20, 28, 45, .05);
  --shadow-2: 0 18px 40px -18px rgba(20, 28, 45, .28);
  --shadow-3: 0 30px 70px -24px rgba(20, 28, 45, .35);
  --sidebar-w: 236px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
::selection { background: #C9D8FF; }

.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.strong { font-weight: 650; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i.fill { fill: currentColor; stroke: none; }

.class-mark { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-variant-numeric: tabular-nums; user-select: none; }

/* ===================== 启动 ===================== */
.boot {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--bg); color: var(--ink-2); font-size: 14px; z-index: 50;
}
.boot-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--brand));
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== 登录 ===================== */
.login { position: fixed; inset: 0; display: grid; grid-template-columns: 46% 54%; background: var(--surface); }

.login-brand {
  position: relative; overflow: hidden; padding: 56px 56px 44px;
  background: radial-gradient(120% 80% at 15% 0%, #2A4FCF 0%, #16277A 45%, #0C1642 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
}
.login-brand::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(80% 70% at 25% 20%, #000 20%, transparent 100%);
}
.login-brand::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -220px; bottom: -240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(96,140,255,.45), transparent 65%); filter: blur(6px);
}
.brand-top { position: relative; display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(140deg, #5C86FF, #2B4FD6); font-weight: 700; font-size: 19px;
  box-shadow: 0 10px 24px -8px rgba(60,110,255,.9);
}
.brand-name { font-size: 16px; font-weight: 650; letter-spacing: .02em; }
.brand-name .bn-title { display: block; font-size: 16px; font-weight: 650; letter-spacing: .02em; }
.brand-name .bn-sub { display: block; font-size: 11.5px; font-weight: 400; color: rgba(255,255,255,.78); letter-spacing: .18em; margin-top: 2px; text-transform: uppercase; }
.brand-main { position: relative; }
.brand-main h2 { font-size: 40px; line-height: 1.22; letter-spacing: -.02em; font-weight: 700; }
.brand-main h2 em { font-style: normal; color: #A8C4FF; }
.brand-main p { margin-top: 16px; color: rgba(255,255,255,.88); font-size: 14.5px; max-width: 400px; }
.brand-main p.brand-en { margin-top: 12px; font-size: 13px; letter-spacing: .12em; text-transform: none; color: rgba(255,255,255,.72); font-weight: 500; }
.brand-stats { position: relative; display: flex; gap: 33px; margin-top: 38px; }
.brand-stats div span { display: block; font-size: 11.5px; letter-spacing: .1em; color: rgba(255,255,255,.5); text-transform: uppercase; }
.brand-stats div b { font-size: 27px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.brand-foot { position: relative; font-size: 12px; color: rgba(255,255,255,.82); display: flex; gap: 18px; }
.brand-foot a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.45); padding-bottom: 1px; }

.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--surface); }
.login-form { width: 100%; max-width: 372px; }
.login-form h1 { font-size: 26px; letter-spacing: -.02em; }
.login-form > p { color: var(--ink-3); margin-top: 8px; font-size: 13.5px; margin-bottom: 30px; }
.login-roles { display: flex; gap: 8px; margin-bottom: 22px; }
.role-tab {
  flex: 1; padding: 11px 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  font-size: 13px; color: var(--ink-2); transition: .16s; text-align: center;
}
.role-tab b { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
.role-tab span { font-size: 11px; color: var(--ink-3); }
.role-tab.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(43,92,230,.08); }
.role-tab.active b { color: var(--brand); }
.login-error {
  background: var(--neg-soft); color: #B3261E; border-radius: 10px; padding: 10px 13px; font-size: 13px;
  margin-bottom: 14px; display: none; align-items: center; gap: 8px;
}
.login-error.show { display: flex; }
.demo-box { margin-top: 26px; border-top: 1px dashed var(--line); padding-top: 18px; }
.demo-box > span { font-size: 11.5px; color: var(--ink-3); letter-spacing: .06em; }
.demo-list { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.demo-chip {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 20px; padding: 6px 12px;
  font-size: 12px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; transition: .15s;
}
.demo-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.demo-chip b { font-weight: 600; }
.screen-entry {
  margin-top: 20px; display: flex; align-items: center; gap: 10px; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, #fff, #FAFBFE);
  transition: .16s;
}
.screen-entry:hover { border-color: #B9C8F5; box-shadow: var(--shadow-1); }
.screen-entry .i { color: var(--brand); }
.screen-entry b { display: block; font-size: 13px; }
.screen-entry span { font-size: 11.5px; color: var(--ink-3); }

/* ===================== 外壳 ===================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-logo { display: flex; align-items: center; gap: 11px; padding: 18px 20px 14px; }
.sidebar-logo .brand-mark { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
.sidebar-logo b { font-size: 14.5px; display: block; letter-spacing: -.01em; }
.sidebar-logo span { font-size: 11px; color: var(--ink-3); }
.nav { padding: 4px 12px 10px; overflow-y: auto; flex: 1; }
.nav-section { font-size: 10px; letter-spacing: .12em; color: #A6AFBE; padding: 13px 10px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 9px;
  color: var(--ink-2); font-size: 13.5px; margin-bottom: 1px; transition: .14s; position: relative;
}
.nav-item:hover { background: var(--line-soft); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 17px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.nav-item .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .badge-dot {
  margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px; background: var(--neg);
  color: #fff; font-size: 10.5px; display: grid; place-items: center; padding: 0 5px; font-weight: 600;
}
.sidebar-foot { padding: 12px; border-top: 1px solid var(--line-soft); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 11px; transition: .15s; }
.user-card:hover { background: var(--line-soft); }
.user-card .u-meta { min-width: 0; flex: 1; }
.user-card .u-meta b { display: block; font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.user-card .u-meta span { font-size: 11.5px; color: var(--ink-3); }
.user-card .icon-btn { opacity: .55; }
.user-card:hover .icon-btn { opacity: 1; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 30px; height: 66px; background: rgba(244,246,250,.86);
  backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); background: rgba(250,251,253,.92); }
.topbar h1 { font-size: 18.5px; letter-spacing: -.02em; }
.topbar .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.clock { text-align: right; margin-right: 6px; }
.clock b { font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.clock span { display: block; font-size: 11.5px; color: var(--ink-3); }

/* 教室大屏在线状态（顶栏胶囊 / 公告页） */
.screen-live {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 12px; font-weight: 550; color: var(--ink-3); white-space: nowrap; flex: none;
}
.screen-live .sl-dot { width: 7px; height: 7px; border-radius: 50%; background: #B9C1CE; flex: none; }
.screen-live[hidden] { display: none; }
.screen-live.on { border-color: #CBE8D8; background: #F2FBF6; color: #237A46; }
.screen-live.on .sl-dot { background: #2E9E4F; box-shadow: 0 0 0 3px rgba(46,158,79,.16); animation: slPulse 2.4s ease-in-out infinite; }
.screen-live.unknown { color: var(--ink-3); }
@keyframes slPulse { 0%, 100% { opacity: 1 } 50% { opacity: .45 } }
.icon-btn.del:hover { background: var(--neg-soft); color: #B3261E; }

.view { padding: 8px 30px 48px; max-width: 1320px; width: 100%; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 6px 0 20px; }
.page-intro p { color: var(--ink-2); font-size: 13.5px; max-width: 660px; }

/* ===================== 按钮 ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 15px;
  border-radius: 9px; border: 1px solid transparent; font-size: 13.5px; font-weight: 550;
  transition: .15s; white-space: nowrap; background: var(--surface); color: var(--ink);
}
.btn .i { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(43,92,230,.28), inset 0 1px 0 rgba(255,255,255,.14); }
.btn.primary:hover { background: #2450CC; }
.btn.ghost { border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { border-color: #C9D3E4; background: var(--surface-2); color: var(--ink); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.soft:hover { background: #E1EAFF; }
.btn.warn { background: #FFF4E0; color: #8A5A00; border-color: #F1DDB4; }
.btn.warn:hover { background: #FFEDD0; border-color: #E8CE9C; }
.btn.danger { background: var(--neg); color: #fff; }
.btn.danger:hover { background: #C93731; }
.btn.danger-soft { background: var(--neg-soft); color: #B3261E; }
.btn.ghost.danger { background: var(--surface); border-color: var(--line); color: var(--neg); }
.btn.ghost.danger:hover { background: var(--neg-soft); border-color: #F2C6C3; color: #B3261E; }

/* 花名册：已移除学生（可恢复） */
.st-arch { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.st-arch-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
/* display:flex 会盖掉浏览器默认的 [hidden]{display:none}，展开/收起必须显式声明 */
.st-arch-list[hidden] { display: none; }
.st-arch-item {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 4px 6px 4px 11px; background: var(--surface); font-size: 12.5px;
}
.st-arch-item b { font-weight: 600; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 42px; padding: 0 20px; font-size: 14.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent;
  display: grid; place-items: center; color: var(--ink-2); transition: .15s;
}
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn.sm .i { width: 15px; height: 15px; }

/* ===================== 卡片 ===================== */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-1); overflow: hidden;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-head.with-border { padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.card-title { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.card-title .i { width: 16px; height: 16px; color: var(--ink-3); }
.card-sub { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 10px 12px; }
.card-body.flush { padding: 0; }
.card-hover { transition: .18s; }
.card-hover:hover { box-shadow: var(--shadow-2); border-color: #DCE3EF; transform: translateY(-1px); }

.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-main { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 340px; }
.mt { margin-top: 16px; }
.mt-sm { margin-top: 10px; }
.mt-lg { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 9px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* ===================== 统计卡 ===================== */
.stat { position: relative; padding: 16px 18px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -34px; top: -34px; width: 96px; height: 96px; border-radius: 50%; background: var(--tint, #EEF2FB); opacity: .7; }
.stat-label { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; position: relative; }
.stat-value { font-size: 27px; font-weight: 680; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; position: relative; line-height: 1.2; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.stat-foot { font-size: 12px; color: var(--ink-3); margin-top: 5px; position: relative; display: flex; align-items: center; gap: 5px; }
.stat-foot .up { color: var(--pos); font-weight: 600; }
.stat-foot .down { color: var(--neg); font-weight: 600; }

/* ===================== 表单 ===================== */
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: var(--surface);
  color: var(--ink); transition: .15s; outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43,92,230,.1); }
.input::placeholder, .textarea::placeholder { color: #AEB6C4; }
.textarea { resize: vertical; min-height: 84px; line-height: 1.65; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B95A6' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.input-group { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); transition: .15s; }
.input-group:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43,92,230,.1); }
.input-group span { padding-left: 12px; color: var(--ink-3); display: flex; }
.input-group .input { border: 0; box-shadow: none !important; }
.search { position: relative; }
.search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 16px; height: 16px; }
.search .input { padding-left: 34px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.switch { position: relative; width: 40px; height: 22px; border-radius: 11px; background: #DCE1EA; transition: .2s; flex: none; border: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: .2s; }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(18px); }

/* ===================== 标签 / 徽标 ===================== */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 550; background: var(--line-soft); color: var(--ink-2); white-space: nowrap;
}
.tag.blue { background: var(--brand-soft); color: var(--brand); }
.tag.green { background: var(--pos-soft); color: #12793A; }
.tag.red { background: var(--neg-soft); color: #B3261E; }
.tag.amber { background: #FDF3E4; color: #A5661A; }
.tag.violet { background: #F1EDFE; color: #5B3FD1; }
.tag.gold { background: #FBF3DF; color: #9A6E14; }
.tag.outline { background: transparent; border: 1px solid var(--line); color: var(--ink-3); }

/* 公告收到确认徽标：待确认=灰底，已确认=绿底对勾 */
.ack-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; line-height: 1.5;
  padding: 2px 9px; border-radius: 999px; background: var(--line-soft); color: var(--ink-3);
  border: 1px solid transparent; white-space: nowrap; flex: none;
}
.ack-badge.on { background: var(--pos-soft); color: #12793A; border-color: #CBEBD8; font-weight: 600; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.avatar { border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600; background: var(--av-bg); flex: none; letter-spacing: -.02em; }
.avatar.sq { border-radius: 9px; }
.delta { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 13px; }
.delta.up { color: var(--pos); }
.delta.down { color: var(--neg); }
.delta.zero { color: var(--ink-3); }
.score-pill { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 13px; padding: 2px 9px; border-radius: 7px; }
.score-pill.high { background: #FBF3DF; color: #9A6E14; }
.score-pill.mid { background: var(--brand-soft); color: var(--brand); }
.score-pill.low { background: var(--line-soft); color: var(--ink-2); }
.score-pill.neg { background: var(--neg-soft); color: #B3261E; }

/* ===================== 表格 ===================== */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .04em;
  padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: middle; }
.table tbody tr { transition: .12s; }
.table tbody tr:hover { background: #FBFCFE; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .act { text-align: right; white-space: nowrap; }

/* 可排序表头（考试成绩等） */
.table th.sortable { cursor: pointer; user-select: none; transition: color .12s, background .12s; }
.table th.sortable:hover { background: #F0F3FA; color: var(--ink); }
.table th.sorted { background: #EDF2FF; }
.sort-ind { font-size: 8.5px; margin-left: 3px; vertical-align: 1px; opacity: .85; }
.sort-bar .chip { font-size: 12.5px; padding: 5px 11px; }
.sort-bar .chip.active { font-weight: 600; }
.table tbody tr.clickable { cursor: pointer; }

/* 单科分析弹窗 */
.sub-sec { margin-top: 20px; }
.sub-h {
  font-size: 13px; font-weight: 650; color: var(--ink); margin-bottom: 9px;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.sub-h .muted { font-weight: 400; }
.sub-scroll { max-height: 288px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.sub-scroll .table th { position: sticky; top: 0; z-index: 1; }
.sub-scroll .table td { padding: 8px 14px; }
.chips-clamp { max-height: 74px; overflow: hidden; position: relative; }
.chips-clamp.open { max-height: none; }

/* 学习排座预览 */
.gs-wrap {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 10px;
  max-height: 44vh; overflow: auto; padding: 2px;
}
.gs-card { border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px 10px; background: var(--surface-2); }
.gs-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 7px; font-size: 12.5px; }
.gs-head b { font-weight: 650; }

/* 座位版本 */
.sv-list { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow: auto; padding-right: 2px; }
.sv-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
  background: var(--surface); transition: border-color .15s, background .15s;
}
.sv-row:hover { border-color: #CBD5E8; background: var(--surface-2); }
.sv-main { min-width: 0; }
.sv-name { font-weight: 650; display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.sv-meta { margin-top: 3px; font-size: 11.5px; }
.sv-diff { margin-top: 3px; font-size: 11.5px; color: var(--ink-2); }
.sv-empty { padding: 30px 16px; text-align: center; color: var(--ink-3); font-size: 13px; line-height: 2; }
.sv-form { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.sv-form .input { flex: 1; }
.gs-area { font-size: 10.5px; color: var(--ink-3); margin: -4px 0 7px; font-variant-numeric: tabular-nums; }
.gs-body { display: grid; gap: 5px; }
.gs-cell {
  border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 5px 4px;
  min-height: 40px; display: flex; flex-direction: column; justify-content: center; text-align: center;
}
.gs-cell b { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-cell span { font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.gs-cell.top { background: #E8F7EE; border-color: #C6E9D3; }
.gs-cell.mid { background: #F1F4FA; border-color: #E1E7F0; }
.gs-cell.low { background: #FDECEB; border-color: #F3C9C6; }
.gs-cell.empty { border-style: dashed; background: #fff; opacity: .55; }
.gs-dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: middle; }
.gs-dot.top { background: #C6E9D3; }
.gs-dot.mid { background: #E1E7F0; }
.gs-dot.low { background: #F3C9C6; }

/* ===================== 加减分记录 ===================== */
.sg-day td {
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  padding: 7px 14px; font-size: 12px; color: var(--ink-2); font-weight: 600;
}
.sg-day td em { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 8px; font-size: 11.5px; }
.sg-stu {
  display: flex; align-items: center; gap: 8px; padding: 3px 7px 3px 3px;
  border: 1px solid transparent; background: transparent; border-radius: 8px;
  font-size: 13px; color: var(--ink); text-align: left; transition: .12s;
}
.sg-stu:hover { background: var(--brand-soft); border-color: #D3DEF8; }
.sg-stu b { font-weight: 600; }
/* 撤销 / 删除保持同一尺寸与描边风格，只靠文字颜色区分危险操作 */

/* ===================== 标签页 / 筛选 ===================== */
.tabs { display: inline-flex; gap: 3px; padding: 3px; background: var(--line-soft); border-radius: 10px; }
.tab { border: 0; background: transparent; padding: 6px 13px; border-radius: 7px; font-size: 12.5px; color: var(--ink-2); transition: .14s; }
.tab.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 12px;
  font-size: 12.5px; color: var(--ink-2); transition: .14s;
}
.chip:hover { border-color: #C3CFE4; }
.chip.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.chip:disabled { opacity: .5; cursor: not-allowed; }
.chip .flag-ic { width: 10px; height: 12px; vertical-align: -1px; }

/* 学生名单：职位标签（组长用小红旗 + 浅红底，未设置时是虚线「＋ 设置」） */
.duty-chip, .duty-tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; line-height: 1; white-space: nowrap;
  border: 1px dashed #D5DDEA; background: #fff; color: var(--ink-3);
  font-family: inherit;
}
.duty-chip { cursor: pointer; transition: .14s; }
.duty-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.duty-chip.on, .duty-tag {
  border: 1px solid #F5CFCC; background: #FFF3F2; color: #C0392F; font-weight: 600;
}
.duty-chip.on .flag-ic, .duty-tag .flag-ic { width: 9px; height: 11px; color: #E0443E; }

/* 分段选择（类型切换） */
.seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--line-soft); border-radius: 10px; }
.seg-btn { border: 0; background: transparent; padding: 7px 20px; border-radius: 7px; font-size: 12.5px; color: var(--ink-2); transition: .14s; font-family: inherit; cursor: pointer; }
.seg-btn.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }

/* ===================== 进度 ===================== */
.progress { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 3px; background: var(--brand); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.progress.green i { background: var(--pos); }
.progress.amber i { background: var(--amber); }

/* ===================== 空态 / 加载 ===================== */
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 20px; text-align: center; color: var(--ink-3); }
.empty .i { width: 26px; height: 26px; opacity: .4; margin-bottom: 4px; }
.empty p { font-size: 13.5px; color: var(--ink-2); }
.empty span { font-size: 12px; max-width: 320px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px; color: var(--ink-3); font-size: 13px; }

/* ===================== Toast ===================== */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 8px; background: #182031; color: #fff; padding: 9px 15px;
  border-radius: 10px; font-size: 13px; box-shadow: var(--shadow-2); opacity: 0; transform: translateY(-8px); transition: .22s;
  max-width: 460px;
}
.toast.in { opacity: 1; transform: none; }
.toast .i { width: 16px; height: 16px; color: #6EE7A8; }
.toast.err .i { color: #FF8A80; }
.toast.warn .i { color: #FFC46B; }

/* ===================== 弹窗 ===================== */
.overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(16,22,36,.42); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; transition: .2s;
}
.overlay.in { opacity: 1; }
.modal {
  background: var(--surface); border-radius: 18px; width: 100%; max-width: 480px; box-shadow: var(--shadow-3);
  transform: translateY(10px) scale(.99); transition: .24s cubic-bezier(.2,.8,.2,1); max-height: 88vh; display: flex; flex-direction: column;
}
.overlay.in .modal { transform: none; }
.modal.wide { max-width: 620px; }
.modal.narrow { max-width: 400px; }
.modal.xwide { max-width: 900px; }
.modal-head { padding: 20px 22px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.modal-head h3 { font-size: 16.5px; letter-spacing: -.01em; }
.modal-head p { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { padding: 0 22px 20px; display: flex; justify-content: flex-end; gap: 9px; }
.confirm-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }

.drawer-overlay { justify-content: flex-end; padding: 0; }
.drawer {
  width: 460px; max-width: 94vw; height: 100%; background: var(--surface); box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; transform: translateX(24px); transition: .26s cubic-bezier(.2,.8,.2,1);
}
.overlay.in .drawer { transform: none; }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-head .dh-main { flex: 1 1 auto; min-width: 0; }
.drawer-body { padding: 18px 20px 30px; overflow-y: auto; flex: 1; }

/* ===================== 内部小部件 ===================== */
.sect-label { font-size: 11px; letter-spacing: .1em; color: #A6AFBE; text-transform: uppercase; font-weight: 600; margin: 0 0 10px; }
.hr { height: 1px; background: var(--line-soft); margin: 16px 0; }

.kv { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--ink-3); }
.kv b { font-weight: 600; text-align: right; }

.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .f-main { flex: 1; min-width: 0; }
.feed-item .f-main p { font-size: 13px; color: var(--ink); }
.feed-item .f-main span { font-size: 11.5px; color: var(--ink-3); }
.feed-item .t { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.rank-no { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--line-soft); color: var(--ink-3); }
.rank-no.n1 { background: linear-gradient(140deg, #F7D774, #D8A22C); color: #6A4A06; }
.rank-no.n2 { background: linear-gradient(140deg, #E4E9F2, #B9C3D4); color: #4A566B; }
.rank-no.n3 { background: linear-gradient(140deg, #F0C9A6, #CE8F5C); color: #6B3D18; }

/* 课表 */
.week { width: 100%; border-collapse: separate; border-spacing: 0; }
.week th { font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.week th.today { color: var(--brand); }
.week td { padding: 3px; vertical-align: middle; }
.week .period-cell { width: 84px; text-align: center; padding: 6px 4px; }
.week .period-cell b { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.week .period-cell span { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* 周五独立作息：节次格里额外显示周五时间 */
.week .period-cell .fri-time {
  display: block; margin-top: 2px; font-size: 10px; font-weight: 600; color: #B4691E;
  letter-spacing: -.2px; white-space: nowrap;
}
.week .period-cell .fri-time i { font-style: normal; opacity: .65; margin: 0 1px; }
.week th .fri-dot {
  display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 5px;
  font-size: 9.5px; font-style: normal; font-weight: 600; line-height: 15px;
  color: #B4691E; background: #FBF0DF; vertical-align: 1px;
}
/* 周五节数比常规少时，多出来的行不可排课 */
.lesson.fri-off { background: transparent; border: 1px dashed var(--line); opacity: .55; align-items: center; justify-content: center; }
.lesson.fri-off .ls-ic { display: none; }
.lesson {
  border-radius: 9px; padding: 6px 8px; min-height: 50px; border: 1px solid transparent;
  background: var(--line-soft); display: flex; flex-direction: column; gap: 2px; position: relative; transition: .15s;
}
.lesson b { font-size: 12.8px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson span { font-size: 10.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-top { display: flex; align-items: center; gap: 5px; min-width: 0; }

/* 学科图标小方块：--sc 为学科色 */
.subj-badge {
  width: 21px; height: 21px; border-radius: 6px; flex: none;
  display: inline-grid; place-items: center;
  background: color-mix(in srgb, var(--sc, #5A6473) 13%, #fff);
  color: var(--sc, #5A6473);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc, #5A6473) 15%, transparent);
}
.subj-badge .i { width: 13px; height: 13px; stroke-width: 1.9; }
.lesson .subj-badge { color: var(--sc, #5A6473); overflow: visible; line-height: 1; }
.lg-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.lg-item .subj-badge { width: 19px; height: 19px; border-radius: 5px; }
.lg-item .subj-badge .i { width: 12px; height: 12px; }
.lesson.now { box-shadow: 0 0 0 2px var(--brand), 0 6px 16px -8px rgba(43,92,230,.5); background: #fff; }
.lesson.now::after {
  content: ""; position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand); animation: pulse 1.6s infinite;
}
.lesson.free { background: transparent; border: 1px dashed var(--line); color: var(--ink-3); align-items: center; justify-content: center; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

/* 今日课程 */
.today-list { display: flex; flex-direction: column; gap: 2px; }
.tl-row { display: flex; gap: 12px; padding: 9px 2px; border-radius: 9px; transition: .15s; align-items: center; }
.tl-row:hover { background: var(--surface-2); }
.tl-time { width: 46px; flex: none; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-bar { width: 3px; height: 30px; border-radius: 2px; background: var(--line); flex: none; }
.tl-main { flex: 1; min-width: 0; }
.tl-head { display: inline-flex; align-items: center; gap: 7px; font-style: normal; min-width: 0; }
.tl-main .subj-badge { color: var(--sc, #5A6473); overflow: visible; }
.tl-main b { font-size: 13px; font-weight: 600; }
.tl-main span { display: block; font-size: 11.5px; color: var(--ink-3); }
.tl-row.now { background: var(--brand-soft); }
.tl-row.now .tl-bar { background: var(--brand); }
.tl-row.now .tl-main b { color: var(--brand); }
.tl-row.done { opacity: .45; }

/* 学生选择 */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; padding: 2px; }
.pick {
  display: flex; align-items: center; gap: 7px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); font-size: 12.5px; transition: .14s; text-align: left;
}
.pick:hover { border-color: #C3CFE4; background: var(--surface-2); }
.pick.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.pick .avatar { width: 26px; height: 26px; font-size: 11px; }
.pick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 记分台：按小组选人 */
.pick-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pick-tools[hidden] { display: none; }
.pick-tools .pt-label { font-size: 11.5px; color: var(--ink-3); flex: none; }
.gchip {
  display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--surface);
  font-size: 11.5px; color: var(--ink-2); transition: .14s; cursor: pointer;
  font-family: inherit;
}
.gchip i { width: 7px; height: 7px; border-radius: 2px; background: var(--gc, #C3CCDA); flex: none; }
.gchip em { font-style: normal; font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.gchip:hover { border-color: color-mix(in srgb, var(--gc, #C3CCDA) 45%, #fff); background: var(--surface-2); }
.gchip.on { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 11%, #fff); color: var(--ink); font-weight: 600; }
.gchip.on em { color: var(--ink-2); }
.gchip.part { border-style: dashed; border-color: color-mix(in srgb, var(--gc) 45%, var(--line)); }
.gchip.part i { opacity: .5; }
.gchip .gc-flag { display: inline-flex; color: #E0443E; }
.gchip .gc-flag .flag-ic { width: 9px; height: 11px; }

.behavior-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.beh {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--surface);
  display: flex; align-items: center; justify-content: space-between; gap: 6px; transition: .14s; text-align: left;
}
.beh:hover { border-color: #C3CFE4; }
.beh.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px rgba(43,92,230,.08); }
.beh b { font-size: 12.5px; font-weight: 550; }
.beh.on b { color: var(--brand); }

/* 临时加减分（只用于这一次，不写进班规） */
.temp-score {
  margin-top: 14px; padding: 11px 12px 12px; border: 1px dashed var(--line);
  border-radius: 12px; background: var(--surface-2, #FAFBFD);
}
.temp-score .ts-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.temp-score .ts-head b { font-size: 12.5px; }
.seg-mini {
  display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 9px;
  overflow: hidden; background: var(--surface);
}
.seg-mini button {
  border: 0; background: transparent; font-family: inherit; font-size: 12px;
  padding: 8px 13px; color: var(--ink-2); transition: .12s;
}
.seg-mini button + button { border-left: 1px solid var(--line); }
.seg-mini button.on { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.seg-mini button.on[data-sign="-1"] { background: var(--neg-soft); color: #B23730; }

/* 道具卡 */
.prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.prop-card {
  position: relative; border-radius: 14px; padding: 15px 16px 14px; overflow: hidden;
  background: linear-gradient(150deg, var(--p1), var(--p2)); border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 8px 20px -12px rgba(40,40,60,.4); min-height: 132px; display: flex; flex-direction: column;
  transition: .2s;
}
.prop-card:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -16px rgba(40,40,60,.45); }
.prop-card::after {
  content: ""; position: absolute; top: -60%; left: -30%; width: 60%; height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: rotate(18deg);
  opacity: 0; transition: .5s;
}
.prop-card:hover::after { opacity: 1; left: 90%; }
.prop-card .p-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.prop-card .p-name { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.prop-card .p-rar { font-size: 10.5px; padding: 1px 7px; border-radius: 20px; background: rgba(255,255,255,.55); font-weight: 600; }
.prop-card .p-icon { position: absolute; right: 12px; bottom: 8px; opacity: .16; }
.prop-card .p-icon .i { width: 62px; height: 62px; stroke-width: 1.2; }
.prop-card .p-desc { font-size: 11.5px; margin-top: 6px; opacity: .78; line-height: 1.55; position: relative; z-index: 1; }
.prop-card .p-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.prop-card .p-count { font-size: 12px; font-weight: 600; opacity: .85; }

/* 公告预览（迷你教室屏） */
.mini-screen {
  border-radius: 12px; background: linear-gradient(160deg, #0C1430, #16224A); color: #fff; padding: 22px 22px 20px;
  position: relative; overflow: hidden; min-height: 176px; display: flex; flex-direction: column; justify-content: center;
}
.mini-screen::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .6;
}
.mini-screen .ms-tag { font-size: 11px; letter-spacing: .12em; opacity: .6; position: relative; }
.mini-screen h4 { font-size: 21px; margin-top: 8px; line-height: 1.35; position: relative; letter-spacing: -.01em; }
.mini-screen p { font-size: 12.5px; opacity: .68; margin-top: 8px; line-height: 1.7; position: relative; }

/* 公告列表 */
.ann-item { display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.ann-item:last-child { border-bottom: 0; }
.ann-lv { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; flex: none; }
.ann-main { flex: 1; min-width: 0; }
.ann-main b { font-size: 13.5px; font-weight: 600; display: block; }
.ann-main p { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.ann-main .ann-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; display: flex; gap: 10px; align-items: center; }

/* 处罚单 */
.punish-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); position: relative; overflow: hidden; }
.punish-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--lv); }
.punish-card + .punish-card { margin-top: 10px; }

/* 作业卡 */
.hw-card { border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; background: var(--surface); transition: .16s; }
.hw-card:hover { border-color: #D5DEEE; box-shadow: var(--shadow-1); }
.hw-card + .hw-card { margin-top: 10px; }
.hw-subj { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 650; color: #fff; flex: none; }

/* 学科配色 */
.ac-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 9px; }
.ac-color {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); cursor: pointer; transition: .15s;
}
.ac-color:hover { border-color: #C9D3E4; }
.ac-color input[type="color"] {
  width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: transparent;
  cursor: pointer; flex: none;
}
.ac-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.ac-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 7px; }
.ac-color span { font-size: 13px; font-weight: 600; flex: 1; }
.ac-color i { font-style: normal; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 设置行 */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .s-main b { font-size: 13.5px; font-weight: 600; display: block; }
.setting-row .s-main span { font-size: 12px; color: var(--ink-3); }
@media (max-width: 980px) {
  .setting-row.chime-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .chime-picks { justify-content: flex-start !important; max-width: none !important; }
}

/* 响应式 */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-main, .g-side { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 66px; }
  .sidebar-logo b, .sidebar-logo span, .nav-item span, .user-card .u-meta, .nav-section { display: none; }
  .nav-item { justify-content: center; }
  .sidebar-logo { justify-content: center; padding: 18px 0; }
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .view, .topbar { padding-left: 18px; padding-right: 18px; }
  .g-3, .g-2 { grid-template-columns: 1fr; }
}

/* 作业提交核对：未交更易辨识 */
#hw-grid .pick:not(.on) { background: #F7F8FB; border-style: dashed; color: var(--ink-2); }
#hw-grid .pick:not(.on) .avatar { filter: grayscale(.45); opacity: .75; }
#hw-grid .pick.on { box-shadow: inset 0 0 0 1px rgba(43, 92, 230, .22); }

/* ===================== 座位图 ===================== */
.seat-map {
  background: linear-gradient(180deg, #FBFCFE, #F6F8FC);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 20px;
}
.seat-stage {
  text-align: center; font-size: 12px; letter-spacing: .3em; color: var(--ink-3);
  background: #fff; border: 1px dashed #D3DCEA; border-radius: 9px;
  padding: 7px 0; margin: 0 auto 16px; max-width: 340px;
}
.seat-rows { display: flex; flex-direction: column; gap: 9px; position: relative; }
.seat-row { display: flex; gap: 9px; align-items: stretch; }
.seat-rows > .seat-row { position: relative; z-index: 1; }
/* ---- 小组分块：组间留空隙，一组座位圈一个虚线框 ---- */
.seat-gap { flex: 0 0 var(--blk-gap, 20px); width: var(--blk-gap, 20px); }
.seat-row.band-start { margin-top: 18px; }
.seat-block {
  position: absolute; z-index: 0; pointer-events: none;
  border: 1.5px dashed color-mix(in srgb, var(--gc, #C3CCDA) 62%, #fff);
  border-radius: 13px;
  background: color-mix(in srgb, var(--gc, #C3CCDA) 2.5%, transparent);
  transition: opacity .16s, border-color .16s, background .16s;
}
.seat-block.on { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 7%, transparent); }
.seat-block.dim { opacity: .3; }
.seat-rn {
  width: 22px; flex: none; display: grid; place-items: center;
  font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.seat {
  flex: 1 1 0; min-width: 0; min-height: 58px; border-radius: 10px;
  border: 1px dashed #DCE3EE; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  cursor: pointer; transition: .16s; padding: 6px 4px;
}
.seat:hover { border-color: var(--brand); box-shadow: 0 8px 20px -14px rgba(43, 92, 230, .55); transform: translateY(-1px); }
.seat.taken {
  border: 1px solid #E4EAF4; border-top: 2px solid var(--seat, #5B8FF9);
  background: color-mix(in srgb, var(--seat, #5B8FF9) 4%, #fff);
  cursor: pointer;
}
.seat.taken b {
  font-size: 12.5px; font-weight: 600; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.seat.taken span { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.seat-empty { font-size: 17px; color: #C3CCDA; font-weight: 300; }
.seat .avatar { margin-bottom: 1px; }

/* ---- 学习小组标识 ---- */
.seat { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.seat.taken { touch-action: none; }
.seat-map.gv .seat.grp {
  border-style: solid;
  border-color: color-mix(in srgb, var(--gc) 24%, #E4EAF4);
  border-top: 3px solid var(--gc);
  background: linear-gradient(180deg, color-mix(in srgb, var(--gc) 9%, #fff) 0%, #fff 78%);
}
/* 注意选择器权重：.seat.taken span（灰字 10.5px）会盖掉 .seat-gno，必须一起写上 */
.seat-gno,
.seat.taken span.seat-gno,
.seat-ghost span.seat-gno {
  position: absolute; top: 3px; right: 4px;
  height: 13px; padding: 0 5px; border-radius: 4px;
  background: var(--gcd, var(--gc)); color: #fff;
  font-size: 9.5px; font-weight: 700; line-height: 13px;
  letter-spacing: 0; pointer-events: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .2);
}
/* 组号要占住卡片顶上一窄条，不然会压到头像 */
.seat-map.gv .seat.grp { padding-top: 18px; }

/* ---- 组长小红旗：占左上角，和右上角组号各占一边 ---- */
.seat.taken.lead { padding-top: 18px; }
.seat-flag,
.seat.taken span.seat-flag {
  position: absolute; top: 3px; left: 5px;
  width: 12px; height: 13px; display: grid; place-items: center;
  color: #E0443E; pointer-events: none;
}
.seat-flag .flag-ic, .sl-flag .flag-ic { width: 10px; height: 12px; }
.sl-flag { display: inline-flex; color: #E0443E; margin-left: 1px; }
.seat.dim { opacity: .24; filter: grayscale(.65); }
.seat-legend {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line, #E6EAF2);
}
.seat-legend .sl-title { font-size: 11.5px; color: var(--ink-3); margin-right: 2px; }
.sl-item {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line, #E6EAF2); background: #fff;
  font-size: 12px; color: var(--ink-2); font-weight: 550; transition: .14s;
}
.sl-item i { width: 8px; height: 8px; border-radius: 3px; background: var(--gc, #C3CCDA); flex: none; }
.sl-item em { font-style: normal; font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sl-item:hover { border-color: color-mix(in srgb, var(--gc, #C3CCDA) 45%, #fff); }
.sl-item.on {
  border-color: var(--gc); color: var(--gc); font-weight: 650;
  background: color-mix(in srgb, var(--gc) 9%, #fff);
}
.sl-item.none { color: var(--ink-3); }
.sl-clear { font-size: 11.5px; color: var(--brand); font-weight: 600; padding: 0 4px; }
.sl-clear[hidden] { display: none; }

/* 拖动换座 */
.seat-ghost {
  position: fixed; z-index: 999; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 10px; border: 1px solid var(--brand);
  background: #fff; box-shadow: 0 18px 36px -12px rgba(20, 28, 45, .35);
  transform: rotate(-1.5deg) scale(1.04); padding: 6px 4px;
}
.seat-ghost:has(.seat-gno) { padding-top: 18px; }
.seat-ghost .seat-gno { opacity: 1; color: #fff; font-size: 9.5px; }
.seat-ghost b { font-size: 12.5px; font-weight: 600; }
.seat-ghost span { font-size: 10.5px; color: var(--ink-3); }
.seat.dragging { opacity: .3; border-style: dashed; }
.seat.drop {
  border-color: var(--brand) !important; border-style: dashed !important;
  background: #EDF2FF !important; transform: translateY(-1px);
  box-shadow: 0 8px 20px -14px rgba(43, 92, 230, .55);
}
body.seat-dragging { cursor: grabbing; }
body.seat-dragging .seat.taken { cursor: grabbing; }

/* ---- 小组标签（花名册） ---- */
.tag.grp-tag {
  background: color-mix(in srgb, var(--gc, #5B8FF9) 11%, #fff);
  color: var(--gc, #2B5CE6);
  border: 1px solid color-mix(in srgb, var(--gc, #5B8FF9) 26%, #fff);
  font-variant-numeric: tabular-nums;
}

/* ---- 学习排座：组数设置 / 预览分块 ---- */
.sg-count { display: flex; align-items: center; gap: 6px; }
.sg-count .input {
  width: 64px; height: 34px; text-align: center; font-weight: 700;
  font-variant-numeric: tabular-nums; padding: 0 4px;
}
.sg-count .input:disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
.sg-step:disabled { opacity: .4; cursor: not-allowed; }
.sg-step {
  width: 32px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 15px; font-weight: 600;
  display: grid; place-items: center; transition: .14s;
}
.sg-step:hover:not(:disabled) { border-color: #C3CFE4; color: var(--ink); background: var(--surface-2); }
.sg-unit { font-size: 12.5px; color: var(--ink-3); }

/* 学习排座：表单 + 每组行列 + 原位保留 */
.sg-form { display: grid; grid-template-columns: 1.55fr 1fr 1.15fr; gap: 12px 14px; align-items: end; }
.sg-form > .field:nth-child(4) { grid-column: 1 / span 2; }
.sg-size { display: flex; align-items: center; gap: 6px; }
.sg-size .input {
  width: 56px; height: 34px; text-align: center; font-weight: 700;
  font-variant-numeric: tabular-nums; padding: 0 4px;
}
.sg-size .input.auto { color: var(--ink-2); background: var(--surface-2); }
.sg-x { font-size: 12px; color: var(--ink-3); }
.sg-auto {
  margin-left: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink-3);
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; line-height: 1.6;
  transition: .14s;
}
.sg-auto:hover { border-color: #C3CFE4; color: var(--ink); }
.sg-auto.on { background: #EAF1FF; border-color: #C9DAFB; color: #2B5CE6; }
.sg-hint { font-size: 11px; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.sg-tip { margin-top: 10px; font-size: 12px; line-height: 1.75; color: var(--ink-3); }
.sg-tip strong { color: var(--ink-2); font-weight: 650; }
.sg-warn {
  display: flex; gap: 9px; align-items: flex-start;
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.75;
  border: 1px solid #F3DFB8; background: #FFF8E9; color: #7A5300;
}
.sg-warn[hidden] { display: none; }
.sg-warn.danger { border-color: #F5CFCC; background: var(--neg-soft); color: #9B2C25; }
.sg-warn b { font-weight: 700; }
.sg-warn-ic {
  flex: none; width: 17px; height: 17px; border-radius: 50%; margin-top: 2px;
  background: #E8A33D; color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.sg-warn.danger .sg-warn-ic { background: var(--neg); }
.sg-warn > div { min-width: 0; }
.sg-keep {
  border: 1px dashed #D8E1EF; border-radius: 10px; padding: 9px 11px; background: var(--surface-2);
  font-size: 12.5px; margin-bottom: 10px;
}
.sg-keep > b { font-weight: 650; font-size: 12px; }
.sg-keep-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gs-block { display: grid; gap: 5px; margin-top: 5px; }
.gs-block:first-of-type { margin-top: 0; }
.gs-card { border-top: 3px solid var(--gc, var(--line)); }
.gs-gdot {
  display: inline-block; width: 8px; height: 8px; border-radius: 3px;
  background: var(--gc, #5B8FF9); margin-right: 5px; vertical-align: middle;
}

/* 道具持有人 */
.holder-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow: auto; }
.holder-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2);
}
.holder-row .h-main { flex: 1; min-width: 0; }
.holder-row .h-main b { display: block; font-size: 13px; }
.holder-row .h-main span { font-size: 11.5px; color: var(--ink-3); }
.holder-row .h-time { font-size: 11px; color: var(--ink-3); flex: none; }
.holder-row .h-qty {
  flex: none; min-width: 40px; text-align: center; font-size: 12.5px; font-weight: 700;
  border-radius: 7px; padding: 3px 8px; font-variant-numeric: tabular-nums;
}

/* 危险文字按钮 */
.btn.danger-text { color: var(--neg); }
.btn.danger-text:hover { background: var(--neg-soft); border-color: #F5CFCC; }

/* ===================== 页脚（开发者信息） ===================== */
.app-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 7px; padding: 16px 30px 22px; font-size: 11.5px; color: var(--ink-3);
  border-top: 1px solid var(--line-soft); max-width: 1320px; width: 100%; align-self: center;
}
.app-foot b { color: var(--ink-2); font-weight: 600; }
.app-foot a { color: var(--ink-3); transition: .14s; }
.app-foot a:hover { color: var(--brand); }
.foot-sep { opacity: .45; }
/* ICP 备案号（登录页与主界面页脚共用） */
.icp-link { color: var(--ink-3); text-decoration: none; transition: .14s; }
.icp-link:hover { color: var(--brand); text-decoration: underline; }
.icp-wrap { display: block; margin-top: 4px; }

/* 页脚「由 告告 开发与维护」→ 开发维护端入口 */
.dev-entry { color: inherit; transition: .14s; }
.dev-entry b { color: var(--ink-2); font-weight: 600; transition: .14s; }
.dev-entry:hover, .dev-entry:hover b { color: var(--brand); }

/* 外链导航项 */
.nav-item.nav-ext .nav-ext-ic { width: 12px; height: 12px; opacity: .4; transform: rotate(-45deg); }
.nav-item.nav-ext:hover .nav-ext-ic { opacity: .8; }

/* 我的账号 */
.profile-head {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px;
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); margin-bottom: 16px;
}
.profile-head b { font-size: 17px; display: block; letter-spacing: -.01em; }
.profile-head .muted { margin-top: 3px; display: block; }

/* 加减分规则 */
.rule-list { display: flex; flex-direction: column; gap: 8px; }
.rule-row { display: flex; align-items: center; gap: 8px; }
.rule-row .rule-name { flex: 1; min-width: 0; }
.rule-score { display: flex; align-items: center; gap: 2px; flex: none; }
.rule-score span { font-weight: 700; font-size: 13px; width: 11px; text-align: center; }
.rule-score .input {
  width: 64px; text-align: center; font-variant-numeric: tabular-nums;
  padding-left: 6px; padding-right: 6px;
}
.rule-row .rule-del { color: #C25049; opacity: .55; transition: .14s; }
.rule-row .rule-del:hover { opacity: 1; background: #FDECEB; }

/* 登录页页脚 */
.login-foot { margin-top: 24px; text-align: center; font-size: 11.5px; color: #64748B; }
.login-foot b { color: var(--ink-2); font-weight: 600; }

/* 侧栏条目较多时压缩高度，保证「我的账号」不被裁掉 */
@media (max-height: 900px) {
  .sidebar-logo { padding: 14px 18px 10px; }
  .nav { padding: 2px 10px 8px; }
  .nav-item { padding: 7px 10px; font-size: 13px; }
  .nav-section { padding: 10px 10px 4px; }
  .sidebar-foot { padding: 10px; }
}
@media (max-height: 780px) {
  .nav-item { padding: 6px 10px; font-size: 12.5px; }
  .nav-item .i { width: 16px; height: 16px; }
  .nav-section { padding: 8px 10px 3px; }
}
@media (max-height: 820px) {
  .sidebar-logo { padding: 12px 16px 8px; }
  .sidebar-logo b { font-size: 13px; }
  .nav { padding: 0 9px 6px; }
  .nav-item { padding: 5px 9px; font-size: 12.5px; gap: 8px; }
  .nav-item .i { width: 15px; height: 15px; }
  .nav-section { padding: 5px 9px 2px; font-size: 9.5px; }
  .sidebar-foot { padding: 8px; }
  .user-card { padding: 6px; gap: 8px; }
  .user-card .u-meta b { font-size: 12.5px; }
}
.login-foot-links { display: block; margin-top: 4px; }
.login-foot-links a { color: #475569; }
.login-foot-links a:hover { color: var(--brand); }
.login-foot-links i { font-style: normal; opacity: .5; margin: 0 3px; }

/* 学习排座表单：窄屏两列 / 单列 */
@media (max-width: 760px) {
  .sg-form { grid-template-columns: 1fr 1fr; }
  .sg-form > .field:nth-child(1) { grid-column: 1 / -1; }
  .sg-form > .field:nth-child(4) { grid-column: 1 / -1; }
  /* 手机屏放不下 9 列，别把卡片挤成竖条：整块座位图横向滚动，行号吸在左边 */
  .seat-rows { overflow-x: auto; overflow-y: hidden; padding: 8px 8px 12px; -webkit-overflow-scrolling: touch; }
  .seat-row { width: max-content; }
  .seat { flex: none; width: 64px; min-height: 66px; }
  .seat-rn { position: sticky; left: 0; z-index: 2; background: #FAFBFE; }
}
@media (max-width: 460px) {
  .sg-form { grid-template-columns: 1fr; }
  .sg-form > .field:nth-child(1),
  .sg-form > .field:nth-child(4) { grid-column: auto; }
  .sg-size .input { width: 52px; }
}

/* 多班级平台：登录页、班级选择与大屏设备 */
.xy-logo { display: block; object-fit: contain; flex: none; }
.brand-points { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 22px; }
.brand-points span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255,255,255,.9); }
.brand-points .i { width: 15px; height: 15px; color: #A8C4FF; }
.login-actions { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 14px 0 4px; font-size: 12px; color: #98A4B8; }
.login-actions .link-btn { background: none; border: 0; padding: 0; color: #2B5CE6; cursor: pointer; font-size: 12px; }
.login-hint { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; padding: 11px 12px; border: 1px solid #E3EBFB; background: #F6F9FF; border-radius: 12px; }
.login-hint .i { width: 17px; height: 17px; color: #2B5CE6; flex: none; margin-top: 1px; }
.login-hint b { display: block; font-size: 12.5px; color: #2B3C63; margin-bottom: 3px; }
.login-hint span { display: block; font-size: 11.5px; color: #76839B; line-height: 1.6; }
/* 登录页的两个入口：教室大屏 / 客户端下载，必须能直接点进去 */
.login-entries { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.login-entry { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #E2E9F5;
  border-radius: 12px; background: #FBFCFE; color: var(--ink); transition: border-color .16s, background .16s, box-shadow .16s; }
.login-entry:hover { border-color: #BFD0F2; background: #F6F9FF; box-shadow: 0 4px 14px rgba(43,92,230,.08); }
.login-entry .le-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; background: #EDF3FF; color: #2B5CE6;
  display: flex; align-items: center; justify-content: center; }
.login-entry .le-ic .i { width: 16px; height: 16px; }
.login-entry .le-main { flex: 1; min-width: 0; }
.login-entry .le-main b { display: block; font-size: 12.5px; font-weight: 600; color: #1E2B45; }
.login-entry .le-main i { display: block; font-style: normal; font-size: 11px; color: #6B7890; margin-top: 2px; }
.login-entry .le-arrow { width: 13px; height: 13px; color: #9AA7BC; flex: none; }
.back-link {
  display: inline-flex; align-items: center; gap: 5px; margin-bottom: 16px; padding: 3px 0;
  background: none; border: 0; color: #64748B; font-size: 12px; cursor: pointer;
  transition: color .16s;
}
.back-link:hover { color: #2B5CE6; }
.back-link .i { width: 14px; height: 14px; }
.class-picker { display: grid; gap: 9px; margin: 18px 0 20px; }
.class-choice {
  width: 100%; display: flex; align-items: center; gap: 11px; padding: 12px 13px;
  border: 1px solid #E1E8F4; border-radius: 14px; background: #fff; cursor: pointer; text-align: left;
  transition: border-color .14s, box-shadow .14s, transform .14s;
}
.class-choice:hover { border-color: #2B5CE6; box-shadow: 0 8px 24px -14px rgba(43,92,230,.45); transform: translateY(-1px); }
.class-choice.busy { opacity: .6; pointer-events: none; }
.class-choice .cc-main { flex: 1; min-width: 0; }
.class-choice .cc-main b { display: block; font-size: 14px; color: #1B2740; }
.class-choice .cc-main span { display: block; font-size: 11.5px; color: #8A96A9; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.class-choice .cc-role { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: #EEF3FF; color: #2B5CE6; }
.class-choice > .i { width: 16px; height: 16px; color: #AAB4C4; }
.screen-code { font-size: 19px; font-weight: 800; letter-spacing: .16em; padding: 6px 11px; border-radius: 10px; background: #F1F5FF; color: #24409A; border: 1px solid #DDE7FF; }
.screen-devices { display: grid; gap: 8px; margin-top: 12px; }
.screen-device-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #E7ECF5; border-radius: 12px; background: #FBFCFF; }
.sd-dot { width: 8px; height: 8px; border-radius: 50%; background: #C7D0DE; flex: none; }
.sd-dot.on { background: #2E9E4F; box-shadow: 0 0 0 3px rgba(46,158,79,.14); }
.sd-main { flex: 1; min-width: 0; }
.sd-main b { display: block; font-size: 13px; color: #1B2740; }
.sd-main span { display: block; font-size: 11.5px; color: #8996A9; margin-top: 2px; }
@media (max-width: 700px) {
  .screen-devices .setting-row, .screen-devices .row { width: 100% !important; max-width: none !important; justify-content: flex-start !important; }
}
