
:root {
  --primary: #1a73e8; --primary-dark: #1557b0; --primary-light: #e8f0fe;
  --success: #0d904f; --success-bg: #e6f4ea;
  --warn: #e37400; --warn-bg: #fef7e0;
  --danger: #d93025; --danger-bg: #fce8e6;
  --purple: #7c3aed; --purple-bg: #f3e8ff;
  --gray: #80868b; --gray-bg: #f1f3f4;
  --dark: #16213a;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  background: #eef1f6; color: #1f2937; font-size: 14px;
}
/* ===== 顶部设计说明条 ===== */
.intro-bar { background: var(--dark); color: #cbd2e0; padding: 10px 16px; font-size: 11.5px; line-height: 1.8; }
.intro-bar b { color: #fff; font-size: 12.5px; margin-right: 6px; }
.intro-bar .hl { color: #7eb3ff; font-weight: 600; }
.intro-bar .hl2 { color: #ffb84d; font-weight: 600; }

/* ===== H5 舞台 ===== */
.stage { min-height: 100vh; display: flex; justify-content: center; }
.app { width: 100%; max-width: 520px; min-height: 100vh; background: #f6f8fb; position: relative; display: flex; flex-direction: column; }
@media (min-width: 600px) {
  body { background: linear-gradient(135deg, #16213a 0%, #1f2c52 55%, #1a73e8 160%); padding: 26px 0; }
  .app { min-height: auto; border-radius: 26px; box-shadow: 0 24px 70px rgba(0,0,0,.45); overflow: hidden; min-height: calc(100vh - 52px); }
}
.screen { display: none; flex: 1; flex-direction: column; }
.screen.show { display: flex; }
.fade-in { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== 通用组件 ===== */
.tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 12px; font-size: 11.5px; font-weight: 500; gap: 4px; }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-success { background: var(--success-bg); color: var(--success); }
.tag-warning { background: var(--warn-bg); color: var(--warn); }
.tag-info { background: var(--primary-light); color: var(--primary); }
.tag-gray { background: var(--gray-bg); color: var(--gray); }
.tag-purple { background: var(--purple-bg); color: var(--purple); }
.cell-input { border: 1px solid #e5e7eb; border-radius: 9px; padding: 8px 10px; font-size: 13px; outline: none; background: #fff; color: #374151; width: 100%; }
.cell-input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(26,115,232,.08); }
.card { background: #fff; border-radius: 14px; margin: 0 14px 12px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.card-title { font-size: 14px; font-weight: 700; color: #374151; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.card-hint { font-size: 11px; color: #9ca3af; font-weight: 400; }
.chip-note { font-size: 11.5px; color: #9ca3af; background: #f9fafb; border-radius: 9px; padding: 9px 12px; line-height: 1.8; margin-top: 10px; }
.num-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.num-dot.gray { background: #9aa0a6; }
.num-dot.hot { background: var(--warn); }
.seg-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 14px 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg { flex-shrink: 0; background: #fff; border: 1px solid #e5e7eb; color: #6b7280; border-radius: 20px; padding: 7px 16px; font-size: 12.5px; cursor: pointer; font-weight: 600; }
.seg.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== 登录屏 ===== */
#screen-login { background: linear-gradient(160deg, #16213a 0%, #1f2c52 55%, #1a73e8 170%); justify-content: center; padding: 30px 26px; }
.login-logo { width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 14px; }
.login-title { text-align: center; font-size: 21px; font-weight: 800; color: #fff; letter-spacing: 1px; }
.login-sub { text-align: center; font-size: 12px; color: rgba(255,255,255,.55); margin: 6px 0 28px; }
.login-card { background: #fff; border-radius: 18px; padding: 26px 22px; box-shadow: 0 18px 46px rgba(0,0,0,.3); }
.login-field { margin-bottom: 15px; }
.login-field label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.login-field input { width: 100%; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 13px; font-size: 15px; outline: none; }
.login-field input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(26,115,232,.1); }
.login-err { font-size: 12px; color: var(--danger); background: var(--danger-bg); border-radius: 9px; padding: 9px 12px; margin-bottom: 13px; display: none; }
.login-btn { width: 100%; background: var(--primary); color: #fff; border: none; border-radius: 11px; padding: 13px 0; font-size: 15.5px; font-weight: 700; cursor: pointer; margin-top: 4px; }
.login-demo-acc { display: flex; gap: 8px; margin-top: 12px; }
.demo-acc-btn { flex: 1; background: var(--primary-light); color: var(--primary); border: none; border-radius: 9px; padding: 8px 6px; font-size: 11px; font-weight: 600; cursor: pointer; line-height: 1.6; }
.demo-acc-btn span { display: block; font-size: 10px; color: #6b7280; font-weight: 400; }
.login-tip { font-size: 11px; color: rgba(255,255,255,.5); text-align: center; margin-top: 18px; line-height: 1.8; }
.login-domain { text-align: center; font-size: 12px; color: rgba(255,255,255,.85); margin-top: 22px; background: rgba(255,255,255,.08); border-radius: 9px; padding: 9px 10px; }
.login-domain b { color: #ffb84d; }

/* ===== 主框架 ===== */
.app-head { background: linear-gradient(135deg, #16213a, #1f2c52); color: #fff; padding: 14px 16px 46px; position: relative; }
.app-head-row { display: flex; align-items: center; justify-content: space-between; }
.app-head-title { font-size: 16.5px; font-weight: 800; }
.app-head-ent { font-size: 12px; color: rgba(255,255,255,.75); margin-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-logout { background: rgba(255,255,255,.12); color: #fff; border: none; border-radius: 9px; padding: 6px 13px; font-size: 12px; cursor: pointer; }
.head-stats { position: absolute; left: 14px; right: 14px; bottom: -34px; background: #fff; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.1); display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 4px; }
.hs-item { text-align: center; border-right: 1px solid #f0f2f6; }
.hs-item:last-child { border-right: none; }
.hs-num { font-size: 19px; font-weight: 800; color: #1f2937; }
.hs-num.ok { color: var(--success); } .hs-num.warn { color: var(--warn); } .hs-num.bad { color: var(--danger); }
.hs-label { font-size: 10.5px; color: #9ca3af; margin-top: 2px; }
.app-body { flex: 1; padding: 46px 0 86px; }
.tab-page { display: none; }
.tab-page.show { display: block; animation: fadeIn .25s ease; }

/* ===== TabBar ===== */
.tabbar { position: absolute; bottom: 0; left: 0; right: 0; z-index: 100; background: #fff; border-top: 1px solid #eef0f5; display: flex; padding: 6px 0 max(6px, env(safe-area-inset-bottom)); }
.tab-item { flex: 1; text-align: center; cursor: pointer; color: #9ca3af; font-size: 10.5px; }
.tab-item .ticon { font-size: 21px; line-height: 1.2; filter: grayscale(1) opacity(.6); }
.tab-item.active { color: var(--primary); font-weight: 600; }
.tab-item.active .ticon { filter: none; }
.tab-item.hidden-tab { display: none; }

/* ===== 首页：模块宫格 ===== */
.mod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mod-card { background: #fff; border-radius: 14px; padding: 16px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05); cursor: pointer; transition: transform .1s; position: relative; }
.mod-card:active { transform: scale(.97); }
.mod-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; margin-bottom: 9px; }
.mod-icon.blue { background: var(--primary-light); } .mod-icon.green { background: var(--success-bg); }
.mod-icon.purple { background: var(--purple-bg); } .mod-icon.orange { background: var(--warn-bg); }
.mod-name { font-size: 14px; font-weight: 700; color: #1f2937; }
.mod-desc { font-size: 11px; color: #9ca3af; margin-top: 3px; line-height: 1.5; }
.mod-soon { position: absolute; top: 10px; right: 10px; font-size: 9.5px; background: var(--gray-bg); color: #9aa0a6; border-radius: 8px; padding: 1px 7px; font-weight: 600; }
.greet-card { background: linear-gradient(135deg, #1a73e8, #4285f4); color: #fff; border-radius: 14px; margin: 0 14px 12px; padding: 16px 18px; box-shadow: 0 6px 16px rgba(26,115,232,.28); }
.greet-hello { font-size: 16px; font-weight: 800; }
.greet-sub { font-size: 11.5px; color: rgba(255,255,255,.8); margin-top: 5px; line-height: 1.6; }

/* ===== 外呼模块 ===== */
.chain-v { position: relative; padding-left: 4px; }
.chain-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; position: relative; }
.chain-row .ctxt { font-size: 13px; color: #374151; font-weight: 600; }
.chain-row .csub { font-size: 11px; color: #9ca3af; font-weight: 400; margin-left: 6px; }
.chain-row.hot .ctxt { color: var(--warn); }
.chain-v .chain-row:not(:last-child)::after { content: ''; position: absolute; left: 9px; top: 30px; bottom: -6px; width: 2px; background: #e5e7eb; }
.chain-fail { font-size: 10.5px; color: #9aa0a6; background: var(--gray-bg); border-radius: 8px; padding: 2px 8px; margin-left: 8px; }
.veh-card { background: #fff; border-radius: 13px; margin: 0 14px 10px; padding: 13px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.veh-card.missing { border: 1px solid #fde68a; background: #fffdf6; }
.veh-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.veh-plate { font-size: 15px; font-weight: 800; color: #1f2937; letter-spacing: .5px; }
.veh-fleet { font-size: 11px; color: #6b7280; background: var(--gray-bg); border-radius: 8px; padding: 2px 8px; }
.veh-form { display: flex; gap: 8px; align-items: center; }
.veh-form .f-item { flex: 1; }
.veh-form .f-label { font-size: 10.5px; color: #9ca3af; margin-bottom: 4px; }
.phone-empty { border-color: #fbbf24 !important; background: #fffdf4 !important; }
.btn-save-line { background: var(--primary); color: #fff; border: none; border-radius: 9px; padding: 8px 14px; font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0; }
.emg-card { border: 1.5px dashed #d7dce5; border-radius: 14px; padding: 15px 16px; background: #fafbfc; margin-bottom: 12px; }
.emg-card.primary { border-color: #93c5fd; background: #f5f9ff; }
.emg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13.5px; font-weight: 700; }
.emg-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.emg-row .lbl { width: 68px; font-size: 12px; color: #6b7280; flex-shrink: 0; }
.rec-card { background: #fff; border-radius: 13px; margin: 0 14px 10px; padding: 13px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.rec-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-plate { font-weight: 800; font-size: 14px; }
.rec-time { font-size: 11px; color: #9ca3af; margin-left: auto; }
.rec-mid { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: #374151; }
.rec-actions { display: flex; gap: 8px; margin-top: 9px; }
.mini-btn { border: 1px solid #e5e7eb; background: #fff; border-radius: 8px; padding: 4px 11px; font-size: 11.5px; cursor: pointer; color: #374151; }
.rec-alarm { font-size: 12px; color: #6b7280; margin-top: 4px; }
.plat-switch { display: flex; background: #f1f3f4; border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.plat-opt { flex: 1; text-align: center; font-size: 13px; color: #6b7280; border-radius: 9px; padding: 9px 0; cursor: pointer; font-weight: 600; }
.plat-opt.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.plat-opt.disabled { opacity: .45; pointer-events: none; }
.type-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tchip { border: 1.5px solid #e8eaed; background: #fafbfc; color: #6b7280; border-radius: 20px; padding: 7px 14px; font-size: 12.5px; cursor: pointer; user-select: none; }
.tchip.on { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }
.time-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.time-row .lbl { font-size: 12.5px; color: #6b7280; flex-shrink: 0; }
.time-row input[type="time"] { border: 1px solid #e5e7eb; border-radius: 9px; padding: 7px 9px; font-size: 13px; }
.seg-pane { display: none; }
.seg-pane.show { display: block; animation: fadeIn .2s ease; }

/* ===== 日报模块 ===== */
.rpt-card { background: #fff; border-radius: 13px; margin: 0 14px 10px; padding: 14px 15px; box-shadow: 0 1px 3px rgba(0,0,0,.05); display: flex; align-items: center; gap: 12px; }
.rpt-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--danger-bg); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.rpt-icon.zip { background: var(--warn-bg); }
.rpt-info { flex: 1; min-width: 0; }
.rpt-name { font-size: 13.5px; font-weight: 700; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpt-meta { font-size: 11px; color: #9ca3af; margin-top: 3px; }
.btn-dl { background: var(--primary); color: #fff; border: none; border-radius: 9px; padding: 8px 14px; font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0; }

/* ===== 我的 ===== */
.me-row { display: flex; align-items: center; gap: 10px; padding: 13px 4px; border-bottom: 1px solid #f5f6f8; font-size: 13.5px; color: #374151; cursor: pointer; }
.me-row:last-child { border-bottom: none; }
.me-row .m-ico { font-size: 17px; }
.me-row .m-arrow { margin-left: auto; color: #c7cdd6; }
.me-val { color: #9ca3af; font-size: 12px; margin-left: auto; }
