/* =========================================================
   签到留证与改址留痕 · 原型样式
   后台：B 端青绿主色（与现有 TMS 后台一致）；司机 App：蓝色主色（与现有 App 一致）
   ========================================================= */
:root {
  --primary: #13c2a3;
  --primary-hover: #0fb094;
  --primary-light: #e6f9f5;
  --danger: #f5222d;
  --danger-light: #fff1f0;
  --warn: #fa8c16;
  --warn-light: #fff7e6;
  --success: #52c41a;
  --success-light: #f6ffed;
  --info: #1677ff;
  --info-light: #e6f4ff;
  --text: #303133;
  --text-secondary: #606266;
  --text-placeholder: #c0c4cc;
  --border: #dcdfe6;
  --border-light: #ebeef5;
  --bg: #f5f7fa;
  --bg-hover: #fafbfc;
  --radius: 4px;
  --app-blue: #1677ff;
  --app-red: #f5222d;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 13px; color: var(--text); background: #eef1f5; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { display: block; }
[hidden] { display: none !important; }
.mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }
.muted { color: #909399; font-size: 12px; }
.nowrap { white-space: nowrap; }
.c-danger { color: var(--danger); }
.c-warn { color: var(--warn); }
.c-ok { color: #389e0d; }
.c-link { color: var(--info); }

/* ---------- 原型头部 ---------- */
.proto-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px; padding: 10px 20px; background: #1f2d3d; color: #fff; flex-wrap: wrap; }
.proto-title { display: flex; align-items: baseline; gap: 10px; }
.proto-title h1 { margin: 0; font-size: 16px; font-weight: 600; }
.proto-kicker { font-size: 10px; letter-spacing: .12em; color: #7fe3d0; border: 1px solid rgba(127, 227, 208, .5); border-radius: 3px; padding: 1px 6px; }
.proto-sub { font-size: 12px; color: #a3b1c2; }
.view-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.view-tab { border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: #c9d4e0; padding: 6px 12px; border-radius: 4px; transition: .15s; }
.view-tab span { font-size: 11px; color: #7fe3d0; margin-right: 6px; }
.view-tab:hover { border-color: var(--primary); color: #fff; }
.view-tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.view-tab.is-active span { color: #fff; }
.view-tab.is-extra { border-style: dashed; }
.proto-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.demo-clock { font-size: 12px; color: #a3b1c2; }
.demo-clock b { color: #fff; font-weight: 500; }
.proto-tools .btn { background: transparent; color: #c9d4e0; border-color: rgba(255, 255, 255, .25); }
.proto-tools .btn:hover { color: #fff; border-color: var(--primary); }
main { padding: 16px 20px 40px; }

/* ---------- 基础控件 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 32px; padding: 0 15px; border: 1px solid var(--border); background: #fff; border-radius: var(--radius); color: var(--text-secondary); transition: .15s; white-space: nowrap; }
.btn:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.btn:disabled { opacity: .55; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-primary:disabled { background: #a0e3d7; border-color: #a0e3d7; opacity: 1; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #cf1322; border-color: #cf1322; color: #fff; }
.btn-orange { background: #e8743b; border-color: #e8743b; color: #fff; }
.btn-orange:hover:not(:disabled) { background: #d4632c; border-color: #d4632c; color: #fff; }
.btn-warn { color: #d46b08; border-color: #ffd591; background: var(--warn-light); }
.btn-text { border-color: transparent; color: var(--primary); }
.link-btn { border: 0; background: none; padding: 0 2px; color: var(--primary); font-size: 12.5px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.is-quiet { color: #4d8f84; }
.link-btn.is-danger { color: var(--danger); }
.input { height: 32px; width: 100%; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; transition: border-color .15s; }
.input:focus { outline: none; border-color: var(--primary); }
.input:disabled { background: var(--bg); color: var(--text-placeholder); }
.input::placeholder, textarea::placeholder { color: var(--text-placeholder); }
.textarea { height: auto; padding: 6px 10px; resize: vertical; line-height: 1.5; }
select.input { padding-right: 24px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 3px; font-size: 12px; line-height: 1; white-space: nowrap; background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border-light); margin-right: 4px; }
.tag-primary { background: var(--primary-light); color: #08979c; border-color: #a8e8dc; }
.tag-success { background: var(--success-light); color: #389e0d; border-color: #b7eb8f; }
.tag-warn { background: var(--warn-light); color: #d46b08; border-color: #ffd591; }
.tag-danger { background: var(--danger-light); color: #cf1322; border-color: #ffa39e; }
.tag-info { background: var(--info-light); color: #0958d9; border-color: #91caff; }
.tag-muted { background: #f4f4f5; color: #909399; border-color: #e9e9eb; }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chk input { accent-color: var(--primary); width: 15px; height: 15px; }
.chk.is-locked { cursor: default; color: var(--text-secondary); }
.radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; cursor: pointer; }
.radio input { accent-color: var(--primary); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.seg-btn { border: 0; border-right: 1px solid var(--border); background: #fff; padding: 0 14px; height: 30px; color: var(--text-secondary); }
.seg-btn:last-child { border-right: 0; }
.seg-btn.is-on { background: var(--primary); color: #fff; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin-right: 8px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { padding: 28px; text-align: center; color: #909399; }
.empty { padding: 32px; text-align: center; color: var(--text-placeholder); }
.empty.is-error { color: var(--danger); }
.req, .fl i, .as-label i { color: var(--danger); font-style: normal; margin-right: 3px; }

/* ---------- 轻提示 ---------- */
.toast-root { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; max-width: 560px; padding: 9px 16px; border-radius: 4px; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .12); border: 1px solid var(--border-light); opacity: 0; transform: translateY(-6px); transition: .2s; }
.toast.is-in { opacity: 1; transform: none; }
.toast-icon { width: 18px; height: 18px; flex: none; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; background: var(--primary); }
.toast-error .toast-icon { background: var(--danger); }
.toast-warn .toast-icon { background: var(--warn); }
.toast-info .toast-icon { background: var(--info); }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow: auto; }
.modal { background: #fff; border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .08); display: flex; flex-direction: column; max-height: calc(100vh - 96px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--border-light); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-close { border: 0; background: none; font-size: 22px; line-height: 1; color: #909399; padding: 0 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 18px; overflow: auto; flex: 1; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--border-light); }
.confirm-text { margin: 4px 0; color: var(--text-secondary); line-height: 1.7; }
.form-label-top { display: block; margin-bottom: 6px; }
.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; }

/* 看大图 */
.photo-viewer-mask { padding-top: 32px; }
.photo-viewer-mask .modal { max-height: calc(100vh - 64px); }
.pv { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
.pv-stage { position: relative; background: #1f1f1f; border-radius: 4px; display: flex; align-items: center; justify-content: center; min-height: 420px; }
.pv-stage img { max-width: 100%; max-height: calc(100vh - 200px); object-fit: contain; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 56px; border: 0; background: rgba(0, 0, 0, .45); color: #fff; font-size: 28px; border-radius: 4px; }
.pv-nav:hover { background: rgba(0, 0, 0, .65); }
.pv-prev { left: 8px; }
.pv-next { right: 8px; }
.pv-meta { margin: 0; display: grid; grid-template-columns: 70px 1fr; gap: 8px 10px; align-content: start; }
.pv-meta dt { color: #909399; }
.pv-meta dd { margin: 0; word-break: break-all; }
.pv-note { grid-column: 1 / -1; margin: 8px 0 0; padding: 8px 10px; background: var(--bg); border-radius: 4px; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }

/* ---------- 地图 ---------- */
.mapview { position: relative; overflow: hidden; background: #f2efe9; user-select: none; touch-action: none; }
.mapview-svg { display: block; width: 100%; height: 100%; cursor: grab; }
.mapview.is-dragging .mapview-svg { cursor: grabbing; }
.mapview-ctrl { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; background: #fff; border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); overflow: hidden; }
.mapview-ctrl button { width: 28px; height: 28px; border: 0; border-bottom: 1px solid var(--border-light); background: #fff; font-size: 16px; color: #555; }
.mapview-ctrl button:last-child { border-bottom: 0; font-size: 13px; }
.mapview-ctrl button:hover { color: var(--primary); }
.mapview-scale { position: absolute; left: 10px; bottom: 8px; font-size: 10px; color: #555; display: flex; flex-direction: column; gap: 1px; pointer-events: none; }
.mapview-scale i { display: block; height: 4px; border: 1.5px solid #555; border-top: 0; }
.mapview-attrib { position: absolute; right: 6px; bottom: 4px; font-size: 10px; color: #8c8c8c; background: rgba(255, 255, 255, .7); padding: 0 4px; border-radius: 2px; pointer-events: none; }
.mv-place { fill: #5c5c5c; text-anchor: middle; font-weight: 500; paint-order: stroke; stroke: rgba(255, 255, 255, .9); stroke-width: 3px; }
.mv-road-name { font-size: 10px; fill: #8c8c8c; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.mv-area-name { font-size: 12px; fill: #5b8c51; text-anchor: middle; paint-order: stroke; stroke: rgba(255, 255, 255, .7); stroke-width: 2px; }
.mv-area-name.is-water { fill: #4a86b8; font-size: 14px; }
.mv-badge-text { fill: #fff; font-size: 12px; font-weight: 700; text-anchor: middle; }
.mv-badge-num { font-size: 10px; font-weight: 700; text-anchor: middle; }
.mv-marker { cursor: pointer; }
.mv-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mv-line-track { stroke: #1d39c4; stroke-width: 3.5; opacity: .85; }
.mv-line-plan { stroke: #389e0d; stroke-width: 3.5; stroke-dasharray: 10 7; }
.mv-line-deviation { stroke: #fa8c16; stroke-width: 2; stroke-dasharray: 5 4; }
.mv-line-change { stroke: #f5222d; stroke-width: 2; stroke-dasharray: 6 4; }

/* =========================================================
   页面一：司机 App
   ========================================================= */
.driver-layout { display: flex; gap: 24px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.phone-wrap { flex: none; }
.phone { position: relative; width: 375px; height: 780px; border-radius: 36px; border: 10px solid #1c1c1e; background: #f5f6f8; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); display: flex; flex-direction: column; }
.phone-caption { text-align: center; color: #909399; font-size: 12px; margin: 10px 0 0; }
.phone-status { flex: none; height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 14px; font-weight: 600; background: #f5f6f8; }
.ps-icons { font-size: 11px; font-weight: 600; letter-spacing: .5px; }
.ps-battery { font-style: normal; background: #333; color: #fff; border-radius: 4px; padding: 0 4px; margin-left: 3px; font-size: 10px; }
.phone-nav { flex: none; height: 44px; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; background: #fff; border-bottom: 1px solid #eee; }
.phone-nav b { text-align: center; font-size: 17px; }
.pn-back { font-size: 26px; padding-left: 12px; color: #333; }
.phone-body { flex: 1; overflow-y: auto; padding: 10px 12px 24px; }
.app-card { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.app-wb-top { display: flex; justify-content: space-between; align-items: center; }
.app-wb-top b { font-size: 15px; }
.app-status { color: var(--app-blue); background: var(--info-light); border-radius: 10px; padding: 1px 8px; font-size: 12px; }
.app-wb-sub { color: #888; font-size: 12.5px; margin-top: 4px; }
.app-section-title { font-size: 13px; color: #888; margin: 4px 2px 8px; }
.app-stop { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid transparent; }
.app-stop.is-current { border-color: #91caff; box-shadow: 0 2px 8px rgba(22, 119, 255, .1); }
.app-stop.is-done { opacity: .92; }
.app-stop-head { display: flex; align-items: center; gap: 8px; }
.app-stop-head b { flex: 1; font-size: 14.5px; }
.app-seq { width: 20px; height: 20px; border-radius: 50%; background: var(--app-red); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.app-stop.is-done .app-seq { background: #bfbfbf; }
.app-type { font-size: 12px; color: #666; }
.app-addr { color: #555; font-size: 12.5px; margin-top: 6px; line-height: 1.5; }
.app-addr.is-old { color: #aaa; text-decoration: line-through; margin-top: 2px; }
.app-contact { color: #999; font-size: 12px; margin-top: 4px; }
.app-change { margin-top: 6px; padding: 8px 10px; background: #fffbe6; border-radius: 6px; }
.app-change .app-addr { margin-top: 4px; }
.app-stop-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.app-signed { flex: 1 1 100%; display: flex; align-items: center; gap: 6px; color: #666; font-size: 12px; min-width: 0; flex-wrap: wrap; }
.app-muted { color: #999; font-size: 12px; }
.app-tag { display: inline-block; font-size: 11.5px; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.app-tag.ok { background: #f6ffed; color: #389e0d; }
.app-tag.warn { background: #fff7e6; color: #d46b08; }
.app-tag.info { background: var(--info-light); color: #0958d9; }
.app-btn { height: 32px; padding: 0 16px; border-radius: 16px; border: 0; background: var(--app-blue); color: #fff; font-size: 13.5px; }
.app-btn:disabled { background: #91caff; }
.app-btn-sm { height: 28px; padding: 0 12px; font-size: 12.5px; }
.app-btn-ghost { height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid #d9d9d9; background: #fff; color: #555; font-size: 13px; }
.app-link { border: 0; background: none; color: var(--app-blue); padding: 0; font-size: 13px; }
.app-notice { background: #fff7e6; border: 1px solid #ffd591; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.app-notice-title { font-weight: 600; color: #d46b08; margin-bottom: 2px; }
.app-notice p { margin: 0 0 6px; color: #613400; font-size: 12.5px; line-height: 1.6; }
.app-upload { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff7e6; border: 1px solid #ffd591; color: #ad4e00; border-radius: 8px; font-size: 12px; padding: 6px 10px; margin-bottom: 10px; }
.app-upload .app-link { font-size: 12px; white-space: nowrap; }

/* 围栏外签到弹层 */
.phone-overlay { position: absolute; inset: 0; z-index: 5; background: rgba(0, 0, 0, .45); display: flex; flex-direction: column; justify-content: flex-end; }
.app-sheet { background: #fff; border-radius: 16px 16px 0 0; max-height: calc(100% - 40px); display: flex; flex-direction: column; animation: sheetUp .2s ease-out; }
@keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.as-head { display: flex; align-items: center; justify-content: center; position: relative; padding: 14px 16px 10px; }
.as-head b { font-size: 17px; }
.as-close { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 26px; color: #666; line-height: 1; }
.as-body { flex: 1; overflow-y: auto; padding: 0 16px 8px; }
.as-map { height: 170px; border-radius: 8px; border: 1px solid #eee; }
.as-info { margin-top: 10px; padding: 10px 12px; background: #fff1f0; border-radius: 8px; }
.as-dist { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.as-dist b { color: var(--app-red); font-size: 16px; }
.as-dist span { color: #888; font-size: 12px; }
.as-sub { color: #666; font-size: 12px; margin-top: 4px; line-height: 1.5; }
.as-tip { margin: 6px 0 0; color: #a8071a; font-size: 12px; }
.as-sec { margin-top: 14px; }
.as-label { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.as-count { margin-left: auto; color: #999; font-weight: 400; font-size: 12px; }
.as-optional { margin-left: 6px; font-weight: 400; color: #bbb; font-size: 12px; }
.as-select { display: block; width: 100%; height: 40px; padding: 0 34px 0 12px; border: 1px solid #e5e5e5; border-radius: 8px; background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23999' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center; font-size: 14px; color: #333; -webkit-appearance: none; appearance: none; }
.as-select.is-empty { color: #bbb; }
.as-select option { color: #333; }
.as-select:focus { outline: none; border-color: var(--app-blue); }
.as-hint { margin: 8px 0 0; color: #666; font-size: 12px; line-height: 1.6; }
.as-hint.is-strong { color: #0958d9; background: #f0f5ff; border-radius: 6px; padding: 6px 8px; }
.as-warn { margin: 6px 0 0; color: #d46b08; background: #fff7e6; border-radius: 6px; padding: 6px 8px; font-size: 12px; }
.as-err { margin: 6px 0 0; color: var(--app-red); font-size: 12px; }
.as-shots { color: #888; font-size: 12px; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.as-shots span { background: #f0f5ff; color: #2f54eb; border-radius: 4px; padding: 1px 6px; }
.as-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.as-photo { position: relative; width: 72px; height: 96px; }
.as-photo-img { width: 100%; height: 100%; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #000; }
.as-photo-img img { width: 100%; height: 100%; object-fit: cover; }
.as-photo-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 13px; line-height: 1; }
.as-add { width: 72px; height: 96px; border: 1px dashed #bfbfbf; border-radius: 6px; background: #fafafa; color: #666; font-size: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.as-add-icon { width: 26px; height: 20px; border: 2px solid #8c8c8c; border-radius: 4px; position: relative; }
.as-add-icon::after { content: ""; position: absolute; width: 8px; height: 8px; border: 2px solid #8c8c8c; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.as-note { margin: 6px 0 0; color: #999; font-size: 11.5px; }
.as-photo-tag { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 10px; line-height: 16px; border-radius: 3px; padding: 0 4px; pointer-events: none; }
.as-album-icon { width: 26px; height: 20px; border: 2px solid #8c8c8c; border-radius: 3px; position: relative; overflow: hidden; }
.as-album-icon::before { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #8c8c8c; right: 3px; top: 2px; }
.as-album-icon::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: #8c8c8c; clip-path: polygon(0 100%, 35% 15%, 60% 65%, 75% 40%, 100% 100%); }
/* 手机相册（「现场系统异常」才有） */
.alb { height: 100%; display: flex; flex-direction: column; background: #fff; color: #333; }
.alb-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #f0f0f0; }
.alb-top b { font-size: 15px; }
.alb-cancel { border: 0; background: none; color: #333; font-size: 15px; padding: 0; }
.alb-done { height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--app-blue); color: #fff; font-size: 13px; }
.alb-done:disabled { background: #d9d9d9; }
.alb-tip { margin: 8px 12px; color: #666; font-size: 12px; line-height: 1.6; }
.alb-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 12px; align-content: start; }
.alb-item { position: relative; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #000; aspect-ratio: 9 / 14; }
.alb-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.alb-item.is-on { border-color: var(--app-blue); }
.alb-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .25); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.alb-item.is-on .alb-check { background: var(--app-blue); }
.alb-time { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); color: #fff; font-size: 11px; text-align: left; }
.alb-demo { margin: 8px 12px 12px; color: #aaa; font-size: 11px; }
.as-textarea { position: relative; }
.as-textarea textarea { width: 100%; border: 1px solid #e5e5e5; border-radius: 8px; padding: 8px 10px 18px; resize: none; font-size: 13px; }
.as-textarea textarea:focus { outline: none; border-color: var(--app-blue); }
.am-counter { position: absolute; right: 10px; bottom: 6px; color: #bbb; font-size: 11px; }
.as-error-banner { margin-top: 12px; background: #fff1f0; border: 1px solid #ffa39e; color: #a8071a; border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.as-foot { border-top: 1px solid #f0f0f0; padding: 8px 16px 14px; }
.as-missing, .as-ready { font-size: 12px; text-align: center; margin-bottom: 8px; }
.as-missing { color: #d46b08; }
.as-ready { color: #389e0d; }
.as-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.app-btn-outline, .app-btn-danger { height: 42px; border-radius: 8px; font-size: 16px; }
.app-btn-outline { border: 1px solid var(--app-blue); background: #fff; color: var(--app-blue); }
.app-btn-danger { border: 0; background: var(--app-red); color: #fff; }
.app-btn-danger:disabled { background: #ffccc7; }
.app-btn-outline:disabled { opacity: .5; }

/* 相机 */
.phone-camera { position: absolute; inset: 0; z-index: 8; background: #000; }
.cam { height: 100%; display: flex; flex-direction: column; color: #fff; }
.cam-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.cam-text-btn { border: 0; background: none; color: #fff; font-size: 15px; }
.cam-flag { font-size: 11px; color: #ffc53d; border: 1px solid #ffc53d; border-radius: 3px; padding: 0 4px; }
.cam-view { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.cam-view canvas { width: 100%; max-height: 100%; aspect-ratio: 3 / 4; object-fit: contain; }
.cam-scenes { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; align-items: center; }
.cam-scenes-label { font-size: 11px; color: #999; flex: none; }
.cam-chip { flex: none; border: 1px solid #555; background: transparent; color: #ddd; border-radius: 12px; padding: 2px 10px; font-size: 12px; cursor: pointer; }
.cam-chip.is-on { border-color: #ffc53d; color: #ffc53d; }
.cam-bottom { display: flex; justify-content: center; padding: 10px 0 22px; }
.cam-shutter { width: 64px; height: 64px; border-radius: 50%; border: 5px solid #fff; background: #fff; box-shadow: inset 0 0 0 3px #000; }
.cam-shutter:active { transform: scale(.94); }

/* 演示面板 */
.demo-panel { width: 400px; max-width: 100%; display: flex; flex-direction: column; gap: 12px; }
.dp-card { background: #fff; border-radius: 6px; padding: 14px 16px; border: 1px solid var(--border-light); }
.dp-card h4 { margin: 0 0 10px; font-size: 14px; }
.dp-card h4 small { font-weight: 400; color: #909399; font-size: 12px; margin-left: 6px; }
.dp-label { font-size: 12px; color: #909399; margin-bottom: 6px; }
.dp-field + .dp-field { margin-top: 12px; }
.dp-radio { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 4px; cursor: pointer; border: 1px solid transparent; }
.dp-radio:hover { background: var(--bg-hover); }
.dp-radio.is-on { border-color: #a8e8dc; background: var(--primary-light); }
.dp-radio input { margin-top: 3px; accent-color: var(--primary); }
.dp-radio b { display: block; font-weight: 500; }
.dp-radio em { display: block; font-style: normal; color: #909399; font-size: 12px; }
.dp-queue { margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.dp-hint { margin-top: 6px; font-size: 12px; color: #909399; line-height: 1.6; }
.dp-steps { margin: 0; padding-left: 18px; color: var(--text-secondary); line-height: 1.75; }
.dp-steps li + li { margin-top: 4px; }
.dp-rules ul { margin: 0; padding-left: 18px; color: var(--text-secondary); line-height: 1.7; }

/* =========================================================
   后台通用
   ========================================================= */
.admin { background: #fff; border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, .05); overflow: hidden; }
.admin-tabs { display: flex; gap: 10px; padding: 10px 14px; background: var(--bg); border-bottom: 1px solid var(--border-light); }
.at-tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; border-radius: 4px; background: #fff; color: var(--text-secondary); font-weight: 500; }
.at-tab.is-active { background: var(--primary); color: #fff; }
.at-tab em { font-style: normal; opacity: .8; }
.at-home { width: 14px; height: 12px; border: 2px solid currentColor; border-radius: 7px 7px 2px 2px; display: inline-block; }
.admin-page { padding: 12px 16px 14px; }
.page-head { display: flex; align-items: center; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light); }
.page-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.demo-select { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: #909399; }
.demo-select select { height: 30px; border: 1px dashed #ffc53d; border-radius: 4px; background: #fffbe6; padding: 0 8px; }
.subtabs { display: flex; margin: 12px 0 0; border: 1px solid var(--border-light); border-bottom: 0; background: var(--bg); width: fit-content; }
.subtabs span { padding: 9px 22px; color: var(--text-secondary); font-size: 14px; }
.subtabs span.is-active { background: #fff; color: var(--text); font-weight: 600; }
.page-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 12px; }

/* =========================================================
   页面二：在途跟踪
   ========================================================= */
.trk { border: 1px solid var(--border-light); }
.trk-toolbar { display: flex; align-items: center; gap: 18px; padding: 10px 14px; border-bottom: 1px solid var(--border-light); flex-wrap: wrap; font-size: 13.5px; }
.trk-sum { color: var(--text-secondary); }
.chk-new { padding: 2px 8px; border: 1px dashed #ffc53d; border-radius: 4px; background: #fffbe6; }
.trk-legend { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); flex-wrap: wrap; }
.lg { display: inline-block; width: 26px; height: 0; border-top: 3px solid; margin-left: 8px; }
.lg-track { border-color: #1d39c4; }
.lg-plan { border-top-style: dashed; border-color: #389e0d; }
.lg-dev { border-top: 2px dashed #fa8c16; }
.lg-change { border-top: 2px dashed #f5222d; }
.trk-body { display: grid; grid-template-columns: 400px minmax(0, 1fr); height: 640px; }
.trk-timeline { overflow-y: auto; border-right: 1px solid var(--border-light); padding: 6px 12px 16px 20px; }
.tl-item { position: relative; padding: 10px 8px 10px 26px; border-radius: 4px; }
.tl-item::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; border-left: 1px solid #d9d9d9; }
.tl-item.is-clickable { cursor: pointer; }
.tl-item.is-clickable:hover { background: var(--bg-hover); }
.tl-item.is-selected { background: var(--primary-light); }
.tl-dot { position: absolute; left: 0; top: 13px; width: 15px; height: 15px; border-radius: 50%; border: 2px solid #52c41a; background: #fff; }
.tl-signin .tl-dot { border-color: var(--primary); }
.tl-address_change .tl-dot { border-color: var(--danger); }
.tl-stay .tl-dot { border-color: #722ed1; }
.tl-time { font-size: 15px; color: var(--text); }
.tl-text { color: var(--text-secondary); margin-top: 4px; line-height: 1.7; }
.tl-address_change .tl-text { color: #a8071a; }
.tl-stay .tl-text { color: #531dab; }
.tl-sign { margin-top: 6px; padding: 8px 10px; background: #fff; border: 1px dashed #ffd591; border-radius: 4px; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 4px 0; }
.tl-reason { margin-top: 5px; color: var(--text-secondary); font-size: 12.5px; }
.tl-thumbs { display: flex; gap: 6px; margin-top: 6px; }
.tl-thumb { width: 48px; height: 64px; padding: 0; border: 1px solid var(--border-light); border-radius: 3px; overflow: hidden; background: #000; }
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tl-thumb.is-pending { display: inline-flex; align-items: center; justify-content: center; background: #fff7e6; border: 1px dashed #ffc069; color: #d46b08; font-size: 11px; }
.trk-mapwrap { position: relative; min-width: 0; }
.trk-map { position: absolute; inset: 0; }
.trk-card { position: absolute; right: 14px; top: 14px; width: 420px; max-width: calc(100% - 28px); max-height: calc(100% - 28px); display: flex; flex-direction: column; background: #fff; border-radius: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, .16); }
.sc-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 8px; border-bottom: 1px solid var(--border-light); }
.sc-head b { font-size: 14px; }
.sc-close { border: 0; background: none; font-size: 20px; color: #909399; line-height: 1; }
.sc-body { overflow-y: auto; padding: 8px 14px 14px; }
.sc-kv { display: grid; grid-template-columns: 98px minmax(0, 1fr); gap: 5px 4px; margin: 0; }
.sc-kv dt { color: var(--text); font-weight: 600; white-space: nowrap; }
.sc-kv dd { margin: 0; color: var(--text); word-break: break-all; }
.sc-sub { color: #909399; font-size: 12px; margin-top: 2px; }
.sc-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-photo { width: 84px; padding: 0; border: 1px solid var(--border-light); border-radius: 3px; overflow: hidden; background: #fff; text-align: left; }
.sc-photo img { width: 100%; height: 108px; object-fit: cover; background: #000; }
.sc-photo span { display: block; padding: 2px 4px; font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-photo:hover { border-color: var(--primary); }
.sc-photo.is-pending { border-style: dashed; border-color: #ffc069; }
.sc-photo.is-pending:hover { border-color: #ffc069; }
.sc-photo.is-pending b { display: flex; align-items: center; justify-content: center; height: 108px; background: #fff7e6; color: #d46b08; font-weight: 500; font-size: 12px; }
.sc-reasons { margin: 4px 0 0; padding-left: 16px; color: var(--text-secondary); font-size: 12.5px; }
.link-btn + .link-btn { margin-left: 8px; }

/* =========================================================
   页面三：提单 + 改址
   ========================================================= */
.filter-bar { display: flex; gap: 10px; align-items: center; padding: 4px 0 12px; }
.filter-bar .input { max-width: 240px; }
.table-toolbar { display: flex; align-items: center; gap: 14px; padding: 8px 2px; color: var(--text-secondary); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border-light); }
.table { width: 100%; border-collapse: collapse; }
.table th { background: #f5f7fa; color: var(--text-secondary); font-weight: 600; text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
.table td { padding: 10px 10px; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.table tbody tr:hover td { background: var(--bg-hover); }
.col-chk { width: 36px; }
.col-addr { min-width: 280px; }
.col-ops { white-space: nowrap; }
.cell-addr { line-height: 1.5; }
.cell-tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 0; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: #c0c4cc; }
.s-primary { background: var(--primary); }
.s-success { background: var(--success); }
.s-info { background: var(--info); }

/* 修改地址弹窗 */
.change-mask .modal-body { padding-top: 12px; }
.chg-banner { padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; font-size: 13px; line-height: 1.6; }
.chg-banner b { margin-right: 10px; }
.chg-banner.is-normal { background: var(--primary-light); color: #006d5b; border: 1px solid #a8e8dc; }
.chg-banner.is-late { background: var(--warn-light); color: #873800; border: 1px solid #ffd591; }
.chg-banner.is-blocked { background: var(--danger-light); color: #a8071a; border: 1px solid #ffa39e; }
.chg-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; padding: 10px 12px; background: var(--bg); border-radius: 4px; }
.kv { display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; }
.kv .k { color: #909399; white-space: nowrap; }
.kv-wide { grid-column: span 2; }
.chg-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; margin-top: 2px; }
.chg-addr { margin-top: 14px; }
.chg-addr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.chg-sec { border: 1px solid var(--border-light); border-radius: 4px; padding: 12px 14px 4px; margin-bottom: 12px; }
.chg-sec h4, .chg-impact h4 { margin: 0 0 12px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.chg-sec h4 small, .chg-impact h4 small { font-weight: 400; color: #ad6800; font-size: 12px; }
.num { width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: #fff; font-style: normal; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.form-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 0 10px; align-items: start; margin-bottom: 12px; }
.form-row.two { grid-template-columns: 84px minmax(0, 1fr) 64px minmax(0, 1fr); }
.fl { text-align: right; color: var(--text-secondary); line-height: 32px; white-space: nowrap; }
.fc { min-width: 0; }
.fhint { color: #909399; font-size: 12px; margin-top: 4px; line-height: 1.5; }
.ferr { color: var(--danger); font-size: 12px; min-height: 0; }
.ferr:not(:empty) { margin-top: 4px; }
.form-row.has-error .input { border-color: var(--danger); }
.inline { display: flex; gap: 8px; align-items: center; }
.inline .input { flex: 1; }
.cascader { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.radios { min-height: 32px; display: flex; align-items: center; flex-wrap: wrap; }
.f-loc { min-height: 32px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chg-map { height: 340px; border: 1px solid var(--border-light); border-radius: 4px; }
.chg-map-tip { color: #c45656; font-size: 12px; margin: 6px 0 10px; }
.chg-impact { border: 1px solid var(--border-light); border-radius: 4px; padding: 12px 14px; }
.imp-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; margin-top: 10px; align-items: start; }
.imp-row .k { color: #909399; }
.imp-risk { margin-top: 10px; padding: 8px 10px; border-radius: 4px; border: 1px solid; }
.imp-risk.is-low { background: var(--success-light); border-color: #b7eb8f; }
.imp-risk.is-medium { background: var(--warn-light); border-color: #ffd591; }
.imp-risk.is-high { background: var(--danger-light); border-color: #ffa39e; }
.imp-reasons { margin-top: 4px; color: var(--text-secondary); font-size: 12px; }
.imp-orders .chk { display: flex; margin-bottom: 4px; }
.imp-sync { margin: 0; padding-left: 16px; color: var(--text-secondary); line-height: 1.7; }
.proofs { display: flex; gap: 10px; flex-wrap: wrap; }
.proof { position: relative; width: 92px; }
.proof-img { width: 92px; height: 92px; padding: 0; border: 1px solid var(--border-light); border-radius: 4px; overflow: hidden; background: var(--bg); }
.proof-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.proof-name { display: block; font-size: 11px; color: #909399; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.proof-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; line-height: 1; }
.proof-add { width: 92px; height: 92px; border: 1px dashed var(--border); border-radius: 4px; background: var(--bg-hover); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #909399; cursor: pointer; font-size: 12px; transition: .15s; }
.proof-add span { font-size: 22px; line-height: 1; }
.proof-add:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.proof-samples { margin-top: 6px; font-size: 12px; color: #909399; }
.chg-foot-msg { margin-right: auto; font-size: 12.5px; color: #909399; }
.chg-foot-msg.is-ok { color: #389e0d; }
.chg-foot-msg.is-bad { color: var(--danger); }

/* 地图校准 */
.cal-rule { margin: 12px 0; padding: 8px 12px; background: #fffbe6; border: 1px dashed #ffd591; border-radius: 4px; color: #614700; line-height: 1.7; }
.cal .chg-banner { margin-top: 0; }
.cal-map { height: 400px; border: 1px solid var(--border-light); border-radius: 4px; }
.cal-msg { margin-top: 8px; color: #909399; }
.cal-msg.is-ok { color: #389e0d; }
.cal-msg.is-bad { color: var(--danger); }

/* 改址记录 */
.cr-list { display: flex; flex-direction: column; gap: 12px; }
.cr { border: 1px solid var(--border-light); border-radius: 4px; padding: 12px 14px; }
.cr-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cr-head b { font-size: 14px; margin-right: 4px; }
.cr-time { margin-left: auto; color: #909399; font-size: 12px; }
.cr-addr { margin-top: 8px; padding: 8px 10px; background: var(--bg); border-radius: 4px; line-height: 1.8; }
.cr-k { display: inline-block; width: 64px; color: #909399; flex: none; }
.cr-dist { color: var(--text-secondary); font-size: 12px; }
.cr-kv { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 10px; margin: 10px 0 0; }
.cr-kv dt { color: #909399; }
.cr-kv dd { margin: 0; }
.cr-kv dd.is-ok { color: #389e0d; }
.cr-kv dd.is-bad { color: var(--danger); }
.cr-proofs { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; flex-wrap: wrap; }
.cr-proof { width: 72px; height: 72px; padding: 0; border: 1px solid var(--border-light); border-radius: 4px; overflow: hidden; background: var(--bg); }
.cr-proof img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cr-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-light); }
.cr-role { margin-right: auto; color: #ad6800; font-size: 12px; }
.cr-cal { background: var(--bg-hover); }
.cr-cal-text { margin: 8px 0 0; color: var(--text-secondary); }

/* =========================================================
   页面四：台账
   ========================================================= */
.ledger-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.kpi { border: 1px solid var(--border-light); border-radius: 4px; padding: 10px 14px; display: flex; flex-direction: column; }
.kpi span { color: #909399; font-size: 12px; }
.kpi b { font-size: 24px; font-weight: 600; margin-top: 2px; }
.kpi em { font-style: normal; color: #909399; font-size: 12px; }
.kpi.is-danger b { color: var(--danger); }
.kpi.is-warn b { color: var(--warn); }
.ledger-filters { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ledger-filters select.input { width: 160px; }
.table-ledger td { font-size: 12.5px; }
.table-ledger td:nth-child(1), .table-ledger td:nth-child(2), .table-ledger td:nth-child(5), .table-ledger td:nth-child(10) { white-space: nowrap; }
.col-check { min-width: 260px; max-width: 360px; color: var(--text-secondary); }

/* =========================================================
   证据包
   ========================================================= */
.ep-doc { color: #1f1f1f; }
.ep-header { text-align: center; border-bottom: 2px solid #1f1f1f; padding-bottom: 8px; margin-bottom: 12px; }
.ep-header h2 { margin: 0; font-size: 20px; letter-spacing: .1em; }
.ep-meta { color: #666; font-size: 12px; margin-top: 4px; }
.ep-kv { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.ep-kv th, .ep-kv td { border: 1px solid #d9d9d9; padding: 6px 8px; text-align: left; vertical-align: top; font-size: 12.5px; }
.ep-kv th { width: 96px; background: #fafafa; font-weight: 600; white-space: nowrap; }
.ep-head th { width: 80px; }
.ep-stop { margin-top: 16px; page-break-inside: avoid; }
.ep-stop h4 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.ep-type { font-weight: 400; color: #666; font-size: 12px; }
.ep-change { color: #a8071a; margin-top: 2px; }
.ep-images { display: flex; gap: 8px; flex-wrap: wrap; }
.ep-images figure { margin: 0; width: 132px; }
.ep-images img { width: 132px; height: 176px; object-fit: cover; border: 1px solid #d9d9d9; }
.ep-images figure.is-proof img { object-position: top; }
.ep-images figcaption { font-size: 11px; color: #666; margin-top: 2px; line-height: 1.4; }
.ep-pending { width: 132px; height: 176px; display: flex; align-items: center; justify-content: center; border: 1px dashed #ffc069; background: #fff7e6; color: #d46b08; font-size: 12px; }
.ep-footer { margin-top: 18px; padding-top: 8px; border-top: 1px solid #d9d9d9; color: #666; font-size: 12px; }

@media print {
  body.is-printing-evidence { background: #fff; }
  body.is-printing-evidence > *:not(#modal-root) { display: none !important; }
  body.is-printing-evidence #modal-root > *:not(.evidence-mask) { display: none !important; }
  body.is-printing-evidence .evidence-mask { position: static; background: none; padding: 0; display: block; }
  body.is-printing-evidence .evidence-mask .modal { box-shadow: none; max-height: none; width: auto !important; }
  body.is-printing-evidence .evidence-mask .modal-head, body.is-printing-evidence .evidence-mask .modal-foot { display: none; }
  body.is-printing-evidence .evidence-mask .modal-body { overflow: visible; padding: 0; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 1100px) {
  .trk-body { grid-template-columns: 320px minmax(0, 1fr); }
  .chg-grid { grid-template-columns: 1fr; }
  .chg-top { grid-template-columns: 1fr 1fr; }
  .ledger-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  main { padding: 12px; }
  .trk-body { grid-template-columns: 1fr; height: auto; }
  .trk-timeline { max-height: 420px; border-right: 0; border-bottom: 1px solid var(--border-light); }
  .trk-mapwrap { height: 520px; }
  .pv { grid-template-columns: 1fr; }
  .chg-top { grid-template-columns: 1fr; }
  .kv-wide { grid-column: auto; }
  .form-row.two { grid-template-columns: 84px minmax(0, 1fr); }
  .form-row.two > .fl:nth-of-type(2) { grid-column: 1; }
  .chg-addr-grid { grid-template-columns: 1fr; }
  .phone { width: 100%; max-width: 375px; }
}

/* ===== 2026-11-13 产品确认后的新增 ===== */
.c-info { color: var(--info); }
.demo-user { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #a3b1c2; }
.demo-user select { height: 28px; border: 1px dashed #ffc53d; border-radius: 4px; background: #2b3a4d; color: #fff; padding: 0 6px; font-size: 12px; }
.ro-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 3px; background: #f4f4f5; color: #606266; border: 1px dashed #c0c4cc; font-size: 12px; }
.btn-new { border-color: #91caff; color: #0958d9; background: var(--info-light); }
.btn-new:disabled { opacity: .5; cursor: not-allowed; }
.link-btn:disabled { color: #c0c4cc; cursor: not-allowed; text-decoration: none; }
.link-addr { border: 0; background: none; padding: 0; text-align: left; color: inherit; font: inherit; line-height: 1.5; cursor: pointer; }
.link-addr:hover { color: var(--primary); text-decoration: underline dotted; }

/* 修改地址：通知时间、修改人 */
.f-time .input { flex: 0 1 240px; min-width: 0; }
.imp-owner { padding-top: 8px; border-top: 1px dashed var(--border-light); }
.imp-owner b { color: #1f2329; }

/* 图三弹窗：选择送货地址 */
.addr-opts { margin: 12px 0 0; border: 1px solid var(--border-light); border-radius: 4px; padding: 10px 12px; }
.ao-title { font-weight: 600; margin-bottom: 8px; }
.ao-title small { margin-left: 8px; font-weight: 400; color: #ad6800; font-size: 12px; }
.ao-item { display: grid; grid-template-columns: 18px 96px minmax(0, 1fr); gap: 2px 8px; align-items: start; padding: 6px 4px; border-radius: 4px; cursor: pointer; }
.ao-item:hover { background: var(--bg-hover); }
.ao-item input { margin-top: 3px; accent-color: var(--primary); }
.ao-item.is-disabled { cursor: default; }
.ao-item.is-disabled:hover { background: none; }
.ao-label { font-weight: 500; }
.ao-label em { font-style: normal; margin-left: 6px; font-size: 11px; color: #08979c; background: var(--primary-light); border-radius: 3px; padding: 0 4px; }
.ao-text { color: #1f2329; }
.ao-note { grid-column: 3; color: #909399; font-size: 12px; }
.ao-block { margin-top: 6px; padding: 6px 10px; border-radius: 4px; background: var(--danger-light); color: #a8071a; font-size: 12px; }
.ao-block.is-quiet { background: var(--bg); color: #909399; }
.cal-msg.is-warn { color: #d46b08; }

/* 后台代补签 */
.px .chg-sec { margin-top: 12px; }
.px-time-hint { margin: -6px 0 12px 94px; }
.px-note { padding: 8px 12px; border-radius: 4px; background: var(--info-light); color: #003eb3; line-height: 1.7; font-size: 12.5px; }
.px .imp-owner { margin-top: 10px; }

/* 改址记录：货主通知 */
.cr-notice { margin-top: 10px; padding: 8px 10px; border-radius: 4px; background: #fafafa; }
.cr-notice-head { color: var(--text-secondary); }
.cr-notice .cr-proofs { margin-top: 6px; }

/* 司机 App：模拟定位拦截 */
.phone-overlay:has(.app-alert) { justify-content: center; align-items: center; }
.app-alert { width: 82%; background: #fff; border-radius: 14px; padding: 22px 18px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: sheetUp .2s ease-out; }
.app-alert b { font-size: 16px; }
.app-alert p { margin: 0; color: #595959; line-height: 1.6; font-size: 13px; }
.aa-icon { width: 44px; height: 44px; border-radius: 50%; background: #fff1f0; color: var(--danger); font-size: 26px; font-weight: 700; line-height: 44px; }
.chg-sec h4 { flex-wrap: wrap; }
.chg-sec h4 .h-title { white-space: nowrap; }
.chg-sec h4 small { line-height: 1.5; }

/* 修改地址弹窗（11-19）：顶部状态按内容撑开、不折行；新收货地址压成两行 */
.f-loc-msg { font-size: 12px; }
@media (min-width: 1101px) {
  .chg > .chg-top { grid-template-columns: minmax(0, 1fr) auto auto; }
  /* 第一行：标准地址｜街道｜详细地址 + 解析定位；第二行：收货联系人｜电话｜新经纬度（解析结果就在「解析定位」下面） */
  .chg-addr-grid {
    grid-template-columns: 364px 250px minmax(0, 1fr);
    grid-template-areas: 'region street detail' 'contact phone location';
    column-gap: 16px;
  }
  .chg-addr-grid > .form-row { grid-template-columns: 72px minmax(0, 1fr); gap: 0 8px; }
  .chg-addr-grid .cascader { gap: 6px; }
  .chg-addr-grid .cascader select.input { padding: 0 4px 0 8px; } /* 三个下拉变窄了，少留点内边距，省市区名字不被截断 */
  .chg-addr-grid > [data-field='region'],
  .chg-addr-grid > [data-field='contact'] { grid-template-columns: 84px minmax(0, 1fr); gap: 0 10px; }
  .chg-addr-grid > [data-field='region'] { grid-area: region; }
  .chg-addr-grid > [data-field='street'] { grid-area: street; }
  .chg-addr-grid > [data-field='detail'] { grid-area: detail; }
  .chg-addr-grid > [data-field='location'] { grid-area: location; }
  .chg-addr-grid > [data-field='contact'] { grid-area: contact; }
  .chg-addr-grid > [data-field='phone'] { grid-area: phone; }
}
