/* 设备管理系统 - 移动端样式 */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eaf1ff;
  --ok: #16a34a;
  --warn: #f59e0b;
  --danger: #dc2626;
  --info: #2563eb;
  --purple: #7c3aed;
  --cyan: #0891b2;
  --muted: #94a3b8;
  --bg: #f2f4f8;
  --card: #ffffff;
  --text: #111827;
  --sub: #6b7688;
  --line: #edf0f5;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(17, 24, 39, .06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: #e9edf4;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 手机外壳 ---------- */
.phone {
  width: 390px;
  height: 844px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  border-radius: 42px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28), 0 0 0 10px #1f2937, 0 0 0 12px #374151;
  display: flex;
  flex-direction: column;
}

@media (max-width: 460px), (max-height: 880px) {
  .phone {
    width: 100%; height: 100%;
    border-radius: 0; box-shadow: none;
    border: none;
  }
  html, body { background: var(--bg); }
}

/* 状态栏 */
.statusbar {
  height: 44px;
  flex: 0 0 44px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px 0 30px;
  font-size: 13px; font-weight: 600; color: #111827;
  background: #fff;
  position: relative; z-index: 30;
}
.statusbar .sb-right { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.statusbar .sb-battery {
  width: 22px; height: 11px; border: 1px solid #111827; border-radius: 3px; position: relative; padding: 1px;
}
.statusbar .sb-battery::after {
  content: ''; position: absolute; right: -3px; top: 3px; width: 2px; height: 5px; background: #111827; border-radius: 0 1px 1px 0;
}
.statusbar .sb-battery i { display: block; height: 100%; width: 76%; background: #111827; border-radius: 1px; }
.statusbar .notch {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  width: 116px; height: 28px; background: #111827; border-radius: 16px;
}
@media (max-width: 460px), (max-height: 880px) { .statusbar { display: none; } }

/* ---------- 骨架 ---------- */
.app { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.page-wrap { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
.page-wrap::-webkit-scrollbar { width: 0; }

/* 顶栏 */
.navbar {
  flex: 0 0 auto;
  height: 48px; display: flex; align-items: center;
  padding: 0 14px; background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff; position: relative;
}
.navbar .back { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px; }
.navbar .title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; margin-right: 34px; }
.navbar .act { min-width: 34px; text-align: right; font-size: 13px; cursor: pointer; }
/* 顶栏「同步最新数据」按钮：多端协作时手动拉一次，等不及自动轮询用它 */
.navbar .act .sync-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 17px; cursor: pointer; vertical-align: middle;
}
.navbar .act .sync-btn:active { background: rgba(255, 255, 255, .2); }

/* 底部 tabbar */
.tabbar {
  flex: 0 0 auto;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar .tab {
  flex: 1; padding: 7px 0 6px; text-align: center; color: var(--muted); font-size: 10px; cursor: pointer;
  transition: color .18s;
}
.tabbar .tab .ico { font-size: 20px; line-height: 1.2; display: block; }
.tabbar .tab .ico svg { width: 21px; height: 21px; display: block; margin: 0 auto; }
.tabbar .tab.on { color: var(--primary); font-weight: 600; }

/* ---------- 通用组件 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin: 10px 12px; overflow: hidden; }
.card-hd { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px 4px; }
.card-hd h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-hd .more { font-size: 12px; color: var(--sub); cursor: pointer; }
.card-bd { padding: 10px 14px 14px; }
.card-bd.tight { padding: 4px 0 8px; }

.sec-title { margin: 16px 14px 8px; font-size: 13px; font-weight: 600; color: var(--sub); display: flex; justify-content: space-between; align-items: center; }

/* 标签 */
.tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 5px; font-size: 11px; line-height: 17px; white-space: nowrap; }
.tag.ok { background: #e8f8ee; color: var(--ok); }
.tag.warn { background: #fef4e4; color: #b45309; }
.tag.danger { background: #fdeaea; color: var(--danger); }
.tag.info { background: var(--primary-soft); color: var(--primary); }
.tag.primary { background: var(--primary-soft); color: var(--primary); }
.tag.muted { background: #f1f3f7; color: var(--sub); }
.tag.purple { background: #f1eafe; color: var(--purple); }
.tag.cyan { background: #e3f4f8; color: var(--cyan); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); }
.dot.danger { background: var(--danger); } .dot.muted { background: var(--muted); }
.dot.info { background: var(--info); }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 12px; }
.stat-grid.c2 { grid-template-columns: repeat(2, 1fr); }
.stat-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.stat {
  background: #fff; border-radius: 12px; padding: 11px 10px; box-shadow: var(--shadow);
  text-align: center; cursor: pointer; transition: transform .15s;
}
.stat:active { transform: scale(.97); }
.stat .num { font-size: 19px; font-weight: 700; line-height: 1.2; }
.stat .num small { font-size: 11px; font-weight: 500; margin-left: 1px; }
.stat .lb { font-size: 11px; color: var(--sub); margin-top: 3px; }
.stat .trend { font-size: 10px; margin-top: 2px; }
.up { color: var(--danger); } .down { color: var(--ok); }

/* 九宫格 */
.grid-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 12px 6px 14px; }
.grid-nav .gn { text-align: center; padding: 8px 2px; cursor: pointer; }
.grid-nav .gn:active { opacity: .6; }
.grid-nav .gn .gi {
  width: 42px; height: 42px; border-radius: 12px; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff;
  position: relative;
}
.grid-nav .gn .gi svg { width: 22px; height: 22px; }
.grid-nav .gn .gt { font-size: 11px; color: #374151; }
/* 角标：相对图标右上角定位，不挤占图标内部布局、不随滚动漂移 */
.grid-nav .gn .gi .badge-n {
  position: absolute; top: -5px; right: -5px; transform: none;
  background: var(--danger); color: #fff; font-size: 9px; min-width: 15px; height: 15px;
  border-radius: 8px; line-height: 15px; padding: 0 3px;
  display: block; box-sizing: border-box; text-align: center;
  border: 1.5px solid #fff; font-weight: 700; pointer-events: none; z-index: 2;
}

/* 列表 */
.list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin: 10px 12px; overflow: hidden; }
.li { padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.li:last-child { border-bottom: none; }
.li:active { background: #f7f9fc; }
.li-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.li-title { font-size: 14px; font-weight: 600; line-height: 1.35; flex: 1; }
.li-sub { font-size: 11.5px; color: var(--sub); margin-top: 4px; line-height: 1.5; }
.li-foot { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 11px; color: var(--sub); flex-wrap: wrap; }
.li-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #cbd3e0; font-size: 15px; }
.li.has-arrow { padding-right: 26px; }

/* 分段控件 */
.seg { display: flex; background: #f1f3f7; border-radius: 9px; padding: 3px; margin: 0 12px 4px; }
.seg .sg { flex: 1; text-align: center; padding: 6px 4px; font-size: 12.5px; color: var(--sub); border-radius: 7px; cursor: pointer; }
.seg .sg.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg.scroll { overflow-x: auto; }
.seg.scroll .sg { flex: 0 0 auto; padding: 6px 13px; white-space: nowrap; }

/* 搜索 & 筛选 */
.searchbar { display: flex; gap: 8px; padding: 10px 12px 6px; }
.searchbar .sb {
  flex: 1; height: 34px; background: #fff; border-radius: 9px; display: flex; align-items: center;
  padding: 0 10px; box-shadow: var(--shadow);
}
.searchbar .sb input { flex: 1; border: none; outline: none; font-size: 13px; background: transparent; margin-left: 6px; }
.searchbar .sb .clear { color: #cbd3e0; font-size: 14px; }
.chips { display: flex; gap: 7px; padding: 4px 12px 8px; overflow-x: auto; }
.chips::-webkit-scrollbar { height: 0; }
.chip {
  flex: 0 0 auto; padding: 5px 11px; background: #fff; border-radius: 15px; font-size: 12px;
  color: var(--sub); box-shadow: var(--shadow); cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--primary); color: #fff; font-weight: 600; }

/* 表单 */
.form { padding: 4px 0 10px; }
.fi { display: flex; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.fi:last-child { border-bottom: none; }
.fi .fl { width: 84px; flex: 0 0 84px; color: var(--sub); }
.fi .fv { flex: 1; }
.fi input, .fi select, .fi textarea {
  width: 100%; border: none; outline: none; font-size: 13.5px; background: transparent; color: var(--text);
  font-family: inherit;
}
.fi textarea { resize: none; min-height: 58px; line-height: 1.5; }
.fi select { appearance: none; -webkit-appearance: none; }
.fi .unit { color: var(--muted); font-size: 12px; }
.fi.col { flex-direction: column; align-items: stretch; }
/* 竖排字段：必须把 flex 的基准尺寸也改掉。
 * .fi .fl 写的是 flex: 0 0 84px（横排时的标签宽度），竖向布局会把 84px 当成**高度**，
 * 于是每行带竖排说明的字段都被撑高 84px（报价、故障描述等都中招）。 */
.fi.col .fl { width: auto; flex: 0 0 auto; margin-bottom: 6px; }
.fi.col .fv { flex: 0 0 auto; }
.fi .req::before { content: '*'; color: var(--danger); margin-right: 2px; }

/* 按钮 */
.btn {
  display: block; width: calc(100% - 24px); margin: 14px 12px; height: 44px; line-height: 44px;
  text-align: center; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--primary); color: #fff; border: none; font-family: inherit;
}
.btn:active { opacity: .85; }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid #c7d7fe; }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #f5c6c6; }
.btn.solid-danger { background: var(--danger); color: #fff; border: 1px solid var(--danger); }
.btn.solid-danger:active { opacity: .85; }
.btn.solid-danger svg { vertical-align: -3px; margin-right: 4px; }
.logout-note { font-size: 11.5px; color: var(--sub); text-align: center; margin-top: 8px; line-height: 1.5; }
.btn-row { display: flex; gap: 10px; padding: 0 12px; }
.btn-row .btn { margin: 14px 0; flex: 1; width: auto; }
.btn-mini { padding: 4px 11px; border-radius: 14px; font-size: 12px; border: 1px solid var(--line); background: #fff; color: var(--sub); cursor: pointer; }
.btn-mini.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-mini.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn-mini.danger { background: #fff; color: var(--danger); border-color: #f3c9c9; }

/* 键值 */
.kv { display: flex; padding: 7px 0; font-size: 13px; }
.kv .k { width: 88px; flex: 0 0 88px; color: var(--sub); }
.kv .v { flex: 1; word-break: break-all; }
.kv .v.money { color: var(--danger); font-weight: 600; }

/* 空态 */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .em-ico { font-size: 40px; opacity: .35; margin-bottom: 8px; }
.empty p { margin: 0; font-size: 13px; }

/* 图表 */
.chart { width: 100%; height: auto; display: block; }

/* 悬浮按钮 */
.fab {
  position: absolute; right: 16px; bottom: 74px; width: 50px; height: 50px; border-radius: 25px;
  background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; font-size: 26px; line-height: 48px;
  text-align: center; box-shadow: 0 6px 18px rgba(37, 99, 235, .38); cursor: pointer; z-index: 20;
}
.fab:active { transform: scale(.93); }

/* 弹层 */
.mask { position: absolute; inset: 0; background: rgba(17, 24, 39, .45); z-index: 40; animation: fade .2s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; background: #fff; z-index: 41;
  border-radius: 16px 16px 0 0; padding: 6px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  max-height: 82%; overflow-y: auto; animation: slideup .26s cubic-bezier(.25,.9,.3,1);
}
@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-hd { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 12px; border-bottom: 1px solid var(--line); }
.sheet-hd h3 { margin: 0; font-size: 15px; }
.sheet-hd .close { color: var(--sub); font-size: 18px; cursor: pointer; }
.sheet-bd { padding: 6px 0 4px; }
.opt { padding: 13px 16px; font-size: 14px; cursor: pointer; border-bottom: 1px solid #f5f7fa; }
.opt:last-child { border-bottom: none; }
.opt.on { color: var(--primary); font-weight: 600; }
.opt:active { background: #f7f9fc; }

/* ---------- 「待你处理」卡片 ----------
 * 报修详情页挺长（故障信息 + 处理进度），把当前该我做的事放在最上面，
 * 否则一屏之内看不到操作入口，看起来就像「没有地方可以填」。 */
.todo-card { border-left: 3px solid var(--primary); background: #f7faff; }
.todo-card .card-hd h3 { color: var(--primary); }
.todo-card .more { color: #6b7688; }
.todo-card .fi.col textarea { min-height: 52px; }

/* ---------- 可搜索选择器（设备台账几百上千台，原生 select 只能一路滚） ---------- */
.fpick {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer; min-height: 20px;
}
.fpick .fp-txt {
  flex: 1; font-size: 13.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fpick .fp-ico { flex: 0 0 auto; display: flex; align-items: center; opacity: .9; }
.fpick:active .fp-txt { color: var(--primary); }

.src-box {
  display: flex; align-items: center; gap: 8px; margin: 2px 14px 8px;
  padding: 0 12px; height: 38px; background: #f4f6fa; border-radius: 10px;
}
.src-box .src-ico { display: flex; align-items: center; }
.src-kw {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 13.5px; font-family: inherit; color: var(--text);
}
.src-list { max-height: 52vh; overflow-y: auto; }
.src-it { position: relative; padding: 11px 16px; border-bottom: 1px solid #f5f7fa; cursor: pointer; }
.src-it:last-child { border-bottom: none; }
.src-it:active { background: #f7f9fc; }
.src-it.on { background: #eff6ff; }
.src-it .src-t { font-size: 13.5px; color: var(--text); }
.src-it.on .src-t { color: var(--primary); font-weight: 600; }
.src-it .src-s { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.src-it .src-cur {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--primary); background: #dbeafe;
  border-radius: 999px; padding: 2px 8px;
}

/* toast */
.toast-box { position: absolute; left: 0; right: 0; top: 62px; z-index: 99; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast-item {
  background: rgba(17, 24, 39, .88); color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px;
  animation: tin .25s; max-width: 80%; text-align: center;
}
.toast-item.ok { background: rgba(22, 163, 74, .93); }
.toast-item.err { background: rgba(220, 38, 38, .93); }
.toast-item.out { opacity: 0; transform: translateY(-8px); transition: .3s; }
@keyframes tin { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* 卡片内的提示条（超期告警 / 下一步指引等）—— 原来只写了 class 没写样式 */
.alert-line {
  display: flex; align-items: center; gap: 6px; margin: 0 0 10px;
  padding: 7px 10px; border-radius: 6px; font-size: 12.5px; line-height: 1.5;
}
.alert-line svg { flex: 0 0 auto; }
.alert-line.danger { background: #fef2f2; color: #991b1b; }
.alert-line.warn { background: #fffbeb; color: #92400e; }
.alert-line.info { background: #f0f7ff; color: #1e40af; }
.alert-line.ok { background: #f0fdf4; color: #166534; }

/* 时间轴 */
.timeline { padding: 4px 14px 8px; }
.tl { position: relative; padding: 0 0 16px 18px; border-left: 1.5px solid var(--line); }
.tl:last-child { border-left-color: transparent; padding-bottom: 2px; }
.tl::before {
  content: ''; position: absolute; left: -5px; top: 3px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--muted); border: 2px solid #fff;
}
.tl.ok::before { background: var(--ok); }
.tl.warn::before { background: var(--warn); }
.tl.danger::before { background: var(--danger); }
.tl .t { font-size: 13px; font-weight: 600; }
.tl .d { font-size: 11.5px; color: var(--sub); margin-top: 3px; line-height: 1.5; }
.tl .tm { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* 表格（报表用） */
.tb { width: 100%; border-collapse: collapse; font-size: 12px; }
.tb th { background: #f6f8fb; color: var(--sub); font-weight: 600; padding: 8px 6px; text-align: left; }
.tb td { padding: 9px 6px; border-bottom: 1px solid var(--line); }
.tb tr:last-child td { border-bottom: none; }
.tb .num { text-align: right; font-variant-numeric: tabular-nums; }

/* 进度条 */
.prog { height: 6px; background: #eef1f6; border-radius: 3px; overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 3px; background: var(--primary); }

/* 工作台头部 */
.hero {
  background: linear-gradient(135deg, #2563eb, #3b82f6 55%, #60a5fa);
  padding: 12px 14px 40px; color: #fff;
  position: relative;
}
/* 工作台头部右上角的「同步」按钮（多端协作时手动拉一次最新数据） */
.hero-sync {
  position: absolute; right: 12px; top: 12px;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 9px 3px 7px; border-radius: 12px;
  background: rgba(255, 255, 255, .2); color: #fff;
  font-size: 11.5px; line-height: 1.5; cursor: pointer;
}
.hero-sync:active { background: rgba(255, 255, 255, .34); }
.hero .hi { font-size: 12px; opacity: .9; }
.hero .hn { font-size: 17px; font-weight: 700; margin-top: 3px; }
.hero .hd { font-size: 11.5px; opacity: .85; margin-top: 3px; }
/* 上移让统计卡"浮"在色块上。
 * 注意必须显式抬起绘制层级：.hero 是 position:relative，在绘制顺序上晚于 static 的卡片，
 * 只写上移会导致颜色块把卡片顶部（连数字上半截）整片盖掉 —— 表现为"数字被切了一半"。 */
.hero-cards { margin-top: -30px; position: relative; z-index: 2; }

/* 提醒条 */
.notice {
  display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; padding: 9px 12px;
  background: #fff8ec; border: 1px solid #fbe3b8; border-radius: 10px; font-size: 12px; color: #92400e;
}
.notice.danger { background: #fdf0f0; border-color: #f6cfcf; color: #991b1b; }
.notice .nt { flex: 1; }

/* 滚动提醒条（工作台顶部，多条横向循环滚动） */
.notice-bar {
  position: relative; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  margin: 10px 12px 0; padding: 8px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow);
}
/* 有提醒条时取消卡片上移，避免压住提醒条 */
.notice-bar + .hero-cards { margin-top: 10px; }
.nb-ico { flex: none; display: flex; }
.nb-view {
  flex: 1; overflow: hidden; height: 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}
.nb-track { display: inline-flex; align-items: center; gap: 30px; white-space: nowrap; }
.nb-track.roll { animation: nb-scroll 18s linear infinite; }
.nb-track.roll:hover { animation-play-state: paused; }
@keyframes nb-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.nb-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #475569; cursor: pointer; }
.nb-item:active { opacity: .55; }
.nb-dot { width: 6px; height: 6px; border-radius: 3px; flex: none; display: inline-block; }

/* 详情页头部 */
.detail-hero { background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; padding: 14px 16px 18px; }
.detail-hero h2 { margin: 0; font-size: 17px; }
.detail-hero .sub { font-size: 12px; opacity: .9; margin-top: 5px; }
.detail-hero .row { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; }
.detail-hero .row .n { font-size: 16px; font-weight: 700; display: block; }

/* 日期倒计时 */
.due { font-size: 11px; }
.due.over { color: var(--danger); font-weight: 600; }
.due.soon { color: var(--warn); font-weight: 600; }
.due.norm { color: var(--sub); }

/* 图标行 */
.iconline { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sub); }

/* ---------- 登录页 ---------- */
.login-hero { background: linear-gradient(135deg, #2563eb, #3b82f6 55%, #60a5fa); padding: 58px 24px 44px; color: #fff; text-align: center; }
.login-hero .logo {
  width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,.22);
  margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700;
}
.login-hero h1 { margin: 0; font-size: 21px; font-weight: 700; }
.login-hero p { margin: 6px 0 0; font-size: 12.5px; opacity: .9; }
.login-body { padding: 22px 24px 10px; }
.fi-lg {
  display: flex; align-items: center; height: 48px; border: 1px solid var(--line);
  border-radius: 10px; padding: 0 14px; margin-bottom: 14px; background: #fafbfd;
}
.fi-lg:focus-within { border-color: var(--primary); background: #fff; }
.fi-lg input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; margin-left: 8px; }
.fi-lg .eye { color: var(--muted); cursor: pointer; }
.login-tip { display: flex; justify-content: space-between; font-size: 12px; color: var(--sub); margin: 2px 0 16px; }
.acc {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 9px; cursor: pointer; background: #fff;
}
.acc:active { background: #f7f9fc; }
.acc .av { width: 34px; height: 34px; border-radius: 10px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex: 0 0 34px; }
.acc .ai { flex: 1; }
.acc .ai .n { font-size: 13.5px; font-weight: 600; }
.acc .ai .d { font-size: 11px; color: var(--sub); margin-top: 2px; }
.acc .au { font-size: 11px; color: var(--muted); }

/* ---------- 用户与权限 ---------- */
.uhead { display: flex; align-items: center; gap: 12px; }
.uhead .av { width: 40px; height: 40px; border-radius: 12px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; flex: 0 0 40px; }
.uhead .n { font-size: 14.5px; font-weight: 600; }
.uhead .d { font-size: 11.5px; color: var(--sub); margin-top: 3px; }
.perm-group { padding: 10px 14px 4px; }
.perm-group .pg-t { font-size: 12.5px; font-weight: 600; color: var(--sub); margin-bottom: 8px; display: flex; justify-content: space-between; }
.perm-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.perm {
  padding: 7px 12px; border-radius: 8px; font-size: 12.5px; border: 1px solid var(--line);
  background: #fff; color: var(--sub); cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.perm.on { background: var(--primary-soft); border-color: #b9cdfb; color: var(--primary); font-weight: 600; }
.perm .box { width: 14px; height: 14px; border-radius: 4px; border: 1px solid #cbd5e1; display: inline-block; }
.perm.on .box { background: var(--primary); border-color: var(--primary); position: relative; }
.perm.on .box::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.perm.readonly { opacity: .6; }
.role-item { padding: 13px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.role-item:last-child { border-bottom: none; }
.role-item.on { background: #f5f8ff; }
.role-item .rt { display: flex; align-items: center; justify-content: space-between; }
.role-item .rn { font-size: 14px; font-weight: 600; }
.role-item .rd { font-size: 11.5px; color: var(--sub); margin-top: 4px; }
.pg-a { color: var(--primary); cursor: pointer; font-weight: 600; }
.btn-row .btn-mini { margin-top: 10px; }
.perm .box { flex: 0 0 14px; }

.text-c { text-align: center; }
.fl { float: left; } .fr { float: right; }
.clearfix::after { content: ''; display: block; clear: both; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; }
.money-t { color: var(--danger); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }

/* ---------- 数据导出（Excel） ---------- */
.ex-toggle { font-size: 12px; color: var(--primary); font-weight: 600; cursor: pointer; }
.ex-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ex-item:last-child { border-bottom: none; }
.ex-item input { display: none; }
.ex-cb { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #cbd5e1; flex: 0 0 18px; position: relative; background: #fff; transition: .15s; }
.ex-item input:checked + .ex-cb { background: var(--primary); border-color: var(--primary); }
.ex-item input:checked + .ex-cb::after { content: ''; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ex-main { flex: 1; min-width: 0; }
.ex-t { display: block; font-size: 13.5px; font-weight: 600; }
.ex-d { display: block; font-size: 11px; color: var(--sub); margin-top: 3px; }
.ex-n { font-size: 12px; color: var(--muted); flex: 0 0 auto; }

/* ---------- v5：部门绑定人员 ---------- */
.member-hint { font-size: 12px; line-height: 1.75; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; margin: 12px 14px; }
.av-sm { width: 24px; height: 24px; border-radius: 8px; font-size: 11px; font-weight: 600; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; margin-right: -6px; box-shadow: 0 0 0 2px #fff; }

/* ---------- v5：登录页说明 ---------- */
.login-note { margin-top: 20px; font-size: 11.5px; line-height: 1.9; color: var(--sub); text-align: center; }

/* ---------- v5：审批流层级链路（列表页） ---------- */
.ag-node { display: inline-flex; flex-direction: column; align-items: center; background: #f5f8ff; border: 1px solid #dbe6ff; border-radius: 8px; padding: 4px 9px; }
.ag-node b { font-size: 12px; font-weight: 600; }
.ag-node i { font-style: normal; font-size: 10.5px; color: var(--sub); margin-top: 1px; }
.ag-arrow { display: inline-flex; align-items: center; transform: rotate(180deg); margin: 0 -1px; }

/* ---------- v5：审批流程进度（详情页） ---------- */
.flow { position: relative; padding-left: 6px; }
.fl-node { position: relative; display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.fl-node::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: -7px; width: 2px; background: var(--line); }
.fl-node:last-child::before { display: none; }
.fl-no { width: 23px; height: 23px; border-radius: 50%; flex: 0 0 23px; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; background: #e8edf6; color: #8c98ab; z-index: 1; }
.fl-t { font-size: 13px; font-weight: 600; }
.fl-s { font-size: 11.5px; color: var(--sub); margin-left: auto; text-align: right; }
.fl-node.done .fl-no { background: var(--ok); color: #fff; }
.fl-node.cur .fl-no { background: var(--warn); color: #fff; box-shadow: 0 0 0 4px #fef3c7; }
.fl-node.rej .fl-no { background: var(--danger); color: #fff; }
.fl-node.cur .fl-t { color: var(--warn); }

/* ---------- v5.1：数据导入 ---------- */
.imp-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.imp-item:last-child { border-bottom: none; }
.imp-item:active { background: #f7f9fc; }
.imp-radio { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid #cbd5e1; flex: 0 0 17px; position: relative; background: #fff; transition: .15s; }
.imp-item.on .imp-radio { border-color: var(--primary); }
.imp-item.on .imp-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); }
.imp-main { flex: 1; min-width: 0; }
.imp-t { display: block; font-size: 13.5px; font-weight: 600; }
.imp-d { display: block; font-size: 11px; color: var(--sub); margin-top: 3px; }
.imp-item.on .imp-t { color: var(--primary); }
.imp-tpl { flex: 0 0 auto; font-size: 11.5px; font-weight: 600; color: var(--primary); background: var(--primary-soft); border-radius: 6px; padding: 4px 9px; }
.imp-drop { border: 1.5px dashed #cbd5e1; border-radius: 12px; padding: 18px 14px; text-align: center; background: #fbfcfe; transition: .15s; }
.imp-drop.over { border-color: var(--primary); background: var(--primary-soft); }
.imp-drop-t { font-size: 13px; font-weight: 600; color: #334155; word-break: break-all; }
.imp-drop-s { font-size: 11.5px; color: var(--sub); margin-top: 5px; line-height: 1.5; }
.imp-policy { margin-top: 12px; }
.imp-plabel { clear: both; font-size: 12.5px; font-weight: 600; color: var(--sub); margin-bottom: 6px; line-height: 1.5; }
.imp-poli { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; font-size: 12.5px; line-height: 1.5; }
.imp-poli input { accent-color: var(--primary); width: 15px; height: 15px; flex: 0 0 15px; margin: 1px 0 0; }
.imp-stat { display: flex; gap: 8px; margin-bottom: 10px; }
.imp-st { flex: 1; text-align: center; background: #f5f7fb; border-radius: 10px; padding: 9px 4px; }
.imp-st b { display: block; font-size: 17px; line-height: 1.2; color: #334155; }
.imp-st span { display: block; font-size: 10.5px; color: var(--sub); margin-top: 3px; }
.imp-st.ok b { color: var(--ok); }
.imp-st.info b { color: var(--primary); }
.imp-st.danger b { color: var(--danger); }
.imp-err { background: #fef7f7; border: 1px solid #fbdcdc; border-radius: 10px; padding: 10px 11px; margin-bottom: 10px; }
.imp-err-hd { font-size: 12px; font-weight: 600; color: #b91c1c; margin-bottom: 7px; }
.imp-err-row { display: flex; gap: 8px; padding: 4px 0; font-size: 11.5px; line-height: 1.55; }
.imp-err-no { flex: 0 0 auto; color: #b91c1c; font-weight: 600; }
.imp-err-msg { color: #7f1d1d; word-break: break-all; }
.imp-err-more { font-size: 11px; color: #b91c1c; padding-top: 5px; opacity: .8; }
.imp-note { font-size: 11.5px; color: var(--sub); line-height: 1.6; margin-bottom: 8px; word-break: break-all; }
.imp-tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.imp-tbl table { border-collapse: collapse; width: 100%; min-width: 430px; font-size: 11.5px; }
.imp-tbl th { text-align: left; font-weight: 600; color: var(--sub); background: #f5f7fb; padding: 7px 9px; white-space: nowrap; }
.imp-tbl td { padding: 7px 9px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
.imp-fn { font-weight: 600; white-space: nowrap; color: #334155; }
.imp-fh { color: var(--sub); }
.imp-prev { margin-bottom: 10px; }
.imp-prev-row { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; background: #fbfcfe; }
.imp-prev-hd { font-size: 11.5px; font-weight: 600; color: var(--sub); margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }
.imp-prev-row .kv { padding: 3px 0; font-size: 12px; }
.imp-prev-row .kv .v { text-align: right; word-break: break-all; }
