* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #eef1f6; --panel: #ffffff; --line: #dfe4ec;
  --text: #1f2937; --muted: #6b7280;
  --brand: #2563eb; --brand-dk: #1e4fbf;
  --danger: #dc2626; --ok: #16a34a; --warn: #d97706;
  --radius: 10px;
}
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
.btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 14px;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dk); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-plus-lg, .btn-minus-lg { flex: 1; padding: 12px; font-size: 17px; font-weight: bold; border-radius: 10px; border: 0; color: #fff; cursor: pointer; }
.btn-plus-lg { background: var(--ok); }
.btn-plus-lg:hover { background: #15803d; }
.btn-minus-lg { background: var(--danger); }
.btn-minus-lg:hover { background: #b91c1c; }
.ipt {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
  font-size: 14px; background: #fff; color: var(--text); outline: none;
}
.ipt:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.ipt-amount { max-width: 130px; }
.ta { min-height: 90px; resize: vertical; }
.muted { color: var(--muted); font-weight: normal; }
.hint { color: var(--muted); font-size: 12px; margin-top: 8px; line-height: 1.6; }
.empty { color: var(--muted); text-align: center; padding: 28px 0; }

/* 顶栏 */
.topbar {
  height: 60px; background: linear-gradient(90deg, #16233f, #1f3a68);
  color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 20;
}
.brand-title { font-size: 18px; font-weight: bold; letter-spacing: 1px; }
.brand-sub { font-size: 12px; opacity: .75; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.operator-chip { background: rgba(255,255,255,.14); padding: 5px 12px; border-radius: 999px; font-size: 12px; margin-right: 4px; }
.topbar .btn-ghost { color: #cfe0ff; border-color: rgba(255,255,255,.3); }
.topbar .btn-ghost:hover { color: #fff; border-color: #fff; }

/* 登录 */
.login-holder { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; }
.login-card { background: var(--panel); border-radius: 16px; padding: 34px 34px 26px; width: 360px; box-shadow: 0 10px 30px rgba(15,30,60,.12); }
.login-title { font-size: 20px; font-weight: bold; margin-bottom: 4px; }
.login-sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.login-card .ipt { margin-bottom: 14px; }
.login-hint { margin-top: 12px; font-size: 12px; color: var(--warn); background: #fef6e7; border: 1px solid #f3d9a4; border-radius: 8px; padding: 8px 10px; }
.login-err { margin-top: 10px; color: var(--danger); font-size: 13px; background: #fdecec; border-radius: 8px; padding: 8px 10px; }

/* 主体 */
.app { max-width: 1180px; margin: 0 auto; padding: 16px 16px 60px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; background: #fff; padding: 6px; border-radius: 12px; border: 1px solid var(--line); }
.tab { border: 0; background: transparent; padding: 9px 20px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--muted); }
.tab:hover { color: var(--brand); }
.tab.active { background: var(--brand); color: #fff; font-weight: 600; }

.panel { display: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel.active { display: block; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-title { font-size: 17px; font-weight: 600; }
.col-title { font-size: 15px; margin-bottom: 10px; }

/* 表格 */
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.grid th { background: #f6f8fb; color: #4b5563; font-weight: 600; }
.grid tr:hover td { background: #f8faff; }
.grid .ops { display: flex; gap: 6px; }
.table-scroll { max-height: 56vh; overflow: auto; }
.table-scroll .grid th { position: sticky; top: 0; z-index: 1; }

.score-pos { color: var(--ok); font-weight: bold; }
.score-neg { color: var(--danger); font-weight: bold; }

.rank-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rank-col { background: #fbfcfe; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.medal { display: inline-block; min-width: 22px; text-align: center; border-radius: 6px; font-weight: bold; }
.medal.m1 { background: #fcd34d; color: #7c4a03; }
.medal.m2 { background: #cbd5e1; color: #334155; }
.medal.m3 { background: #fdba74; color: #7c2d12; }
.medal.mn { background: #eef2f7; color: var(--muted); }

@media (max-width: 900px) { .rank-cols { grid-template-columns: 1fr; } }

/* 积分操作 */
.score-wrap { max-width: 780px; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; color: #374151; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px; cursor: pointer; font-size: 14px; font-weight: bold; }
.chip-plus { color: var(--ok); }
.chip-plus:hover { background: #f0fdf4; border-color: var(--ok); }
.chip-minus { color: var(--danger); }
.chip-minus:hover { background: #fef2f2; border-color: var(--danger); }
.chip.active-plus { background: var(--ok); color: #fff; border-color: var(--ok); }
.chip.active-minus { background: var(--danger); color: #fff; border-color: var(--danger); }
.chip-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.amount-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.amount-tip { color: var(--muted); font-size: 12px; }
.submit-row { display: flex; gap: 10px; margin-top: 4px; }
.score-result { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; line-height: 1.7; min-height: 18px; }
.score-result.err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* 公告 */
.notice-block { max-width: 780px; }
.notice-now { background: #fffbeb; border: 1px dashed #f0c36c; border-radius: 8px; padding: 12px; color: #92400e; font-size: 15px; min-height: 40px; }
.notice-now.empty-now { color: var(--muted); font-style: italic; }

/* 设置 */
.settings-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .settings-cols { grid-template-columns: 1fr; } }
.settings-block { background: #fbfcfe; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.danger-zone { border-color: #f5b5b5; background: #fffbfb; }
.danger-zone .col-title { color: var(--danger); }

/* 弹窗 */
/* 关键修复：作者样式 display 会覆盖 hidden 属性，必须用 !important 保证 [hidden] 生效 */
[hidden] { display: none !important; }
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 14px; padding: 22px; width: 420px; max-width: 92vw; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal-sm { width: 380px; }
.modal-title { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.modal-text { color: #374151; line-height: 1.7; margin-bottom: 14px; white-space: pre-wrap; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); background: #1f2937; color: #fff; padding: 11px 22px; border-radius: 999px; z-index: 200; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.ok { background: #15803d; }
.toast.err { background: #b91c1c; }

/* ============ 批量导入 ============ */
.head-btns { display: flex; gap: 10px; }
#importText { font-family: Consolas, "Microsoft YaHei", monospace; line-height: 1.9; }

/* ============ 全班快评 ============ */
.quick-block { margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line); }
.quick-block .col-title { margin-bottom: 12px; }
.quick-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.quick-bar .chips { margin-bottom: 0; }
.ipt-amount-sm { width: 84px; }
.quick-reason { width: 220px; }
.quick-search { width: 320px; margin-bottom: 12px; }
.q-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.q-gtitle { grid-column: 1 / -1; font-size: 13px; font-weight: 600; color: #64748b; margin-top: 6px; }
.q-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 6px 7px; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; font: inherit; }
.q-card:hover { transform: translateY(-2px); border-color: #93c5fd; box-shadow: 0 4px 12px rgba(59,130,246,.15); }
.q-card:active { transform: translateY(0) scale(.97); }
.q-card:disabled { opacity: .6; }
.q-name { font-size: 15px; font-weight: 600; color: #1e293b; }
.q-total { font-size: 12px; color: #94a3b8; }
.flash-plus { animation: qplus .7s ease; border-color: #16a34a !important; background: #f0fdf4 !important; }
@keyframes qplus { 0% { transform: scale(1); } 30% { transform: scale(1.12); background: #bbf7d0; } 100% { transform: scale(1); } }
.flash-minus { animation: qminus .7s ease; border-color: #dc2626 !important; background: #fef2f2 !important; }
@keyframes qminus { 0% { transform: scale(1); } 30% { transform: scale(1.12); background: #fecaca; } 100% { transform: scale(1); } }
.q-empty { grid-column: 1 / -1; color: #94a3b8; padding: 18px 0; text-align: center; }
.quick-result { margin-top: 12px; min-height: 22px; font-size: 14px; color: #16a34a; font-weight: 600; }
.q-undo { color: #dc2626; border-color: #fca5a5; }
.q-mode-minus .q-card { border-color: #fca5a5; }
.q-mode-minus .q-card:hover { border-color: #ef4444; box-shadow: 0 4px 12px rgba(220,38,38,.15); }
.q-mode-row { display: flex; gap: 8px; margin-bottom: 12px; }
.q-group-card { min-height: 56px; justify-content: center; }

/* ============ 排行榜模式 / 局域网信息 ============ */
.rank-mode-row { display: flex; gap: 8px; align-items: center; }
.lan-list { line-height: 2; font-size: 14px; margin-bottom: 14px; word-break: break-all; }
.lan-list b { color: #334155; }
.qr-row { display: flex; gap: 28px; margin: 8px 0 10px; }
.qr-item { text-align: center; font-size: 13px; }
.qr-img img { width: 128px; height: 128px; display: block; margin: 0 auto 6px; background: #fff; border-radius: 8px; padding: 6px; }
.backup-list { margin-top: 10px; line-height: 1.9; font-size: 13px; }
.lan-host { margin-bottom: 10px; }
.lan-ext { margin-top: 10px; word-break: break-all; line-height: 1.8; font-size: 13px; }
.ext-field { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ============ 表格局部横向滚动（防整页溢出） ============ */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; }
.tbl-wrap .grid td, .tbl-wrap .grid th { white-space: nowrap; }
.table-scroll { -webkit-overflow-scrolling: touch; }
.table-scroll .grid td, .table-scroll .grid th { white-space: nowrap; }
.record-time { white-space: nowrap; }

/* ============ 手机/窄屏适配（<800px 全部重排） ============ */
@media (max-width: 800px) {
  body { overflow-x: hidden; }

  /* 顶栏：自动换行，操作按钮单行可横向滑动 */
  .topbar { height: auto; flex-wrap: wrap; row-gap: 6px; padding: 10px 12px; }
  .brand-title { font-size: 16px; }
  .top-actions { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .top-actions::-webkit-scrollbar { display: none; }
  .topbar .btn-ghost { padding: 6px 11px; font-size: 13px; white-space: nowrap; }
  .operator-chip { flex: 0 0 auto; }

  /* 主体留白压缩 */
  .app { padding: 10px 10px 44px; }

  /* 标签页：6 个铺成 3×2 两行，等宽整齐 */
  .tabs { display: flex; flex-wrap: wrap; gap: 6px; }
  .tab { flex: 1 1 calc(33.333% - 6px); text-align: center; padding: 10px 4px; font-size: 13px; white-space: nowrap; }

  /* 面板与标题行可换行 */
  .panel { padding: 12px; border-radius: 12px; }
  .panel-head { flex-wrap: wrap; gap: 8px; }
  .panel-title { font-size: 16px; }
  .rank-mode-row, .head-btns, .q-mode-row { flex-wrap: wrap; }
  .col-title { line-height: 1.5; }
  .col-title .muted { display: block; margin-top: 3px; }

  /* 通用按钮加大触控区域 */
  .btn { padding: 10px 14px; }
  .btn-sm { padding: 8px 12px; }
  .chip { padding: 9px 15px; }
  .btn-plus-lg, .btn-minus-lg { min-height: 50px; font-size: 18px; }

  /* 表格：保证列宽不被挤烂，内部横滑 */
  .tbl-wrap .grid { min-width: 540px; }
  .table-scroll .grid { min-width: 760px; }

  /* 登录卡片适配窄屏 */
  .login-holder { padding: 12px; }
  .login-card { width: min(360px, 100%); padding: 26px 22px 22px; }

  /* 输入框：16px 防 iOS 聚焦时自动放大页面 */
  .ipt, .login-card input, select, textarea, input[type="number"], input[type="password"], input[type="text"], input[type="search"] { font-size: 16px; }

  /* 快评区固定宽度元素改为自适应 */
  .quick-search, .quick-reason { width: 100%; }
  .quick-bar { gap: 8px; }
  .ipt-amount-sm { width: 88px; }
  .amount-row { flex-wrap: wrap; gap: 8px; }
  .amount-tip { width: 100%; }

  /* 双栏并排元素在手机改单列/收紧 */
  .qr-row { gap: 16px; }
  .qr-img img { width: 108px; height: 108px; }
  .submit-row { gap: 8px; }
  .submit-row .btn { flex: 1; text-align: center; }

  /* 弹窗与提示 */
  .modal { padding: 20px 16px; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1; text-align: center; }
  .toast { max-width: 88vw; text-align: center; }
}

/* ---------- 成长阶段分值设置 ---------- */
.growth-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin: 10px 0 4px; }
@media (max-width: 720px) { .growth-grid { grid-template-columns: 1fr; } }
.growth-grid-title { font-weight: 700; font-size: 13px; color: #374151; margin-bottom: 8px; }
/* 当前生效的阈值表高亮，另一套变淡（两套都可见、都能改） */
#treeSumCol.dim, #treeAvgCol.dim { opacity: .5; }
.stage-active { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: #dcfce7; color: #15803d; font-size: 11px; font-weight: 700; vertical-align: middle; }
.stage-dirty { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px;
  background: #fef3c7; color: #b45309; font-size: 12px; font-weight: 700; vertical-align: middle; }
.stage-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.stage-row .stage-name { width: 110px; flex: none; }
.stage-row .stage-min { width: 100px; flex: none; }
.stage-row .stage-arrow { color: #9ca3af; font-size: 12px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 值日 · 课表 ---------- */
/* 值日轮换 */
.duty-today { background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.duty-today .dt-main { font-size: 18px; font-weight: bold; color: var(--brand); }
.duty-today .dt-sub { color: var(--muted); font-size: 12px; margin-top: 5px; line-height: 1.7; }
.duty-order { display: flex; flex-direction: column; gap: 6px; }
.duty-order-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.duty-order-row.first { border-color: var(--brand); background: #f3f7ff; }
.duty-order-idx { width: 22px; height: 22px; flex: none; border-radius: 50%; background: #e5e9f2; color: #4b5563; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.duty-order-row.first .duty-order-idx { background: var(--brand); color: #fff; }
.duty-order-name { flex: 1; min-width: 0; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duty-order-row .btn-sm { padding: 3px 9px; line-height: 1.3; }
.duty-plan-item { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 12px; color: #4b5563; margin: 3px 0; }
.duty-plan-item.cur { background: var(--brand); border-color: var(--brand); color: #fff; }
.duty-plan-item b { font-weight: bold; }
.duty-plan-arrow { color: #b6bdc9; margin: 0 5px; font-size: 12px; }

/* 整周课表 */
.course-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.course-toolbar .grow { flex: 1; }
.course-toolbar .ck { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; cursor: pointer; }
.course-grid-wrap { overflow-x: auto; }
.course-grid { width: 100%; border-collapse: collapse; min-width: 520px; }
.course-grid th, .course-grid td { border: 1px solid var(--line); padding: 2px; }
.course-grid thead th { background: #f3f5f9; font-size: 12px; font-weight: bold; padding: 7px 4px; color: #374151; }
.course-grid thead th.cg-today { color: var(--brand); }
.course-grid .cg-corner, .course-grid .cg-p { width: 48px; text-align: center; font-size: 12px; color: var(--muted); background: #f7f9fc; font-weight: normal; }
.course-grid .cg-ipt { width: 100%; min-width: 72px; border: 1px solid transparent; background: transparent; padding: 6px 4px; text-align: center; border-radius: 6px; font-size: 13px; }
.course-grid .cg-ipt:hover { border-color: var(--line); background: #fff; }
.course-grid .cg-ipt:focus { border-color: var(--brand); background: #fff; outline: none; }
.course-paste { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.course-paste summary { cursor: pointer; font-size: 13px; color: #4b5563; font-weight: bold; }
.course-paste-text { width: 100%; font-family: inherit; resize: vertical; line-height: 1.7; }
@media (max-width: 720px) {
  .course-grid .cg-ipt { min-width: 58px; font-size: 12px; }
}

/* ---------- 快捷换组 ---------- */
.regroup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; align-items: start; }
.rg-col { background: #f9fafc; border: 1px solid var(--line); border-radius: 10px; padding: 8px; transition: border-color .15s, background .15s; min-height: 90px; }
.rg-col.over { border-color: var(--brand); background: #eef4ff; }
.rg-head { display: flex; align-items: baseline; gap: 8px; padding: 2px 4px 8px; cursor: pointer; user-select: none; }
.rg-head:hover .rg-name { color: var(--brand); }
.rg-name { font-weight: bold; font-size: 14px; }
.rg-count { font-size: 12px; color: var(--muted); margin-left: auto; }
.rg-list { display: flex; flex-direction: column; gap: 5px; min-height: 30px; }
.rg-chip { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; cursor: grab; font-size: 13px; transition: box-shadow .12s, border-color .12s; }
.rg-chip:hover { border-color: var(--brand); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.rg-chip:active { cursor: grabbing; }
.rg-chip.dragging { opacity: .45; }
.rg-chip.sel { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37,99,235,.18); }
.rg-chno { color: var(--muted); font-size: 11px; min-width: 20px; }
.rg-chname { font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-chscore { color: #b45309; font-variant-numeric: tabular-nums; font-size: 12px; }
@media (max-width: 720px) {
  .regroup-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
}

/* ---------- 座位表编辑器 ---------- */
.seat-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seat-toolbar label { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.ipt-sm { width: 58px; padding: 4px 6px; }
.seat-wrap { margin-top: 10px; }
.seat-lectern { background: var(--muted-bg, #f1f5f9); border-radius: 6px; text-align: center; font-size: 12px; color: var(--muted); padding: 5px 0; margin-bottom: 10px; letter-spacing: 6px; max-width: 240px; }
.seat-layout { display: grid; grid-template-columns: 175px 1fr; gap: 14px; align-items: start; }
.seat-un-title { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.seat-un-list { display: flex; flex-direction: column; gap: 5px; border: 1px dashed var(--line); border-radius: 8px; padding: 6px; min-height: 60px; max-height: 420px; overflow: auto; }
.seat-chip { background: #eef2ff; color: #3730a3; border-radius: 6px; padding: 4px 8px; font-size: 12px; text-align: center; cursor: grab; user-select: none; }
.seat-chip:active { cursor: grabbing; }
.seat-grid { display: grid; gap: 6px; }
.seat-cell { border: 1px dashed var(--line); border-radius: 8px; min-height: 40px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); background: #fff; }
.seat-cell.occupied { border-style: solid; border-color: #bfdbfe; background: #eff6ff; color: #1e3a8a; font-weight: 600; cursor: grab; }
.seat-cell.over { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37,99,235,.18); }
.seat-cell.dragging { opacity: .35; }
.seat-un-list.over { border-color: var(--brand); background: #eff6ff; }
.seat-empty-hint { font-size: 12px; color: var(--muted); }
@media (max-width: 720px) {
  .seat-layout { grid-template-columns: 1fr; }
  .seat-un-list { flex-direction: row; flex-wrap: wrap; max-height: 140px; }
}

/* ===== 调休 · 特殊日期 ===== */
.cal-add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cal-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.cal-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 13px; background: #fff; }
.cal-row .cal-date { font-weight: 700; }
.cal-row .cal-tag { border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.cal-row .cal-tag.work { background: #ecfdf5; color: #047857; }
.cal-row .cal-tag.rest { background: #fef2f2; color: #b91c1c; }
.cal-row .cal-sub { color: var(--muted); font-size: 12px; }
.cal-row .cal-del { margin-left: auto; }
.cal-empty { color: var(--muted); font-size: 12px; }

/* 调休标记（值日预览里的小字） */
.duty-swap { font-style: normal; font-size: 11px; margin: 0 3px; padding: 1px 5px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; }

/* 整组拖动开关 */
.seat-toolbar .seat-gdrag { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; user-select: none; white-space: nowrap; }
.seat-toolbar .seat-gdrag input { cursor: pointer; }

/* ===== 积分商城 + 学生登录密码（2026-09-24） ===== */
.chip.on { background: var(--primary, #2563eb); color: #fff; border-color: var(--primary, #2563eb); }

.tag-on { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: bold; background: #ecfdf5; color: #047857; }
.tag-off { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: bold; background: #f3f4f6; color: #6b7280; }

.pwd-ok { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: bold; background: #ecfdf5; color: #047857; }
.pwd-wait { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: bold; background: #fffbeb; color: #b45309; }

.st { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: bold; }
.st-pending { background: #fffbeb; color: #b45309; }
.st-done { background: #ecfdf5; color: #047857; }
.st-rejected { background: #fef2f2; color: #b91c1c; }
.st-canceled { background: #f3f4f6; color: #6b7280; }

.ck-line { display: inline-flex; align-items: center; gap: 7px; margin: 8px 0 4px; font-size: 13px; cursor: pointer; user-select: none; }
.ck-line input { cursor: pointer; }

.pwd-result { margin-top: 14px; border: 1px solid #fcd34d; background: #fffbeb; border-radius: 10px; padding: 12px 14px; }
.pwd-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #92400e; }
.pwd-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; max-height: 260px; overflow: auto; }
.pwd-chip { display: inline-flex; align-items: baseline; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 13px; }
.pwd-chip b { font-weight: bold; }
.pwd-chip i { font-style: normal; color: var(--muted); font-size: 12px; }
.pwd-chip em { font-style: normal; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: bold; color: #1d4ed8; letter-spacing: 1px; }

/* ===== 值日任务分工（2026-09-28） ===== */
.duty-task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 12px 0 4px; }
.dt-row { display: flex; align-items: center; gap: 8px; background: var(--panel-bg, #f9fafb); border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 7px 10px; }
.dt-name { flex: 0 0 auto; font-size: 13px; font-weight: bold; min-width: 3.5em; }
.dt-ipt { flex: 1; min-width: 0; padding: 6px 10px !important; font-size: 13px !important; }

/* ===== 班委补录标记（2026-09-28）：积分记录与补录日志用 ===== */
.bdtag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 5px;
         background: #fff4e0; color: #b96b00; border: 1px solid #f3c47a; font-size: 11px; white-space: nowrap; }
.bdtag.warn { background: #fdecec; color: #b91c1c; border-color: #f6b1b1; }
