/* NFC 教师签到签退系统 —— 单文件样式，移动端优先，无外部依赖 */
:root {
  --bg: #f2f5f8;
  --panel: #ffffff;
  --line: #dde5ec;
  --text: #1c2b36;
  --muted: #6b7c8c;
  --blue: #2f6fb0;
  --green: #1f9d55;
  --orange: #e08a1e;
  --red: #d0453b;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(28, 43, 54, .07);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #eef2f6; padding: 1px 5px; border-radius: 4px; font-size: 13px; word-break: break-all; }

h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 16px; margin: 0 0 10px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 18px 16px 40px; }
.wrap.narrow { max-width: 720px; }

.page-head { margin-bottom: 16px; }
.page-head.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

/* ------------------------------------------------------------------ 按钮 */
.btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.4;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: #f6f9fc; text-decoration: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #28629c; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: #eec4c1; color: var(--red); }
.btn.danger:hover { background: #fdf1f0; }
.btn.tiny { padding: 3px 9px; font-size: 12.5px; }
.head-actions .btn { white-space: nowrap; }

/* --------------------------------------------------------------- 统计卡片 */
.cards-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.stat {
  flex: 1 1 130px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  text-align: center;
}
.stat-num { font-size: 26px; font-weight: 700; color: var(--blue); }
.stat-label { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table thead th { background: #f7fafc; font-size: 13px; color: var(--muted); white-space: nowrap; }
/* 数据单元格默认不换行，避免窄屏被压成竖排（操作列/说明列另有处理） */
.table td { white-space: nowrap; }
/* 说明/备注类单元格允许换行，保持可读性 */
.table td.muted.small { white-space: normal; }
.table tbody tr:hover { background: #fafcfe; }
.table tr.dim { opacity: .55; }
.table tr.warn-row { background: #fffaf0; }
.table .ops { white-space: nowrap; }
.table .ops form { display: inline-block; margin: 0 2px 2px 0; }
.table .ops .card-edit { display: inline-flex; gap: 4px; align-items: center; }
input.mini, select.mini { font-size: 12.5px; padding: 3px 6px; width: auto; max-width: 120px; }

/* 宽表格容器：避免操作列把前面文字列压成竖排 */
.table-wrap { overflow-x: auto; width: 100%; }
.exempt-list-table { min-width: 950px; width: 100%; }
.exempt-list-table th,
.exempt-list-table td { white-space: nowrap; }
.exempt-list-table td:nth-child(7),
.exempt-list-table th:nth-child(7) { white-space: normal; max-width: 240px; }

/* 刷卡记录表格：列很多，移动端必须横向滚动，禁止姓名/部门竖排 */
.events-table { min-width: 980px; width: 100%; }
.events-table th,
.events-table td { white-space: nowrap; }
.events-table td:nth-child(11),
.events-table th:nth-child(11) { white-space: normal; max-width: 220px; }
.events-table td.ops { min-width: 72px; text-align: right; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 12.5px; white-space: nowrap; }
.tag.in { background: #e6f6ec; color: var(--green); }
.tag.out { background: #e9f1fb; color: var(--blue); }
.tag.warn { background: #fdf3e3; color: var(--orange); }
.tag.none { background: #eef1f4; color: var(--muted); }

/* ------------------------------------------------------------------ 表单 */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; align-items: end; }
.form-grid label, .panel form > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  color: var(--muted);
}
.form-grid label.wide { grid-column: 1 / -1; }
/* label 之外的整行说明文字（如「新增老师」表单里的填写提示）也要独占一行 */
.form-grid > .wide { grid-column: 1 / -1; }

/* form-grid 里的 mini-check 与上面的 column flex 冲突，
   会导致 checkbox 与说明文字堆叠 / 文字被压竖排。这里恢复为横向并允许换行。 */
.form-grid .mini-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  white-space: normal;
  line-height: 1.45;
}
.form-grid .mini-check input {
  flex-shrink: 0;
  margin-top: 2px;
  width: auto;
}
.form-grid .mini-check .small {
  display: block;
  margin-top: 2px;
}
input, select, textarea {
  font: inherit;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  width: 100%;
}
input:focus, select:focus { outline: 2px solid #cfe1f3; border-color: var(--blue); }
input[disabled] { background: #f2f4f6; color: var(--muted); }
.form-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
/* 「设置」页常用间隔一键填 */
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.preset-row .btn.tiny { padding: 4px 9px; font-size: 12.5px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; }
.inline-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--muted); }
form.inline { display: inline; }
.export-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* -------------------------------------------------------------- 提示条 */
.flashes { max-width: 1080px; margin: 12px auto 0; padding: 0 16px; }
.flash {
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 8px;
  font-size: 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.flash.ok { border-color: #bfe6cd; background: #eefaf2; color: #15693c; }
.flash.error { border-color: #eec4c1; background: #fdf1f0; color: #a3372e; }
.flash.warn { border-color: #f0dcb6; background: #fdf7ec; color: #8c6417; }

.steps { margin: 6px 0 6px 20px; padding: 0; }
.steps li { margin-bottom: 5px; }
.addr { list-style: none; margin: 6px 0; padding: 0; }
.addr li { margin-bottom: 4px; }
.empty { padding: 26px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.err-code { font-size: 56px; color: var(--blue); margin: 40px 0 0; }

/* ------------------------------------------------------------ 刷卡页 */
body.tap { background: #0f2130; }
.tap-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 18px calc(40px + env(safe-area-inset-bottom));
  text-align: center;
}
.tap-card {
  width: min(90vw, 400px);
  background: linear-gradient(165deg, #1c3549, #16293a);
  border: 1px solid #24425c;
  border-radius: 22px;
  padding: 26px 20px 20px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .38);
}
.tap-avatar {
  width: 66px; height: 66px; line-height: 66px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(160deg, #3e86cc, #2f6fb0);
  color: #fff; font-size: 30px; font-weight: 700;
}
.tap-who { font-size: 30px; font-weight: 700; color: #fff; }
.tap-dept { font-size: 14px; color: #8fb0c6; margin-top: 2px; }
.tap-todo {
  margin-top: 14px;
  font-size: 16px;
  color: #cfe6f7;
  background: rgba(255, 255, 255, .08);
  border-radius: 10px;
  padding: 9px 12px;
}
.tap-todo b { color: #7fd4a5; font-size: 19px; }
.tap-todo.warn { color: #f0c98a; }
.tap-go {
  width: 100%;
  margin-top: 16px;
  padding: 17px 0;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(160deg, #2bb673, #1a8c4b);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}
.tap-go:active { transform: scale(.985); }
/* 按钮里的提示字：旧版是 .tap-hint{font-size:17px;margin-top:10px}，
   新按钮是横向 flex（spinner + 文字），只留字号，margin 交给 .tap-go 的 gap */
.tap-hint { font-size: 17px; }
.tap-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tap-tip { font-size: 12.5px; color: #7d97ab; margin-top: 10px; }
.tap-note { color: #a8bccd; font-size: 13.5px; max-width: 420px; line-height: 1.6; }
.tap-note b { color: #fff; }
/* ------------------------------------------------------------ 结果页 */
.result-page { max-width: 560px; margin: 0 auto; padding: 22px 16px 40px; }
.result-card {
  border-radius: 20px;
  padding: 30px 22px;
  text-align: center;
  color: #fff;
  box-shadow: 0 10px 26px rgba(28, 43, 54, .18);
}
.result-card.ok-in { background: linear-gradient(160deg, #2bb673, #1f9d55); }
.result-card.ok-out { background: linear-gradient(160deg, #4a92d6, #2f6fb0); }
.result-card.warn { background: linear-gradient(160deg, #efa93f, #d98a16); }
.result-card.bad { background: linear-gradient(160deg, #e06055, #c53b31); }
.result-who { font-size: 22px; font-weight: 600; }
.result-dept { font-size: 14px; opacity: .9; margin-left: 6px; }
.result-big { font-size: 40px; font-weight: 800; margin: 12px 0 4px; letter-spacing: 2px; }
.result-time { font-size: 15px; opacity: .92; }
.result-msg { font-size: 15px; margin-top: 12px; }
.result-wait { font-size: 18px; margin-top: 8px; }
/* 打卡成功后随机回的那句关心话 */
.result-greet {
  margin: 14px 0 0;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .18);
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: .3px;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  margin: 18px 0 0;
  padding: 12px;
  background: rgba(255, 255, 255, .16);
  border-radius: 12px;
  text-align: left;
}
.result-stats dt { font-size: 12.5px; opacity: .88; }
.result-stats dd { margin: 0; font-size: 17px; font-weight: 600; }
.result-foot { font-size: 13px; opacity: .85; margin-top: 10px; }
.result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

/* ------------------------------------------------------------ 标签页 */
.url-line { display: inline-block; background: #eef2f6; border-radius: 6px; padding: 2px 6px; font-size: 13px; word-break: break-all; }
img.qr { width: 96px; height: 96px; image-rendering: pixelated; }

/* ------------------------------------------------------------ 登录页 */
.login-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 6vh 16px calc(32px + env(safe-area-inset-bottom));
}
.login-head { text-align: center; margin-bottom: 18px; }
.login-logo {
  width: 58px; height: 58px; line-height: 58px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: linear-gradient(160deg, #3e86cc, #2f6fb0);
  color: #fff; font-size: 28px; font-weight: 700;
}
.login-head h1 { font-size: 22px; margin: 0; }
.login-head p { margin: 2px 0 0; }
.login-bound {
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid #bfe6cd;
  background: linear-gradient(180deg, #f2fdf6, #fff);
  text-align: center;
}
.lb-main { font-size: 13px; color: var(--muted); }
.lb-name { font-size: 24px; font-weight: 700; margin: 2px 0 6px; }
.login-panel { padding: 18px 16px; }
.login-panel label {
  display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 12px; font-size: 13.5px; color: var(--muted);
}
.login-panel input { padding: 11px 12px; font-size: 16px; }
.btn.block { display: block; width: 100%; padding: 12px 0; font-size: 16px; text-align: center; }
.center { text-align: center; }
/* ============================================================ 老师打卡页 */
body.me { background: #eef2f6; }
.me-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.me-who { display: flex; flex-direction: column; line-height: 1.25; }
.me-name { font-size: 17px; font-weight: 700; }
.me-sub { font-size: 12px; color: var(--muted); }
.me-ops { display: flex; gap: 12px; font-size: 13px; }
.me-ops a { color: var(--muted); }
.me-wrap { max-width: 640px; margin: 0 auto; padding: 14px 14px calc(32px + env(safe-area-inset-bottom)); }

.hero {
  border-radius: 20px; padding: 26px 20px 22px; text-align: center; color: #fff;
  margin-bottom: 14px; box-shadow: 0 12px 28px rgba(28, 43, 54, .22);
}
.hero.ok-in { background: linear-gradient(165deg, #35c07d, #1a8c4b); }
.hero.ok-out { background: linear-gradient(165deg, #59a2e0, #2a639d); }
.hero.warn { background: linear-gradient(165deg, #f0ad4a, #d3861a); }
.hero.bad { background: linear-gradient(165deg, #e26a5f, #c0392f); }
.hero-icon {
  width: 62px; height: 62px; line-height: 62px; margin: 0 auto 10px;
  border-radius: 50%; background: rgba(255, 255, 255, .22);
  font-size: 34px; font-weight: 700;
}
.hero-big { font-size: 42px; font-weight: 800; letter-spacing: 4px; line-height: 1.15; }
.hero-time { font-size: 17px; opacity: .95; margin-top: 6px; font-variant-numeric: tabular-nums; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.hero-tag { background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.hero-note { font-size: 15px; margin-top: 12px; opacity: .97; }
.hero-next { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .28); font-size: 15.5px; }
.hero-greet {
  margin-top: 12px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, .18);
  border-radius: 12px;
  font-size: 15.5px;
  line-height: 1.6;
  letter-spacing: .3px;
}

.status-strip {
  border-radius: 14px; padding: 14px 16px; margin-bottom: 14px;
  border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow);
}
.status-strip.can { border-color: #bfe6cd; background: linear-gradient(180deg, #f2fdf6, #fff); }
.status-strip.wait { border-color: #f0dcb6; background: linear-gradient(180deg, #fffaf0, #fff); }
.ss-main { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 700; }
.status-strip.can .ss-main { color: #15693c; }
.status-strip.wait .ss-main { color: #8c6417; }
.ss-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #2bb673; flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(43, 182, 115, .22);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.ss-sub { font-size: 13.5px; color: var(--muted); margin-top: 5px; }

.today-card {
  position: relative; border-radius: 14px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px;
}
.tc-chip {
  position: absolute; top: 12px; right: 14px; font-size: 12.5px; padding: 2px 10px;
  border-radius: 999px; background: #eef1f4; color: var(--muted);
}
.tc-chip.on { background: #e6f6ec; color: var(--green); font-weight: 600; }
.tc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-right: 76px; }
.tc-grid > div { display: flex; flex-direction: column; }
.tc-grid span { font-size: 12px; color: var(--muted); }
.tc-grid b { font-size: 19px; font-variant-numeric: tabular-nums; }
.tc-duty { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 420px) { .tc-grid { grid-template-columns: repeat(2, 1fr); padding-right: 0; padding-top: 22px; } }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-row { display: flex; gap: 10px; align-items: flex-start; }
.tl-idx {
  flex: 0 0 26px; height: 26px; line-height: 26px; border-radius: 50%;
  background: #eef6ff; color: var(--blue); font-size: 13px; font-weight: 700; text-align: center;
}
.tl-body { flex: 1 1 auto; min-width: 0; }
.tl-times {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 600;
}
.tl-arrow { color: var(--muted); font-weight: 400; }
.tl-out { color: var(--blue); }
.tl-open { color: var(--orange); font-size: 15px; }
.tl-dur { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: auto; }
.tl-point { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.fold {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden;
}
.fold > summary {
  cursor: pointer; padding: 13px 16px; font-size: 15px; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "展开"; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.fold[open] > summary::after { content: "收起"; }
.fold-body { padding: 0 16px 16px; }
.fold-body .steps { margin-top: 0; }
.me-wrap .panel { border-radius: 12px; }

/* ============================================================ 值班表
   改版重写 style.css 时，下面这几段被当成旧样式删掉了，但模板还在用 →
   值班表页 / 首页值班卡片 / 后台值班表页 全掉了样式（卡片没了边框和栅格，挤成一列）。
   这里按原版 style.css 的取值原样补回，值班表恢复原来的样子。 */
.duty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.duty-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; box-shadow: var(--shadow); }
.duty-card.arrived { border-color: #bfe6cd; background: #f4fdf7; }
/* 已签退：蓝色调，与已到岗（绿色）区分开 */
.duty-card.out { border-color: #bfd9f2; background: #f4f8fd; }
.duty-name { font-size: 17px; font-weight: 700; }
.duty-class { font-size: 12.5px; color: var(--muted); }
.duty-state { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.duty-card.arrived .duty-state { color: var(--green); font-weight: 600; }
.duty-card.out .duty-state { color: var(--blue); font-weight: 600; }
.duty-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.duty-col-head { font-weight: 700; margin-bottom: 6px; }
.duty-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.duty-list li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.duty-cls { color: var(--muted); }
.duty-tt { font-weight: 600; }
.duty-banner { font-size: 16px; }
.result-duty { font-size: 14px; opacity: .93; margin-top: 8px; }
/* 后台值班表页：楼层小标题 / 单双日切换 / 小复选框 */
.floor-head { font-size: 15px; margin: 18px 0 6px; padding: 2px 0 2px 8px; border-left: 4px solid var(--blue); }
.tabs { display: flex; gap: 8px; margin: 0 0 12px; }
.mini-check { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.mini-check input { width: auto; }

/* ------------------------------------------------------ 打卡点 / 临时码
   同样是被删掉但模板还在用的一段。 */
.point-card {
  display: flex;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.point-card.dim { opacity: .55; }
.point-main { flex: 1 1 auto; min-width: 0; }
.point-side { flex: 0 0 140px; text-align: center; }
.point-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.point-name { font-size: 18px; font-weight: 700; }
.point-code { font-size: 15px; letter-spacing: 2px; }
.point-ops { display: flex; gap: 6px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.url-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.url-label { font-size: 12.5px; color: var(--muted); flex: 0 0 100%; }
.codes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.code-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}
.code-card.dim { opacity: .55; }
.code-big { font-size: 30px; font-weight: 800; letter-spacing: 6px; margin: 8px 0 4px; }
.code-state { display: flex; gap: 8px; justify-content: center; align-items: center; margin-bottom: 6px; }

/* 无排班打卡：问「替谁值班」的卡片（me.html 里的 panel sub-ask） */
.sub-ask { border-color: #f0c98a; background: #fffdf6; }
.sub-ask h2 { color: #8c6417; }
.sub-ask .form-actions { justify-content: flex-start; }
/* 后台顶栏副标题 / 左对齐小字 */
.brand-sub { font-size: 12.5px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.left { text-align: left; }

/* ------------------------------------------------------------ 顶栏 / 页脚 */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-weight: 700; color: var(--text); }
.mainnav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.mainnav a { color: var(--muted); }
.mainnav a:hover { color: var(--blue); }
.logout { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.logout .who { font-size: 13px; color: var(--muted); }
/* 顶栏右侧：值班大屏按钮 + 账号 + 退出 */
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-right .logout { margin-left: 0; }
.screen-btn { color: var(--blue); white-space: nowrap; }
.screen-btn:hover { background: #eef5fd; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 16px; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; }
