/* ================= 基础 ================= */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --ink: #0e1726;
  --ink-2: #33415c;
  --muted: #6b7a90;
  --line: #e6ebf4;
  --line-2: #eff3f9;
  --primary: #2f5cf6;
  --primary-dark: #1e46d4;
  --primary-50: #eef3ff;
  --navy: #0b1526;
  --navy-2: #122139;
  --green: #0f9d6e;
  --green-50: #e7f8f0;
  --amber: #d9822b;
  --amber-50: #fdf2e4;
  --red: #d94a4a;
  --red-50: #fdeeee;
  --violet: #7a5af8;
  --violet-50: #f1eeff;
  --cyan: #0d94a3;
  --cyan-50: #e5f7f9;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px -18px rgba(16, 24, 40, .25);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
::selection { background: #cfdaff; }
.tnum { font-variant-numeric: tabular-nums; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfd7e5; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ================= 启动页 ================= */
.boot { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }
.boot-logo { width: 56px; height: 56px; border-radius: 16px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.boot-logo svg { width: 28px; height: 28px; }
.boot p { font-size: 13px; letter-spacing: .04em; }

/* ================= 登录 ================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 10% 10%, #1b3a7a 0%, transparent 55%),
              radial-gradient(900px 500px at 90% 90%, #123d55 0%, transparent 50%),
              linear-gradient(150deg, #091426 0%, #0e1f3a 60%, #0a1628 100%);
  padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(600px 400px at 70% 40%, #000 20%, transparent 80%);
}
.auth-brand > * { position: relative; z-index: 2; }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(140deg, #4b74ff, #2f5cf6); display: grid; place-items: center; box-shadow: 0 8px 20px -8px #2f5cf6; }
.brand-mark svg { width: 22px; height: 22px; color: #fff; }
.brand-name { font-size: 17px; font-weight: 650; letter-spacing: .02em; }
.brand-sub { font-size: 12px; color: #93a7c8; letter-spacing: .18em; }
.auth-hero h1 { font-size: 38px; line-height: 1.28; font-weight: 680; letter-spacing: -.01em; }
.auth-hero h1 em { font-style: normal; color: #7fa0ff; }
.auth-hero p { margin-top: 18px; color: #a8b8d4; font-size: 14.5px; max-width: 420px; line-height: 1.9; }
.auth-points { display: flex; flex-direction: column; gap: 14px; margin-top: 40px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; color: #c9d6ea; font-size: 13.5px; }
.auth-point i { width: 22px; height: 22px; border-radius: 7px; background: rgba(122, 154, 255, .14); display: grid; place-items: center; color: #8faaff; flex: none; margin-top: 1px; }
.auth-point i svg { width: 13px; height: 13px; }
.auth-foot { color: #5f7395; font-size: 12px; }
.auth-foot a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 388px; }
.auth-card h2 { font-size: 25px; font-weight: 680; letter-spacing: -.01em; }
.auth-card .sub { color: var(--muted); margin-top: 8px; font-size: 13.5px; margin-bottom: 30px; }
.auth-logo-m { display: none; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 550; margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 10px 12px; outline: none; transition: border-color .16s, box-shadow .16s; font-size: 14px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 92, 246, .12); }
.input::placeholder, .textarea::placeholder { color: #a9b4c6; }
/* 只读字段：明确区分，避免误以为能改 */
.input:disabled { background: #f4f6fa; color: #7c8aa0; cursor: not-allowed; }
.textarea { resize: vertical; min-height: 88px; line-height: 1.7; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 108px; }
.input-suffix { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px; padding: 9px 16px;
  font-size: 13.5px; font-weight: 550; background: #fff; color: var(--ink-2);
  transition: all .16s; white-space: nowrap; line-height: 1.4;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: #f6f8fc; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px -8px rgba(47, 92, 246, .8); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #c9d4e6; background: #f9fbff; }
.btn-soft { background: var(--primary-50); color: var(--primary); }
.btn-soft:hover { background: #e3ebff; }
.btn-danger { background: var(--red-50); color: var(--red); }
.btn-danger:hover { background: #fbdcdc; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { padding: 12px 20px; font-size: 14.5px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--primary); padding: 0; font-size: 13px; font-weight: 550; }
.btn-link:hover { text-decoration: underline; }

.auth-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.auth-aux { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.auth-aux a { color: var(--primary); font-weight: 550; }
.auth-tip { margin-top: 18px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.auth-tip b { color: var(--ink-2); font-weight: 600; }
.auth-switch { margin-top: 24px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--primary); font-weight: 600; margin-left: 4px; }

.code-btn { border: 1px solid var(--line); background: #fff; color: var(--primary); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.code-btn:disabled { color: var(--muted); cursor: not-allowed; }

/* ================= 布局 ================= */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex: none; background: linear-gradient(180deg, #0b1526 0%, #0c1830 100%);
  color: #cdd8ea; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, .04);
}
.side-brand { padding: 22px 20px 18px; display: flex; align-items: center; gap: 11px; }
.side-brand .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.side-brand .brand-mark svg { width: 19px; height: 19px; }
.side-brand .t { font-size: 15px; font-weight: 650; color: #fff; letter-spacing: .01em; }
.side-brand .s { font-size: 10.5px; color: #64799c; letter-spacing: .16em; }
.side-nav { padding: 8px 12px; flex: 1; overflow-y: auto; }
.side-label { font-size: 10.5px; color: #526688; letter-spacing: .14em; padding: 14px 10px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px;
  color: #a9b9d2; font-size: 13.5px; margin-bottom: 2px; transition: all .15s; position: relative;
}
.nav-item svg { width: 17px; height: 17px; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #e6eefc; }
.nav-item.active { background: linear-gradient(90deg, rgba(47, 92, 246, .28), rgba(47, 92, 246, .1)); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #5b82ff; }
.nav-item .badge { margin-left: auto; background: #e2544a; color: #fff; font-size: 10.5px; padding: 0 6px; border-radius: 20px; line-height: 17px; }
.side-user { border-top: 1px solid rgba(255, 255, 255, .06); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(140deg, #37527f, #22344f); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.avatar.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
.side-user .n { font-size: 13px; color: #e8f0fc; font-weight: 550; line-height: 1.3; }
.side-user .r { font-size: 11px; color: #64799c; }
.side-user .out { margin-left: auto; color: #6c81a3; background: none; border: none; padding: 4px; }
.side-user .out:hover { color: #fff; }
.side-user .out svg { width: 16px; height: 16px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 66px; flex: none; background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: 0 28px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { min-width: 0; flex: 1; }
.topbar h1 { font-size: 17px; font-weight: 650; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .desc { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-date { font-size: 12.5px; color: var(--muted); padding-right: 8px; }
.view { padding: 24px 28px 60px; max-width: 1440px; width: 100%; margin: 0 auto; }
.menu-btn { display: none; }

.tabbar { display: none; }

/* ================= 通用组件 ================= */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 17px 20px 0; }
.card-head h3 { font-size: 14.5px; font-weight: 620; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 12px 20px 18px; }
.section-gap { margin-bottom: 18px; }

.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-32 { grid-template-columns: 1.55fr 1fr; }
.g-23 { grid-template-columns: 1fr 1.6fr; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat .lab { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .lab svg { width: 14px; height: 14px; }
.stat .val { font-size: 26px; font-weight: 660; letter-spacing: -.02em; margin-top: 6px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .val small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.mini-stat.clickable { cursor: pointer; border-radius: 9px; padding: 3px 7px; margin: -3px -7px; transition: background .15s ease; }
.mini-stat.clickable:hover { background: #eef3fb; }
.mini-stat.clickable .l svg { color: #b6c2d4; vertical-align: -1px; margin-left: 1px; }
.mini-stat.clickable:hover .l svg { color: var(--primary); }

.stat.clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.stat.clickable:hover { transform: translateY(-2px); border-color: #c7d6f2; box-shadow: 0 14px 30px -18px rgba(16, 24, 40, .45); }
.kpi-more { margin-left: auto; display: flex; color: #b6c2d4; transition: color .15s; }
.stat.clickable:hover .kpi-more { color: var(--primary); }
.top-reimb-btn { font-weight: 700; letter-spacing: .02em; padding: 8px 16px; box-shadow: 0 8px 20px -8px rgba(47, 92, 246, .9); }

.report-preview { background: #f8fafd; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 12.5px; line-height: 2; white-space: pre-wrap; word-break: break-word; max-height: 24vh; overflow: auto; color: #33415c; }

.adv-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.adv-row:last-child { border-bottom: none; }
.adv-main { flex: 1; min-width: 0; }
.adv-state { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.adv-state.disputed { color: var(--red); }
.adv-state.paid { color: var(--primary); }
.adv-actions { display: flex; gap: 6px; flex: none; align-items: center; }

.stat .foot { font-size: 11.5px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat .icon-bubble { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; }
.stat .icon-bubble svg { width: 16px; height: 16px; }
.b-blue { background: var(--primary-50); color: var(--primary); }
.b-green { background: var(--green-50); color: var(--green); }
.b-amber { background: var(--amber-50); color: var(--amber); }
.b-red { background: var(--red-50); color: var(--red); }
.b-violet { background: var(--violet-50); color: var(--violet); }
.b-cyan { background: var(--cyan-50); color: var(--cyan); }
.c-green { color: var(--green); } .c-red { color: var(--red); } .c-amber { color: var(--amber); }
.c-blue { color: var(--primary); } .c-muted { color: var(--muted); } .c-violet { color: var(--violet); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 20px; font-size: 11.5px; font-weight: 550; line-height: 19px; white-space: nowrap; }
.chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip.gray { background: #f1f4f9; color: #64748b; }
.chip.blue { background: var(--primary-50); color: #2b4fd0; }
.chip.cyan { background: var(--cyan-50); color: var(--cyan); }
.chip.violet { background: var(--violet-50); color: #6742e8; }
.chip.amber { background: var(--amber-50); color: #b46717; }
.chip.orange { background: #fff0e6; color: #cf6a1c; }
.chip.green { background: var(--green-50); color: #0b835b; }
.chip.red { background: var(--red-50); color: #c23c3c; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.hot { background: var(--red-50); color: var(--red); border-color: #f7d4d4; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 550; color: var(--muted); font-size: 11.5px; letter-spacing: .03em;
  padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table th:first-child { border-radius: 8px 0 0 8px; }
.table th:last-child { border-radius: 0 8px 8px 0; }
.table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #fafcff; }
.table tbody tr:last-child td { border-bottom: none; }
.table .no { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.table .strong { font-weight: 550; color: var(--ink); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.order-link {
  display: inline-flex; align-items: center; gap: 3px; padding: 0;
  border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--primary); cursor: pointer; text-decoration: underline;
  text-decoration-color: rgba(47, 92, 246, .35); text-underline-offset: 3px;
}
.order-link:hover { color: #1d47c9; text-decoration-color: currentColor; }
.row-click { cursor: pointer; }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: #98a5b8; }
.search-box input { padding-left: 32px; width: 230px; }
.select-sm { padding: 8px 30px 8px 11px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; outline: none; appearance: none;
  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='%236b7a90' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.select-sm:focus { border-color: var(--primary); }
.seg { display: inline-flex; background: #eef2f8; border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: none; background: none; padding: 5px 12px; border-radius: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); font-weight: 600; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; margin: 0 auto 10px; color: #c3cddd; }
.empty p { font-size: 13px; }
.empty .btn { margin-top: 14px; }

.progress { height: 6px; border-radius: 6px; background: #edf1f7; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 6px; background: var(--primary); }

/* 模态框 / 抽屉 */
.overlay { position: fixed; inset: 0; background: rgba(10, 18, 33, .46); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .16s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 520px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px -20px rgba(4, 12, 30, .5); animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal.wide { max-width: 760px; }
.modal.xwide { max-width: 980px; }
.modal-head { padding: 18px 22px 12px; display: flex; align-items: flex-start; gap: 12px; }
.modal-head h3 { font-size: 16px; font-weight: 650; }
.modal-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.modal-head .x { margin-left: auto; background: none; border: none; color: var(--muted); padding: 4px; border-radius: 8px; }
.modal-head .x:hover { background: var(--surface-2); color: var(--ink); }
.modal-body { padding: 6px 22px 8px; overflow-y: auto; }
.modal-foot { padding: 14px 22px 18px; display: flex; gap: 10px; justify-content: flex-end; }
.modal-foot .left { margin-right: auto; }

.drawer-overlay { position: fixed; inset: 0; background: rgba(10, 18, 33, .4); z-index: 100; display: flex; justify-content: flex-end; animation: fade .16s; }
.drawer { width: 620px; max-width: 100%; background: #f7f9fd; height: 100%; display: flex; flex-direction: column; animation: slide .2s ease; box-shadow: -20px 0 60px -20px rgba(4, 12, 30, .4); }
@keyframes slide { from { transform: translateX(30px); opacity: .6; } }
.drawer-head { padding: 16px 22px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.drawer-head h3 { font-size: 15.5px; font-weight: 650; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; }
.drawer-foot { padding: 12px 22px; background: #fff; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.drawer-foot .right { margin-left: auto; display: flex; gap: 8px; }

/* 表单网格 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.req::after { content: "*"; color: var(--red); margin-left: 3px; }
.form-section { padding: 14px 0 4px; }
.form-section-t { font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: .04em; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.form-section-t::after { content: ""; height: 1px; flex: 1; background: var(--line); }

/* Toast */
#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #0f1b2d; color: #fff; padding: 9px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); display: flex; align-items: center; gap: 8px; animation: toastIn .2s ease; max-width: 90vw; }
.toast svg { width: 15px; height: 15px; }
.toast.success svg { color: #4ade9a; }
.toast.error svg { color: #ff8a8a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } }

/* 空状态 / 加载 */
.loading-row { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }
.spinner { width: 18px; height: 18px; border: 2px solid #dbe3f0; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -4px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= 业务组件 ================= */
.kpi-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.hero-money { background: linear-gradient(135deg, #12336e, #1f4fb8 60%, #2f5cf6); color: #fff; border: none; }
.hero-money .lab { color: #b9cbef; }
.hero-money .val { color: #fff; }
.hero-money .foot { color: #9db4e0; }
.hero-money .icon-bubble { background: rgba(255, 255, 255, .14); color: #fff; }
.hero-money::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .06); }

.mini-stats { display: flex; gap: 24px; padding: 10px 0 2px; }
.mini-stat .l { font-size: 11.5px; color: var(--muted); }
.mini-stat .v { font-size: 17px; font-weight: 620; font-variant-numeric: tabular-nums; }

.quick-import { background: linear-gradient(135deg, #eef3ff, #f7f9ff); border: 1px solid #dce6ff; border-radius: var(--radius); padding: 18px 20px; }
.quick-import h3 { font-size: 14.5px; font-weight: 620; display: flex; align-items: center; gap: 8px; }
.quick-import h3 .tag { font-weight: 500; }
.quick-import p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.quick-import textarea { margin-top: 12px; background: #fff; border-color: #d9e3f7; min-height: 92px; font-size: 13px; }
.quick-import .row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.quick-import .hint { font-size: 11.5px; color: var(--muted); }

.paste-zone { background: linear-gradient(135deg, #eef3ff, #f8faff); border: 1px solid #dce6ff; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.paste-head { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.paste-zone textarea { margin-top: 8px; min-height: 72px; background: #fff; border-color: #d9e3f7; font-size: 13px; }
.paste-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.paste-foot .hint { font-size: 11.5px; color: #93a1b5; }

.order-card { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: #fff; transition: box-shadow .16s, border-color .16s; }
.order-card:hover { border-color: #cdd9ee; box-shadow: 0 6px 18px -12px rgba(16, 24, 40, .3); }
.order-card .top { display: flex; align-items: center; gap: 8px; }
.order-card .no { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.order-card .fault { font-size: 14px; font-weight: 580; margin-top: 6px; }
.order-card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.order-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.order-card .meta svg { width: 12px; height: 12px; }
.order-card .bottom { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.order-card .bottom .money { font-size: 12px; color: var(--muted); }
.order-card .bottom .money b { color: var(--ink); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.order-card .bottom .spacer { flex: 1; }

.list { display: flex; flex-direction: column; gap: 9px; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 14px; }
.tl-item::before { content: ""; position: absolute; left: -18px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #c6d2e6; border: 2px solid #fff; box-shadow: 0 0 0 1px #dde5f2; }
.tl-item:first-child::before { background: var(--primary); box-shadow: 0 0 0 1px #b9c9ff; }
.tl-item .t { font-size: 12.5px; font-weight: 550; }
.tl-item .d { font-size: 11.5px; color: var(--muted); }
.tl-item .time { font-size: 11px; color: #9aa7ba; }

.upload-box { border: 1.5px dashed #ccd8ec; border-radius: 12px; padding: 16px; text-align: center; color: var(--muted); font-size: 12.5px; background: var(--surface-2); cursor: pointer; transition: all .16s; }
.upload-box:hover { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.upload-box svg { width: 26px; height: 26px; margin: 0 auto 6px; }
.photo-box { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.photo-box img { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; }
.photo-box .bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); color: #fff; font-size: 11px; display: flex; justify-content: space-between; }

.region-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.region-opt { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; cursor: pointer; background: #fff; transition: all .15s; }
.region-opt:hover { border-color: #c9d6f0; }
.region-opt.on { border-color: #b9caff; background: var(--primary-50); color: var(--primary-dark); font-weight: 600; }
.region-opt input { margin: 0; }

.shot-empty { display: flex; gap: 8px; margin-top: 2px; }
.shot-thumb { position: relative; width: 140px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); cursor: zoom-in; }
.shot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-tip { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 6px 3px; background: linear-gradient(transparent, rgba(0, 0, 0, .62)); color: #fff; font-size: 10.5px; text-align: center; }
.shot-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.shot-actions .btn { padding: 4px 9px; font-size: 11.5px; border-radius: 7px; }

/* 收款截图：多张缩略图，右下角标序号 */
.pay-grid { margin-top: 2px; }
.shot-cell.pay-cell { width: 92px; height: 92px; }
.pay-idx { position: absolute; left: 4px; bottom: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: rgba(12, 20, 32, .62); color: #fff; font-size: 10.5px; line-height: 16px; text-align: center; }

/* 客户电话：输入框 + 一键拨号 */
.phone-row { display: flex; align-items: stretch; gap: 6px; }
.phone-row .input { flex: 1; min-width: 0; }
.phone-call { flex: none; white-space: nowrap; padding: 0 9px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-size: 12.5px; }
.phone-copy { flex: none; white-space: nowrap; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.detail-item .k { font-size: 11.5px; color: var(--muted); }
.detail-item .v { font-size: 13.5px; margin-top: 1px; word-break: break-all; }
.money-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 13px; }
.money-row + .money-row { border-top: 1px dashed var(--line-2); }
.money-row .k { color: var(--muted); font-size: 12.5px; }
.money-row .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.money-total { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-top: 6px; }

.alert-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.alert-row:last-child { border-bottom: none; }
.alert-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: none; }
.alert-row .grow { flex: 1; min-width: 0; }
.alert-row .f { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-row .s { font-size: 11.5px; color: var(--muted); }

.chart { width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }

.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-row .top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.bar-row .top b { font-variant-numeric: tabular-nums; }
.bar-row .track { height: 7px; background: #eef2f9; border-radius: 6px; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #6f93ff, #2f5cf6); }

.pagination { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 14px 4px 0; font-size: 12.5px; color: var(--muted); }
.pagination button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 12.5px; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* 打卡 */
.checkin-banner { display: flex; align-items: center; gap: 10px; background: var(--amber-50); border: 1px solid #f6e0c4; color: #9a5a12; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 12px; }
.checkin-banner svg { width: 16px; height: 16px; flex: none; }
.checkin-banner .btn { margin-left: auto; }

/* 工资条 */
.payslip { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.payslip-head { background: linear-gradient(135deg, #101f38, #1c3358); color: #fff; padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.payslip-head .m { font-size: 12px; color: #a9bcdc; }
.payslip-head .n { font-size: 16px; font-weight: 620; }
.payslip-body { padding: 14px 18px; }
.big-salary { font-size: 30px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.alert-banner { display: flex; align-items: center; gap: 10px; background: #fff6f6; border: 1px solid #f6d8d8; color: #a33; border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; font-size: 12.5px; line-height: 1.7; }
.alert-banner svg { flex: none; color: var(--red); }
.alert-banner > div { flex: 1; min-width: 0; }
.alert-banner b { color: #8f2f2f; }
.alert-banner .btn { flex: none; }

/* 老板派单 → 工程师确认接单 */
.accept-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid #f0dede; border-radius: 9px; padding: 8px 11px; }
.accept-row .btn { flex: none; }

/* 待审批（员工新建 → 老板审批） */
.alert-banner.warn { background: #fff8ea; border-color: #f2ddb4; color: #7d6a3f; }
.alert-banner.warn svg { color: #d9822b; }
.alert-banner.warn b { color: #8a5a00; }

.approve-banner { display: flex; gap: 13px; align-items: flex-start; background: #fff8ea; border: 1px solid #f2ddb4; border-radius: 14px; padding: 14px 16px; }
.approve-banner .ap-icon { width: 38px; height: 38px; border-radius: 12px; background: #fdf0d5; color: #b8860b; display: flex; align-items: center; justify-content: center; flex: none; }
.approve-banner .ap-main { flex: 1; min-width: 0; font-size: 12.6px; color: #6f5c33; line-height: 1.75; }
.approve-banner .ap-main b { font-size: 14px; color: #8a5a00; }
.approve-banner .ap-sub { margin-top: 3px; font-size: 12.5px; color: #7d6a3f; }
.approve-banner .ap-tip { margin-top: 5px; font-size: 11.5px; color: #9a8558; }
.approve-banner .ap-actions { display: flex; gap: 8px; flex: none; }

.approve-list { display: grid; gap: 10px; }
.approve-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.approve-item .ap-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.approve-item .ap-fault { font-size: 14.5px; font-weight: 620; }
.approve-item .ap-time { margin-left: auto; font-size: 11.5px; color: #93a1b5; }
.approve-item .ap-grid { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 9px; font-size: 12.5px; color: #6b7a90; }
.approve-item .ap-grid span { display: inline-flex; align-items: center; gap: 4px; }
.approve-item .ap-grid .full { flex-basis: 100%; }
.approve-item .ap-op { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

@media (max-width: 640px) {
  .approve-banner { flex-wrap: wrap; }
  .approve-banner .ap-actions { width: 100%; }
  .approve-banner .ap-actions .btn { flex: 1; }
  .approve-item .ap-op .btn { flex: 1; }
}
.btn-ghost.active { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

/* ================= 来单了（老板派单 → 工程师接单） ================= */
.incoming-wrap { max-width: 1440px; width: 100%; margin: 0 auto; padding: 0 28px; }
.incoming-wrap.on { padding-top: 20px; }

.incoming-banner {
  position: relative; overflow: hidden;
  display: flex; gap: 18px; align-items: flex-start;
  padding: 20px 22px; border-radius: 18px; color: #fff;
  background: linear-gradient(118deg, #c8161d 0%, #e5331f 48%, #f2601f 100%);
  box-shadow: 0 26px 54px -28px rgba(206, 28, 22, .95), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: ib-in .42s cubic-bezier(.2, .9, .3, 1.15) both;
}
.ib-glow {
  position: absolute; right: -80px; top: -180px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .55), transparent 62%);
  opacity: .45; animation: ib-breathe 2.6s ease-in-out infinite; pointer-events: none;
}
.ib-bell {
  position: relative; flex: none; width: 62px; height: 62px; border-radius: 20px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .46);
  display: grid; place-items: center; color: #fff;
  animation: ib-swing 1.7s ease-in-out infinite;
}
.ib-bell svg { width: 30px; height: 30px; }
.ib-ring { position: absolute; inset: -6px; border-radius: 26px; border: 2px solid rgba(255, 255, 255, .7); animation: ib-ping 1.7s ease-out infinite; }

.ib-main { flex: 1; min-width: 0; position: relative; }
.ib-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ib-title { font-size: 30px; font-weight: 800; letter-spacing: .03em; line-height: 1.15; text-shadow: 0 4px 18px rgba(90, 8, 4, .38); animation: ib-flash 1.7s ease-in-out infinite; }
.ib-pill { background: rgba(255, 255, 255, .95); color: #c02018; font-size: 13px; font-weight: 750; padding: 4px 12px; border-radius: 20px; }
.ib-tip { font-size: 13px; color: rgba(255, 255, 255, .92); margin-top: 6px; }

.ib-list { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; max-height: 250px; overflow-y: auto; padding-right: 3px; }
.ib-item { display: flex; align-items: center; gap: 14px; background: rgba(255, 255, 255, .97); border-radius: 13px; padding: 12px 14px; box-shadow: 0 10px 22px -18px rgba(0, 0, 0, .8); }
.ib-info { flex: 1; min-width: 0; }
.ib-fault { font-size: 16px; font-weight: 750; color: #16233a; line-height: 1.4; }
.ib-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: #6b7a90; margin-top: 5px; }
.ib-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ib-meta svg { width: 12px; height: 12px; }
.ib-hot { display: inline-block; background: #d92020; color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 1px 7px; margin-right: 8px; vertical-align: 2px; }

.ib-accept {
  flex: none; display: inline-flex; align-items: center; gap: 6px; border: none;
  color: #fff; border-radius: 12px; padding: 13px 22px; font-size: 16px; font-weight: 750; letter-spacing: .02em;
  background: linear-gradient(135deg, #e11d1d, #ff6a2b);
  box-shadow: 0 14px 26px -14px rgba(225, 29, 29, .95);
  animation: ib-pulse 1.6s ease-in-out infinite;
}
.ib-accept svg { width: 17px; height: 17px; }
.ib-accept:hover { filter: brightness(1.06); }
.ib-accept:disabled { opacity: .7; animation: none; }

/* 全屏来单提醒 */
.incoming-mask {
  position: fixed; inset: 0; z-index: 260; padding: 20px;
  background: rgba(8, 12, 22, .62); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; animation: fade .18s ease;
}
.incoming-card {
  position: relative; width: 100%; max-width: 470px; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 24px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7);
  animation: ic-pop .34s cubic-bezier(.2, .9, .3, 1.32) both;
}
.ic-x {
  position: absolute; right: 12px; top: 12px; z-index: 3; width: 32px; height: 32px; border: none;
  border-radius: 10px; background: rgba(255, 255, 255, .22); color: #fff; display: grid; place-items: center;
}
.ic-x:hover { background: rgba(255, 255, 255, .34); }
.ic-head {
  position: relative; overflow: hidden; padding: 26px 24px 22px; text-align: center; color: #fff;
  background: radial-gradient(120% 92% at 50% 0%, #ff7038 0%, #e3261c 54%, #bc1212 100%);
}
.ic-head::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 18% 8%, rgba(255, 255, 255, .34), transparent 44%); }
.ic-bell {
  position: relative; width: 82px; height: 82px; margin: 0 auto 14px; border-radius: 26px;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .5);
  display: grid; place-items: center; animation: ib-swing 1.5s ease-in-out infinite;
}
.ic-bell svg { width: 40px; height: 40px; }
.ic-kicker { font-size: 12px; letter-spacing: .2em; color: rgba(255, 255, 255, .86); }
.ic-title { font-size: 42px; font-weight: 800; line-height: 1.1; letter-spacing: .05em; margin-top: 4px; text-shadow: 0 6px 26px rgba(80, 6, 2, .45); }
.ic-sub { font-size: 12.5px; color: rgba(255, 255, 255, .9); margin-top: 8px; }
.ic-body { padding: 20px 24px 4px; }
.ic-fault { font-size: 21px; font-weight: 750; color: #0e1726; line-height: 1.45; }
.ic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.ic-cell { background: #f6f8fd; border-radius: 12px; padding: 10px 12px; }
.ic-cell .k { display: block; font-size: 11px; color: #8b9ab0; letter-spacing: .06em; }
.ic-cell .v { display: block; font-size: 15px; font-weight: 650; color: #16233a; margin-top: 2px; word-break: break-all; }
.ic-addr { display: flex; gap: 7px; align-items: flex-start; font-size: 13px; color: #4a5a72; background: #f9fbff; border: 1px solid #e8eefa; border-radius: 12px; padding: 10px 12px; margin-top: 10px; line-height: 1.6; }
.ic-addr svg { flex: none; margin-top: 2px; color: #d92020; }
.ic-time { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #93a1b5; margin-top: 12px; }
.ic-foot { padding: 18px 24px 22px; }
.ic-accept {
  width: 100%; height: 62px; border: none; border-radius: 16px; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 20px; font-weight: 800; letter-spacing: .06em;
  background: linear-gradient(135deg, #e11d1d 0%, #ff6a2b 100%);
  box-shadow: 0 18px 34px -16px rgba(225, 29, 29, .95); animation: ib-pulse 1.6s ease-in-out infinite;
}
.ic-accept svg { width: 21px; height: 21px; }
.ic-accept:disabled { opacity: .7; animation: none; }
.ic-later-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.ic-call { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--primary); }
.ic-later { position: relative; z-index: 1; background: none; border: none; font-size: 12.5px; color: #8b9ab0; padding: 4px; }
.ic-later:hover { color: var(--ink-2); }

/* 列表里待接单的卡片也拉出来一点 */
.order-card.awaiting { border-color: #f3b9b9; background: linear-gradient(180deg, #fff8f7, #fff 62%); box-shadow: 0 12px 28px -22px rgba(217, 74, 74, .85); }

@keyframes ib-in { from { opacity: 0; transform: translateY(-10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes ib-breathe { 0%, 100% { transform: scale(.92); opacity: .32; } 50% { transform: scale(1.12); opacity: .58; } }
@keyframes ib-ping { 0% { transform: scale(.86); opacity: .9; } 70% { transform: scale(1.26); opacity: 0; } 100% { opacity: 0; } }
@keyframes ib-swing { 0%, 58%, 100% { transform: rotate(0); } 66% { transform: rotate(-11deg); } 74% { transform: rotate(9deg); } 82% { transform: rotate(-6deg); } 90% { transform: rotate(3deg); } }
@keyframes ib-flash { 0%, 100% { opacity: 1; } 50% { opacity: .74; } }
@keyframes ib-pulse { 0%, 100% { box-shadow: 0 12px 26px -14px rgba(225, 29, 29, .85); } 50% { box-shadow: 0 18px 40px -10px rgba(225, 29, 29, 1), 0 0 0 7px rgba(225, 29, 29, .12); } }
@keyframes ic-pop { from { opacity: 0; transform: translateY(18px) scale(.9); } to { opacity: 1; transform: none; } }

.report-editor { min-height: 300px; max-height: 46vh; font-size: 13px; line-height: 2; }
div.report-editor { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow: auto; white-space: pre-wrap; word-break: break-word; outline: none; }
div.report-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 92, 246, .12); }
.report-editor strong { color: #0f172a; font-weight: 750; }
.report-editor .total-hl { color: #1e46d4; font-weight: 700; }
.dispute-row { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .72); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: #4a5a72; }
.dispute-row .btn { flex: none; }

.note-inline { margin-top: 4px; font-size: 11.5px; line-height: 1.55; color: #6b7a90; background: #f6f8fc; border-left: 2px solid #d8e1f0; padding: 3px 7px; border-radius: 5px; max-width: 260px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-inline.pending { background: #fffbf0; border-left-color: #f0b429; color: #8a6a12; }
.note-inline.canceled { background: #fff7f7; border-left-color: #e0736c; color: #a33; }

.report-entry { transition: box-shadow .16s ease, border-color .16s ease; }
.report-entry:hover { border-color: #cfdcf5; box-shadow: 0 10px 26px -20px rgba(16, 24, 40, .5); }
.report-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.report-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.report-card-body { font-size: 12.5px; line-height: 2.05; color: #33415c; white-space: pre-wrap; word-break: break-word; }
.num-hl { color: #0f172a; font-weight: 750; font-size: 13.5px; }
.total-hl { color: #1e46d4; font-weight: 700; }

.report-text { background: #f8fafd; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-family: var(--font); font-size: 13px; line-height: 2; white-space: pre-wrap; word-break: break-all; max-height: 58vh; overflow: auto; margin: 0; color: #1f2b3d; }
.admin-note { background: #fffbeb; border: 1px solid #fde9b8; border-radius: 10px; padding: 10px 13px; font-size: 12.5px; color: #8a6414; line-height: 1.7; }
.admin-note b { color: #6b4c0c; }
.sms-code-hint { display: inline-flex; align-items: center; gap: 6px; background: #e8f8f0; color: #0b835b; border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 600; letter-spacing: .08em; }

/* ================= 成本明细 / 账单凭证 ================= */
.cost-block { margin: 4px 0 14px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.cost-block.is-off { user-select: none; }
.cost-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cost-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 620; color: var(--ink-2); }
.cost-title svg { color: var(--primary); }
.cost-sub { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.cost-head .btn { margin-left: auto; }
.cost-rows { display: flex; flex-direction: column; gap: 7px; }
.cost-row { display: grid; grid-template-columns: 1fr 120px 32px; gap: 7px; align-items: center; }
.cost-row .input { padding: 7px 9px; font-size: 12.5px; }
.cost-row .cost-amount { text-align: right; font-variant-numeric: tabular-nums; }
.cost-del { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; color: #98a6ba; border-radius: 8px; cursor: pointer; }
.cost-del:hover { color: var(--red); border-color: #f3cccc; background: var(--red-50); }
.cost-empty { padding: 9px 10px; border: 1px dashed #d8e1ef; border-radius: 9px; font-size: 12px; color: #93a1b5; background: #fff; }
.cost-foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.cost-foot b { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.cost-foot-tip { font-size: 11px; color: #a3b0c2; }
.cost-shot-head { display: flex; align-items: center; gap: 10px; margin: 12px 0 7px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.cost-shot-head .hint { font-weight: 400; }
.shot-wall .hint { margin-top: 5px; }
.shot-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.shot-cell { position: relative; width: 76px; height: 76px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.shot-cell img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.shot-x { position: absolute; top: 3px; right: 3px; width: 19px; height: 19px; border: none; border-radius: 50%; background: rgba(12, 20, 32, .62); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.shot-x:hover { background: rgba(200, 40, 40, .85); }
.input.is-auto { background: #f2f6ff; color: #1e46d4; font-weight: 620; }
.input[readonly] { cursor: default; }

/* ================= 回收库存 ================= */
.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.stock-card { border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 14px 15px; display: flex; flex-direction: column; gap: 7px; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.stock-card:hover { border-color: #c9d6f0; box-shadow: 0 6px 18px rgba(24, 45, 84, .06); }
.sc-head { display: flex; align-items: center; gap: 7px; }
.sc-no { margin-left: auto; font-size: 11px; color: #a3b0c2; font-variant-numeric: tabular-nums; }
.sc-name { font-size: 14.5px; font-weight: 640; color: var(--ink); line-height: 1.4; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--muted); }
.sc-money { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: #4a5b78; }
.sc-money b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-sale { font-size: 11.5px; color: #6b7a90; }
.sc-note { font-size: 12px; color: #5a6a80; background: var(--surface-2); border-radius: 8px; padding: 6px 9px; line-height: 1.6; }
.sc-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.sc-actions .btn { padding: 4px 9px; font-size: 11.5px; border-radius: 7px; }

/* 工单里从库存选件 */
.cost-row.is-stock .input[data-cost-name] { background: #f2f6ff; color: #24439e; font-weight: 600; }
.stock-pick-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow: auto; }
.stock-pick { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; cursor: pointer; background: #fff; }
.stock-pick:hover { border-color: #c9d6f0; background: #fafcff; }
.stock-pick input { margin: 0; flex: none; }
.sp-main { flex: 1; min-width: 0; }
.sp-name { font-size: 13.5px; font-weight: 620; color: var(--ink); }
.sp-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sp-date { flex: none; font-size: 11.5px; color: #a3b0c2; }
.sp-qty { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: #4a5b78; }
.sp-qty input { width: 76px; }
.sc-more { display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: #6b7a90; background: var(--surface-2); border-radius: 9px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 14px; }
.album-cell { display: flex; flex-direction: column; gap: 4px; }
.album-cell img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); cursor: zoom-in; }
.album-cell span { font-size: 10.5px; color: #8a97a8; text-align: center; }
.sale-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.sale-row { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fbfcfe; }
.sr-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #4a5b78; }
.sr-top b { color: var(--ink); }
.sr-note { font-size: 12px; color: #5a6a80; margin-top: 5px; line-height: 1.6; }

/* ================= 回收库存（移动端） ================= */
@media (max-width: 720px) {
  .stock-grid { grid-template-columns: 1fr; }
  .stock-card { padding: 12px 13px; }
}

/* ================= 报销申请（弹窗） ================= */
.rb-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rb-dates { display: flex; align-items: center; gap: 6px; }
.rb-dates .input { width: 150px; padding: 7px 9px; font-size: 12.5px; }
.rb-sum { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 11px 13px; border-radius: 11px; background: var(--primary-50); border: 1px solid #dbe6ff; margin-bottom: 10px; }
.rb-sum-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rb-sum-main .lab { font-size: 12px; color: #4a5b78; }
.rb-sum-main b { font-size: 22px; color: #1e46d4; letter-spacing: -.02em; }
.rb-sum-main .sub { font-size: 11.5px; color: #7b8aa3; }
.rb-sum-pick { margin-left: auto; font-size: 12.5px; color: #4a5b78; }
.rb-sum-pick b { font-size: 17px; color: #0f9d6e; }
.rb-table td { font-size: 12.5px; }
.rb-table tr.is-done td { opacity: .55; }
.rb-proof { position: relative; width: 46px; height: 34px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.rb-proof img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.rb-proof span { position: absolute; right: 1px; bottom: 1px; background: rgba(12, 20, 32, .66); color: #fff; font-size: 9.5px; border-radius: 4px; padding: 0 3px; }
.rb-thumb { width: 42px; height: 32px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; cursor: zoom-in; }
.rb-empty { padding: 26px 16px; text-align: center; color: #93a1b5; font-size: 12.5px; background: var(--surface-2); border: 1px dashed #d8e1ef; border-radius: 11px; line-height: 1.9; }
.rb-empty b { display: block; color: var(--ink-2); font-size: 13px; margin-bottom: 3px; }

/* ================= 工单状态 / 服务时长 / 完成后锁定 ================= */
.status-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.status-pick .btn { padding: 10px 2px; font-size: 12.5px; white-space: nowrap; }
.status-pick .btn:disabled { opacity: .45; cursor: not-allowed; }

.dur-box { border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); padding: 11px 12px; }
.dur-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dur-step { flex: 1 1 0; min-width: 86px; }
.dur-step .k { font-size: 11px; color: #8b9ab0; }
.dur-step .v { font-size: 12.5px; color: #b3bdcc; font-weight: 600; margin-top: 1px; }
.dur-step.on .v { color: var(--ink-2); }
.dur-arrow { color: #c3cbd9; display: flex; align-items: center; }
.dur-metrics { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; padding-top: 9px; border-top: 1px dashed #dde4ef; font-size: 12px; color: #6b7a90; }
.dur-metrics span { display: inline-flex; align-items: center; gap: 4px; }
.dur-metrics b { color: #1e46d4; font-size: 13.5px; }

/* 进度下方：按进度一一对应的时长信息 */
.prog-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 2px; }
.prog-metrics.one { grid-template-columns: 1fr; }
.prog-metric { border: 1px solid #dbe4f3; background: #f7faff; border-radius: 12px; padding: 12px 14px; }
.prog-metric .k { font-size: 13px; font-weight: 700; color: #43536d; letter-spacing: .01em; }
.prog-metric .v { font-size: 25px; font-weight: 750; color: #1e46d4; letter-spacing: -.02em; margin: 3px 0 2px; font-variant-numeric: tabular-nums; }
.prog-metric .v.live { color: #b06d00; }
.prog-metric .v.empty { color: #b9c4d4; font-size: 17px; font-weight: 600; }
.prog-metric .s { font-size: 11.5px; color: #8b9ab0; }
.prog-nodes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #dde4ef; }
.prog-nodes span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #7b8ba3; }
.prog-nodes b { font-weight: 650; color: #33415c; font-variant-numeric: tabular-nums; }

/* 拍照打卡（挂在「维修中」下） */
.checkin-block { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #dde4ef; }
.checkin-t { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 700; color: #22314a; }
.checkin-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.checkin-large { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px; border: 1px dashed #cfdcf3; border-radius: 12px; background: #f8fbff; }
.checkin-large .btn { min-width: 210px; }
.checkin-large .hint { margin: 0; text-align: center; }
.checkin-block .photo-box img { aspect-ratio: 16/9; }
.checkin-block .photo-box { max-width: 520px; }

/* 成本 / 收入栏目与金额加大加粗 */
.amount-field > label { font-size: 14px !important; font-weight: 700 !important; color: #22314a !important; }
.amount-input { font-size: 17px !important; font-weight: 700 !important; color: #16233a !important; height: 44px; }
.cost-title { font-size: 14.5px !important; font-weight: 700 !important; }
.cost-foot { font-size: 13px !important; }
.cost-foot b { font-size: 17px !important; font-weight: 750 !important; color: #1e46d4; }
.money-total-big .money-row { padding: 9px 0; }
.money-total-big .money-row .k { font-size: 13.5px; font-weight: 650; color: #33415c; }
.money-total-big .money-row .v { font-size: 16px; font-weight: 750; }
.money-total-big .money-row .v.big { font-size: 21px; }


.lock-banner { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: #fff7ed; border: 1px solid #f5dcb8; color: #8a5a12; margin-bottom: 12px; font-size: 12.8px; line-height: 1.7; }
.lock-banner b { color: #7a4a08; }
.lock-banner .lock-sub { font-size: 11.8px; color: #9a7136; margin-top: 2px; }
.lock-banner .lock-actions { margin-left: auto; display: flex; gap: 8px; }
.lock-banner > div:first-of-type { flex: 1; min-width: 180px; }

.confirm-summary { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; margin-bottom: 12px; }
.confirm-summary .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; font-size: 12.8px; color: #4a5b78; border-bottom: 1px solid var(--line); }
.confirm-summary .row:last-child { border-bottom: none; }
.confirm-summary .row b { font-size: 13.5px; color: var(--ink-2); }
.confirm-warn { padding: 9px 12px; border-radius: 9px; background: #fff8e8; border: 1px solid #f3e0ae; color: #8a6412; font-size: 12.3px; line-height: 1.7; margin-bottom: 10px; }
.confirm-danger { display: flex; align-items: flex-start; gap: 7px; padding: 10px 12px; border-radius: 9px; background: #fdeeee; border: 1px solid #f6cccc; color: #b03535; font-size: 12.3px; line-height: 1.7; }
.confirm-danger svg { flex-shrink: 0; margin-top: 2px; }

/* ================= 响应式 ================= */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-32, .g-23 { grid-template-columns: 1fr; }
  .kpi-hero { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { min-height: 100vh; align-items: flex-start; padding-top: 52px; }
  .auth-logo-m { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
  .auth-logo-m .brand-mark { width: 38px; height: 38px; }
  .auth-logo-m .t { font-size: 15px; font-weight: 650; }
  .auth-logo-m .s { font-size: 10.5px; color: var(--muted); letter-spacing: .14em; }

  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 120; transform: translateX(-100%); transition: transform .22s ease; width: 248px; }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(10, 18, 33, .45); z-index: 110; }
  .topbar { height: 58px; padding: 0 14px; gap: 10px; }
  .topbar .desc { display: none; }
  .topbar-right { gap: 6px; flex: none; }
  .topbar-right .btn { padding: 7px 10px; font-size: 12.5px; border-radius: 9px; }
  .topbar-right .btn svg { width: 14px; height: 14px; }
  .topbar h1 { font-size: 15.5px; }
  .topbar .desc { display: none; }
  .menu-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 9px; color: var(--ink-2); }
  .menu-btn svg { width: 17px; height: 17px; }
  .top-date { display: none; }
  .view { padding: 16px 14px 90px; }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .kpi-hero { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat .val { font-size: 21px; }
  .stat .icon-bubble { width: 28px; height: 28px; right: 10px; top: 10px; }
  .stat .icon-bubble svg { width: 14px; height: 14px; }
  .card-head { padding: 14px 14px 0; }
  .card-body { padding: 14px; }
  .card-body.tight { padding: 8px 14px 14px; }
  .toolbar { gap: 6px; }
  .search-box input { width: 100%; }
  .search-box { flex: 1; min-width: 130px; }
  .drawer { width: 100%; }
  .report-editor { min-height: 220px; max-height: 34vh; }
  .alert-banner { align-items: flex-start; flex-wrap: wrap; }
  .incoming-wrap { padding: 0 14px; }
  .incoming-wrap.on { padding-top: 14px; }
  .incoming-banner { padding: 15px 14px; gap: 12px; border-radius: 16px; }
  .ib-bell { width: 50px; height: 50px; border-radius: 15px; }
  .ib-bell svg { width: 24px; height: 24px; }
  .ib-title { font-size: 24px; }
  .ib-pill { font-size: 12px; }
  .ib-tip { font-size: 12px; }
  .ib-item { flex-wrap: wrap; gap: 10px; padding: 11px 12px; }
  .ib-fault { font-size: 15px; }
  .ib-accept { width: 100%; justify-content: center; padding: 12px 16px; font-size: 15.5px; }
  .incoming-mask { padding: 12px; }
  .ic-title { font-size: 34px; }
  .ic-bell { width: 68px; height: 68px; border-radius: 22px; margin-bottom: 10px; }
  .ic-bell svg { width: 34px; height: 34px; }
  .ic-fault { font-size: 18px; }
  .ic-accept { height: 56px; font-size: 18px; }
  .modal { max-height: 88vh; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .table th, .table td { padding: 9px 8px; }
  .mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; width: 100%; }
  .mini-stat .l { font-size: 11px; white-space: nowrap; }
  .mini-stat .v { font-size: 15.5px; }
  .toolbar .input[type=date], .toolbar .input[type=month] { width: calc(50% - 20px) !important; min-width: 0; }
  .toolbar .search-box { flex: 1 1 100%; }
  .toolbar .seg { overflow-x: auto; max-width: 100%; }
  .toolbar .btn { flex: 0 0 auto; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; color: #8a97ab; font-size: 10.5px; border-radius: 8px; }
  .tabbar a svg { width: 19px; height: 19px; }
  .tabbar a.active { color: var(--primary); }
  .tabbar a.active svg { stroke-width: 2.2; }
  .view.has-tab { padding-bottom: 86px; }
}
@media (max-width: 640px) {
  .cost-row { grid-template-columns: 1fr 88px 30px; gap: 6px; }
  .cost-head { flex-wrap: wrap; gap: 6px 8px; }
  /* 手机上空间紧：隐藏长提示，标题不折行，两个按钮保持一行 */
  .cost-sub { display: none; }
  .cost-title { white-space: nowrap; }
  .cost-head .btn { padding: 4px 8px; font-size: 11.5px; border-radius: 7px; }
  .rb-bar { gap: 8px; }
  .rb-bar .seg { width: 100%; }
  .rb-dates { width: 100%; }
  .rb-dates .input { flex: 1; width: auto; min-width: 0; }
  .rb-sum-main b { font-size: 19px; }
  .rb-sum-pick { margin-left: 0; }
  .ic-head { padding: 22px 18px 18px; }
  .ic-body { padding: 16px 18px 2px; }
  .ic-foot { padding: 14px 18px 18px; }
  .ic-grid { grid-template-columns: 1fr; }
  .ic-cell { padding: 9px 11px; }
}
@media (max-width: 380px) {
  .kpi-hero { grid-template-columns: 1fr; }
}
