/* ============================================================
   路边停车助手 · 视觉规范
   主色 #165DFF ｜ 风险四色 ｜ 深蓝工具风 ｜ 阿里巴巴普惠体
   ============================================================ */

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: local("Alibaba PuHuiTi 3.0"), local("AlibabaPuHuiTi-3-55-Regular"),
       url("/fonts/AlibabaPuHuiTi-3-55-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Alibaba PuHuiTi";
  src: local("Alibaba PuHuiTi 3.0 Bold"), local("AlibabaPuHuiTi-3-85-Bold"),
       url("/fonts/AlibabaPuHuiTi-3-85-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --blue: #165DFF;
  --blue-soft: #3C7EFF;
  --navy: #0B1626;
  --navy-2: #101E32;
  --navy-3: #16283F;
  --line: #22364F;
  --green: #00B42A;
  --yellow: #FF7D00;
  --red: #F53F3F;
  --deepred: #A8071A;
  --t1: #EAF1FA;
  --t2: #94A9C2;
  --t3: #63799A;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
  --font: "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 700px at 50% -10%, #17304f 0%, #060c15 55%, #030709 100%);
  color: var(--t1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ---------------- 手机壳 ---------------- */
.phone {
  width: 390px;
  height: 844px;
  max-height: 100vh;
  border-radius: 42px;
  padding: 10px;
  background: linear-gradient(145deg, #1a2c42, #0a1420);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .75), inset 0 0 0 1px rgba(120, 165, 220, .18);
  position: relative;
}
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--navy);
  display: flex;
  flex-direction: column;
}
@media (max-width: 480px) {
  body { display: block; background: var(--navy); }
  .phone { width: 100%; height: 100dvh; max-height: none; border-radius: 0; padding: 0; box-shadow: none; background: var(--navy); }
  .screen { border-radius: 0; }
}

/* ---------------- 状态栏 ---------------- */
.statusbar {
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--t1);
  position: relative;
  z-index: 40;
}
.sb-right { display: flex; align-items: center; gap: 5px; }
.sb-signal, .sb-wifi, .sb-bat { display: inline-block; background: var(--t1); border-radius: 2px; }
.sb-signal { width: 3px; height: 5px; box-shadow: 5px 0 0 var(--t1), 10px 0 0 var(--t1), 15px 0 0 var(--t1); margin-right: 12px; }
.sb-wifi { width: 14px; height: 10px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; opacity: .9; }
.sb-bat { width: 22px; height: 11px; border-radius: 3px; background: transparent; border: 1px solid rgba(234, 241, 250, .5); position: relative; }
.sb-bat::before { content: ""; position: absolute; left: 1.5px; top: 1.5px; bottom: 1.5px; width: 12px; background: var(--green); border-radius: 1.5px; }

/* ---------------- 通用 ---------------- */
.app { position: relative; flex: 1; min-height: 0; }
.page { position: absolute; inset: 0; display: flex; flex-direction: column; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.scroll::-webkit-scrollbar { width: 0; }

.hidden { display: none !important; }

.tabbar {
  flex: 0 0 auto;
  height: 62px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  background: rgba(11, 22, 38, .96);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: 4px;
  position: relative;
  z-index: 30;
}
.tabbar button {
  background: none; border: 0; color: var(--t3);
  font-family: var(--font); font-size: 11px; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; transition: color .18s;
}
.tabbar button.on { color: var(--blue-soft); }
.tabbar .ic { font-size: 18px; line-height: 1; }

/* 悬浮上报按钮 */
.fab {
  position: absolute; right: 16px; bottom: 206px; z-index: 35;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(140deg, var(--blue-soft), var(--blue));
  border: 0; color: #fff; font-size: 22px;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 22px rgba(22, 93, 255, .45);
}
.fab::after { content: "上报"; position: absolute; top: -20px; font-size: 10px; color: var(--t2); }

@keyframes pulse {
  0%, 100% { stroke-opacity: .55; }
  50% { stroke-opacity: .12; }
}
.pulse { animation: pulse 2.2s ease-in-out infinite; }

/* ---------------- 首页 ---------------- */
.mapwrap { position: absolute; inset: 0; overflow: hidden; }
.mapsvg { position: absolute; inset: 0; width: 100%; height: 100%; }

.topbar {
  position: absolute; top: 6px; left: 0; right: 0; z-index: 20;
  padding: 6px 16px 0;
  background: linear-gradient(180deg, rgba(11, 22, 38, .96) 30%, rgba(11, 22, 38, 0) 100%);
}
.searchrow { display: flex; gap: 10px; align-items: center; }
.search {
  flex: 1; height: 42px; border-radius: 21px;
  background: rgba(22, 40, 63, .92);
  border: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px; color: var(--t2); font-size: 13px;
  cursor: text;
}
.search input {
  flex: 1; background: none; border: 0; outline: none;
  color: var(--t1); font-size: 13px; font-family: var(--font);
}
.search input::placeholder { color: var(--t3); }
.locbtn {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 42px;
  background: rgba(22, 40, 63, .92); border: 1px solid var(--line);
  color: var(--blue-soft); font-size: 17px; cursor: pointer;
  display: grid; place-items: center;
}
.locbtn.spin { animation: spin .8s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

.searchdrop {
  margin-top: 8px; border-radius: 14px; overflow: hidden;
  background: rgba(16, 30, 50, .98); border: 1px solid var(--line);
}
.searchdrop div {
  padding: 12px 14px; font-size: 13px; color: var(--t1);
  border-bottom: 1px solid rgba(34, 54, 79, .6); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.searchdrop div:last-child { border-bottom: 0; }
.searchdrop span.tag { font-size: 11px; padding: 2px 8px; border-radius: 8px; }

/* 图例 */
.legend {
  position: absolute; top: 74px; right: 16px; z-index: 15;
  background: rgba(16, 30, 50, .9); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 11px; font-size: 11px; color: var(--t2);
  display: flex; flex-direction: column; gap: 6px;
  backdrop-filter: blur(8px);
}
.legend b { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* 当前路段卡片 */
.curcard {
  position: absolute; left: 16px; right: 16px; bottom: 84px; z-index: 18;
  background: rgba(16, 30, 50, .96);
  border: 1px solid var(--line);
  border-radius: 18px; padding: 14px 16px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
  cursor: pointer;
}
.curcard .row1 { display: flex; align-items: center; justify-content: space-between; }
.curcard .road { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.curcard .badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 9px; color: #fff; }
.curcard .verdict { margin-top: 8px; font-size: 13px; color: var(--t2); line-height: 1.5; display: flex; gap: 8px; align-items: flex-start; }
.curcard .verdict em { font-style: normal; color: var(--t1); font-weight: 700; }
.curcard .meta { margin-top: 10px; display: flex; gap: 16px; font-size: 11px; color: var(--t3); }
.curcard .go { position: absolute; right: 16px; bottom: 14px; font-size: 12px; color: var(--blue-soft); font-weight: 600; }

.miniactions {
  position: absolute; left: 16px; right: 16px; bottom: 20px; z-index: 17;
  display: flex; gap: 10px;
}
.btn-ghost, .btn-main {
  flex: 1; height: 46px; border-radius: 13px; border: 0; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-ghost { background: rgba(22, 40, 63, .95); color: var(--t1); border: 1px solid var(--line); }
.btn-main { background: linear-gradient(135deg, var(--blue-soft), var(--blue)); color: #fff; box-shadow: 0 8px 20px rgba(22, 93, 255, .35); }
.btn-main.green { background: linear-gradient(135deg, #16C24A, var(--green)); box-shadow: 0 8px 20px rgba(0, 180, 42, .32); }
.btn-main.ghostred { background: rgba(245, 63, 63, .14); color: #FF7C7C; border: 1px solid rgba(245, 63, 63, .4); }

/* 停车中横幅 */
.parkingbar {
  position: absolute; left: 16px; right: 16px; bottom: 84px; z-index: 19;
  background: linear-gradient(120deg, rgba(0, 180, 42, .95), rgba(0, 140, 60, .95));
  border-radius: 16px; padding: 12px 16px; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 10px 26px rgba(0, 180, 42, .3);
}
.parkingbar .t { font-size: 13px; opacity: .85; }
.parkingbar .n { font-size: 22px; font-weight: 700; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.parkingbar button { background: rgba(255, 255, 255, .2); border: 0; color: #fff; font-family: var(--font); font-size: 13px; font-weight: 700; padding: 9px 14px; border-radius: 10px; cursor: pointer; }

/* ---------------- 详情页 ---------------- */
.navbar {
  flex: 0 0 auto; height: 50px; display: flex; align-items: center;
  padding: 0 12px; gap: 8px; border-bottom: 1px solid rgba(34, 54, 79, .55);
  background: var(--navy-2);
}
.navbar .back { width: 36px; height: 36px; border-radius: 10px; background: rgba(34, 54, 79, .5); border: 0; color: var(--t1); font-size: 16px; cursor: pointer; }
.navbar .title { font-size: 15px; font-weight: 700; flex: 1; text-align: center; padding-right: 36px; }

.hero {
  padding: 18px 18px 20px;
  border-radius: 0 0 22px 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  border-radius: 50%; background: rgba(255, 255, 255, .12); filter: blur(4px);
}
.hero .kicker { font-size: 12px; opacity: .8; letter-spacing: 1px; }
.hero h1 { margin: 6px 0 0; font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.hero .conclusion { margin-top: 10px; font-size: 14px; font-weight: 700; line-height: 1.5; position: relative; z-index: 2; }
.hero .prob { margin-top: 14px; display: flex; align-items: flex-end; gap: 10px; position: relative; z-index: 2; }
.hero .prob b { font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -1px; }
.hero .prob span { font-size: 13px; opacity: .85; padding-bottom: 4px; }
.hero .prob .lv { margin-left: auto; font-size: 12px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); padding: 5px 10px; border-radius: 9px; }

.card {
  background: var(--navy-2); border: 1px solid var(--line);
  border-radius: var(--radius); margin: 12px 16px; padding: 16px;
}
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card h3::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--blue); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13px; border-bottom: 1px dashed rgba(34, 54, 79, .8); }
.kv:last-child { border-bottom: 0; padding-bottom: 0; }
.kv .k { color: var(--t2); flex: 0 0 auto; }
.kv .v { color: var(--t1); text-align: right; font-weight: 500; }

.warn { display: flex; gap: 10px; padding: 11px 12px; border-radius: 11px; font-size: 13px; line-height: 1.5; margin-bottom: 8px; }
.warn.high { background: rgba(245, 63, 63, .12); border: 1px solid rgba(245, 63, 63, .28); color: #FFC9C9; }
.warn.mid { background: rgba(255, 125, 0, .12); border: 1px solid rgba(255, 125, 0, .28); color: #FFD8B0; }
.warn.low { background: rgba(0, 180, 42, .12); border: 1px solid rgba(0, 180, 42, .28); color: #B7F0C4; }

.feedback { display: flex; gap: 10px; font-size: 12px; color: var(--t2); padding: 9px 0; border-bottom: 1px solid rgba(34, 54, 79, .5); line-height: 1.6; }
.feedback:last-child { border-bottom: 0; }
.feedback .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-top: 8px; flex: 0 0 6px; }
.feedback time { color: var(--t3); }

.bottom-fixed {
  flex: 0 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(11, 22, 38, .96); border-top: 1px solid var(--line);
  display: flex; gap: 10px; align-items: center;
}
.bottom-fixed .btn-ghost { flex: 0 0 96px; }

.disclaimer { font-size: 11px; color: var(--t3); text-align: center; padding: 4px 24px 22px; line-height: 1.7; }

/* ---------------- 记录页 ---------------- */
.pagehead { padding: 18px 18px 6px; }
.pagehead h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.pagehead p { margin: 6px 0 0; font-size: 12px; color: var(--t3); }

.bigtime {
  margin: 12px 16px; padding: 20px 18px; border-radius: 18px;
  background: linear-gradient(140deg, rgba(22, 93, 255, .18), rgba(22, 40, 63, .9));
  border: 1px solid rgba(60, 126, 255, .35);
}
.bigtime .lab { font-size: 12px; color: var(--t2); letter-spacing: .5px; }
.bigtime .val { font-size: 42px; font-weight: 700; letter-spacing: 1px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.bigtime .sub { font-size: 12px; color: var(--t3); }
.bigtime .acts { margin-top: 16px; display: flex; gap: 10px; }

.rec-item {
  background: var(--navy-2); border: 1px solid var(--line); border-radius: 13px;
  margin: 0 16px 10px; padding: 14px 15px; display: flex; align-items: center; gap: 12px;
}
.rec-item .bar { width: 4px; align-self: stretch; border-radius: 2px; }
.rec-item .body { flex: 1; min-width: 0; }
.rec-item .n { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.rec-item .n span { font-size: 11px; font-weight: 500; padding: 2px 7px; border-radius: 7px; }
.rec-item .d { font-size: 11px; color: var(--t3); margin-top: 6px; }
.rec-item .del { background: none; border: 0; color: var(--t3); font-size: 15px; cursor: pointer; padding: 6px; }

.empty { text-align: center; padding: 48px 20px; color: var(--t3); font-size: 13px; }
.empty .ic { font-size: 40px; opacity: .45; display: block; margin-bottom: 12px; }

/* ---------------- 上报页 ---------------- */
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 16px 0; }
.type {
  background: var(--navy-2); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 14px; cursor: pointer; transition: .18s;
}
.type.on { border-color: var(--blue); background: rgba(22, 93, 255, .12); }
.type .ic { font-size: 22px; }
.type .n { margin-top: 8px; font-size: 14px; font-weight: 700; }
.type .d { margin-top: 3px; font-size: 11px; color: var(--t3); line-height: 1.4; }

.field { margin: 14px 16px 0; }
.field label { font-size: 12px; color: var(--t2); display: block; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; background: var(--navy-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 13px; color: var(--t1); font-size: 13px; font-family: var(--font);
  outline: none; resize: none;
}
.field textarea { min-height: 92px; line-height: 1.6; }
.field textarea:focus, .field input:focus { border-color: rgba(60, 126, 255, .6); }
.counter { text-align: right; font-size: 11px; color: var(--t3); margin-top: 6px; }
.upload { display: flex; gap: 10px; }
.upload .slot {
  width: 78px; height: 78px; border-radius: 11px; border: 1px dashed var(--line);
  background: var(--navy-2); color: var(--t3); display: grid; place-items: center;
  font-size: 22px; cursor: pointer;
}

/* ---------------- 我的 ---------------- */
.profile { display: flex; align-items: center; gap: 14px; padding: 20px 18px; }
.avatar {
  width: 58px; height: 58px; border-radius: 50%; flex: 0 0 58px;
  background: linear-gradient(140deg, var(--blue-soft), var(--blue));
  display: grid; place-items: center; font-size: 24px; font-weight: 700;
}
.profile .nm { font-size: 17px; font-weight: 700; }
.profile .sub { font-size: 12px; color: var(--t3); margin-top: 5px; }
.statrow { display: flex; gap: 10px; margin: 0 16px; }
.stat { flex: 1; background: var(--navy-2); border: 1px solid var(--line); border-radius: 13px; padding: 14px 12px; text-align: center; }
.stat b { display: block; font-size: 20px; font-weight: 700; }
.stat span { font-size: 11px; color: var(--t3); margin-top: 4px; display: block; }

.list { margin: 14px 16px; background: var(--navy-2); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.listrow {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px;
  border-bottom: 1px solid rgba(34, 54, 79, .6); font-size: 14px; cursor: pointer;
}
.listrow:last-child { border-bottom: 0; }
.listrow .ic { font-size: 17px; width: 20px; text-align: center; }
.listrow .t { flex: 1; }
.listrow .arr { color: var(--t3); font-size: 14px; }

/* ---------------- Toast / 弹层 ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 120px; transform: translate(-50%, 12px);
  background: rgba(16, 30, 50, .97); border: 1px solid var(--line);
  color: var(--t1); font-size: 13px; padding: 12px 18px; border-radius: 12px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 99;
  max-width: 80%; text-align: center; line-height: 1.5; box-shadow: var(--shadow);
  font-family: var(--font);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.sheet-mask {
  position: fixed; inset: 0; background: rgba(3, 8, 14, .6);
  display: none; align-items: flex-end; justify-content: center; z-index: 98;
  backdrop-filter: blur(3px);
}
.sheet-mask.on { display: flex; }
.sheet {
  width: 390px; max-width: 100%; background: var(--navy-2);
  border-radius: 20px 20px 0 0; padding: 10px 0 18px;
  border-top: 1px solid var(--line);
  animation: up .25s ease;
}
@media (max-width: 480px) { .sheet { width: 100%; } }
@keyframes up { from { transform: translateY(30px); opacity: .6; } }
.sheet-bar { width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 3px auto 12px; }
.sheet-body { padding: 0 18px; }
.sheet-body h4 { margin: 0 0 12px; font-size: 16px; }
.sheet-body .opt {
  padding: 14px; border-radius: 12px; background: var(--navy-3); margin-bottom: 9px;
  font-size: 13px; display: flex; justify-content: space-between; align-items: center; cursor: pointer;
}
.sheet-body .opt small { color: var(--t3); }

.tag-1 { background: rgba(0, 180, 42, .18); color: #4BE07A; }
.tag-2 { background: rgba(255, 125, 0, .18); color: #FFB65C; }
.tag-3 { background: rgba(245, 63, 63, .18); color: #FF8A8A; }
.tag-4 { background: rgba(168, 7, 26, .3); color: #FF7C7C; }
