/* =====================================================================
 * 工单管理系统 - 企业风格样式表（v1.1.0）
 * 纯原生 CSS，无任何外部依赖 / CDN
 * 主要区块：
 *   1. 设计变量与基础   2. 布局/侧边栏/顶栏   3. 卡片/按钮/徽章/表单
 *   4. 表格与分页       5. 工单表单分区与服务项目选择器
 *   6. 详情/时间线      7. 首页统计卡/快捷入口 8. 数据统计图表
 *   9. 登录页(两步验证) 10. 后台通用            11. 响应式
 * ===================================================================== */

/* ---------------- 1. 设计变量与基础 ---------------- */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eaf1ff;
  --sidebar-bg: #1e293b;
  --sidebar-2: #273449;
  --bg: #f3f5f9;
  --card: #ffffff;
  --border: #e5e8ef;
  --ink-1: #1f2937;
  --ink-2: #4b5563;
  --ink-3: #9aa3b2;
  --ok: #16a34a;
  --ok-soft: #e7f6ec;
  --warn: #d97706;
  --warn-soft: #fdf1e0;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --muted: #6b7280;
  --muted-soft: #eef0f4;
  --teal: #0d9488;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 84px; }
/* 统一的序列 ID 窄列（前后台所有列表保持一致，避免 ID 列过宽） */
.table .col-id { width: 52px; min-width: 52px; max-width: 64px; text-align: center; white-space: nowrap; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* 表头/单元格水平居中（如状态徽标列，保证表头与内容对齐） */
.table .col-c { text-align: center; }
.sub-text { color: var(--ink-3); font-size: 12px; }
.remark-cell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.empty-cell { text-align: center; color: var(--ink-3); padding: 34px 0 !important; }
.op-cell .btn { margin: 1px 2px 1px 0; }
.req { color: var(--danger); margin-left: 2px; }
.green { color: var(--ok); }
.orange { color: var(--warn); }

/* ---------------- 2. 布局 / 侧边栏 / 顶栏 ---------------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 222px; flex-shrink: 0; background: var(--sidebar-bg);
  color: #cbd5e1; display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.brand-name { color: #fff; font-weight: 600; font-size: 15px; letter-spacing: .5px; }
.menu { flex: 1; padding: 12px 10px; overflow-y: auto; }
.menu-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; margin-bottom: 3px; border-radius: 8px;
  color: #b6c2d4; font-size: 14px; transition: background .15s, color .15s;
}
.menu-item:hover { background: var(--sidebar-2); color: #fff; }
.menu-item.active { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(37,99,235,.35); }
.menu-ico { width: 19px; height: 19px; display: inline-flex; }
.menu-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-foot { padding: 14px 18px; font-size: 11.5px; color: #64748b; border-top: 1px solid rgba(255,255,255,.07); }

.main { flex: 1; margin-left: 222px; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 60px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 22px; gap: 14px;
  position: sticky; top: 0; z-index: 40; box-shadow: var(--shadow);
}
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle svg { width: 22px; height: 22px; fill: none; stroke: var(--ink-1); stroke-width: 2; stroke-linecap: round; }
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-name { font-weight: 600; }
.role-badge {
  font-size: 12px; padding: 2px 9px; border-radius: 20px;
  background: var(--primary-soft); color: var(--primary-dark);
}
.top-link { color: var(--ink-2); font-size: 13px; }
.top-link:hover { color: var(--primary); }
.top-link.logout:hover { color: var(--danger); }

.content { flex: 1; padding: 22px; max-width: 1500px; width: 100%; margin: 0 auto; }
.footer { text-align: center; color: var(--ink-3); font-size: 12px; padding: 18px; }
.sidebar-mask { display: none; }

/* ---------------- 3. 卡片 / 按钮 / 徽章 / 表单 ---------------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; border: 1px solid var(--border); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px;
}
.card-body { padding: 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 16px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; cursor: pointer; line-height: 1.2; white-space: nowrap;
  background: #fff; color: var(--ink-1); transition: all .15s; text-decoration: none;
}
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 11px 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn-success:hover { background: #128a3e; }
.btn-warn { background: var(--warn); color: #fff; border-color: var(--warn); }
.btn-warn:hover { background: #b96406; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-text-danger { color: var(--danger); }
.btn-text-danger:hover { border-color: var(--danger); background: var(--danger-soft); }

.badge { display: inline-block; padding: 3px 11px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge.ok   { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.muted{ background: var(--muted-soft); color: var(--muted); }
.badge.blue { background: var(--primary-soft); color: var(--primary-dark); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge-lg { padding: 5px 14px; font-size: 13px; }
.role-tag-line { background: #f1f5f9; color: #334155; padding: 2px 10px; border-radius: 6px; font-size: 12.5px; }
.level-tag { background: #fef9e7; color: #a16207; border: 1px solid #f5e6b8; padding: 1px 9px; border-radius: 6px; font-size: 12px; }

.form-control {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; background: #fff; color: var(--ink-1);
  transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea.form-control { resize: vertical; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--ink-2); font-size: 13.5px; }
.form-hint { color: var(--ink-3); font-size: 12px; margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.form-grid .full { grid-column: 1 / -1; }

/* 分区横向表单（工单表单） */
.form-section { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.form-section-title {
  background: #f8fafc; padding: 10px 16px; font-weight: 600; font-size: 13.5px;
  color: #334155; border-bottom: 1px solid var(--border);
}
.form-horizontal { padding: 16px 18px 4px; }
.h-row { display: flex; align-items: flex-start; margin-bottom: 15px; }
.h-label { width: 118px; flex-shrink: 0; text-align: right; padding-right: 16px; padding-top: 9px; color: var(--ink-2); font-size: 13.5px; }
.h-ctrl { flex: 1; min-width: 0; }
.region-triple { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; }
.form-footer { display: flex; align-items: center; gap: 12px; padding: 6px 2px; }

/* 大尺寸表单（新建工单 / 添加入驻，整体放大，便于录入） */
.form-lg .form-control { height: 44px; padding: 10px 14px; font-size: 15px; border-radius: 9px; }
.form-lg textarea.form-control { height: auto; }
.form-lg select.form-control { padding-top: 0; padding-bottom: 0; }
.form-lg .form-group { margin-bottom: 20px; }
.form-lg .form-group > label,
.form-lg .h-label { font-size: 14.5px; }
.form-lg .h-label { width: 128px; padding-top: 12px; }
.form-lg .h-row { margin-bottom: 19px; }
.form-lg .form-horizontal { padding: 20px 22px 6px; }
.form-lg .form-section { margin-bottom: 22px; }
.form-lg .form-section-title { padding: 13px 20px; font-size: 15px; }
.form-lg .region-triple { gap: 12px; }
.form-lg .form-footer { padding-top: 10px; }
.form-lg .radio-pill { padding: 9px 18px; font-size: 14.5px; }
.form-lg .svc-picker { padding: 20px 22px 22px; }
.form-lg .svc-cat { padding: 9px 18px; font-size: 14.5px; }
.form-lg .svc-item span { padding: 9px 18px; font-size: 14.5px; }
.form-lg .svc-cats { gap: 10px; margin-bottom: 16px; }
.form-lg .svc-items { gap: 10px; }
/* 超管后台入口在侧边栏略作区分 */
.menu-admin { margin-top: 6px; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0; }
.menu-admin .menu-ico svg { stroke: #fbbf24; }

/* 服务项目选择器：一级 tab + 二级 radio 卡片 */
.svc-picker { padding: 16px 18px 18px; }
.svc-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.svc-cat {
  padding: 7px 16px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--ink-2); cursor: pointer; font-size: 13.5px; transition: all .15s;
}
.svc-cat:hover { border-color: var(--primary); color: var(--primary); }
.svc-cat.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 8px rgba(37,99,235,.3); }
.svc-items { display: flex; flex-wrap: wrap; gap: 9px; }
.svc-item { position: relative; }
.svc-item input { position: absolute; opacity: 0; pointer-events: none; }
.svc-item span {
  display: inline-block; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border);
  background: #fbfcfe; cursor: pointer; font-size: 13.5px; color: var(--ink-1); transition: all .15s;
}
.svc-item:hover span { border-color: var(--primary); }
.svc-item input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }
.svc-item.single span { cursor: default; }

/* 单选胶囊（经营时间 / 状态） */
.radio-inline { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: #fbfcfe; font-size: 13.5px; }
.radio-pill input { accent-color: var(--primary); }
.radio-pill:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }

/* 密码可见切换 */
.pwd-wrap { position: relative; }
.pwd-wrap .form-control { padding-right: 44px; }
.pwd-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #64748b; cursor: pointer; padding: 6px; display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.pwd-toggle:hover { color: var(--primary); }
.pwd-toggle svg { width: 19px; height: 19px; }
.pwd-toggle .ico-eye-off { display: none; }
.pwd-toggle[aria-pressed="true"] .ico-eye { display: none; }
.pwd-toggle[aria-pressed="true"] .ico-eye-off { display: block; }

/* ---------------- 4. 表格 / 分页 / 工具条 ---------------- */
.toolbar { margin-bottom: 16px; }
.toolbar .search { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .search .form-control { width: auto; min-width: 220px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; }
.table th, .table td { padding: 11px 13px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: #f8fafc; color: #475569; font-weight: 600; white-space: nowrap; font-size: 13px; }
.table tbody tr:hover { background: #f9fbff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-dense th, .table-dense td { padding: 8px 10px; }
.table-summary {
  display: flex; flex-wrap: wrap; gap: 26px; align-items: center;
  padding: 13px 16px; margin-top: 12px; background: #f8fafc;
  border: 1px dashed #cbd5e1; border-radius: 8px; font-size: 14px; color: var(--ink-2);
}
.table-summary b { color: var(--ink-1); font-size: 15px; }
.table-summary .profit b { color: var(--ok); font-size: 17px; }

.pagination { margin-top: 18px; display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 7px;
  font-size: 13px; background: #fff; color: var(--ink-2);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { color: var(--ink-3); background: #f8fafc; }
.pagination .page-gap { border:none; background:transparent; padding:6px 4px; }
.pagination .page-prev, .pagination .page-next { font-weight:600; }

.alert { padding: 11px 15px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid transparent; }
.alert-success { background: var(--ok-soft); color: #157347; border-color: #bfe6cc; }
.alert-danger { background: var(--danger-soft); color: #b42318; border-color: #f5c6c6; }
.alert-info { background: var(--primary-soft); color: var(--primary-dark); border-color: #cdddff; }
.alert-warning { background: var(--warn-soft); color: #92400e; border-color: #f3ddb8; }

/* ---------------- 5. 详情 / 时间线 ---------------- */
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.detail-title { font-size: 17px; font-weight: 700; margin-left: 10px; }
.detail-block-title { font-size: 14.5px; margin: 20px 0 10px; padding-left: 10px; border-left: 3px solid var(--primary); }
.kv-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.kv-table th, .kv-table td { padding: 10px 14px; border: 1px solid var(--border); font-size: 13.5px; }
.kv-table th { background: #f8fafc; color: #475569; font-weight: 600; width: 13%; white-space: nowrap; text-align: left; }
.kv-table td { width: 37%; }
.prewrap { white-space: pre-wrap; word-break: break-all; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.timeline li { position: relative; padding: 0 0 18px 24px; border-left: 2px solid #e5e8ef; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-dot { position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; }
.tl-dot.dot-blue { background: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.tl-dot.dot-green { background: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.tl-dot.dot-gray { background: var(--muted); box-shadow: 0 0 0 1px var(--muted); }
.tl-body b { display: block; font-size: 13.5px; }
.tl-meta { color: var(--ink-3); font-size: 12.5px; }

/* ---------------- 6. 首页 ---------------- */
.welcome-bar {
  background: linear-gradient(120deg, #2563eb, #3b82f6 55%, #60a5fa);
  color: #fff; border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(37,99,235,.22);
}
.welcome-title { font-size: 21px; font-weight: 700; }
.welcome-sub { margin-top: 6px; font-size: 13.5px; opacity: .92; }
.welcome-sub b { font-weight: 600; }

.stat-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid-5 { grid-template-columns: repeat(5, 1fr); }
/* 首页 6 个统计卡：PC 一行 3 个，手机一行 2 个 */
.stat-grid-6 { grid-template-columns: repeat(3, 1fr); }
@media (max-width:720px){ .stat-grid-6 { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 20px 22px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.stat-card .label { color: var(--ink-2); font-size: 13px; margin-bottom: 10px; }
.stat-card .value { font-size: 27px; font-weight: 700; line-height: 1.1; }
.stat-card .value small { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.stat-blue::before { background: var(--primary); } .stat-blue .value { color: var(--primary); }
.stat-green::before { background: var(--ok); } .stat-green .value { color: var(--ok); }
.stat-orange::before { background: var(--warn); } .stat-orange .value { color: var(--warn); }
.stat-teal::before { background: var(--teal); } .stat-teal .value { color: var(--teal); }
.stat-cyan::before { background:#0891b2; } .stat-cyan .value { color:#0891b2; }
.stat-gray::before { background: #94a3b8; } .stat-gray .value { color: #64748b; }
@media (max-width: 1200px){ .stat-grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px){ .stat-grid-5 { grid-template-columns: repeat(2, 1fr); } }

.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.quick-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 22px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe;
  color: var(--ink-1); font-size: 14px; transition: all .15s;
}
.quick-item:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.qi-ico {
  width: 42px; height: 42px; border-radius: 11px; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700;
}
.qi-ico svg { width: 22px; height: 22px; stroke: #fff; fill: none; }

/* ---------------- 7. 数据统计 ---------------- */
.stats-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.stats-filter label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.stats-filter .form-control { width: auto; }
.stats-filter .sep { color: var(--ink-3); }
.chart-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-top: 18px; background: #fff; }
.chart-summary { display: flex; flex-wrap: wrap; gap: 22px; align-items: baseline; margin-bottom: 12px; }
.chart-summary .cs-title { font-weight: 700; font-size: 15px; }
.chart-summary .cs-money { color: var(--danger); font-size: 22px; font-weight: 700; }
.chart-summary .cs-wait { color: var(--ink-2); font-size: 13.5px; }
.chart-summary b { font-size: 16px; }
.chart-scroll { overflow-x: auto; padding-bottom: 6px; }
.chart-scroll canvas { min-width: 100%; }

/* ---------------- 8. 登录页（两步验证） ---------------- */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  padding: 24px;
}
.login-card {
  width: 880px; max-width: 100%; background: #fff; border-radius: 16px; overflow: hidden;
  display: grid; grid-template-columns: 380px 1fr; box-shadow: var(--shadow-lg); min-height: 520px;
}
.login-aside {
  background: linear-gradient(160deg, #1d4ed8, #2563eb 60%, #3b82f6);
  color: #fff; padding: 44px 36px; display: flex; flex-direction: column;
}
.login-logo {
  width: 54px; height: 54px; border-radius: 14px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; margin-bottom: 22px;
}
.login-aside-title { font-size: 23px; font-weight: 700; }
.login-aside-sub { margin-top: 10px; font-size: 13.5px; opacity: .9; line-height: 1.7; }
.login-feats { margin: 30px 0 0; padding: 0; list-style: none; }
.login-feats li { position: relative; padding-left: 22px; margin-bottom: 14px; font-size: 13.5px; opacity: .95; }
.login-feats li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; }

.login-panel { padding: 42px 44px; display: flex; flex-direction: column; justify-content: center; }
.login-panel h1 { font-size: 24px; }
.login-sub { color: var(--ink-3); font-size: 13.5px; margin: 8px 0 22px; }
.login-form .form-group { margin-bottom: 17px; }
.login-form .btn { margin-top: 4px; }
.login-tip { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.login-back { text-align: center; margin-top: 14px; font-size: 13px; }
.security-q {
  background: var(--warn-soft); border: 1px solid #f3ddb8; color: #92400e;
  padding: 11px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
}
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row .form-control { flex: 1; }
.captcha-img {
  height: 36px; width: 104px; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; background: #f1f5f9; flex-shrink: 0;
}

/* 步骤条 */
.steps { display: flex; align-items: center; margin-bottom: 24px; }
.step { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); }
.step-no {
  width: 24px; height: 24px; border-radius: 50%; background: var(--muted-soft); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700;
}
.step.active { color: var(--primary-dark); font-weight: 600; }
.step.active .step-no { background: var(--primary); color: #fff; }
.step.done .step-no { background: var(--ok); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 12px; }
.step-line.on { background: var(--ok); }

/* ---------------- 9. 两栏（账号安全） ---------------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* ---------------- 10. 后台布局（admin_layout） ---------------- */
.admin-header { background: #111827; color: #fff; padding: 0 22px; height: 58px; display: flex; align-items: center; gap: 22px; position: sticky; top: 0; z-index: 50; }
.admin-header .brand { border: 0; padding: 0; }
.admin-header .brand-logo { width: 30px; height: 30px; font-size: 15px; }
.admin-header .brand-name { font-size: 16px; }
.admin-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.admin-nav a { color: #cbd5e1; padding: 8px 13px; border-radius: 7px; font-size: 13.5px; }
.admin-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav a.active { background: var(--primary); color: #fff; }
.admin-user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.admin-user a { color: #cbd5e1; }
.admin-user a:hover { color: #fff; }
.admin-body { padding: 22px; max-width: 1500px; margin: 0 auto; width: 100%; }

/* 设置描述列表 */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.check-list label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-bottom: 10px; }
.check-list input { accent-color: var(--primary); width: 16px; height: 16px; }
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
.stat-mini { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat-mini .n { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat-mini .t { color: var(--ink-2); font-size: 13px; margin-top: 4px; }

/* ---------------- 11. 响应式 ---------------- */
@media (max-width: 1100px) {
  .stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
  .main { margin-left: 0; }
  .nav-toggle { display: inline-flex; }
  .login-card { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .form-grid, .two-col, .settings-grid { grid-template-columns: 1fr; }
  .region-triple { grid-template-columns: 1fr; }
  .h-row { flex-direction: column; }
  .h-label { width: auto; text-align: left; padding: 0 0 6px; }
  /* 手机端：隐藏姓名/角色与次要链接，但保留通知铃铛与“退出”按钮可见 */
  .topbar-right .user-name, .topbar-right .role-badge, .topbar-right .top-link:not(.logout) { display: none; }
  .topbar-right .logout { display: inline-flex; padding: 6px 12px; font-size: 13px; }
  .content, .admin-body { padding: 14px; }
}

/* ===== 回收站页签 ===== */
.recycle-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.recycle-tab { padding: 9px 18px; border: 1px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0; background: #f8fafc; color: var(--ink-2); font-size: 14px; margin-bottom: -1px; }
.recycle-tab.active { background: #fff; color: var(--primary-dark); border-color: var(--border); font-weight: 600; box-shadow: inset 0 -2px 0 var(--primary); }
.recycle-count { color: var(--ink-3); font-size: 12.5px; margin-left: 2px; }
.recycle-tab.active .recycle-count { color: var(--primary); }
/* 导出按钮 */
.btn-export { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.btn-export:hover { background: #d1fae5; }

/* =====================================================================
   v2.0.0 新增样式
   ===================================================================== */

/* 消除移动端点击 300ms 延迟与双击缩放（配合 viewport user-scalable=no） */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
button, a, .menu-item, .btn, input[type=checkbox], input[type=radio], select { touch-action: manipulation; }

/* ---- 侧边栏底部“进入后台”入口 ---- */
.sidebar-foot { display: flex; flex-direction: column; gap: 8px; }
.sidebar-admin-link { color: #cbd5e1 !important; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; margin-bottom: 2px; }
.sidebar-admin-link:hover { background: var(--sidebar-2); color: #fff !important; }
.sidebar-foot .copyright { font-size: 11px; color: #64748b; line-height: 1.6; }

/* ---- 顶部通知铃铛 ---- */
.bell-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9px; color: var(--ink-2); }
.bell-link:hover { background: #f1f5f9; color: var(--primary); }
.bell-ico { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bell-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  background: #ef4444; color: #fff; border-radius: 9px; font-size: 10.5px; line-height: 17px;
  text-align: center; font-weight: 600; border: 1.5px solid #fff; box-sizing: content-box;
}
/* 未读角标提醒：有未读时由 JS 添加 .flash，角标轻微左右抖动，未读清零自动移除 */
@keyframes bell-badge-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  50% { transform: translateX(1px); }
  75% { transform: translateX(-1px); }
}
.bell-badge.flash { animation: bell-badge-shake 0.8s ease-in-out infinite; }

/* ---- 指定用户选择（发布公告：搜索 + 勾选 + 已选标签） ---- */
.user-pick-head { display:flex; align-items:center; gap:8px; margin:8px 0 6px; }
.user-pick-list { max-height:220px; overflow-y:auto; border:1px solid var(--border); border-radius:8px; background:#fff; }
.user-pick-item { display:flex; align-items:center; gap:8px; padding:8px 12px; cursor:pointer; border-bottom:1px solid #f1f5f9; font-size:13.5px; }
.user-pick-item:last-child { border-bottom:0; }
.user-pick-item:hover { background:#f8fafc; }
.user-pick-item input { width:15px; height:15px; flex-shrink:0; }
.user-pick-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; align-items:center; }
.user-pick-tag { display:inline-flex; align-items:center; gap:5px; background:#eef2ff; color:#3730a3; border:1px solid #c7d2fe; border-radius:6px; padding:3px 9px; font-size:12.5px; }
.user-pick-tag b { cursor:pointer; color:#6366f1; font-weight:600; padding:0 1px; }
.user-pick-tag b:hover { color:#b91c1c; }

/* ---- 后台全站通知：标题/内容平铺不截断，超出由外层 table-wrap 横向滑动查看 ---- */
.broadcast-hint { color: var(--danger); font-size: 13px; }   /* 公告必填提示：红色醒目 */
.notice-admin-table td.notice-full-cell { white-space: nowrap; }
.notice-title-full { white-space: nowrap; line-height: 1.5; }
.notice-content-full { margin-top: 2px; color: var(--ink-2); font-size: 13px; line-height: 1.6;
  white-space: nowrap; }

/* ---- 移动端：全站通知表精简列（隐藏 ID/时间），标题/内容仍平铺，整表可左右滑动 ---- */
@media (max-width: 900px) {
  .notice-admin-table th:nth-child(1), .notice-admin-table td:nth-child(1),
  .notice-admin-table th:nth-child(6), .notice-admin-table td:nth-child(6) { display: none; }
  .notice-admin-table td:nth-child(2) { max-width: 22vw; overflow: hidden; text-overflow: ellipsis; }
}

/* ---- 通知列表 ---- */
.notice-list { display: flex; flex-direction: column; gap: 10px; }
.notice-item { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.notice-item.unread { border-left: 3px solid var(--primary); background: #f8fbff; }
.notice-dot { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; margin-top: 7px; flex-shrink: 0; }
.notice-item.unread .notice-dot { background: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.notice-type { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 10px; margin-right: 8px; }
.nt-new_order { background: #dbeafe; color: #1d4ed8; }
.nt-overdue { background: #ffedd5; color: #c2410c; }
.nt-security { background: #fee2e2; color: #b91c1c; }
.nt-system { background: #e2e8f0; color: #475569; }
.notice-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.notice-content { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; line-height: 1.6; }
.notice-time { color: var(--ink-3); font-size: 12px; white-space: nowrap; margin-left: auto; }

/* ---- 电话自动带出历史提示条 ---- */
.lookup-hint { display: none; margin-top: 6px; border: 1px solid #bfdbfe; background: #eff6ff; color: #1e40af; border-radius: 8px; padding: 9px 12px; font-size: 12.5px; line-height: 1.7; }
.lookup-hint.show { display: block; }
.lookup-hint.warn { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.lookup-hint b { color: inherit; }
.lookup-hint .lh-row { display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* ---- 工单批量操作工具条 ---- */
.batch-bar { display: none; align-items: center; flex-wrap: wrap; gap: 10px; background: #f0f7ff; border: 1px dashed #93c5fd; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.batch-bar.show { display: flex; }
.batch-bar .batch-count { font-size: 13px; color: #1d4ed8; font-weight: 600; margin-right: 4px; }
.batch-bar select { width: auto; padding: 7px 10px; font-size: 13px; }
.table .col-check { width: 38px; text-align: center; }
.table .col-check input { width: 16px; height: 16px; cursor: pointer; }

/* ---- 工单附件 ---- */
.attach-upload { border: 1.5px dashed #cbd5e1; border-radius: 10px; padding: 18px; text-align: center; background: #f8fafc; margin-bottom: 14px; }
.attach-upload input[type=file] { margin: 8px auto; display: block; }
.attach-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.attach-item { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.attach-thumb { height: 110px; background: #f1f5f9 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 12px; }
.attach-thumb.pdf-thumb { background: #fee2e2; color: #b91c1c; font-weight: 600; }
.attach-meta { padding: 7px 9px; font-size: 11.5px; color: var(--ink-2); line-height: 1.4; }
.attach-name { font-weight: 600; color: var(--ink); word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: column; overflow: hidden; }
.attach-actions { display: flex; gap: 6px; padding: 0 9px 9px; }
.attach-actions a, .attach-actions button { flex: 1; font-size: 12px; padding: 5px 4px; text-align: center; }

/* ---- 数据备份页 ---- */
.backup-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; margin-bottom: 18px; }
.backup-cron { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; font-size: 13px; line-height: 1.9; }
.backup-cron code { background: #eef2ff; color: #3730a3; padding: 2px 7px; border-radius: 6px; word-break: break-all; }
.backup-list-table td .bk-size { color: var(--ink-3); }

/* ---- 通用：说明小卡片 / 口径说明 ---- */
.scope-note { background: #f8fafc; border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 8px; padding: 10px 14px; font-size: 12.5px; color: var(--ink-2); line-height: 1.8; margin-bottom: 16px; }
.scope-note b { color: var(--ink); }

/* ---- 打印派工单 ---- */
.print-page { max-width: 820px; margin: 0 auto; background: #fff; }
.print-toolbar { text-align: right; margin-bottom: 12px; }
.print-sheet { border: 1px solid #d1d5db; border-radius: 6px; padding: 30px 34px; color: #111; }
.print-sheet h1 { text-align: center; font-size: 22px; margin: 0 0 4px; }
.print-sheet .print-sub { text-align: center; color: #444; font-size: 13px; margin-bottom: 18px; }
.print-sheet table { width: 100%; border-collapse: collapse; font-size: 13px; }
.print-sheet td { border: 1px solid #cbd5e1; padding: 8px 10px; vertical-align: top; }
.print-sheet .pk { background: #f3f4f6; width: 110px; font-weight: 600; white-space: nowrap; }
.print-sign { display: flex; justify-content: space-between; margin-top: 40px; font-size: 13px; }
.print-sign div { width: 45%; border-top: 1px solid #999; padding-top: 6px; text-align: center; color: #333; }
@media print {
  body * { visibility: hidden; }
  .print-page, .print-page * { visibility: visible; }
  .print-page { position: absolute; left: 0; top: 0; width: 100%; }
  .print-toolbar { display: none; }
  .print-sheet { border: none; padding: 0; }
}

/* ===== v2.1.0 工单列表状态快捷筛选 Tab ===== */
.status-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 14px;}
.status-tab{display:inline-flex;align-items:center;gap:7px;padding:6px 14px;border-radius:999px;
  background:#f1f5f9;color:#475569;font-size:13px;font-weight:600;text-decoration:none;border:1px solid #e2e8f0;
  transition:all .15s;}
.status-tab:hover{background:#e8eef5;color:#1e3a5f;}
.status-tab .status-count{min-width:20px;height:20px;line-height:20px;padding:0 6px;border-radius:999px;
  background:#e2e8f0;color:#475569;font-size:12px;text-align:center;box-sizing:border-box;}
.status-tab.active{background:#1e3a5f;color:#fff;border-color:#1e3a5f;}
.status-tab.active .status-count{background:rgba(255,255,255,.22);color:#fff;}
.status-tab.st-doing.active{background:#2563eb;border-color:#2563eb;}
.status-tab.st-done.active{background:#16a34a;border-color:#16a34a;}
.status-tab.st-invalid.active{background:#94a3b8;border-color:#94a3b8;}

/* =====================================================================
 * v3.0.0 新增样式
 *  侧边导航分组 / 输入框统一 / 统计趋势图 / 客户详情 / 超期待办 /
 *  图片灯箱 / 扫码弹层 / 重复客户提醒 / 移动端退出按钮强化
 * ===================================================================== */

/* ---- 侧边导航分组（前台 + 后台共用） ---- */
.menu-group { margin-bottom: 4px; }
.menu-group-title {
  padding: 12px 18px 4px; font-size: 11px; letter-spacing: 1.5px;
  color: rgba(255,255,255,.42); font-weight: 600;
}
.menu-group:first-child .menu-group-title { padding-top: 6px; }

/* ---- 输入框 / 下拉 / 文本域 统一规范 ---- */
.form-control,
input.form-control, select.form-control, textarea.form-control {
  width: 100%; min-height: 38px; padding: 8px 12px; font-size: 14px; line-height: 1.4;
  color: var(--ink-1, #0f172a); background: #fff;
  border: 1px solid #cbd5e1; border-radius: 8px; outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
textarea.form-control { min-height: 84px; resize: vertical; }
.form-control::placeholder { color: #94a3b8; }
.form-control:focus {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.form-control:disabled, .form-control[readonly] {
  background: #f1f5f9; color: #64748b; cursor: not-allowed; border-color: #e2e8f0;
}
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
/* 表单两列栅格（账号安全-个人资料等） */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
@media (max-width: 720px){ .form-grid { grid-template-columns: 1fr; } }

/* ---- 数据统计：近 7/30 天纯 CSS 趋势图 ---- */
.trend-card { margin-bottom: 18px; }
.trend-tabs { margin-left: 12px; display: inline-flex; gap: 4px; }
.trend-tab { padding: 3px 12px; border-radius: 999px; font-size: 12px; color: var(--ink-2,#475569); background:#f1f5f9; }
.trend-tab.active { background: var(--primary,#2563eb); color:#fff; }
.trend-legend { font-size: 12px; color: var(--ink-3,#64748b); margin: 6px 0 2px; }
.trend-legend .lg { display:inline-block; width:10px; height:10px; border-radius:2px; margin:0 4px 0 10px; vertical-align:-1px; }
.trend-legend .lg-new { background:#3b82f6; } .trend-legend .lg-done { background:#16a34a; }
.trend-chart { display:flex; align-items:flex-end; gap:2px; height:190px; padding-top:10px; border-bottom:1px solid #e2e8f0; }
.trend-col { flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; }
.trend-bars { display:flex; align-items:flex-end; justify-content:center; gap:2px; width:100%; height:168px; }
.trend-bars .bar { width:42%; max-width:14px; min-height:0; border-radius:2px 2px 0 0; transition:height .2s; }
.bar-new { background:linear-gradient(180deg,#60a5fa,#2563eb); }
.bar-done { background:linear-gradient(180deg,#4ade80,#16a34a); }
.trend-x { height:16px; font-size:9px; line-height:16px; color:#94a3b8; white-space:nowrap; }

/* ---- 客户档案详情：键值信息栅格 ---- */
.kv-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px 18px; }
.kv-grid .kv-k { display:block; font-size:12px; color:#94a3b8; margin-bottom:3px; }
.kv-grid .kv-v { font-size:14px; color:#0f172a; word-break:break-all; }
@media (max-width:900px){ .kv-grid { grid-template-columns:repeat(2,1fr); } }
.table-dense th, .table-dense td { padding:9px 10px; }
.empty-cell { text-align:center; color:#94a3b8; padding:26px 0; }
td.strong, .strong { font-weight:700; }

/* ---- 首页：超期 / 即将超期待办看板 ---- */
.todo-board { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:20px; }
.todo-col .card-header { border-bottom:2px solid #e2e8f0; }
.todo-overdue .todo-head { color:#e11d48; }
.todo-due .todo-head { color:#d97706; }
.todo-item {
  display:grid; grid-template-columns:auto 1fr auto auto; gap:4px 12px; align-items:center;
  padding:10px 8px; border-bottom:1px solid #f1f5f9; color:inherit;
}
.todo-item:hover { background:#f8fafc; }
.todo-no { color:#1d4ed8; font-weight:600; font-size:12.5px; }
.todo-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.todo-phone { color:#64748b; font-size:12.5px; }
.todo-time { font-size:12px; padding:2px 9px; border-radius:999px; white-space:nowrap; }
.overdue-tag { background:#ffe4e6; color:#e11d48; font-weight:600; }
.due-tag { background:#fef3c7; color:#b45309; }
@media (max-width:900px){ .todo-board { grid-template-columns:1fr; } }

/* ---- 图片灯箱 ---- */
.lightbox-mask {
  position:fixed; inset:0; background:rgba(2,6,23,.9); display:none;
  align-items:center; justify-content:center; z-index:9999; padding:24px;
}
.lightbox-mask.show { display:flex; }
.lightbox-img { max-width:94vw; max-height:86vh; border-radius:8px; box-shadow:0 20px 60px rgba(0,0,0,.5); background:#fff; }
.lightbox-cap { position:absolute; bottom:26px; left:0; right:0; text-align:center; color:#cbd5e1; font-size:13px; }
/* 灯箱右上角显式关闭按钮（灯箱不支持点击空白处关闭，与全站弹窗行为一致） */
.lightbox-close { position:fixed; top:18px; right:22px; width:44px; height:44px; border-radius:50%;
  border:1px solid rgba(255,255,255,.35); background:rgba(15,23,42,.6); color:#fff;
  font-size:24px; line-height:1; cursor:pointer; z-index:10000; display:flex; align-items:center; justify-content:center; }
.lightbox-close:hover { background:rgba(15,23,42,.9); }

/* ---- 重复客户提醒（电话失焦带出历史时的醒目提示） ---- */
.lookup-hint.repeat { border-color:#fb923c; background:#fff7ed; color:#9a3412; }
.lookup-hint .lh-warn { color:#c2410c; font-weight:700; margin-bottom:4px; }
/* 浮动提醒：绝对定位于输入框下方，不挤占表单布局 */
.h-ctrl { position: relative; }
.lookup-float { position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:60; margin-top:0; box-shadow:var(--shadow-lg); }

/* ---- 移动端：确保退出按钮始终可见且不被挤压 ---- */
@media (max-width: 900px){
  .topbar-right { gap: 8px; }
  .topbar-right .logout {
    display:inline-flex !important; flex-shrink:0; align-items:center;
    padding:6px 12px; font-size:13px; border:1px solid var(--danger,#dc2626);
    border-radius:8px; color:var(--danger,#dc2626); white-space:nowrap;
  }
  .bell-link { width:34px; height:34px; flex-shrink:0; margin-right:10px; }
}

/* ---- 危险文字小按钮（清空已读等） ---- */
.btn-text-danger.btn-sm { line-height:1.4; }

/* ---- 卡片头部右侧按钮组（统一横向排列与间距） ---- */
.card-header .header-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.card-header .header-actions form { margin:0; }

/* =====================================================================
 * v4.0.0 样式增量
 * ===================================================================== */

/* ---- 页面标题（统一各页一级标题） ---- */
.page-title { font-size:19px; font-weight:700; color:var(--ink-1); margin:2px 0 16px; }

/* ---- 顶部居中悬浮 toast（PC/WAP 均固定在顶栏下方居中，自动消失，不占布局、不遮挡两侧内容） ---- */
.toast-wrap { position:fixed; top:72px; bottom:auto; left:50%; right:auto; transform:translateX(-50%); z-index:9999; width:min(440px, calc(100vw - 36px)); display:flex; flex-direction:column; gap:10px; pointer-events:none; }
.toast {
  pointer-events:auto; width:100%; box-sizing:border-box; display:flex; align-items:flex-start; gap:10px;
  background:#fff; border-radius:10px; padding:13px 14px; box-shadow:var(--shadow-lg);
  border:1px solid var(--border); border-left:4px solid var(--primary);
  opacity:0; transform:translateY(14px); transition:opacity .28s, transform .28s; font-size:14px; color:var(--ink-1);
}
.toast.show { opacity:1; transform:translateY(0); }
.toast .toast-ico { flex:none; width:22px; height:22px; line-height:22px; text-align:center; border-radius:50%; color:#fff; font-weight:700; font-size:13px; }
.toast .toast-msg { flex:1; line-height:1.5; word-break:break-all; }
.toast .toast-x { flex:none; border:0; background:transparent; color:var(--ink-3); font-size:18px; cursor:pointer; line-height:1; padding:0 2px; }
.toast-success { border-left-color:var(--ok); } .toast-success .toast-ico { background:var(--ok); }
.toast-danger { border-left-color:var(--danger); } .toast-danger .toast-ico { background:var(--danger); }
.toast-warning { border-left-color:var(--warn); } .toast-warning .toast-ico { background:var(--warn); }
.toast-info { border-left-color:var(--primary); } .toast-info .toast-ico { background:var(--primary); }
/* WAP（手机）端 toast 固定在顶部导航下方，避免底部浏览器工具栏遮挡看不到；PC 保持底部居中 */
@media (max-width:640px){
  .toast-wrap{ top:calc(66px + env(safe-area-inset-top, 0px)); bottom:auto; width:calc(100vw - 24px); }
  .toast{ max-width:none; min-width:0; }
}

/* ---- 电话双色区分：客户电话=主色蓝加粗；修理厂/师傅电话=青色 ---- */
.tel-cust { color:var(--primary); font-weight:600; white-space:nowrap; }
.tel-merc { color:var(--teal); white-space:nowrap; }

/* ---- 离线库在线更新进度条弹层 ---- */
.geo-progress { margin:14px 0 6px; height:14px; border-radius:8px; background:var(--muted-soft); overflow:hidden; border:1px solid var(--border); }
.geo-progress-bar { height:100%; width:0%; border-radius:8px; background:linear-gradient(90deg,var(--primary),#60a5fa); transition:width .25s ease; }
.geo-progress-bar.indeterminate { width:35% !important; background:linear-gradient(90deg,transparent,var(--primary),transparent); animation:geo-indet 1.1s infinite linear; }
@keyframes geo-indet { 0%{ margin-left:-35%; } 100%{ margin-left:100%; } }
.geo-progress-text { font-size:13px; color:var(--ink-2); line-height:1.6; word-break:break-all; }
.geo-progress-text.ok { color:var(--ok); font-weight:600; }
.geo-progress-text.err { color:var(--danger); font-weight:600; }

/* ---- 通用 CSS 模态框（确认 / 指派） ---- */
.modal-mask {
  position:fixed; inset:0; z-index:9990; background:rgba(15,23,42,.5); display:none;
  align-items:center; justify-content:center; padding:18px;
}
.modal-mask.show { display:flex; }
.modal-dialog { background:#fff; border-radius:12px; width:480px; max-width:100%; max-height:90vh; overflow:auto; box-shadow:var(--shadow-lg); }
.modal-dialog.modal-sm { width:400px; }
.modal-head { display:flex; align-items:center; justify-content:space-between; padding:15px 18px; border-bottom:1px solid var(--border); font-weight:700; font-size:15.5px; }
.modal-x { border:0; background:transparent; font-size:22px; line-height:1; color:var(--ink-3); cursor:pointer; }
.modal-body { padding:18px; }
.modal-foot { display:flex; justify-content:flex-end; gap:10px; padding:13px 18px; border-top:1px solid var(--border); }

/* ---- 表单：铺满 / 操作区 / 双输入 / 勾选网格 ---- */
.form-actions { margin-top:6px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; row-gap:8px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 20px; }
.form-grid .form-group.full, .form-grid .full { grid-column:1 / -1; }
.dual-input { display:flex; gap:10px; }
.dual-input .form-control { flex:1; }
.check-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); gap:10px; }
.check-grid .radio-pill { margin:0; justify-content:flex-start; }
.radio-pill.pill-locked { opacity:.85; background:var(--muted-soft); }
.radio-pill em { font-style:normal; font-size:12px; color:var(--ink-3); margin-left:auto; }
.settings-form .card, .form-lg.card { margin-bottom:18px; }
@media (max-width:720px){ .form-grid { grid-template-columns:1fr; } .dual-input { flex-direction:column; } }

/* ---- 服务项目：拉开一级 / 二级色块对比 ---- */
.svc-cats { background:#f1f5fb; border:1px solid #e3e9f4; border-radius:10px; padding:10px; }
.svc-cat { background:#fff; border-color:#d4dcec; color:var(--ink-2); font-weight:600; }
.svc-cat:hover { border-color:var(--primary); color:var(--primary); }
.svc-cat.active {
  background:linear-gradient(135deg,#1d4ed8,#2563eb); border-color:#1d4ed8; color:#fff;
  box-shadow:0 4px 10px rgba(37,99,235,.35);
}
.svc-items { padding-left:2px; }
.svc-item span { background:#fafbfd; border-style:dashed; border-color:#dbe2ee; color:var(--ink-2); }
.svc-item:hover span { border-color:#60a5fa; background:#fff; }
.svc-item input:checked + span {
  background:#eef6ff; border:1px solid #3b82f6; color:#1d4ed8; font-weight:700;
  box-shadow:inset 3px 0 0 #3b82f6; border-style:solid;
}

/* ---- 验证码加大 + 登录输入防 iOS 聚焦放大 ---- */
.captcha-img { height:36px; width:104px; border-radius:8px; border:1px solid var(--border); cursor:pointer; background:#f5f6fa; }
.login-form .form-control, .login-panel input.form-control { font-size:16px; }
.captcha-row input.form-control { font-size:16px; }
/* 全站表单输入在小屏不小于 16px，避免 iOS Safari 聚焦自动放大 */
@media (max-width:640px){
  input.form-control, select.form-control, textarea.form-control { font-size:16px; }
}

/* ---- 后台控制台 ---- */
.stat-grid-today { grid-template-columns:repeat(4,1fr); margin-bottom:16px; }
.stat-grid-today .stat-card { color:#fff; position:relative; overflow:hidden; }
.stat-grid-today .stat-card .label { color:rgba(255,255,255,.85); }
.stat-grid-today .stat-card .value { color:#fff; font-size:30px; }
.stat-accent-blue { background:linear-gradient(135deg,#3b82f6,#2563eb); }
.stat-accent-green { background:linear-gradient(135deg,#22c55e,#16a34a); }
.stat-accent-red { background:linear-gradient(135deg,#f87171,#dc2626); }
.stat-accent-cyan { background:linear-gradient(135deg,#22d3ee,#0891b2); }
.dash-cols { display:grid; grid-template-columns:1.6fr 1fr; gap:18px; margin-top:18px; align-items:start; }
.dash-cols-equal { grid-template-columns:1fr 1fr; align-items:stretch; }
/* 等高两栏：卡片撑满栅格高度，底部随卡片圆角裁切，避免出现直角/高低不一 */
.dash-cols-equal > .card { margin-bottom:0; display:flex; flex-direction:column; overflow:hidden; }
.dash-cols-equal > .card > .card-body { flex:1 1 auto; }
/* 控制台“最新工单 / 最近操作”两栏：按列对齐——首列左、中列居中、末列右，垂直居中 */
.dash-recent .table-dense td { vertical-align:middle; }
.dash-recent .table-dense td:first-child { text-align:left; }
.dash-recent .table-dense td:nth-child(2) { text-align:center; }
.dash-recent .table-dense td:last-child { text-align:right; }
.dash-recent .table-dense td:nth-child(2) .sub-text { text-align:center; }
.dash-recent .table-dense td.empty-cell { text-align:center; }
/* 统计色块与下方卡片之间留出间距（控制台快捷入口等） */
.stat-grid + .card { margin-top:20px; }
.quick-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
/* 控制台快捷入口平铺：PC 一行 8 个，平板 4 个，手机 2 个 */
.quick-grid-flat { grid-template-columns:repeat(8,1fr); }
@media (max-width:1200px){ .quick-grid-flat { grid-template-columns:repeat(4,1fr); } }
.quick-btn { display:block; text-align:center; padding:14px 8px; border:1px solid var(--border); border-radius:10px; background:#fafbfd; color:var(--ink-1); font-size:13.5px; transition:all .15s; }
.quick-btn:hover { border-color:var(--primary); background:var(--primary-soft); color:var(--primary-dark); text-decoration:none; }
.sec-list { list-style:none; margin:0; padding:0; }
.sec-list li { display:flex; align-items:center; justify-content:space-between; padding:10px 2px; border-bottom:1px dashed var(--border); font-size:14px; }
.sec-list li:last-child { border-bottom:0; }
.sec-ok { color:var(--ok); font-weight:700; font-size:13px; }
.sec-off { color:var(--warn); font-weight:700; font-size:13px; }
.more-link { font-size:13px; color:var(--primary); font-weight:400; }
.card-header .more-link { margin-left:auto; }
@media (max-width:1100px){ .dash-cols { grid-template-columns:1fr; } .quick-grid{ grid-template-columns:repeat(3,1fr);} }
@media (max-width:640px){
  .stat-grid { grid-template-columns:repeat(2,1fr) !important; gap:10px; }
  .stat-grid-today { grid-template-columns:repeat(2,1fr); gap:10px; }
  .quick-grid { grid-template-columns:repeat(2,1fr); }
}

/* ---- 后台通用：标签 / 筛选条 / 分页紧凑 ---- */
.tag { display:inline-block; padding:2px 9px; border-radius:20px; background:var(--primary-soft); color:var(--primary-dark); font-size:12px; }
.filter-bar { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:14px; align-items:center; }
.badge-success { background:var(--ok-soft); color:var(--ok); }
.badge-warn { background:var(--warn-soft); color:var(--warn); }

/* ---- 侧边栏：退出 / 后台入口强调 ---- */
.menu-logout { color:#fca5a5; }
.menu-logout:hover { background:rgba(220,38,38,.18); color:#fff; }
.menu-logout .menu-ico svg { stroke:#fca5a5; }

/* ---- 后台表单铺满（统一两列，窄屏单列） ---- */
.content .card .form-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 20px; }
.content .card .form-grid .full, .content .card .form-grid .form-group.full { grid-column:1/-1; }
@media (max-width:760px){ .content .card .form-grid { grid-template-columns:1fr; } }

/* ---- 移动端：表格/详情错位兜底 ---- */
@media (max-width:640px){
  .h-row { flex-direction:column; }
  .h-row .h-label { width:auto; padding-top:0; margin-bottom:6px; }
  .detail-grid { grid-template-columns:1fr !important; }
  .two-col { grid-template-columns:1fr; }
  .table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .op-cell .btn { margin-bottom:4px; }
  /* 工单详情 kv-table：四列表格在手机上重排为“标签|值”两列，避免挤压错位 */
  table.kv-table, .kv-table tbody { display:block; }
  .kv-table tr { display:grid; grid-template-columns:34% 66%; }
  .kv-table th, .kv-table td { display:block; width:auto !important; padding:9px 11px; }
  .kv-table td[colspan] { grid-column:2; }
  .detail-head { flex-direction:column; align-items:stretch; }
  .detail-head .op-cell { display:flex; flex-wrap:wrap; gap:6px; }
}


/* ---- 数据大屏独立密码页（深色，全局样式，供 screen_login.php 使用） ---- */
body.screen-login-body { background:radial-gradient(900px 500px at 50% -10%,#10315c,#07111f); min-height:100vh; display:flex; align-items:center; justify-content:center; margin:0; }
.screen-login-card { width:360px; max-width:90vw; background:rgba(20,40,72,.72); border:1px solid rgba(86,152,255,.3); border-radius:16px; padding:34px 30px; text-align:center; color:#dbeafe; box-shadow:0 20px 60px rgba(0,0,0,.4); }
.screen-login-card .sl-icon { width:60px; height:60px; line-height:60px; margin:0 auto 14px; font-size:30px; border-radius:16px; background:rgba(59,130,246,.2); color:#60a5fa; }
.screen-login-card h1 { font-size:20px; color:#dbeafe; margin:0 0 6px; }
.screen-login-card .sl-sub { font-size:13px; color:#7f9bbd; margin-bottom:22px; }
.screen-login-card .sl-input { height:46px; text-align:center; font-size:16px; margin-bottom:14px; }
.screen-login-card .sl-hint { font-size:12px; color:#64748b; margin-top:12px; }
.screen-login-card .sl-back { margin-top:16px; font-size:13px; }
.screen-login-card .sl-back a { color:#60a5fa; }

/* =====================================================================
 * v5.0.0 增补样式
 *  - 悬浮提示下移，避免遮挡顶栏/内容
 *  - 一级/二级救援项目色块拉开
 *  - SLA 标签 / 客户评级 / 回访记录 / 完结弹窗 / 密码实时规则
 *  - 大屏轮播、区域热力云、登录备案、防双击放大
 * ===================================================================== */

/* 防移动端双击/点空白放大：允许平移，禁用双击缩放 */
html, body { touch-action: manipulation; }
button, a.btn, .svc-cat, .svc-item span, .radio-pill, .status-tab, select, input[type=checkbox], input[type=radio] { touch-action: manipulation; }

/* toast 统一固定在顶栏下方居中；WAP 略下移以贴合移动顶栏高度并避开刘海安全区 */
@media (min-width:641px){
  .toast-wrap { top: calc(72px + env(safe-area-inset-top, 0px)); }
}
@media (max-width:640px){
  .toast-wrap { top: calc(66px + env(safe-area-inset-top, 0px)); bottom:auto; width:calc(100vw - 24px); }
}

/* 通知角标：无未读时隐藏 */
.bell-badge { display:none; }
.bell-badge.show { display:block; }

/* 一级 / 二级救援项目：色块明显区分 */
.svc-cats { background:#eef3fb; border:1px solid #dbe4f2; }
.svc-cat { background:#1e3a5f; border-color:#1e3a5f; color:#eaf1fb; font-weight:600; }
.svc-cat:hover { background:#2b4d7a; border-color:#2b4d7a; color:#fff; }
.svc-cat.active { background:var(--primary); border-color:var(--primary); color:#fff; box-shadow:0 4px 10px rgba(37,99,235,.35); }
.svc-item span { background:#fff; border:1px solid #cdd7e8; border-style:solid; color:var(--ink-1); }
.svc-item:hover span { border-color:var(--primary); background:#f5f9ff; }
.svc-item input:checked + span { background:var(--primary); border-color:var(--primary); color:#fff; font-weight:600; }
.svc-placeholder { color:#94a3b8; font-size:13.5px; padding:6px 2px 0; }

/* 标签内的补充说明小字 */
.label-sub { color:#94a3b8; font-weight:400; font-size:12.5px; margin-left:4px; }

/* 登录页备案号 */
.login-beian { margin-top:22px; padding-top:14px; border-top:1px solid #eef0f4; text-align:center; font-size:12.5px; }
.login-beian a { color:#94a3b8; margin:0 8px; }
.login-beian a:hover { color:var(--primary); }
.beian-links { font-size:12.5px; }
.beian-links a { color:#94a3b8; margin-left:10px; }

/* 验证码尺寸（与输入框高度协调，不突兀） */
.captcha-img.captcha-lg { width:104px; height:36px; }
.captcha-row .captcha-input { flex:1; }

/* SLA 时效标签 */
.sla-tag { display:inline-block; padding:2px 10px; border-radius:20px; font-size:12px; font-weight:600; border:1px solid; margin-left:8px; }

/* 客户评级徽章 */
.rating-badge { display:inline-block; min-width:26px; text-align:center; padding:2px 8px; border-radius:6px; font-weight:700; font-size:12.5px; }
.rating-badge.rate-a { background:#fef3c7; color:#b45309; }
.rating-badge.rate-b { background:#dbeafe; color:#1d4ed8; }
.rating-badge.rate-c { background:#dcfce7; color:#15803d; }
.rating-badge.rate-n { background:#f1f5f9; color:#94a3b8; }

/* 客户回访记录 */
.visit-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.visit-item { border:1px solid var(--border); border-radius:10px; padding:12px 14px; background:#fafbfd; }
.visit-head { display:flex; align-items:center; gap:10px; margin-bottom:6px; flex-wrap:wrap; }
.visit-result { display:inline-block; padding:2px 10px; border-radius:20px; font-size:12px; font-weight:600; }
.visit-r-很满意 { background:#dcfce7; color:#15803d; }
.visit-r-满意 { background:#dbeafe; color:#1d4ed8; }
.visit-r-一般 { background:#fef9c3; color:#a16207; }
.visit-r-不满意 { background:#fee2e2; color:#b91c1c; }
.visit-content { font-size:13.5px; line-height:1.6; color:var(--ink-1); }
.visit-form { margin-top:12px; }

/* 完结弹窗金额输入 */
#completeModal .modal-body label { display:block; margin:6px 0; font-weight:600; font-size:14px; }

/* 密码实时强弱提示 */
.pwd-rule { font-size:12.5px; color:#94a3b8; margin-top:6px; }
.pwd-rule.ok { color:var(--ok); }
.pwd-rule.bad { color:var(--danger); }

/* 数据大屏：多屏轮播（激活屏必须保持 flex 纵向布局，否则内部 flex:1 板块不撑满、两屏不等高） */
.s-slide { display:none; }
.carousel-on .s-slide.active { display:flex; }
.s-dots { display:flex; gap:8px; justify-content:center; margin-top:14px; }
.s-dot { width:9px; height:9px; border-radius:50%; background:rgba(255,255,255,.25); cursor:pointer; }
.s-dot.active { background:#60a5fa; width:22px; border-radius:5px; }
/* 区域热力云（替代真实地图，离线可用） */
.region-cloud { display:flex; flex-wrap:wrap; gap:10px; align-content:flex-start; }
.region-chip { padding:8px 14px; border-radius:10px; border:1px solid rgba(96,165,250,.35); background:rgba(30,58,95,.55); color:#dbeafe; font-size:14px; }
.region-chip b { color:#fff; font-size:16px; margin-left:6px; }
.region-chip.heat-1 { background:rgba(37,99,235,.35); }
.region-chip.heat-2 { background:rgba(37,99,235,.55); border-color:#60a5fa; }
.region-chip.heat-3 { background:rgba(220,38,38,.55); border-color:#f87171; }
.region-chip.heat-4 { background:rgba(220,38,38,.8); border-color:#fca5a5; }
.sla-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:5px; }

/* 后台/前台表单在窄屏统一铺满（兜底） */
@media (max-width:640px){
  .content .card .form-grid, .form-grid { grid-template-columns:1fr !important; }
  .form-horizontal .h-ctrl { width:100%; }
}

/* =====================================================================
 * v5.0.0 补充样式
 * ===================================================================== */

/* 入驻类型卡片单选（师傅 / 修理厂） */
.type-pick { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; }
.type-card { display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:16px 18px;
  border:2px solid var(--border); border-radius:12px; cursor:pointer; background:#fafbfd;
  transition:border-color .15s, box-shadow .15s, background .15s; position:relative; }
.type-card:hover { border-color:#93c5fd; background:#f8fbff; }
.type-card input[type="radio"] { position:absolute; opacity:0; pointer-events:none; }
.type-card .type-ico { font-size:30px; line-height:1; }
.type-card .type-name { font-size:16px; font-weight:700; color:var(--ink-1); }
.type-card .type-sub { font-size:12.5px; color:var(--ink-3); line-height:1.5; }
.type-card:has(input:checked) { border-color:var(--primary); background:#eff6ff;
  box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.type-card:has(input:checked) .type-name { color:var(--primary); }
@media (max-width:560px){ .type-pick { grid-template-columns:1fr; } }

/* 入驻类型标签（列表） */
.tag.type-master { background:#eef2ff; color:#4338ca; border:1px solid #c7d2fe; }
.tag.type-shop   { background:#ecfdf5; color:#047857; border:1px solid #a7f3d0; }

/* 多选分屏/权限的复选框容器 */
.check-grid { display:flex; flex-wrap:wrap; gap:10px; }
.check-grid .radio-pill { display:inline-flex; align-items:center; gap:6px; }

/* 后台控制台 / 备份统计卡：手机端一行 2 个、更紧凑 */
@media (max-width:640px){
  .stat-grid, .backup-summary { grid-template-columns:repeat(2, minmax(0,1fr)) !important; gap:10px !important; }
  .stat-grid .stat-card, .backup-summary .stat-card { padding:12px !important; }
  .stat-grid .stat-card .value, .backup-summary .stat-card .value { font-size:22px !important; }
  .stat-grid .stat-card .label, .backup-summary .stat-card .label { font-size:12px !important; }
  .dash-cols { grid-template-columns:1fr !important; }
  .quick-grid { grid-template-columns:repeat(2, minmax(0,1fr)) !important; }
}

/* toast 层级保证（位置统一为底部居中，见通用区块与移动端适配区块） */
.toast-wrap { z-index:9999; }

/* 密码两次一致实时校验 */
input.form-control.ok { border-color:var(--ok); }
input.form-control.bad { border-color:var(--danger); }

/* =====================================================================
 * v5.0.3 后台控制台手机端防撑破
 *  - 网格子项允许收缩（min-width:0），长表格在卡片内横向滚动而不是撑开整页
 *  - 快捷入口按钮文字换行，安全状态条目紧凑不溢出
 * ===================================================================== */
.dash-cols > div { min-width: 0; }
.dash-cols .card { min-width: 0; }
.quick-grid { min-width: 0; }
.quick-btn { min-width: 0; word-break: break-all; line-height: 1.4; }
.sec-list { min-width: 0; }
.sec-list li { gap: 10px; min-width: 0; }
.sec-list li > span:first-child { min-width: 0; word-break: break-all; }
.content { overflow-x: hidden; }
.table-dense td { word-break: break-word; }
@media (max-width:640px){
  .content { padding: 14px 12px; }
  .quick-btn { padding: 13px 6px; font-size: 13px; }
  .sec-list li { font-size: 13px; padding: 9px 0; }
  .card-body { padding: 14px; }
}

/* =====================================================================
 * v5.0.6 IP 白名单规则列表：IP 不挤压；手机端改为卡片式逐行展示
 * ===================================================================== */
.table-whitelist td code {
  display: inline-block;
  padding: 3px 8px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .table-whitelist thead { display: none; }
  .table-whitelist, .table-whitelist tbody, .table-whitelist tr, .table-whitelist td { display: block; width: 100% !important; }
  .table-whitelist tr {
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: #fff;
  }
  .table-whitelist td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    border: 0 !important;
    border-bottom: 1px dashed var(--border) !important;
    padding: 9px 2px !important;
    white-space: normal !important;
    text-align: right;
  }
  .table-whitelist td:last-child { border-bottom: 0 !important; }
  .table-whitelist td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--ink-3);
    flex: 0 0 auto;
    text-align: left;
  }
  .table-whitelist td[data-label="IP 规则"] { flex-direction: column; align-items: stretch; gap: 6px; text-align: left; }
  .table-whitelist .wl-empty td { display: block; text-align: center !important; }
  .table-whitelist .wl-empty td::before { content: none; }
}

/* =====================================================================
 * v5.3 增补：角色权限分组、派工推荐卡片
 * ===================================================================== */
/* 角色权限：按功能分组 */
.perm-group { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: #fbfcfe; }
.perm-group-title { font-weight: 700; font-size: 13.5px; color: var(--ink-1); margin-bottom: 10px; }
.perm-group .check-grid { margin: 0; }

/* 派工推荐卡片面板 */
.assign-panel { margin-top: 10px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe; overflow: hidden; }
.assign-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); background: #f5f7fb; }
.assign-panel-head span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.assign-more { border: 1px solid var(--primary); background: #fff; color: var(--primary); border-radius: 7px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.assign-more:hover { background: var(--primary-soft); }
.assign-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; padding: 12px; max-height: 260px; overflow-y: auto; }
.assign-card { text-align: left; border: 1px solid var(--border); border-radius: 9px; background: #fff; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; transition: border-color .15s, box-shadow .15s; }
.assign-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.assign-card.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary) inset; }
.assign-card .ac-name { font-size: 14px; font-weight: 700; color: var(--ink-1); }
.assign-card .ac-phone { font-size: 13.5px; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.assign-card .ac-addr { font-size: 12px; color: var(--ink-2); line-height: 1.4; word-break: break-all; }
.assign-card .ac-meta { font-size: 12px; color: var(--ink-3); }
.assign-empty { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3); padding: 6px 2px; }
