/* ===== 设计令牌 ===== */
:root {
  --primary: #2f6bff;
  --primary-weak: #eaf1ff;
  --sidebar-w: 226px;
  --topbar-h: 62px;
  --radius: 12px;
  --radius-card: 16px;
  --t1: #1b2333;   /* 主文字 */
  --t2: #5c6780;   /* 次文字 */
  --t3: #8e99b0;   /* 弱文字 */
  --line: #eef1f6;
  --bg: #f5f7fb;
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(27,35,51,.04), 0 2px 8px rgba(27,35,51,.04);
  --shadow-md: 0 4px 16px rgba(27,35,51,.08), 0 1px 3px rgba(27,35,51,.06);
  --shadow-float: 0 18px 50px rgba(31,52,120,.18), 0 6px 18px rgba(31,52,120,.12);
  --ok: #1fab6b; --warn: #f5a623; --danger: #f0533a; --info: #2f6bff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--t1); background: var(--bg); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--primary); text-decoration: none; }

/* ===== 系统设置（认证与安全） ===== */
.settings-head { line-height: 1.35; }
.settings-title { font-size: 15px; font-weight: 600; color: var(--t1); }
.settings-sub { font-size: 12px; color: var(--t3); margin-top: 2px; }
.settings-card { max-width: 760px; }
.settings-ico {
  width: 30px; height: 30px; margin-right: 10px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-weak); color: var(--primary);
}
.settings-ico svg { width: 18px; height: 18px; }
.settings-desc { font-size: 13px; line-height: 1.75; color: var(--t2); margin: 0 0 18px; }
.settings-row {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fbfcff;
}
.settings-row-main { flex: 1; min-width: 0; }
.settings-row-title { font-size: 14px; font-weight: 600; color: var(--t1); }
.settings-row-sub { font-size: 12px; color: var(--t3); margin-top: 4px; line-height: 1.6; }
.sw {
  position: relative; width: 46px; height: 26px; flex: none; padding: 0;
  border: 1px solid #d9e0ec; border-radius: 999px; background: #e6eaf2;
  transition: background .18s, border-color .18s;
}
.sw .sw-knob {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(27,35,51,.18);
  transition: left .18s;
}
.sw.on { background: var(--primary); border-color: var(--primary); }
.sw.on .sw-knob { left: 22px; }
.settings-divider { height: 1px; background: var(--line); margin: 18px 0; }
.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.settings-cell { padding: 12px 14px; border-radius: 10px; background: var(--bg); }
.settings-cell-k { font-size: 12px; color: var(--t3); }
.settings-cell-v { font-size: 13px; font-weight: 600; color: var(--t1); margin-top: 4px; }
.settings-note {
  max-width: 760px; margin-top: 14px; padding: 12px 14px;
  border-left: 3px solid var(--warn); border-radius: 8px; background: #fffaf0;
  font-size: 12.5px; line-height: 1.75; color: #8a6420;
}
.settings-note-k { font-weight: 600; margin-right: 8px; }
.settings-meta { max-width: 760px; margin-top: 10px; font-size: 12px; color: var(--t3); }

.settings-tip {
  margin: 10px 0 0; padding: 10px 14px; border-radius: 10px;
  background: var(--primary-weak, #eef4ff); color: var(--t1);
  font-size: 12.5px; line-height: 1.6;
}
.settings-actions { display: flex; gap: 10px; margin-top: 16px; }
.settings-actions .btn { min-width: 112px; }


/* ===== 趟次服务总览（总进度盘）===== */
.ov-modal { max-width: min(1400px, 96vw); }
.ov-sub { font-size: 12.5px; color: var(--t3); }
.ov-card { margin-bottom: 14px; }
.ov-tip {
  margin-top: 8px; font-size: 12px; color: #8a6420;
  background: #fffaf0; border-left: 3px solid var(--warn); border-radius: 8px; padding: 8px 12px;
}
/* 图例 */
.ov-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--t2); margin-left: 14px; }
.ov-legend:first-of-type { margin-left: 0; }
.ov-legend-pct { color: var(--t3); font-weight: 600; }
.ov-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ov-dot.none { background: #dfe3ec; }
.ov-dot.ok { background: #1fab6b; }
.ov-dot.warn { background: #f5a623; }
/* 矩阵：环节 × 团 */
.ov-matrix-wrap { overflow-x: auto; margin: 0 -2px; }
.ov-matrix { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.ov-matrix th, .ov-matrix td { padding: 5px 4px; text-align: center; }
.ov-matrix thead th {
  color: var(--t2); font-weight: 600; background: #fafbfe;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; white-space: nowrap;
}
.ov-matrix tbody tr:hover td { background: #fafbff; }
.ov-stage-col {
  position: sticky; left: 0; z-index: 1; background: #fff; text-align: left !important;
  min-width: 168px; padding-left: 10px !important; padding-right: 14px !important;
  border-right: 1px solid var(--line);
}
.ov-matrix thead .ov-stage-col { background: #fafbfe; z-index: 2; }
.ov-stage-i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; margin-right: 7px; border-radius: 5px;
  background: var(--primary-weak); color: var(--primary); font-size: 11px; font-weight: 700;
}
.ov-group-col { min-width: 62px; font-size: 11.5px; }
.ov-sum-col { min-width: 86px; white-space: nowrap; padding-left: 10px !important; }
.ov-sum-ok { color: var(--ok); font-weight: 600; margin-right: 8px; }
.ov-sum-warn { color: #c8821a; font-weight: 600; margin-right: 8px; }
.ov-sum-none { color: var(--t3); margin-right: 8px; }
/* 单元格：团号小方块，三态 */
.ov-dot-cell {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 50px; padding: 3px 7px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; cursor: default;
}
.ov-dot-cell.none { background: #eef0f5; color: #a8b0c2; }
.ov-dot-cell.ok { background: #e6f7ef; color: #128a52; }
.ov-dot-cell.warn { background: #fdf3e0; color: #b8730f; }

/* ===== 团服务周期（7 环节 × 工作条目 × 扫码确认） ===== */
/* 按钮组：卡片头部的并列按钮之间留出间距，避免文字贴在一起 */
.lc-actions { display: inline-flex; align-items: center; gap: 8px; }
/* 按钮内联图标：与文字之间 4px，尺寸 14px */
.btn .btn-ico { width: 14px; height: 14px; flex: 0 0 14px; display: inline-flex; }
.btn .btn-ico svg { width: 14px; height: 14px; }
/* 表格内的危险操作按钮：淡红描边，与普通按钮区分 */
.btn-danger-ghost { background: #fff; border-color: #f3d2cb; color: var(--danger); }
.btn-danger-ghost:hover { background: #fff3f1; border-color: var(--danger); }
/* 状态列：胶囊不换行，列宽足够 */
.lc-th-state { width: 104px; }
.lc-tag-pending { font-weight: 600; }
.lc-head { display: flex; flex-direction: column; gap: 8px; min-width: 260px; }
.lc-title { font-size: 15px; font-weight: 700; color: var(--t1); display: flex; align-items: baseline; gap: 10px; }
.lc-sub { font-size: 12.5px; font-weight: 400; color: var(--t3); }
.lc-progress { display: flex; align-items: center; gap: 10px; }
.lc-bar { width: 220px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.lc-bar-in { height: 100%; border-radius: 999px; background: var(--primary); transition: width .25s ease; }
.lc-ptext { font-size: 12.5px; color: var(--t2); white-space: nowrap; }

/* ===== 人数四段线：计划 → 应到 → 实到 → 返校 =====
   说明书：「计划人数（计调表）−行前请假→ 应到人数 −临时请假→ 实到人数 −中途离团→ 返校人数」
   数值由服务端算，前端只展示；无数据时显示「待扫码」，不用 0 冒充。 */
.lc-hc { margin: 0 0 14px; }
.lc-hc-line {
  display: flex; align-items: stretch; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 12px; background: #fbfcff; overflow: hidden;
}
.lc-hc-node {
  flex: 1 1 0; min-width: 118px; max-width: 260px; padding: 10px 16px;
  display: flex; flex-direction: column; gap: 3px; background: #fff;
}
.lc-hc-node.ok .lc-hc-k { color: var(--t3); }
.lc-hc-node.ok .lc-hc-v { color: var(--t1); }
.lc-hc-node.pending { background: #fbfcfe; }
.lc-hc-node.pending .lc-hc-v { color: var(--t3); font-size: 14px; font-weight: 500; padding: 4px 0 3px; }
.lc-hc-k { font-size: 11.5px; color: var(--t3); white-space: nowrap; }
.lc-hc-v { font-size: 20px; font-weight: 700; letter-spacing: -.3px; line-height: 1.25; white-space: nowrap; }
.lc-hc-arrow {
  flex: 0 0 auto; min-width: 96px; padding: 10px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: #f7f9fd; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.lc-hc-op { font-size: 11px; color: var(--t3); white-space: nowrap; }
.lc-hc-d { font-size: 13px; font-weight: 600; color: var(--danger); white-space: nowrap; }
/* 0 人是正常情况（灰色），>0 才需要警示（红） */
.lc-hc-d.zero { color: var(--t3); font-weight: 500; }
.lc-hc-d.none { color: var(--t3); font-weight: 400; }
/* 人事变动名单 */
.lc-hc-names {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 8px; font-size: 12px; color: var(--t2);
}
.lc-hc-names-k { color: var(--t3); }
.lc-hc-names-empty { color: var(--t3); }
.lc-hc-name { display: inline-flex; align-items: center; gap: 5px; }
.lc-hc-name-t {
  padding: 1px 7px; border-radius: 999px; font-size: 11.5px;
  background: #fdf3e0; color: #c8821a; white-space: nowrap;
}
.lc-hc-name-v { color: var(--t1); }
.lc-notice { margin-bottom: 12px; }
.lc-stage { margin-bottom: 14px; }
/* 条目表：容器可横向滚动，列宽不再被挤到换行 */
.lc-table-wrap { overflow-x: auto; margin: 0 -2px; }
.lc-table { min-width: 980px; }
.lc-table td { vertical-align: middle; }
.lc-table th { white-space: nowrap; }
.lc-table .input, .lc-table .select { width: 100%; }
.lc-select { margin-bottom: 6px; }
.lc-input { font-size: 12.5px; }
.lc-switch { display: inline-flex; align-items: center; cursor: pointer; }
.lc-switch input { display: none; }
.lc-track { width: 36px; height: 20px; border-radius: 999px; background: #d8dde8; position: relative; transition: background .18s ease; display: inline-block; }
.lc-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s ease; }
.lc-switch input:checked + .lc-track { background: var(--primary); }
.lc-switch input:checked + .lc-track::after { transform: translateX(16px); }
.lc-code { display: flex; align-items: center; gap: 8px; }
.lc-code code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; font-weight: 600; color: var(--t1); background: var(--bg); padding: 4px 8px; border-radius: 6px; letter-spacing: .8px; white-space: nowrap; }
.lc-qr { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.lc-doneby { font-size: 11.5px; color: var(--t3); margin-top: 4px; line-height: 1.45; }
.lc-doneby-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-doneby-time { display: block; white-space: nowrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; }
.lc-note-row td { padding-top: 0; border-bottom: 1px solid var(--line); }
.lc-note-row .lc-input { font-size: 12.5px; color: var(--t2); background: #fafbfe; }
.lc-note-row:hover .lc-input { color: var(--t1); }

.lc-abn {
  display: inline-block; font-size: 11.5px; color: #B4232C;
  background: #FDECEA; padding: 1px 7px; border-radius: 999px;
}
.lc-loc { font-size: 11.5px; color: var(--t3); font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }

.lc-role { display: inline-block; margin-left: 6px; font-size: 11.5px; color: var(--primary); background: var(--primary-weak); padding: 1px 7px; border-radius: 999px; }

/* ===== 登录页 ===== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #2f6bff 0%, #5a8bff 45%, #8fb0ff 100%);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 388px; background: #fff; border-radius: var(--radius-card);
  box-shadow: var(--shadow-float); padding: 36px 32px;
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-brand .logo { width: 40px; height: 40px; border-radius: 11px; background: var(--primary);
  display: flex; align-items: center; justify-content: center; color: #fff; }
.login-title { font-size: 22px; font-weight: 700; margin: 4px 0 2px; }
.login-sub { color: var(--t3); font-size: 13px; margin-bottom: 22px; }
.login-hint {
  margin-top: 18px; padding: 12px 14px; background: var(--primary-weak); border-radius: 10px;
  color: #2c4ea8; font-size: 12.5px; line-height: 1.6;
}
.login-err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 0; }

/* ===== 表单控件 ===== */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--t2); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #fff; color: var(--t1); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.textarea { resize: vertical; min-height: 80px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px; padding: 9px 16px; font-size: 14px;
  font-weight: 500; transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #2559e0; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--t1); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fff; border-color: #f5c6bd; color: var(--danger); }
.btn-danger:hover { background: #fff3f1; }
.btn-warn { background: #fff; border-color: #f3d9a6; color: #c8821a; }
.btn-warn:hover { background: #fff8ec; }
.btn-plain { background: transparent; color: var(--t2); }
.btn-plain:hover { color: var(--primary); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }
/* 小号按钮：表格内嵌操作用 */
.btn-mini { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
/* 兜底：没带变体类的小号按钮不应退化成浏览器默认灰底按钮。
   用 :not() 排除所有变体，保证 .btn-plain / .btn-assign 等不受影响。 */
.btn-mini:not(.btn-primary):not(.btn-ghost):not(.btn-danger):not(.btn-warn):not(.btn-plain):not(.btn-assign) {
  background: #fff; border-color: var(--line); color: var(--t2);
}
.btn-mini:not(.btn-primary):not(.btn-ghost):not(.btn-danger):not(.btn-warn):not(.btn-plain):not(.btn-assign):hover {
  border-color: var(--primary); color: var(--primary);
}
/* 「待分配」醒目按钮：橙色 + 轻微呼吸感，突出未指派状态 */
.btn-assign {
  background: #fff3e0; border-color: #f3c98a; color: #b96f0d; font-weight: 600;
  animation: wbpulse 1.8s ease-in-out infinite;
}
.btn-assign:hover { background: #ffe9c9; border-color: #eab469; }

/* ===== 布局 ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 0 18px;
  border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15px; }
.sidebar .brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--primary);
  display: flex; align-items: center; justify-content: center; color: #fff; }
.nav { flex: 1; overflow-y: auto; padding: 10px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--t2); font-size: 14px; cursor: pointer; margin-bottom: 2px; user-select: none;
}
.nav-item:hover { background: var(--bg); color: var(--t1); }
.nav-item.active { background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.nav-item .ico { width: 18px; height: 18px; flex: 0 0 18px; }
.nav-item .badge { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: var(--primary); color: #fff; }
.nav-sec { font-size: 11px; color: var(--t3); padding: 12px 12px 4px; }
.nav-item.nav-parent { cursor: default; color: var(--t1); font-weight: 600; }
.nav-item.nav-parent:hover { background: transparent; }
.nav-item.nav-sub { padding-left: 40px; font-size: 13px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: 0 0 var(--topbar-h); background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center;
  padding: 0 20px; position: sticky; top: 0; z-index: 5; gap: 12px;
}
.topbar .crumb { font-size: 15px; font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .who { display: flex; align-items: center; gap: 8px; color: var(--t2); font-size: 13px; }
.topbar .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-weak); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
.content { padding: 20px; overflow-x: hidden; }

/* ===== 卡片 ===== */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.card-h { display: flex; align-items: center; margin-bottom: 14px; }
.card-h .t { font-size: 15px; font-weight: 600; }
.card-h .spacer { flex: 1; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px 18px; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.stat .l { color: var(--t3); font-size: 13px; margin-top: 2px; }
.stat .v.warn { color: var(--warn); } .stat .v.danger { color: var(--danger); } .stat .v.ok { color: var(--ok); }

/* ===== 工具栏 / 筛选 ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; }

/* ===== 表格 ===== */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { color: var(--t2); font-weight: 600; background: #fafbfe; position: sticky; top: 0; }
.table tbody tr:hover { background: #fafbff; }
.table .ell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .ell:hover { white-space: normal; }
/* ===== 紧凑表格（趟次管理 / 团列表）：行更矮、留白更小 ===== */
.table.compact { font-size: 13px; }
.table.compact th, .table.compact td { padding: 8px 10px; }
.table.compact th { font-size: 12.5px; }
/* 操作列按钮组：一行排列，按钮之间留 6px，不再换行 */
.row-actions { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
/* v112：趟次操作列分两行——第一行查看类，第二行管理类；display:flex 为块级，两个 span 自然换行 */
.trip-ops { min-width: 300px; }
.trip-ops-row { display: flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.trip-ops-row + .trip-ops-row { margin-top: 6px; }
/* 数字 / 短码列：居中 + 等宽，便于纵向扫读 */
.tbl-num { text-align: center !important; }
.tbl-mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
/* 团号：加粗一点，是行的主标识 */
.tbl-key { font-weight: 600; color: var(--t1); }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: var(--primary-weak); color: var(--primary); white-space: nowrap; }
.tag.ok { background: #e6f7ef; color: var(--ok); }
.tag.warn { background: #fdf3e0; color: #c8821a; }
.tag.danger { background: #fdecea; color: var(--danger); }
.tag.plain { background: var(--bg); color: var(--t2); }
/* v127：已驳回行的原因摘要（悬浮看全文），克制的小字提示 */
.rej-reason { color: var(--danger); font-size: 12px; margin-left: 4px; cursor: help; }

/* ===== 抽屉 ===== */
.drawer-mask { position: fixed; inset: 0; background: rgba(20,28,48,.35); z-index: 30; display: flex; justify-content: flex-end; }
.drawer { width: 480px; max-width: 92vw; background: #fff; height: 100%; overflow-y: auto; box-shadow: var(--shadow-md); padding: 22px; }
.drawer-h { display: flex; align-items: center; margin-bottom: 16px; }
.drawer-h .t { font-size: 17px; font-weight: 700; } .drawer-h .spacer { flex: 1; }

/* ===== 模态 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(20,28,48,.4); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-float); padding: 24px; width: 440px; max-width: 100%; }
.modal-h { font-size: 17px; font-weight: 700; margin-bottom: 14px; }

/* ===== 分段控制 ===== */
.segment { display: inline-flex; background: var(--bg); border-radius: 10px; padding: 3px; gap: 2px; }
.segment .seg { padding: 6px 14px; border-radius: 8px; color: var(--t2); cursor: pointer; font-size: 13px; }
.segment .seg.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow-sm); }
/* v94b 教官列表选项卡：去掉浏览器默认按钮边框；选中纯蓝、非选中灰；贴近下方表格 */
.segment.instructor-tabs { margin-bottom: 0; }
.segment.instructor-tabs .seg {
  border: 0; background: #e9edf5; color: var(--t2);
}
.segment.instructor-tabs .seg.active {
  background: var(--primary); color: #fff; font-weight: 600; box-shadow: none;
}
.segment .seg-num {
  display: inline-block; min-width: 18px; margin-left: 5px; padding: 0 5px;
  border-radius: 999px; background: rgba(27,35,51,.08); color: var(--t2);
  font-size: 11px; font-weight: 600; line-height: 17px; text-align: center;
}
.segment.instructor-tabs .seg.active .seg-num {
  background: rgba(255,255,255,.24); color: #fff;
}

/* ===== 注册用户：口径说明条 ===== */
.ru-hint { padding: 9px 12px; border-radius: 10px; background: var(--bg); color: var(--t2); font-size: 12.5px; line-height: 1.6; margin-bottom: 14px; border-left: 3px solid var(--primary); }
.ru-hint::before { content: "口径 · "; color: var(--primary); font-weight: 600; }
/* v23：微信绑定列里的脱敏 openid 摘要，等宽小字，不与身份徽标抢视觉 */
.ru-wx-id { display: block; margin-top: 4px; font-size: 11.5px; color: var(--t2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .2px; }

/* ===== 权限勾选网格 ===== */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.perm-cell { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.perm-cell.on { border-color: var(--primary); background: var(--primary-weak); color: var(--primary); }

/* ===== 提示条 ===== */
.tip { padding: 10px 12px; border-radius: 10px; background: var(--primary-weak); color: #2c4ea8; font-size: 13px; margin-bottom: 14px; }
.tip.warn { background: #fdf3e0; color: #c8821a; }
.empty { text-align: center; color: var(--t3); padding: 40px 0; }

/* ===== 打印 ===== */
.print-sheet { background: #fff; }
@media print { body * { visibility: hidden; } .print-area, .print-area * { visibility: visible; } .print-area { position: absolute; left: 0; top: 0; width: 100%; } }

/* ===== 响应式：窄屏侧栏收起为图标条 ===== */
@media (max-width: 860px) {
  .sidebar { width: 64px; flex-basis: 64px; }
  .sidebar .brand span, .nav-item .label, .nav-sec, .nav-item .badge { display: none; }
  .nav-item { justify-content: center; padding: 12px 0; }
}

/* ===== 上传 / 加载反馈 ===== */
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: wbspin .7s linear infinite; vertical-align: -2px; flex: none; }
@keyframes wbspin { to { transform: rotate(360deg); } }
.up-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.up-bar > i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 3px; transition: width .2s ease; }
.up-bar.parsing > i { opacity: .5; animation: wbpulse 1.1s ease-in-out infinite; }
@keyframes wbpulse { 0%, 100% { opacity: .3; } 50% { opacity: .95; } }

/* ===== 宽屏编辑弹窗（趟次等字段较多的表单） ===== */
.modal.wide { width: min(1080px, 94vw); max-width: none; max-height: 90vh; display: flex; flex-direction: column; padding: 0; }
.modal.wide .modal-h { display: flex; align-items: center; gap: 12px; padding: 16px 22px; margin: 0; border-bottom: 1px solid var(--line); }
.modal.wide .modal-h .t { font-size: 17px; font-weight: 700; }
.modal.wide .modal-h .spacer { flex: 1; }
.modal.wide .modal-body { padding: 18px 22px 4px; overflow-y: auto; flex: 1; }
.modal.wide .modal-foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
.modal.wide .modal-foot .login-err { flex: 1; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 22px; }
.form-grid .field { margin-bottom: 14px; }

/* ===== 分页器 ===== */
.pager {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--t2);
}
.pager .spacer { flex: 1; }
.pager .pinfo { color: var(--t3); }
.pager .pbtn {
  min-width: 32px; height: 30px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--t1);
  font-size: 13px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.pager .pbtn:hover:not([disabled]) { border-color: var(--primary); color: var(--primary); }
.pager .pbtn.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager .pbtn[disabled] { opacity: .45; cursor: not-allowed; }
.pager .pbtn.dots { border-color: transparent; background: transparent; cursor: default; }
.pager .psize {
  height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px;
  background: #fff; color: var(--t1); font-size: 13px;
}

/* ===== 队伍展开行 ===== */
/* 展开按钮：带箭头指示当前状态 */
.t-expand {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); background: #fff; color: var(--t1);
  border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 500;
  transition: all .15s; white-space: nowrap;
}
.t-expand:hover { border-color: var(--primary); color: var(--primary); }
.t-expand .ar { font-size: 10px; transition: transform .18s; display: inline-block; }
.t-expand.open .ar { transform: rotate(90deg); }

/* 展开后的成员明细区 */
.t-detail { background: #fafbfe; }
.t-detail-inner { padding: 12px 16px 14px; }
.t-mem {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-top: 1px solid var(--line);
}
.t-mem:first-child { border-top: none; }
.t-mem .nm { font-size: 13.5px; font-weight: 500; }
.t-mem .sub { font-size: 12px; color: var(--t3); }
.t-mem .grow { flex: 1; }
.t-group-h {
  font-size: 12px; font-weight: 700; color: var(--t3);
  margin: 10px 0 4px; letter-spacing: .04em;
}
.t-group-h:first-child { margin-top: 0; }
.t-roster { display: flex; flex-wrap: wrap; gap: 6px; }
.t-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; font-size: 12px; background: #fff;
}
.t-chip .ty { font-size: 11px; padding: 0 5px; border-radius: 999px; }
.t-chip .ty.full { background: var(--primary-weak); color: var(--primary); }
.t-chip .ty.temp { background: #fdf3e0; color: #c8821a; }
.t-chip .ph { color: var(--t3); font-size: 11px; }

/* ===== 总教官选择器 ===== */
.chief-list { max-height: 320px; overflow-y: auto; }
.chief-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 8px; cursor: pointer; transition: all .15s; background: #fff;
}
.chief-item:hover { border-color: var(--primary); background: var(--primary-weak); }
.chief-item.on { border-color: var(--primary); background: var(--primary-weak); box-shadow: 0 0 0 3px rgba(47,107,255,.10); }
.chief-item .nm { font-size: 14px; font-weight: 600; color: var(--t1); }
.chief-item .ph { font-size: 12px; color: var(--t3); }

/* ===== 教官团队 / 执勤职位（v51：调度 / 接驳 两组） ===== */
/* car 仅作履职码 4 个车厢环节的展码授权透传，不在界面展示、不可配置；栅格 3 列 → 2 列 */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 860px) { .team-grid { grid-template-columns: 1fr; } }
.team-col {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  display: flex; flex-direction: column; overflow: hidden;
}
.team-col-h {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; background: var(--primary-weak); border-bottom: 1px solid var(--line);
}
.team-col-t { font-size: 13px; font-weight: 700; color: var(--primary); }
.team-col-n { font-size: 12px; color: var(--t2); }
.team-col-body { flex: 1; min-height: 120px; max-height: 300px; overflow-y: auto; padding: 10px 12px; }
.team-col-empty { font-size: 12px; color: var(--t3); padding: 14px 0; text-align: center; }
.team-col-add { padding: 10px 12px; border-top: 1px solid var(--line); background: #fbfcfe; }
.team-col-add .select { width: 100%; }
/* ===== v65：7 环节执勤队伍明细（排班确认后自动生成）===== */
.duty-title {
  font-size: 14px; font-weight: 700; color: var(--t1);
  margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line);
}
.duty-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.duty-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fff;
}
.duty-row:last-child { border-bottom: none; }
.duty-row:nth-child(odd) { background: #fbfcfe; }
.duty-no {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.duty-main { flex: 1; min-width: 0; }
.duty-name { font-size: 13px; font-weight: 600; color: var(--t1); }
.duty-role {
  margin-left: 8px; font-size: 11px; font-weight: 500; color: var(--t2);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; background: #fff;
}
.duty-team { font-size: 12px; color: var(--t2); margin-top: 3px; }
.duty-chief { font-size: 12px; color: #B4232C; margin-top: 2px; }
.duty-members { font-size: 11px; color: var(--t3); margin-top: 2px; line-height: 1.6; }
.team-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px 6px 10px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.team-chip .nm { font-size: 13px; font-weight: 600; color: var(--t1); }
.team-chip.missing { border-color: #f5c6bd; background: #fff5f3; }
.team-chip.missing .nm { color: var(--danger); }
.team-chip-x {
  border: none; background: transparent; color: var(--t3); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 6px;
}
.team-chip-x:hover { color: var(--danger); background: #fdecea; }
.form-sec { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--t3); margin: 10px 0 12px; padding-top: 12px; border-top: 1px solid var(--line); letter-spacing: .04em; }
.form-sec:first-child { margin-top: 0; padding-top: 0; border-top: none; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }

/* ===== v45 教官队伍编制总览 =====
   骨架沿用后台令牌（--card / --line / --radius / --shadow-sm），
   语义色用韶山行品牌：韶山红 #B4232C（低于预警线）、深枣红 #8F1A22（超编）、
   站台金 #C9A227（达标）、暖纸 #F6F3ED（底）、墨黑 #20242C（数字）。
   8px 网格、卡内边距 24px；数字是主角，不靠装饰线。 */
.quota-cards {
  --ss-red: #B4232C; --ss-deep: #8F1A22; --ss-gold: #C9A227;
  --ss-paper: #F6F3ED; --ss-ink: #20242C;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px; margin-bottom: 16px;
}
.quota-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 24px; border-left: 3px solid var(--ss-gold);
}
.quota-card.q-warn { border-left-color: var(--ss-red); }
.quota-card.q-over { border-left-color: var(--ss-deep); }
.quota-card-head { display: flex; align-items: center; gap: 8px; }
.quota-card-name { font-size: 20px; font-weight: 700; color: var(--ss-ink); letter-spacing: .01em; }
.quota-card-type {
  font-size: 12px; font-weight: 500; color: var(--t2);
  background: var(--bg); border-radius: 999px; padding: 2px 9px;
}
.quota-card-head .spacer { flex: 1; }
.quota-state {
  font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px;
  background: #eef7f0; color: #1f7a4d; white-space: nowrap;
}
.quota-state.q-over { background: #fbf2dd; color: #8a6210; }
.quota-state.q-warn { background: #fdeceb; color: var(--ss-red); }
.quota-figure { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 8px; }
.quota-num { font-size: 40px; font-weight: 700; line-height: 1; color: var(--ss-ink); font-variant-numeric: tabular-nums; }
.quota-slash { font-size: 20px; font-weight: 400; color: var(--t3); }
.quota-total { font-size: 24px; font-weight: 600; color: var(--t2); font-variant-numeric: tabular-nums; }
.quota-unit { font-size: 12px; font-weight: 400; color: var(--t3); margin-left: 8px; }
.quota-bar { position: relative; height: 8px; border-radius: 4px; background: var(--ss-paper); }
.quota-bar-fill { height: 8px; border-radius: 4px; background: var(--ss-gold); transition: width .3s ease; }
.quota-card.q-over .quota-bar-fill { background: var(--ss-deep); }
.quota-card.q-warn .quota-bar-fill { background: var(--ss-red); }
.quota-bar-tick {
  position: absolute; top: -3px; width: 2px; height: 14px; border-radius: 1px;
  background: var(--ss-ink); opacity: .45;
}
.quota-bar-legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; font-weight: 400; color: var(--t3); }
.quota-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.quota-post {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--ss-paper);
}
.quota-post-k { font-size: 12px; font-weight: 500; color: var(--t2); white-space: nowrap; }
.quota-post-v { font-size: 13px; font-weight: 700; color: var(--ss-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 900px) { .quota-cards { grid-template-columns: 1fr; } }
/* 队伍总览表内的编制状态徽标 */
.q-inline { font-size: 11px; font-weight: 600; margin-left: 8px; white-space: nowrap; }
.q-inline.q-warn { color: var(--danger); }
.q-inline.q-over { color: #8a6210; }
.q-inline.q-ok { color: var(--ok); }
/* 多名总教官勾选列表 */
.chief-picks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; max-height: 160px; overflow-y: auto; }
.chief-pick { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.chief-pick.on { border-color: var(--primary); background: var(--primary-weak); }
.quota-note { grid-column: 1 / -1; font-size: 12px; color: var(--t3); line-height: 1.5; }

/* ===== v69 六色队伍标识：红橙黄绿青蓝底 + 白色大写字母 =====
   色值由服务端 TEAM_BADGE 通过 :style 预算下发，这里只定义形状与排版，不另写一份色值。 */
.t-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  margin-right: 8px; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 700;
  line-height: 1; vertical-align: middle; flex: 0 0 auto; }
.t-badge.sm { width: 18px; height: 18px; margin-right: 6px; border-radius: 5px; font-size: 11px; }
.badge-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--ss-paper); }
.badge-legend-t { font-size: 12px; font-weight: 600; color: var(--t3); margin-right: 2px; }
.badge-legend-item { display: inline-flex; align-items: center; gap: 4px; }
.badge-legend-n { font-size: 12px; color: var(--t2); white-space: nowrap; }
.duty-team { display: flex; align-items: center; flex-wrap: wrap; }

/* ===== v47 教官风采主页审核台 =====
   色板沿用韶山行：韶山红 #B4232C / 站台金 #C9A227 / 暖纸 #F6F3ED / 墨黑 #20242C。
   详情抽屉沿用 .modal.wide 的 modal-body / modal-foot 骨架，内容区只做信息层级。 */
.pf-body { font-size: 13px; }
.pf-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pf-name { font-size: 20px; font-weight: 700; color: var(--t1); margin-right: 4px; }
.pf-portrait { margin: 16px 0 4px; }
.pf-portrait img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); display: block; }
.pf-sec { font-size: 13px; font-weight: 700; color: var(--t1); margin: 18px 0 10px; padding-left: 9px; border-left: 3px solid #B4232C; }
.pf-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pf-row label { font-size: 12px; color: var(--t2); white-space: nowrap; }
.pf-row input[type="number"] { width: 78px; }
.pf-row input[type="checkbox"] { width: 15px; height: 15px; }
.pf-row textarea { width: 100%; resize: vertical; }
.pf-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 9px; background: #FFFDFA; }
.pf-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t1); }
.pf-meta { font-size: 12px; color: var(--t3); white-space: nowrap; }
.pf-add { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pf-add input[type="text"], .pf-add input:not([type]) { flex: 1; min-width: 120px; }
.pf-add .pf-meta { flex-basis: 100%; white-space: normal; }
.pf-add input[type="file"] { font-size: 12px; }
.pf-code { margin: 6px 0 12px; }
.pf-code img { width: 150px; height: 150px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: block; }
.tag.pf-st-approved { background: #eef7f0; color: #1f7a4d; }
.tag.pf-st-pending { background: #fbf2dd; color: #8a6210; }
.tag.pf-st-rejected { background: #fdeceb; color: #B4232C; }
.tag.pf-st-draft { background: var(--bg); color: var(--t2); }
@media (max-width: 700px) { .pf-item { flex-wrap: wrap; } .pf-text { flex-basis: 100%; white-space: normal; } }

/* ===== v60 风采审核列表「首页」开关 =====
   紧凑 34x18 轨道 + 14px 滑块，适配 .table.compact 的 8px 行内边距；
   开启态沿用后台主色 --primary (#2f6bff)，关闭态中性灰，默认关。 */
.pf-switch-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.pf-sw-track { position: relative; display: inline-block; flex: 0 0 34px; width: 34px; height: 18px; border-radius: 999px; background: #D8DEE9; transition: background .18s; }
.pf-sw-knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(27,35,51,.18); transition: left .18s; }
.pf-sw-track.on { background: var(--primary); }
.pf-sw-track.on .pf-sw-knob { left: 18px; }
.pf-sw-text { font-size: 12px; color: var(--t3); white-space: nowrap; }
.pf-sw-track.on + .pf-sw-text { color: var(--primary); font-weight: 600; }
.pf-switch-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.pf-notice { margin: 0 0 12px; padding: 8px 12px; border: 1px solid #cfe0ff; border-radius: 8px; background: var(--primary-weak); color: #2451b8; font-size: 12.5px; line-height: 1.6; }

/* ===== v48 开行计划 ===== */
/* 一趟车含 2~3 所学校 → 表格里并列成标签组，人数用弱色区分，避免与校名抢视线 */
.pl-schools { display: flex; flex-direction: column; gap: 3px; }
.pl-school { display: flex; align-items: baseline; gap: 6px; line-height: 1.45; }
.pl-school b { font-weight: 500; color: var(--t1); }
.pl-school i { font-style: normal; font-size: 12px; color: var(--t3); font-variant-numeric: tabular-nums; }
.pl-over { font-variant-numeric: tabular-nums; font-weight: 600; }
.pl-over.danger { color: var(--danger); }
.pl-over.ok { color: var(--ok); }
.pl-over.zero { color: var(--t2); }
.pl-over.none { color: var(--t3); font-weight: 400; }
.pl-vis { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.pl-vis.on { background: #e6f7ef; color: var(--ok); }
.pl-vis.off { background: var(--bg); color: var(--t3); }
/* 编辑弹层：字段用 8px 栅格对齐，学校明细表独立成区 */
.pl-edit-tbl { margin-top: 4px; }
.pl-edit-tbl td { padding: 5px 6px; }
.pl-edit-tbl input, .pl-edit-tbl select { width: 100%; }
.pf-sec { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--t1); }
.pf-sec-tip { font-size: 12px; font-weight: 400; color: var(--t3); }
/* v48 修：表格内超员文案与日期不换行（超员列窄，"超 203 人"会断成两行） */
.table .pl-over { white-space: nowrap; }
.table .tbl-mono { white-space: nowrap; }

/* ===== v50 开行计划列表：删承办机构列 / 拆车型彩色按钮 / 信息列均匀且不分行 ===== */
/* 表格按 colgroup 百分比等分，窄屏由外层容器横向滚动，避免把文字挤成两行 */
.pl-tbl-wrap { overflow-x: auto; margin: 0 -2px; }
.pl-tbl { table-layout: fixed; min-width: 1000px; }
.table.compact.pl-tbl th, .table.compact.pl-tbl td { padding: 8px 6px; }
.pl-tbl th, .pl-tbl td { white-space: nowrap; }
.pl-tbl .pl-school-cell { white-space: normal; }
.pl-tbl .pl-ops { white-space: normal; }
.pl-tbl .pl-ops .btn { white-space: nowrap; margin: 1px 3px 1px 0; }
.pl-tbl td.pl-info, .pl-tbl td.pl-date { overflow: hidden; text-overflow: ellipsis; }
/* 车型：普铁蓝色 / 高铁粉红，做成小按钮徽标 */
.pl-type { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; padding: 2px 9px; border: 0; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.6; color: #fff; white-space: nowrap; }
.pl-type-normal { background: #2f6bff; }
.pl-type-express { background: #ec4899; }
/* 编辑弹层：承办机构只读汇总（列表已不展示该列） */
.pl-org-view { flex: 1; min-width: 0; color: var(--t2); font-size: 13px; line-height: 1.6; white-space: normal; }
.pl-org-tip { flex-basis: 100%; margin-top: -4px; }

/* ===== v49 角色管理 / 计调趟次 ===== */
/* 5 类职务一人一卡：韶山红左边框 + 人数徽标，管辖范围与职责说明分层 */
.pl-role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 12px; padding: 4px 0 10px; }
.pl-role-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid #B4232C; border-radius: 10px; background: var(--card); box-shadow: var(--shadow-sm); }
.pl-role-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pl-role-name { font-size: 15px; font-weight: 600; color: var(--t1); }
.pl-role-count { font-size: 13px; font-weight: 600; color: #B4232C; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-role-scope { font-size: 12px; color: var(--primary); }
.pl-role-desc { font-size: 12px; line-height: 1.6; color: var(--t2); min-height: 38px; }
.pl-role-foot { display: flex; justify-content: flex-end; padding-top: 4px; }
/* 计调趟次弹层：字段表 + 教官团队标签 */
.pl-trip-tbl th { color: var(--t3); font-weight: 500; background: var(--bg); white-space: nowrap; }
.pl-trip-tbl td { color: var(--t1); }
.pl-trip-posts { display: flex; flex-wrap: wrap; gap: 4px; }
/* 列表「计调趟次」列状态徽标复用 pl-vis，窄列不换行 */
.table .pl-vis { font-size: 12px; }

/* ===== v67 计调趟次弹层：收窄为紧凑卡片，消除贴边 / 横向溢出 / 大片留白 ===== */
/* 通用兜底：wide 弹窗 padding 为 0，旧标题不补内边距就会贴住左上角（含「编辑开行计划」） */
.modal.wide .modal-title { padding: 15px 22px; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 700; color: var(--t1); }
.modal.wide.trip-modal { width: min(660px, 94vw); max-height: 88vh; }
.modal.wide.trip-modal .modal-h { padding: 14px 20px; }
.modal.wide.trip-modal .modal-h .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* flex 子项默认 min-height:auto 会撑破 max-height，正文必须可滚动而不是整体溢出 */
.modal.wide.trip-modal .modal-body { padding: 16px 20px 18px; min-height: 0; }
.modal.wide.trip-modal .modal-foot { padding: 12px 20px; justify-content: flex-end; }
.modal.wide.trip-modal .login-err { margin-bottom: 12px; }
.modal.wide.trip-modal .pf-sec { margin-top: 14px; }
.trip-state { flex: none; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.7; }
.trip-state.on { background: #e8f7ef; color: #1fab6b; }
.trip-state.off { background: #fdf3e0; color: #c8821a; }
.trip-note { padding: 9px 12px; border-radius: 8px; background: var(--bg); border-left: 3px solid var(--primary); color: var(--t2); font-size: 12.5px; line-height: 1.7; margin-bottom: 14px; }
.trip-note::before { content: "口径 · "; color: var(--primary); font-weight: 600; }
.trip-empty { padding: 16px 14px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; text-align: center; }
.trip-empty-t { font-size: 14px; font-weight: 600; color: var(--t1); }
.trip-empty-d { margin-top: 6px; font-size: 12.5px; line-height: 1.6; color: var(--t3); }
.trip-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.trip-file-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--t1); font-size: 13px; cursor: pointer; overflow: hidden; }
.trip-file-btn:hover { border-color: var(--primary); color: var(--primary); }
/* 原生 file 控件会撑出固定宽度并带默认文案，改为透明覆盖层，由按钮与文件名接管显示 */
.trip-file-btn input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.trip-file-name { min-width: 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--t2); }
.trip-upload-tip { margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--t3); }
/* v100 分步操作引导 */
.trip-guide { display: flex; align-items: stretch; gap: 8px; margin-bottom: 14px; }
.trip-guide-step { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.trip-guide-n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--t3); }
.trip-guide-b { min-width: 0; }
.trip-guide-b b { display: block; font-size: 13px; font-weight: 600; color: var(--t1); line-height: 1.35; }
.trip-guide-b em { display: block; margin-top: 2px; font-size: 11.5px; font-style: normal; color: var(--t3); line-height: 1.4; }
.trip-guide-line { flex: none; align-self: center; width: 16px; height: 1px; background: var(--line); }
.trip-guide-step.cur { border-color: var(--primary); background: var(--primary-weak); }
.trip-guide-step.cur .trip-guide-n { background: var(--primary); color: #fff; }
.trip-guide-step.cur .trip-guide-b em { color: var(--primary); }
.trip-guide-step.done { border-color: #d8eee2; background: #f3fbf7; }
.trip-guide-step.done .trip-guide-n { background: var(--ok); color: #fff; }
.trip-guide-step.done .trip-guide-b em { color: var(--ok); }
.trip-guide-step.wait { background: #fafbfd; }
.trip-guide-step.wait .trip-guide-n { background: var(--bg); color: var(--t3); }
.trip-file-btn.locked { background: var(--bg); color: var(--t3); border-color: var(--line); cursor: not-allowed; }
.trip-file-btn.locked:hover { border-color: var(--line); color: var(--t3); }
.modal.wide.trip-modal .pl-trip-tbl { table-layout: fixed; }
.modal.wide.trip-modal .table.compact.pl-trip-tbl th, .modal.wide.trip-modal .table.compact.pl-trip-tbl td { padding: 7px 10px; }
.pl-trip-tbl td { word-break: break-word; }
.pl-trip-posts { gap: 6px; }
.pl-trip-posts .tag { max-width: 100%; white-space: normal; word-break: break-word; }
/* v70 订阅消息模板配置：五行网格，8px 间距，窄列给移除按钮 */
.tpl-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; font-size: 13px; font-weight: 600; color: var(--t1); }
.tpl-count { font-size: 12px; font-weight: 400; color: var(--t3); }
.tpl-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tpl-tr { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr 1.2fr 56px; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tpl-tr:last-child { border-bottom: 0; }
.tpl-th { background: #F7F8FA; font-size: 12px; color: var(--t2); font-weight: 600; }
.tpl-in { width: 100%; min-width: 0; height: 32px; padding: 0 8px; font-size: 12.5px; }
.tpl-del { border: 0; background: none; color: var(--t3); font-size: 12px; cursor: pointer; padding: 4px 0; }
.tpl-del:hover { color: #B4232C; }
.tpl-add-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.tpl-hint { font-size: 12px; color: var(--t3); line-height: 1.5; }

/* ===== v73 注册资料详情弹层（教官列表 → 查看） ===== */
.cert-modal { width: min(720px, 94vw); max-height: 88vh; }
.cert-modal .modal-body { padding: 16px 20px 18px; min-height: 0; }
.cert-modal .modal-foot { padding: 12px 20px; justify-content: flex-end; }
.cert-sec {
  font-size: 13px; font-weight: 600; color: var(--t3); letter-spacing: .5px;
  margin: 4px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.cert-grid {
  display: grid; grid-template-columns: 96px 1fr;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 20px;
}
.cert-k, .cert-v { padding: 9px 12px; font-size: 13px; line-height: 1.5; border-bottom: 1px solid var(--line); }
.cert-k { background: #F7F8FA; color: var(--t2); }
.cert-v { color: var(--t1); word-break: break-all; }
.cert-grid > .cert-k:nth-last-child(2), .cert-grid > .cert-v:last-child { border-bottom: 0; }
.cert-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cert-img-cell { border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-width: 0; }
.cert-img-t {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--t2); margin-bottom: 8px;
}
.cert-img { display: block; width: 100%; height: 148px; object-fit: contain; background: #F7F8FA; border-radius: 6px; }
.cert-img-empty {
  display: flex; align-items: center; justify-content: center;
  height: 148px; background: #F7F8FA; border-radius: 6px; color: var(--t3); font-size: 12px;
}
.cert-meta { margin-top: 14px; font-size: 12px; color: var(--t3); line-height: 1.6; }

/* ===== v88 编辑弹窗内的证明图操作（重新上传 / 清除）=====
   · 沿用 cert-img-cell 的卡片语言，操作行贴在缩略图下方，保持三列等高对齐
   · 8px 网格：图片 148px + 操作行 30px + 间距，卡片整体高度一致
   · label 包 input[type=file]：把「文件选择器」藏起来，只露一个按钮，避免原生控件破坏视觉 */
.cert-img-acts {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.cert-file-btn {
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none;
}
.cert-file-btn input[type="file"] { display: none; }

/* 编辑弹窗内的证明图：压缩缩略图高度，保证「重新上传 / 清除」操作行
   落在首屏可见范围内（只读的「注册资料」弹窗保持 148px 大图预览不变）。
   100px 高仍足够辨认证明材料，缩略图 object-fit: contain 不裁切。 */
.cert-img-grid-edit .cert-img,
.cert-img-grid-edit .cert-img-empty { height: 100px; }
.cert-img-grid-edit .cert-img-acts { margin-top: 8px; padding-top: 8px; }
.cert-img-grid-edit .cert-img-t { margin-bottom: 6px; }

/* ===== v80 趟次扫码管理 / 现场考勤 ===== */
.attn-stat { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.attn-stat-i {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px 6px;
}
.attn-stat-v { font-size: 22px; font-weight: 700; color: var(--t1); line-height: 1.1; }
.attn-stat-v.ok { color: var(--ok); }
.attn-stat-v.bad { color: var(--danger); }
.attn-stat-v.warn { color: #c8821a; }
.attn-stat-l { font-size: 12px; color: var(--t3); }
.attn-filter { margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.attn-filter .select { min-width: 150px; }
.attn-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--t2); }
.attn-filter-n { font-size: 12px; color: var(--t3); }
.attn-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.attn-table { min-width: 1372px; }
.attn-table td { font-size: 12px; vertical-align: middle; }
.attn-table tr.missing td { background: #fff5f5; }
.attn-table tr.warn td { background: #fff9ee; }
.attn-table tr.nopoi td { background: #fffdf1; }
.attn-detail { color: var(--t2); line-height: 1.5; max-width: 210px; }
.attn-poi { display: inline-block; font-size: 12px; padding: 2px 7px; border-radius: 6px; }
.attn-poi.ok { color: var(--ok); background: rgba(31,171,107,.10); }
.attn-poi.miss { color: var(--t3); background: #f2f3f6; }
/* v81：位置采集未开通时的中性态（不与「异常」红冲突） */
.attn-poi.off { color: var(--t3); background: #f2f3f6; }
.attn-loc-off {
  margin-bottom: 12px; padding: 10px 12px; border-radius: 8px; font-size: 12.5px; line-height: 1.6;
  color: #8a6420; background: rgba(201,162,39,.10); border: 1px solid rgba(201,162,39,.28);
}
.attn-table { table-layout: fixed; min-width: 1372px; }
.attn-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attn-table td.attn-detail { white-space: normal; }
.attn-state { display: inline-block; font-size: 11.5px; padding: 2px 7px; border-radius: 6px; font-weight: 600; }
.attn-state.ok { color: var(--ok); background: rgba(31,171,107,.10); }
.attn-state.missing { color: var(--danger); background: rgba(220,53,69,.10); }
.attn-state.warn { color: #c8821a; background: rgba(245,166,35,.14); }
.attn-state.nopoi { color: #8a6420; background: rgba(201,162,39,.14); }
.attn-people { margin-top: 14px; }
