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

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #eef0f4;
  color: #1f2329;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; font-size: 14px; }
input, select, textarea { font-family: inherit; font-size: 15px; color: #1f2329; }

/* 手机容器：手机上看是全屏，电脑上看是居中的手机框 */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100%;
  background: #f4f6f9;
  position: relative;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
  overflow-x: hidden;
}

/* 顶部标题栏 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  color: #fff;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 8px;
}
.navbar .back { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; }
.navbar .title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; margin-right: 40px; }
.navbar.hidden { display: none !important; }

/* 首页头部横幅 */
.hero {
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  color: #fff;
  padding: 18px 16px 46px;
}
.hero .brand { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.hero .sub { font-size: 12px; opacity: 0.85; margin-top: 4px; }
/* 咨询电话：点一下直接拨号 */
.hero .tel { margin-top: 10px; font-size: 12px; opacity: 0.95; }
.hero .tel a {
  display: inline-block; color: #fff; text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, .65); border-radius: 14px;
  padding: 3px 12px; margin-left: 4px; font-size: 13px; font-weight: 600;
}

/* 上浮卡片 */
.lift { margin: -32px 12px 0; position: relative; z-index: 2; }
.card { background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05); }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; }
.card-title::before { content: ""; width: 3px; height: 14px; background: #1565c0; border-radius: 2px; margin-right: 8px; }

/* 功能宫格 */
.grid4 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid-item { background: #fff; border-radius: 10px; padding: 16px 6px; text-align: center; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05); }
.grid-item:active { background: #f2f6fc; }
.grid-icon { width: 42px; height: 42px; border-radius: 10px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; }
.gi-blue { background: linear-gradient(135deg, #42a5f5, #1565c0); }
.gi-green { background: linear-gradient(135deg, #66bb6a, #2e7d32); }
.gi-orange { background: linear-gradient(135deg, #ffa726, #ef6c00); }
.gi-purple { background: linear-gradient(135deg, #ab47bc, #6a1b9a); }
.gi-cyan { background: linear-gradient(135deg, #4dd0e1, #00838f); }
.gi-red { background: linear-gradient(135deg, #ef5350, #c62828); }
.grid-label { font-size: 13px; color: #1f2329; font-weight: 500; }
.grid-desc { font-size: 12px; color: #8a9099; margin-top: 2px; }

/* 公告 */
.notice-item { padding: 8px 0; border-bottom: 1px solid #f0f2f5; font-size: 13px; color: #4e5969; display: flex; }
.notice-item:last-child { border-bottom: none; }
.notice-dot { width: 5px; height: 5px; border-radius: 50%; background: #ed6c02; margin: 8px 8px 0 0; flex-shrink: 0; }

/* 步骤条 */
.stepbar { display: flex; background: #fff; padding: 14px 8px 10px; }
.step { flex: 1; text-align: center; position: relative; }
.step .dot { width: 24px; height: 24px; border-radius: 50%; background: #dfe3e8; color: #fff; font-size: 12px; line-height: 24px; margin: 0 auto 5px; }
.step .txt { font-size: 12px; color: #8a9099; }
.step.active .dot { background: #1565c0; }
.step.active .txt { color: #1565c0; font-weight: 600; }
.step.done .dot { background: #2e7d32; }
.step.done .txt { color: #2e7d32; }
.step::after { content: ""; position: absolute; top: 12px; left: 50%; width: 100%; height: 1px; background: #dfe3e8; z-index: -1; }
.step:last-child::after { display: none; }
.step.done::after { background: #2e7d32; }

/* 表单 */
.form-item { margin-bottom: 14px; }
.form-label { font-size: 13px; color: #4e5969; margin-bottom: 6px; font-weight: 500; }
.form-label .req { color: #d32f2f; margin-left: 2px; }
.form-ctrl {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}
.form-ctrl:focus { border-color: #1565c0; }
.form-ctrl.err { border-color: #d32f2f; background: #fff5f5; }
.form-err { color: #d32f2f; font-size: 12px; margin-top: 4px; display: none; }
.form-err.show { display: block; }
.form-tip { font-size: 12px; color: #8a9099; margin-top: 4px; }
textarea.form-ctrl { resize: none; min-height: 64px; }

/* 选择网格 */
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px;
  border: 1px solid #dfe3e8;
  border-radius: 16px;
  background: #fff;
  font-size: 13px;
  color: #4e5969;
}
.chip.on { border-color: #1565c0; background: #e8f1fc; color: #1565c0; font-weight: 600; }

/* 州市 / 区县 网格 */
.area-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.area-item {
  padding: 10px 4px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  background: #fff;
  color: #4e5969;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.area-item.on { border-color: #1565c0; background: #e8f1fc; color: #1565c0; font-weight: 600; }

/* 网点列表 */
.net-item {
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  padding: 11px 12px;
  margin-bottom: 8px;
  background: #fff;
}
.net-item.on { border-color: #1565c0; background: #e8f1fc; }
.net-name { font-size: 14px; font-weight: 600; color: #1f2329; }
.net-meta { font-size: 12px; color: #8a9099; margin-top: 3px; }

/* 日期横向滚动 */
.date-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.date-scroll::-webkit-scrollbar { display: none; }
.date-item {
  flex: 0 0 62px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  padding: 8px 0;
  text-align: center;
  background: #fff;
}
.date-item .dw { font-size: 11px; color: #8a9099; }
.date-item .dd { font-size: 16px; font-weight: 600; margin-top: 2px; color: #1f2329; }
.date-item.on { border-color: #1565c0; background: #1565c0; }
.date-item.on .dw, .date-item.on .dd { color: #fff; }

/* 按钮 */
.btn {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}
.btn-primary { background: linear-gradient(135deg, #1e88e5, #0d47a1); color: #fff; }
.btn-primary:active { opacity: 0.85; }
.btn-primary.disabled { background: #b8c4d4; pointer-events: none; }
.btn-plain { background: #fff; color: #1565c0; border: 1px solid #1565c0; }
.btn-danger { background: #fff; color: #d32f2f; border: 1px solid #d32f2f; }
.btn-gray { background: #f0f2f5; color: #646a73; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; }

/* 底部操作条：车辆登记页下一步/上一步固定在这里，不会被 tabbar 或备案号挡住 */
.footer-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #eef0f4;
  display: flex;
  gap: 10px;
  z-index: 70;
  box-sizing: border-box;
}
.footer-bar .btn { margin: 0; }

/* 给固定底部条留出空间，避免滚动到最后的内容被按钮遮住 */
.has-footer { padding-bottom: 84px; }
.bottom-space { height: 84px; }

/* 底部导航 */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid #e4e7ed;
  display: flex;
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1;
  padding: 7px 0 6px;
  text-align: center;
  color: #8a9099;
  font-size: 11px;
}
.tab .ti { font-size: 19px; line-height: 1; }
.tab.on { color: #1565c0; font-weight: 600; }
.has-tabbar { padding-bottom: 58px; }

/* 状态标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.t-pending { background: #fff4e5; color: #ed6c02; }
.t-approved { background: #e8f1fc; color: #1565c0; }
.t-assigned { background: #ede7f6; color: #5e35b1; }
.t-visiting { background: #e0f2f1; color: #00838f; }
.t-completed { background: #e8f5e9; color: #2e7d32; }
.t-rejected { background: #fdecea; color: #d32f2f; }
.t-cancelled { background: #f0f2f5; color: #646a73; }

/* 状态提示条 */
.status-banner { border-radius: 10px; padding: 13px 14px; margin-bottom: 12px; color: #fff; }
.sb-pending { background: linear-gradient(135deg, #ffa726, #ef6c00); }
.sb-approved { background: linear-gradient(135deg, #42a5f5, #1565c0); }
.sb-assigned { background: linear-gradient(135deg, #9575cd, #5e35b1); }
.sb-visiting { background: linear-gradient(135deg, #4dd0e1, #00838f); }
.sb-completed { background: linear-gradient(135deg, #66bb6a, #2e7d32); }
.sb-rejected { background: linear-gradient(135deg, #ef5350, #c62828); }
.sb-cancelled { background: linear-gradient(135deg, #b0bec5, #78909c); }
.status-banner .st { font-size: 17px; font-weight: 700; }
.status-banner .sd { font-size: 12px; opacity: 0.92; margin-top: 3px; }

/* 进度时间线 */
.timeline { padding-left: 4px; }
.tl-item { display: flex; min-height: 52px; }
.tl-left { width: 22px; display: flex; flex-direction: column; align-items: center; margin-right: 10px; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: #dfe3e8; margin-top: 4px; flex-shrink: 0; }
.tl-line { flex: 1; width: 2px; background: #dfe3e8; margin: 3px 0; }
.tl-right { flex: 1; padding-bottom: 12px; }
.tl-label { font-size: 14px; color: #8a9099; }
.tl-time { font-size: 12px; color: #a8adb5; margin-top: 2px; }
.tl-item.done .tl-dot { background: #2e7d32; }
.tl-item.done .tl-line { background: #2e7d32; }
.tl-item.done .tl-label { color: #1f2329; font-weight: 600; }
.tl-item.current .tl-dot { background: #1565c0; box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.18); }
.tl-item.current .tl-label { color: #1565c0; font-weight: 700; }
.tl-item.reject .tl-dot { background: #d32f2f; }
.tl-item.reject .tl-label { color: #d32f2f; font-weight: 700; }
.tl-item:last-child .tl-line { display: none; }

/* 信息明细行 */
.info-row { display: flex; padding: 9px 0; border-bottom: 1px solid #f4f6f9; font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-row .k { width: 92px; color: #8a9099; flex-shrink: 0; }
.info-row .v { flex: 1; color: #1f2329; word-break: break-all; }

/* 预约卡片 */
.bk-card { background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05); }
.bk-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bk-no { font-size: 13px; font-weight: 600; color: #1f2329; }
.bk-line { font-size: 12px; color: #646a73; margin-top: 3px; }
.bk-acts { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f4f6f9; }
.bk-acts button { flex: 1; padding: 7px; border: 1px solid #dfe3e8; border-radius: 6px; font-size: 13px; color: #4e5969; }
.bk-acts button.danger { border-color: #f3c9c5; color: #d32f2f; }

/* 成功页 */
.result { text-align: center; padding: 40px 20px 20px; }
.result-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #2e7d32;
  color: #fff;
  font-size: 32px;
  line-height: 62px;
  margin: 0 auto 14px;
}
.result-icon.fail { background: #d32f2f; }
.result-title { font-size: 18px; font-weight: 700; }
.result-desc { font-size: 13px; color: #646a73; margin-top: 6px; }
.result-no {
  background: #f4f6f9;
  border-radius: 8px;
  padding: 12px;
  margin: 16px 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #0d47a1;
}

/* 空状态 */
.empty { text-align: center; padding: 50px 20px; color: #a8adb5; font-size: 13px; }
.empty .ei { font-size: 40px; margin-bottom: 10px; }

/* 提示条 */
.tips { background: #fff8e1; border-left: 3px solid #ffa726; padding: 10px 12px; border-radius: 6px; font-size: 12px; color: #7a5b1e; margin-bottom: 12px; }

/* Toast */
#toast {
  position: fixed;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 999;
  display: none;
  max-width: 80%;
  text-align: center;
}
#toast.show { display: block; }

/* 加载遮罩 */
#loading {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 998;
  display: none;
  align-items: center;
  justify-content: center;
}
#loading.show { display: flex; }
#loading .box { background: rgba(0, 0, 0, 0.75); color: #fff; padding: 14px 20px; border-radius: 8px; font-size: 13px; }

/* 页面切换 */
.page { display: none; }
.page.on { display: block; }

.text-center { text-align: center; }
.mt10 { margin-top: 10px; }
.mt14 { margin-top: 14px; }
.mb10 { margin-bottom: 10px; }
.hidden { display: none; }

/* ---------- 订单评价（打分星星 + 评价卡片） ---------- */
.stars { display: flex; gap: 8px; margin: 6px 0 12px; }
.stars span { font-size: 28px; line-height: 1; color: #dfe3e8; }
.stars span.on { color: #f5a623; }
.cmt { width: 100%; min-height: 88px; padding: 10px 12px; border: 1px solid #dfe3e8; border-radius: 8px;
       font-size: 15px; font-family: inherit; color: #1f2329; background: #fff; resize: vertical; }
.cmt:focus { border-color: #1565c0; }
.rev-item { background: #fafbfc; border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: 13px; color: #4e5969; line-height: 1.7; }
.rev-item .rv-hd { display: flex; justify-content: space-between; font-size: 12px; color: #8a9099; margin-bottom: 4px; }
.rev-item .rv-rp { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e3e8ef; color: #1565c0; }

/* ---------- 上门定位（市民端「预约上门办」用） ---------- */
/* 一行放定位按钮和状态文字，手机窄屏会自动换行 */
.loc-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.loc-btn {
  flex: 0 0 auto;
  padding: 9px 14px;
  font-size: 13px;
  color: #fff;
  background: #1565c0;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
}
.loc-btn:disabled { opacity: .6; }
.loc-state { font-size: 12px; color: #8a9099; flex: 1 1 130px; line-height: 1.4; }
.loc-state.ok { color: #1b8a4b; font-weight: 500; }
.loc-map { margin-bottom: 10px; font-size: 13px; }
.loc-map a { color: #1565c0; text-decoration: none; }
.loc-tip { font-size: 11px; color: #a0a5ac; margin-top: 6px; line-height: 1.5; }

/* 费用与支付卡片：应付金额、支付状态、上报已付的表单 */
.pay-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 13px; color: #6b7280; border-bottom: 1px dashed #eef1f5; }
.pay-row:last-of-type { border-bottom: none; }
.pay-money { font-size: 18px; color: #d32f2f; font-weight: 700; }
.pay-tip { font-size: 11.5px; color: #8a9099; line-height: 1.6; margin-top: 8px; }
.pay-field { margin-top: 10px; }
.pay-field label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 5px; }
.pay-field .req { color: #d32f2f; margin-left: 2px; }
