/* ============================================================
   L1 通用组件层样式（school）
   - 只补充 app.css 里没有的少量组件 class，不覆盖既有样式，
     因此接入后各页面观感与改动前保持一致。
   - 变量沿用 app.css 的 :root 定义（--navy/--gold/--teal/--line/...）。
   ============================================================ */

/* ---------- 图标 ---------- */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 1em;
  height: 1em;
  vertical-align: -0.145em;
  margin-right: 0.28em;
  flex: none;
}
.btn .ico { stroke-width: 1.8; }
.ico-2 { width: 1.25em; height: 1.25em; }
.ico-lg { width: 1.6em; height: 1.6em; }

/* ---------- 图表 ---------- */
a.bar-item { text-decoration: none; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
a.bar-item:hover { background: #f5f9f8; }
a.bar-item:hover .bar-val { color: var(--teal); }

.donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 4px 0; }
.donut {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
}
.donut-hole {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}
.donut-hole strong { font-size: 19px; font-weight: 700; }
.donut-hole small { font-size: 11px; color: var(--muted); }
.donut-legend { display: flex; flex-direction: column; gap: 5px; font-size: 12px; min-width: 140px; }
.donut-item { display: flex; align-items: center; gap: 6px; }
.donut-item i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.donut-item-label { color: var(--muted); }
.donut-item-value { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- 折叠区块（原生 details，无 JS） ---------- */
.ui-fold {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  padding: 0 12px;
  margin-bottom: 10px;
}
.ui-fold[open] { padding-bottom: 10px; }
.ui-fold > summary {
  cursor: pointer;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--navy);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ui-fold > summary::-webkit-details-marker { display: none; }
.ui-fold > summary::before {
  content: '▸';
  color: var(--muted);
  font-size: 11px;
  transition: transform .15s ease;
}
.ui-fold[open] > summary::before { content: '▾'; }
.ui-fold-body { font-size: 13px; }

/* ---------- 批量操作 ---------- */
.bulk-form { margin: 0 0 8px; }
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #fffdf5;
  border: 1px solid #efe4bd;
  border-radius: 10px;
  padding: 7px 10px;
}
.bulk-count { font-size: 12px; color: var(--muted); }
.bulk-count b { color: var(--ink); font-size: 13px; }
.bulk-bar select { width: auto; min-width: 150px; }
.bulk-bar input[data-bulk-remark] { width: auto; min-width: 200px; flex: 1 1 200px; max-width: 380px; }
.bulk-bar input[data-bulk-score] { width: 76px; min-width: 76px; }
.bulk-bar input[data-bulk-remark], .bulk-bar input[data-bulk-score] { padding: 5px 8px; font-size: 12px; }
.bulk-hint { font-size: 12px; color: var(--muted); margin-left: auto; }
input[type="checkbox"].bulk-check {
  width: 15px;
  height: 15px;
  min-width: 0;
  padding: 0;
  margin: 0;
  vertical-align: -2px;
  accent-color: var(--teal);
  cursor: pointer;
}
.data tr.row-on > td { background: #fffdf5; }

/* ---------- 导入面板 ---------- */
.import-fields { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.import-fields ol {
  margin: 4px 0 6px 20px;
  padding: 0;
  font-size: 12px;
  color: #475467;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 2px 14px;
}

/* ---------- 其它小工具 ---------- */
.kpi .num a { border-bottom-style: dotted; }
.muted-note { font-size: 12px; color: var(--muted); }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }

/* 图标按钮内部不留右间距，保持视觉居中 */
.icon-btn .ico { margin-right: 0; }
.m-nav a .ico { margin-right: 0; }

/* 整行可点（data-row-href） */
.data tr.row-click { cursor: pointer; }
.data tr.row-click:hover > td { background: #f6fbfa; }
.data tr.row-click input.bulk-check { cursor: pointer; }

/* 提交中的按钮 */
.btn.is-loading { opacity: .72; cursor: progress; }

@media (max-width: 720px) {
  .bulk-hint { display: none; }
  .donut-wrap { gap: 12px; }
  .ui-fold > summary { padding: 12px 0; }
}

/* ============================================================
   L2 顶栏 / 侧栏 / 弹层（本轮新增）
   仅新增 class，并对 app.css 的少量规则做「不改观感」的微调
   （例如顶栏标题容器从 flex:1 挪到 .tb-title 上）。
   ============================================================ */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 顶栏：标题区 ---------- */
.topbar-app { padding: 8px 14px; gap: 8px; }
.topbar-app .tb-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.topbar-app .tb-title h1 { margin: 0; font-size: 15px; font-weight: 650; flex: none; max-width: 26em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-app .tb-title h1 .muted { font-weight: 500; font-size: 12px; }
.tb-crumb { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16em; }
.topbar-back { display: inline-flex; align-items: center; gap: 2px; }
.topbar-back .ico { margin-right: 0; }
/* 返回目标名（如「数据总控看板」）：宽屏显示，窄屏只留「返回」，避免顶栏被挤爆 */
.tb-back-label {
    font-size: 12px; color: var(--muted); max-width: 12em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 1100px) {
    .tb-back-label { display: none; }
}

/* ---------- 顶栏：全局搜索 ---------- */
.tb-search { position: relative; display: flex; align-items: center; flex: 0 1 300px; min-width: 150px; }
.tb-search input { height: 34px; padding: 6px 46px 6px 30px; font-size: 13px; border-radius: 8px; }
.tb-search-ico { position: absolute; left: 9px; color: var(--muted); display: inline-flex; pointer-events: none; }
.tb-search-ico .ico { margin: 0; width: 15px; height: 15px; }
.tb-search-kbd { position: absolute; right: 8px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; pointer-events: none; }

/* ---------- 顶栏：下拉容器（消息 / 搜索 / 用户） ---------- */
.tb-drop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 45;
  min-width: 260px; max-width: min(420px, 92vw);
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(8,20,33,.16);
  padding: 8px; font-size: 13px;
}
.tb-search .tb-drop { left: 0; right: auto; width: min(520px, 92vw); max-width: none; min-width: 320px; }
.tb-drop-wide { width: min(430px, 92vw); padding: 0; }
.tb-drop-user { width: 288px; padding: 0; }
.tb-loading { padding: 14px; color: var(--muted); font-size: 12px; }

/* ---------- 顶栏：快捷动作 ---------- */
.tb-quick { display: flex; gap: 6px; flex-shrink: 0; }
.tb-quick-btn { display: inline-flex; align-items: center; gap: 2px; background: #fff; color: var(--navy); border: 1px solid var(--line); }
.tb-quick-btn:hover { background: #eef6f5; color: var(--teal); border-color: #b6d8d3; }
.tb-quick-btn .ico { margin-right: 0; }
.tb-campus { flex: 0 1 150px; }
.tb-campus select { width: auto; min-width: 120px; height: 34px; padding: 4px 8px; font-size: 13px; }

/* ---------- 顶栏：用户菜单 ---------- */
.tb-msg { position: relative; display: inline-flex; flex: none; }
.tb-user { position: relative; flex-shrink: 0; }
.tb-user-btn {
  display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px 0 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.tb-user-btn:hover { background: #f8fafc; }
.tb-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: #1c1403; font-weight: 700; font-size: 13px;
}
.tb-user-name { font-size: 13px; font-weight: 650; }
.tb-user-role { font-size: 11px; color: var(--muted); }

.tb-drop-h { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.tb-drop-h strong { font-size: 13px; }
.tb-drop-h .muted { font-size: 11px; }
.tb-drop-list { padding: 6px; display: flex; flex-direction: column; }
.tb-drop-list a { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 8px; color: var(--ink); font-size: 13px; }
.tb-drop-list a:hover { background: #f3f6f9; color: var(--navy); }
.tb-drop-list a.on { background: #fff8e1; }
.tb-drop-list a.danger { color: var(--danger); }
.tb-drop-list a em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); }
.tb-drop-demo a { font-size: 12px; }
.tb-drop-demo a.on { background: #eef6f5; font-weight: 650; }
.tb-drop-list a em { max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 消息面板 ---------- */
.pm-head { display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); padding: 8px 10px 4px; }
.pm-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.pm-tab { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; background: #f2f4f7; color: #475467; font-size: 12px; }
.pm-tab:hover { background: #e9eef3; color: var(--navy); }
.pm-tab.on { background: var(--navy); color: #fff; }
.pm-tab em { font-style: normal; font-size: 11px; opacity: .8; }
.pm-all { align-self: flex-end; font-size: 12px; padding-bottom: 4px; }
.pm-list { max-height: 62vh; overflow: auto; padding: 4px; }
.pm-item { display: flex; gap: 8px; padding: 8px 9px; border-radius: 9px; color: var(--ink); }
.pm-item:hover { background: #f6f9fb; }
.pm-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; background: #98a2b3; }
.pm-dot.danger { background: #d92d20; }
.pm-dot.warn { background: #f79009; }
.pm-dot.sea { background: #667085; }
.pm-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pm-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-detail { font-size: 12px; color: #475467; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-meta { font-size: 11px; color: var(--muted); }
.pm-empty { padding: 18px 14px; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ---------- 搜索结果面板 ---------- */
.ps-panel { max-height: 62vh; overflow: auto; }
.ps-kw { padding: 8px 12px 4px; font-size: 12px; color: var(--muted); }
.ps-group { padding: 4px 6px 8px; }
.ps-group-h { font-size: 11px; color: var(--muted); padding: 4px 7px; letter-spacing: .04em; }
.ps-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--ink); }
.ps-item:hover { background: #f6f9fb; }
.ps-main { display: flex; flex-direction: column; min-width: 0; }
.ps-title { font-size: 13px; }
.ps-note { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-empty { padding: 16px 14px; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ---------- 侧栏：菜单筛选与图标条 ---------- */
.sidebar { width: 216px; }
.nav-modes { display: flex; gap: 4px; padding: 8px 10px 0; }
.nav-modes button {
  flex: 1; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: #b6c6d6; font-size: 11px; padding: 3px 0; border-radius: 6px; cursor: pointer;
}
.nav-modes button:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-modes button.on { background: var(--gold); border-color: var(--gold); color: #1c1403; font-weight: 700; }
.nav-filter { padding: 8px 10px 4px; }
.nav-filter input { height: 30px; padding: 4px 8px; font-size: 12px; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #e8eef4; }
.nav-filter input::placeholder { color: #7f94a8; }
.nav-block-h { gap: 6px; }
.nav-g-ico { width: 14px; height: 14px; margin-right: 0; opacity: .85; }
.nav-g-label { flex: 1; }
.sidebar nav .nav-item { display: flex; align-items: center; gap: 7px; color: #9eb0c2; padding: 5px 10px 5px 12px; border-radius: 6px; font-size: 13px; }
.nav-i-ico { width: 14px; height: 14px; margin-right: 0; opacity: .7; flex: none; }
.sidebar nav .nav-item.active .nav-i-ico { opacity: 1; }
.nav-no-hit { padding: 10px 12px; font-size: 12px; color: #8aa0b5; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding: 6px; }
.sidebar-foot .nav-help-item { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; color: #cfe0ee; margin: 0; }
.sidebar-foot .nav-help-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-foot a.nav-help-item { color: #cfe0ee; }

/* 图标条模式：只留图标，把宽度还给数据 */
body.nav-icons .sidebar { width: 58px; }
body.nav-icons .brand,
body.nav-icons .nav-modes,
body.nav-icons .nav-filter,
body.nav-icons .nav-g-label,
body.nav-icons .nav-block-h::after,
body.nav-icons .nav-item span,
body.nav-icons .sidebar-foot span,
body.nav-icons .sidebar-foot a span { display: none; }
body.nav-icons .sidebar-head { justify-content: center; padding: 12px 6px; }
body.nav-icons .nav-block-h { justify-content: center; }
body.nav-icons .sidebar nav { padding: 6px 4px; }
body.nav-icons .sidebar nav .nav-item,
body.nav-icons .sidebar nav .nav-block > a { justify-content: center; padding: 7px 4px; }
body.nav-icons .nav-i-ico { width: 17px; height: 17px; opacity: .9; }
body.nav-icons .sidebar-foot .nav-help-item { justify-content: center; }
html.pre-nav-icons .sidebar { width: 58px; }
html.pre-nav-hidden .sidebar { display: none; }
@media (max-width: 980px) {
  body.nav-icons .sidebar { width: min(280px, 88vw); }
  body.nav-icons .brand, body.nav-icons .nav-filter, body.nav-icons .nav-g-label, body.nav-icons .nav-item span { display: revert; }
  body.nav-icons .sidebar nav .nav-item { justify-content: flex-start; padding: 8px 10px; }
}
/* 大屏「隐藏」= 真的把侧栏让出来，顶栏的汉堡按钮会成为唯一入口（app.css 已保证
   nav-hidden 时顶栏按钮可见），所以不会出现「关掉就再也打不开」的死角。 */
@media (min-width: 981px) {
  body.nav-hidden .sidebar { display: none; }
}

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 24px; z-index: 30;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  box-shadow: 0 8px 20px rgba(8,20,33,.14); cursor: pointer; font-size: 15px;
}
.to-top:hover { background: #eef6f5; color: var(--teal); }

/* ---------- 大屏指标块 ---------- */
.big-kpi {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px;
}
.big-kpi-num { font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }
.big-kpi-num a { color: inherit; text-decoration: none; }
.big-kpi-num a:hover { color: var(--gold-2); }
.big-kpi-num small { font-size: 15px; margin-left: 4px; font-weight: 600; opacity: .75; }
.big-kpi-label { font-size: 15px; opacity: .9; }
.big-kpi-note { font-size: 12px; opacity: .6; }
.big-kpi.danger .big-kpi-num { color: #ff8d80; }
.big-kpi.warn .big-kpi-num { color: #ffcf7a; }
.big-kpi.ok .big-kpi-num { color: #7ee2b8; }
.big-kpi.gold .big-kpi-num { color: var(--gold-2); }

/* ---------- 二维码分享卡 ---------- */
.qr-share { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.qr-share-code { padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: center; flex: none; }
.qr-share-code .qr-code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); margin-top: 4px; }
.qr-share-side { min-width: 220px; flex: 1; }
.qr-share-url {
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all;
  background: #f7f9fb; border: 1px dashed var(--line); border-radius: 8px; padding: 7px 9px; margin-bottom: 8px;
}

/* ---------- 弹层 ---------- */
.sp-modal {
  border: 0; border-radius: 14px; padding: 0; width: min(560px, 92vw);
  box-shadow: 0 24px 60px rgba(8,20,33,.28);
}
.sp-modal::backdrop { background: rgba(8,20,33,.42); }
.sp-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sp-modal-head h3 { margin: 0; font-size: 15px; }
.sp-modal-body { padding: 14px; font-size: 13px; max-height: 70vh; overflow: auto; }
.sp-modal-body .card { border: 0; padding: 0; margin: 0; }

/* ---------- 懒加载骨架 ---------- */
.lazy-block { position: relative; }
.lazy-skeleton { padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; background: #fbfcfd; }
.lazy-block.is-loaded .lazy-skeleton { display: none; }

/* ---------- 省市区联动 ---------- */
.region-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; }

/* ---------- 主题选择 ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.theme-card {
  display: flex; flex-direction: column; gap: 3px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff;
}
.theme-card:hover { border-color: #cbd5e1; }
.theme-card.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,162,39,.18); }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card strong { font-size: 13px; }
.theme-card .muted { font-size: 11px; line-height: 1.5; }
.theme-swatch { height: 26px; border-radius: 7px; margin-bottom: 4px; }
.theme-default { background: linear-gradient(90deg, #0c1c2e 0 45%, #c9a227 45% 60%, #f3f5f7 60%); }
.theme-sea { background: linear-gradient(90deg, #0b3b46 0 45%, #0f766e 45% 60%, #ecfdf5 60%); }
.theme-warm { background: linear-gradient(90deg, #3a2a12 0 45%, #b45309 45% 60%, #fff7ed 60%); }
.theme-dark { background: linear-gradient(90deg, #0b1220 0 45%, #1f2b3f 45% 60%, #334155 60%); }

/* ---------- 帮助抽屉正文 ---------- */
.help-article h4 { margin: 14px 0 4px; font-size: 13px; color: #0c1c2e; }
.help-article p { margin: 0 0 10px; }
.help-article b { color: #0c1c2e; }

/* ---------- 信息密度 ---------- */
body.density-compact .content { padding: 8px 12px 12px; }
body.density-compact table.data th, body.density-compact table.data td { padding: 4px 6px; }
body.density-compact .card { padding: 9px 11px; margin-bottom: 8px; }
body.density-compact .kpi { padding: 8px 10px; }
body.density-compact .kpi .num { font-size: 19px; }
body.density-compact .topbar-app, body.density-compact .sidebar nav .nav-item { padding-top: 3px; padding-bottom: 3px; }
body.density-loose table.data th, body.density-loose table.data td { padding: 11px 10px; font-size: 14px; }
body.density-loose .card { padding: 16px 18px; }
body.density-loose .kpi .num { font-size: 26px; }

/* ---------- 登录页：演示增强 ---------- */
.login__badge {
  margin-left: auto; font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: rgba(201,162,39,.18); color: var(--gold-2); border: 1px solid rgba(201,162,39,.35);
}
.hero__tips { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.hero__tip { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 9px 12px; }
.hero__tip strong { display: block; font-size: 12px; color: var(--gold-2); margin-bottom: 3px; }
.hero__tip span { font-size: 12px; line-height: 1.6; color: #c9d6e2; }
.role-block { margin-bottom: 10px; }
.role-block__label { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.role-block__label strong { font-size: 13px; color: #fff; }
.role-block__label .muted { font-size: 11px; color: rgba(255,255,255,.5); }
.role-block__can { margin: 0 0 6px; padding-left: 16px; font-size: 11px; line-height: 1.7; color: rgba(255,255,255,.62); }
.panel__form-wrap > summary { cursor: pointer; font-size: 12px; color: rgba(255,255,255,.7); margin: 6px 0 8px; }
.panel__form-wrap[open] > summary { color: #fff; }
.chip-btn { text-decoration: none; }

/* ---------- 窄屏适配 ---------- */
@media (max-width: 1280px) {
  .tb-crumb { display: none; }
  .tb-search { flex: 0 1 190px; }
}
@media (max-width: 1100px) {
  .tb-quick { display: none; }
}
@media (max-width: 860px) {
  .tb-search { display: none; }
  .tb-user-name, .tb-user-role { display: none; }
  .tb-user-btn { padding: 0 6px; }
}

/* ---------- 轻提示（替代 window.alert） ---------- */
.sp-toast-box {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; max-width: 92vw;
}
.sp-toast {
  background: #10233a; color: #fff; font-size: 13px; line-height: 1.5;
  padding: 9px 16px; border-radius: 999px; box-shadow: 0 10px 26px rgba(8,20,33,.24);
  animation: sp-toast-in .2s ease-out; max-width: 100%;
}
.sp-toast.danger { background: #b42318; }
.sp-toast.warn { background: #b54708; }
.sp-toast.ok { background: #067647; }
.sp-toast.out { opacity: 0; transform: translateY(-6px); transition: all .24s ease; }
@keyframes sp-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 确认弹层（替代 window.confirm） ---------- */
.sp-confirm { width: min(420px, 92vw); }
.sp-confirm .sp-modal-body { display: flex; flex-direction: column; gap: 4px; }
.sp-confirm .sp-modal-body p { margin: 0 0 10px; font-size: 13px; line-height: 1.7; color: #344054; }
.sp-confirm .row-actions { margin: 0; justify-content: flex-end; }
.sp-confirm .row-actions .btn { min-width: 88px; justify-content: center; }

/* ---------- 校验失败态 ---------- */
.is-bad, input.is-bad:focus, select.is-bad, textarea.is-bad {
  border-color: #d92d20 !important;
  box-shadow: 0 0 0 3px rgba(217,45,32,.12) !important;
}
.phone-hint { display: block; font-size: 11px; color: #b42318; margin-top: 3px; }
.phone-hint[hidden] { display: none; }
[data-phone-hint] { color: #b42318; }
[data-phone-hint][hidden] { display: none; }

/* ---------- 日期区间 ---------- */
.date-range { display: contents; }.range-quick { display: flex; align-items: flex-end; gap: 4px; flex-wrap: wrap; padding-bottom: 1px; }
.range-quick .btn { padding: 3px 9px; font-size: 12px; font-weight: 500; }
.range-quick .btn:hover { background: #eef6f5; color: var(--teal); border-color: #b6d8d3; }
input[type="date"] { cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .65; }
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* ---------- 分页：跳页表单 ---------- */
.pager { flex-wrap: wrap; }
.pager-jump { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; }
.pager-jump .f { flex-direction: row; align-items: center; margin: 0; }
.pager-jump input[type="number"] { width: 68px; height: 30px; padding: 3px 6px; font-size: 12px; text-align: center; }
.pager-jump .btn { height: 30px; padding: 3px 10px; font-size: 12px; }





/* ---------- 人员档案（/contacts/{id}）：头部头像与档案卡 ---------- */
.avatar-lg {
  width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: #1c1403;
  font-weight: 800; font-size: 24px; letter-spacing: .5px;
}
@media (max-width: 720px) { .avatar-lg { width: 44px; height: 44px; font-size: 19px; } }

/* ---------- 现场留痕图卡：图 + 一行说明（时间/地点/现象） ----------
   app.css 里的 .shot 是 84×64 的纯缩略图，甲方看留痕时太小也看不到说明，
   这里放大到可辨认尺寸，并把 note 作为图注显示（留痕可追溯）。 */
.shots { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.shots .shot {
  display: block; width: 158px; height: auto; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--card-2, #f6f8fb);
}
.shots .shot a { display: block; }
.shots .shot img,
.shots .shot video { display: block; width: 100%; height: 112px; object-fit: cover; background: #0f172a; }
.shots .shot figcaption {
  display: block; padding: 6px 8px; font-size: 12px; line-height: 1.45;
  color: var(--muted, #64748b); border-top: 1px solid var(--line);
}
@media (max-width: 720px) {
  .shots .shot { width: calc(50% - 5px); }
  .shots .shot img, .shots .shot video { height: 96px; }
}

/* 表格单元里的留证小图：不合格项一行里直接能看到证据，不用跳页 */
.mini-shot {
  display: inline-block; margin-top: 6px; border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden; vertical-align: top;
}
.mini-shot img { display: block; width: 96px; height: 64px; object-fit: cover; }
