/* =====================================================
   EDI 设备维修管理系统 - 样式（移动端优先）
   ===================================================== */
:root {
  --primary: #0f6fde;
  --primary-d: #0b58b0;
  --primary-l: #e9f2fd;
  --bg: #f4f6f9;
  --card: #ffffff;
  --t1: #17203a;
  --t2: #5a6577;
  --t3: #98a2b3;
  --line: #e7ebf1;
  --red: #d92d20;
  --orange: #f79009;
  --green: #12b76a;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .07);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: #dfe5ee;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--t1);
}
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }

.app {
  max-width: 430px; margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg);
  display: flex; flex-direction: column;
  position: relative;
  box-shadow: 0 0 30px rgba(15, 30, 60, .14);
}
.page { flex: 1; padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); }
.page.has-action, .form-page { padding-bottom: 100px; }

.ic { display: inline-block; vertical-align: -3px; flex: none; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(135deg, #1a7cf0, var(--primary-d));
  color: #fff;
  display: flex; align-items: center; gap: 6px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  box-shadow: 0 1px 6px rgba(11, 88, 176, .25);
}
.nav-btn { position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; color: #fff; }
.nav-btn:active { background: rgba(255, 255, 255, .15); }
.nav-title { flex: 1; margin: 0; font-size: 17px; font-weight: 600; text-align: center; }
.nav-right { min-width: 40px; display: flex; justify-content: flex-end; }
.nav-dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; background: #ffd166; border-radius: 50%; border: 1.5px solid #0b58b0; }

/* ---------- 底部 Tab ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; z-index: 40;
  height: calc(58px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--line);
  display: flex;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; color: var(--t3); }
.tab .tab-ic { position: relative; }
.tab.active { color: var(--primary); font-weight: 600; }
.tab .dot { position: absolute; top: -2px; right: -5px; width: 8px; height: 8px; background: var(--red); border-radius: 50%; }
.tab-fab { flex: 0 0 62px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 5px; font-size: 10px; color: var(--t3); }
.tab-fab .fab {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #2f8af5, var(--primary));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(15, 111, 222, .38);
  border: 4px solid #fff;
}
.tab-fab .fab:active { transform: translateX(-50%) scale(.94); }
.tab-fab.active { color: var(--primary); font-weight: 600; }

/* ---------- 首页 Hero ---------- */
.hero {
  background: linear-gradient(135deg, #1f7ef0, #0b4fa8);
  color: #fff; border-radius: 16px; padding: 16px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -30px; top: -40px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.hero::before {
  content: ''; position: absolute; right: 30px; bottom: -50px; width: 90px; height: 90px;
  border-radius: 50%; background: rgba(255, 255, 255, .06);
}
.hero-t { font-size: 11px; opacity: .75; letter-spacing: 1px; }
.hero-r { font-size: 20px; font-weight: 700; margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.hero-r span { font-size: 11px; font-weight: 400; background: rgba(255, 255, 255, .18); padding: 2px 8px; border-radius: 999px; }
.hero p { margin: 8px 0 0; font-size: 12.5px; opacity: .85; position: relative; z-index: 1; }
.hero-btn {
  position: relative; z-index: 1; margin-top: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35);
  color: #fff; font-size: 12px; padding: 6px 12px; border-radius: 999px;
}
.hero-btn:active { background: rgba(255, 255, 255, .28); }

/* ---------- 统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 4px; }
.stat { background: #fff; border-radius: 12px; padding: 10px 4px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 19px; line-height: 1.2; }
.stat span { font-size: 11px; color: var(--t3); }

/* ---------- 区块标题 ---------- */
.sec h2 { font-size: 14px; margin: 16px 2px 10px; color: var(--t2); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.sec h2 small { font-size: 11px; color: var(--t3); font-weight: 400; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.card-h { padding: 12px 14px 0; font-size: 14.5px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card-h small { font-size: 11px; color: var(--t3); font-weight: 400; }
.card-b { padding: 10px 14px 14px; }

/* ---------- 工单卡片 ---------- */
.ocard {
  display: block; width: 100%; text-align: left;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 10px;
}
.ocard:active { background: #f8fafc; }
.ocard-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ocard-device { font-size: 15px; font-weight: 600; }
.ocard-sub { font-size: 12.5px; color: var(--t2); margin-top: 4px; }
.ocard-meta { font-size: 11.5px; color: var(--t3); margin-top: 2px; }
.ocard-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--t3); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* ---------- 状态徽章 ---------- */
.badge { display: inline-flex; align-items: center; padding: 2.5px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }

/* ---------- 空态 ---------- */
.empty { text-align: center; color: var(--t3); padding: 42px 0 30px; }
.empty p { margin: 10px 0 2px; font-size: 13.5px; color: var(--t2); }
.empty span { font-size: 11.5px; }

/* ---------- 键值对 ---------- */
.kv { display: flex; gap: 10px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid #f2f4f7; }
.kv:last-child { border-bottom: none; }
.kv .k { flex: none; width: 96px; color: var(--t3); font-size: 12.5px; padding-top: 1px; }
.kv .v { flex: 1; word-break: break-all; }
.kv-block { flex-direction: column; gap: 4px; }
.kv-block .k { width: auto; }
.copy { font-size: 11px; color: var(--primary); border: 1px solid var(--primary); border-radius: 6px; padding: 1px 6px; margin-left: 8px; vertical-align: 1px; }

/* ---------- 照片 ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.photo { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #eef1f5; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; }
.photo-add {
  aspect-ratio: 1 / 1; border: 1.5px dashed #cbd5e1; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--t3); font-size: 11px; background: #fafbfc;
}
.photo-add:active { background: #f1f5f9; }
.photos-none { font-size: 12px; color: var(--t3); padding: 6px 0; }

/* ---------- 步骤条 ---------- */
.steps { display: flex; margin-top: 16px; }
.step { flex: 1; text-align: center; position: relative; font-size: 10.5px; color: var(--t3); }
.step .circle {
  width: 24px; height: 24px; border-radius: 50%; margin: 0 auto 5px;
  background: #eef1f5; color: #a6b0c0;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600;
  position: relative; z-index: 1;
}
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 11px; left: calc(50% + 16px); right: calc(-50% + 16px);
  height: 2px; background: #e7ebf1;
}
.step.done .circle { background: var(--primary); color: #fff; }
.step.done::after { background: var(--primary); }
.step.active .circle { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-l); }
.step.active { color: var(--primary); font-weight: 600; }
.step.active.rej .circle { background: var(--red); box-shadow: 0 0 0 4px #fdecec; }
.step.active.rej { color: var(--red); }

/* ---------- 详情页头部 ---------- */
.dhead { padding: 14px; }
.dh-row { display: flex; justify-content: space-between; align-items: center; }
.dh-no { font-size: 12px; color: var(--t3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dh-device { margin: 10px 0 2px; font-size: 18px; }
.dh-sub { font-size: 12.5px; color: var(--t2); }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -20px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 3px solid var(--primary);
}
.tl-t { font-size: 13.5px; font-weight: 600; }
.tl-d { font-size: 12.5px; color: var(--t2); margin-top: 2px; }
.tl-m { font-size: 11px; color: var(--t3); margin-top: 3px; }

/* ---------- 搜索 / 筛选 ---------- */
.searchbar { display: none; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 9px 12px; margin-bottom: 10px; box-shadow: var(--shadow); color: var(--t3); }
.searchbar.on { display: flex; }
.searchbar input { flex: 1; border: none; outline: none; font-size: 14px; background: none; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 6px 13px; border-radius: 999px; font-size: 12.5px;
  background: #fff; border: 1px solid var(--line); color: var(--t2);
}
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }
.chips.seg { flex-wrap: wrap; overflow: visible; }
.chips.seg .chip { position: relative; padding: 0; }
.chips.seg .chip input { position: absolute; opacity: 0; pointer-events: none; }
.chips.seg .chip span { display: block; padding: 8px 16px; border-radius: 999px; }
.chips.seg .chip input:checked + span { background: var(--primary); color: #fff; font-weight: 500; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 14px; }
.flabel { display: block; font-size: 13px; color: var(--t2); margin-bottom: 6px; font-weight: 500; }
.flabel i { color: var(--red); font-style: normal; margin-left: 2px; }
.fi {
  width: 100%; min-height: 46px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 16px; outline: none; transition: border-color .15s;
  -webkit-appearance: none; appearance: none;
}
.fi:focus { border-color: var(--primary); }
.fi.ta { min-height: 76px; resize: vertical; line-height: 1.5; }
.field.err .fi { border-color: var(--red); }
.field.err .chips.seg .chip span { box-shadow: 0 0 0 1px var(--red); }
.sel { position: relative; }
.sel select {
  width: 100%; min-height: 46px; padding: 11px 34px 11px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
.sel .sel-ar { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--t3); pointer-events: none; }
.fee-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13.5px; }
.fee-in { display: flex; align-items: center; gap: 4px; color: var(--t2); }
.fee-in .fi { width: 120px; min-height: 40px; text-align: right; font-size: 15px; }
.fee-total { display: flex; justify-content: space-between; align-items: center; background: var(--primary-l); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--t2); margin-top: 8px; }
.fee-total b { color: var(--primary); font-size: 16px; }

/* ---------- 配件清单 ---------- */
.part-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 34px 10px 10px; margin-bottom: 8px; position: relative;
}
.part-row [data-p="name"] { grid-column: 1 / 3; }
.part-row .fi { min-height: 40px; font-size: 14px; background: #fff; }
.part-rm { position: absolute; top: 10px; right: 8px; width: 26px; height: 26px; border-radius: 8px; background: #feecec; color: var(--red); display: flex; align-items: center; justify-content: center; }
.add-part { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; padding: 10px; border: 1.5px dashed #cbd5e1; border-radius: 10px; color: var(--t2); font-size: 13px; }
.add-part:active { background: #f8fafc; }
.parts-total { text-align: right; font-size: 13px; color: var(--t2); padding-top: 8px; }
.parts-total b { color: var(--t1); font-size: 15px; }

/* ---------- 配件表 ---------- */
.ptable { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.ptable th { color: var(--t3); font-weight: 500; font-size: 11.5px; padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.ptable td { padding: 7px 4px; border-bottom: 1px solid #f2f4f7; vertical-align: top; }
.ptable tr:last-child td { border-bottom: none; }
.ptable .t-c { text-align: center; }
.ptable .t-r { text-align: right; white-space: nowrap; }

/* ---------- 提示条 ---------- */
.alert { display: flex; gap: 8px; align-items: flex-start; background: #eef6ff; border: 1px solid #cfe3ff; color: #0b4a8f; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.55; margin-bottom: 12px; }
.alert .ic { margin-top: 2px; }
.alert-warn { background: #fffaeb; border-color: #fedf89; color: #93370d; }
.note-warn { background: #fffaeb; border: 1px solid #fedf89; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #7a2e0e; line-height: 1.55; }

/* ---------- 按钮 ---------- */
.btn { min-height: 46px; padding: 0 18px; border-radius: 12px; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(15, 111, 222, .25); }
.btn-primary:active { background: var(--primary-d); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--t2); }
.btn-block { width: 100%; }
.actionbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; z-index: 40;
  background: #fff; border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 10px;
}
.actionbar .btn { flex: 1; }

/* ---------- 消息 ---------- */
.msg { display: flex; gap: 10px; width: 100%; text-align: left; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 10px; }
.msg-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-l); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.msg-m { flex: 1; min-width: 0; }
.msg-t { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.msg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.msg-c { font-size: 12.5px; color: var(--t2); margin-top: 3px; line-height: 1.5; }
.msg-time { font-size: 11px; color: var(--t3); margin-top: 5px; }
.msg.read { opacity: .65; }

/* ---------- 我的 ---------- */
.profile { display: flex; align-items: center; gap: 14px; padding: 18px 16px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #2f8af5, #0b4fa8); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; }
.profile .p-name { font-size: 17px; font-weight: 700; }
.profile .p-role { font-size: 12px; color: var(--t2); margin-top: 2px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 13px 14px; font-size: 14px; border-bottom: 1px solid #f2f4f7; }
.menu-item:last-child { border-bottom: none; }
.menu-item > span:first-child { color: var(--t2); display: flex; }
.menu-item > i { margin-left: auto; color: var(--t3); font-style: normal; font-size: 12px; display: flex; align-items: center; }
.radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbd5e1; position: relative; }
.radio.on { border-color: var(--primary); }
.radio.on::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); }
.tip { font-size: 11.5px; color: var(--t3); text-align: center; line-height: 1.6; margin: 8px 0 4px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: 100%; max-width: 430px; }
.toast { background: rgba(23, 32, 58, .92); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; max-width: 86%; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); animation: toast-in .22s ease; }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 弹层 ---------- */
.mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.mask-dark { background: rgba(0, 0, 0, .88); align-items: center; }
.sheet { background: #fff; width: 100%; max-width: 430px; border-radius: 18px 18px 0 0; padding: 18px 14px calc(16px + env(safe-area-inset-bottom)); animation: sheet-up .28s cubic-bezier(.2, .8, .3, 1); }
.sheet-t { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.sheet-t small { display: block; font-size: 11.5px; color: var(--t3); font-weight: 400; margin-top: 2px; }
.sheet-cancel { width: 100%; padding: 12px; margin-top: 10px; border-radius: 12px; background: #f2f4f7; color: var(--t2); font-size: 14px; }
.dialog { background: #fff; border-radius: 16px; width: calc(100% - 48px); max-width: 330px; padding: 18px; animation: pop .2s ease; }
.dialog-t { font-size: 16px; font-weight: 700; text-align: center; }
.dialog-c { font-size: 13.5px; color: var(--t2); text-align: center; margin: 10px 0 16px; line-height: 1.6; }
.dialog-b { display: flex; gap: 10px; }
.dialog-b .btn { flex: 1; min-height: 42px; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- 照片预览 ---------- */
.pv { position: relative; width: 100%; padding: 0 16px; }
.pv img { border-radius: 10px; width: 100%; }
.pv-x { position: absolute; top: -42px; right: 20px; color: #fff; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }

/* ---------- 扫码识别 ---------- */
.fi-scan { position: relative; }
.fi-scan .fi { padding-right: 84px; }
.scan-btn {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  height: 36px; padding: 0 10px; border-radius: 9px;
  background: var(--primary-l); color: var(--primary);
  font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.scan-btn:active { background: #d8e8fd; }
.scan-mask { align-items: stretch; background: rgba(0, 0, 0, .93); }
.scan-box {
  width: 100%; max-width: 430px; margin: 0 auto; color: #fff;
  display: flex; flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
}
.scan-head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 600; }
.scan-head button { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: #fff; }
.scan-view { position: relative; margin-top: 16px; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 54vh; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 16% 12%; border-radius: 12px; }
.scan-frame i { position: absolute; width: 22px; height: 22px; border: 3px solid #4da3ff; }
.scan-frame .c1 { top: -2px; left: -2px; border-right: none; border-bottom: none; border-radius: 10px 0 0 0; }
.scan-frame .c2 { top: -2px; right: -2px; border-left: none; border-bottom: none; border-radius: 0 10px 0 0; }
.scan-frame .c3 { bottom: -2px; left: -2px; border-right: none; border-top: none; border-radius: 0 0 0 10px; }
.scan-frame .c4 { bottom: -2px; right: -2px; border-left: none; border-top: none; border-radius: 0 0 10px 0; }
.scan-line {
  position: absolute; left: 12%; right: 12%; top: 16%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #4da3ff, transparent);
  box-shadow: 0 0 10px rgba(77, 163, 255, .8);
  animation: scan-move 2.4s ease-in-out infinite;
}
@keyframes scan-move { 0%, 100% { top: 17%; } 50% { top: 79%; } }
.scan-tip { font-size: 12.5px; color: rgba(255, 255, 255, .78); text-align: center; margin: 18px 0; line-height: 1.6; min-height: 20px; }
.scan-tip.scan-err { color: #ffb4ab; }
.scan-box .btn-ghost { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); color: #fff; }

/* ---------- 登录 ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 0 28px calc(40px + env(safe-area-inset-bottom)); background: linear-gradient(160deg, #0f6fde 0%, #0b4f9e 100%); color: #fff; }
.login-logo { text-align: center; margin-bottom: 36px; }
.login-logo .ic { color: #fff; opacity: .95; }
.login-logo h1 { font-size: 24px; font-weight: 700; margin: 12px 0 4px; }
.login-logo p { font-size: 13px; opacity: .82; }
.login-form .field { background: rgba(255, 255, 255, .12); border-radius: 12px; padding: 4px 14px; margin-bottom: 14px; }
.login-form .flabel { color: rgba(255, 255, 255, .85); font-size: 12px; padding-top: 8px; }
.login-form .fi { background: transparent; color: #fff; border: none; padding-left: 0; }
.login-form .fi::placeholder { color: rgba(255, 255, 255, .6); }
.login-form .btn-primary { background: #fff; color: #0f6fde; font-weight: 700; margin-top: 6px; }
.login-tip { margin-top: 22px; font-size: 12px; line-height: 1.7; text-align: center; color: rgba(255, 255, 255, .8); }
.login-tip b { color: #fff; }

/* 密码框 显示/隐藏切换 */
.pw-wrap { position: relative; }
.pw-wrap .fi { width: 100%; }
.login-form .pw-wrap .fi { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer; color: rgba(255, 255, 255, .85);
  padding: 0;
}
.pw-toggle:focus { outline: none; color: #fff; }
.login-form .pw-toggle .ic { color: rgba(255, 255, 255, .85); }

/* ---------- 加载遮罩 ---------- */
.loading-root { position: fixed; inset: 0; background: rgba(255, 255, 255, .55); display: none; align-items: center; justify-content: center; z-index: 90; }
.loading-root.on { display: flex; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #475467; font-size: 13px; }
.spinner { width: 30px; height: 30px; border: 3px solid #c7d6ea; border-top-color: #0f6fde; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 退出登录危险项 ---------- */
.menu-danger { color: #b42318; }
/* 移动端登录：品牌头部 + 白色任务区 */
.login { min-height:100svh; padding:0; justify-content:flex-start; background:#fff; color:var(--t1,#17203a); }
.login-logo { margin:0; padding:32px 30px 43px; background:#102e49; color:#fff; text-align:left; position:relative; overflow:hidden; }
.login-logo:after { content:''; position:absolute; width:180px; height:180px; right:-95px; bottom:-80px; border:30px solid #244960; border-radius:50%; pointer-events:none; }
.ml-brand { display:flex; gap:12px; align-items:center; }
.ml-brand b { border:1px solid #7197ad; padding:9px 8px; border-radius:9px; font:700 23px 'Segoe UI',sans-serif; letter-spacing:-1px; }
.ml-brand>span { font-size:15px; font-weight:600; }
.ml-brand small { display:block; color:#b7cbd9; font-size:10px; letter-spacing:2px; font-weight:400; margin-top:3px; }
.ml-intro { margin-top:32px; position:relative; z-index:1; }
.ml-intro>span { font-size:10px; letter-spacing:2px; color:#8cdded; }
.login-logo h1 { font-size:29px; line-height:1.5; letter-spacing:1px; font-weight:600; margin:12px 0 13px; }
.login-logo p { color:#bdd0df; opacity:1; font-size:11px; letter-spacing:2px; margin:0; }
.ml-panel { padding:29px 30px 20px; background:#fff; border-radius:22px 22px 0 0; margin-top:-18px; position:relative; z-index:2; }
.ml-heading h2 { margin:0 0 5px; font-size:23px; font-weight:600; letter-spacing:.5px; }
.ml-heading p { margin:0 0 26px; font-size:12px; color:#627488; }
.login-form .field { background:none; padding:0; margin-bottom:19px; border:0; border-radius:0; }
.login-form .flabel { display:block; color:#3e5063; padding:0; margin:0 0 8px; font-size:12px; font-weight:600; }
.login-form .fi { display:block; width:100%; height:49px; border:1px solid #dce4ec; border-radius:9px; padding:0 13px; background:#f8fafc; color:#17203a; font-size:14px; box-shadow:none; }
.login-form .fi::placeholder { color:#8492a4; }
.login-form .fi:focus { outline:2px solid #bfdcff; outline-offset:1px; border-color:#0f6fde; background:#fff; }
.login-form .pw-toggle .ic { color:#627488; }
.login-form .pw-toggle { width:40px; height:40px; right:4px; }
.login-form .btn-primary { height:49px; background:#0f6fde; color:#fff; border-radius:9px; margin-top:26px; padding:0 17px; display:flex; justify-content:center; font-size:14px; font-weight:600; box-shadow:none; }
.login-form .btn-primary:hover { background:#0b58b0; }
.login-form .btn-primary span { font-size:22px; font-weight:400; }
.ml-help { text-align:center; font-size:10px; color:#627488; margin:18px 0 23px; }
.login-tip { border-top:1px solid #e7ebf1; padding-top:15px; margin-top:0; text-align:left; color:#627488; font-size:11px; }
.login-tip summary { cursor:pointer; width:fit-content; }
.login-tip p { margin-bottom:0; line-height:1.9; }
.login-tip b { color:#17203a; }
.ml-footer { margin-top:auto; text-align:center; color:#627488; font-size:10px; padding:18px 20px calc(20px + env(safe-area-inset-bottom)); }
.login :focus-visible { outline:3px solid #65b5f5; outline-offset:3px; }
@media(max-width:360px) { .login-logo { padding:24px 23px 35px; } .ml-panel { padding:25px 23px 18px; } .ml-intro { margin-top:24px; } .login-logo h1 { font-size:26px; } }
@media(prefers-reduced-motion:reduce) { .login * { animation:none!important; transition:none!important; } }
/* 状态筛选支持鼠标拖动与可见滚动条 */
.status-scroll { cursor:grab; user-select:none; touch-action:pan-x pan-y; scrollbar-width:thin; scrollbar-color:#b9c9dc transparent; padding-bottom:8px; }
.status-scroll::-webkit-scrollbar { display:block; height:4px; }
.status-scroll::-webkit-scrollbar-thumb { background:#b9c9dc; border-radius:4px; }
.status-scroll.dragging,.status-scroll.dragging .chip { cursor:grabbing; }
.status-scroll .chip { flex-shrink:0; }
.status-scroll:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.orders-refresh { display:flex; align-items:center; justify-content:space-between; color:var(--t2); font-size:12px; padding:3px 0 12px; }
.orders-refresh button,.list-state button { color:var(--primary); padding:7px 10px; }
.list-state,.list-more { display:block; width:100%; text-align:center; padding:18px 8px; color:var(--t2); font-size:13px; }
.list-more { color:var(--primary); }
.mobile-password .field { margin-bottom:18px; }
.mobile-password .pw-wrap .fi { padding-right:48px; }
.mobile-password .pw-toggle { color:var(--t2); }
.mobile-password .pw-toggle:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.password-error { min-height:28px; color:var(--red); font-size:12px; line-height:1.6; padding-bottom:8px; }
.mobile-password .fi[aria-invalid=true] { border-color:var(--red); }
.server-error { color:var(--red); font-size:12px; margin-top:5px; }
.field:not(.err) .server-error { display:none; }
.measurement-input { display:flex; align-items:stretch; gap:8px; }
.measurement-input > .fi { flex:1; min-width:0; }
.measurement-input > .measurement-unit { flex:0 0 100px; width:100px; text-align:center; }
.assignee-help { margin:6px 0 0; color:var(--t3); font-size:12px; line-height:1.6; }
 .logistics-add { margin-top: 10px; }
 .logistics-add label { display: block; margin: 8px 0; }
 .logistics-add [role="alert"] { color: var(--red, #c32d2d); min-height: 24px; font-size: 13px; }
 .logistics-add .btn { min-height: 44px; }

.photo video { width:100%; height:100%; object-fit:contain; background:#111; }
.photo-add:focus-within { outline:2px solid var(--primary); }

.login-remember { display:flex; align-items:center; gap:8px; min-height:36px; font-size:13px; color:#3e5063; cursor:pointer; }
.login-remember input { width:16px; height:16px; margin:0; accent-color:#0f6fde; }
.login-remember input:focus-visible { outline:2px solid #0f6fde; outline-offset:3px; }
.collapsible-card > summary { padding:14px; min-height:48px; font-size:14.5px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:space-between; list-style:none; }
.collapsible-card > summary::-webkit-details-marker { display:none; }
.collapsible-card > summary::after { content:'›'; font-size:22px; line-height:1; color:var(--t3); transform:rotate(0deg); }
.collapsible-card[open] > summary::after { transform:rotate(90deg); }
.collapsible-card > summary:focus-visible { outline:2px solid var(--primary); outline-offset:-3px; border-radius:12px; }
.collapse-meta { font-size:11px; color:var(--t3); margin-bottom:10px; line-height:1.7; }
