:root {
  --blue: #2b7bf3;
  --blue-dark: #1f6ae0;
  --blue-deep: #2360d8;
  --blue-light: #eaf1ff;
  --red: #e5342b;
  --green: #2ba24b;
  --ink: #222;
  --gray: #888;
  --line: #eee;
  --bg: #f2f4f8;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #dfe3ea;
  -webkit-font-smoothing: antialiased;
}

/* Phone-style centered container */
.app {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 24px rgba(0,0,0,.08);
  overflow: hidden;
}

/* Top nav bar (mimics WeChat webview header) */
.nav {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
  flex: 0 0 auto;
}
.nav .back {
  position: absolute;
  left: 12px;
  top: 0;
  height: 46px;
  display: flex;
  align-items: center;
  font-size: 22px;
  color: #333;
  text-decoration: none;
  width: 40px;
}
.nav .dots {
  position: absolute;
  right: 14px;
  color: #333;
  font-size: 20px;
  letter-spacing: 1px;
}

.content {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

/* ===== Home ===== */
.hero {
  background: linear-gradient(180deg, #2f83f6 0%, #2b7bf3 60%, #3a86f7 100%);
  color: #fff;
  padding: 16px 18px 0;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  opacity: .95;
}
.hero-center {
  text-align: center;
  padding: 14px 0 18px;
}
.hero-center .line1 { font-size: 16px; opacity: .95; }
.hero-center .badge {
  display: inline-block;
  background: #cfe0ff;
  color: #1f5fd8;
  border-radius: 5px;
  padding: 0 7px;
  margin: 0 3px;
  font-weight: 700;
}
.hero-center .big {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: .5px;
  margin-top: 6px;
}
.hero-center .big small { font-size: 20px; font-weight: 700; margin-left: 2px; }
.hero-link {
  border-top: 1px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  padding: 13px 2px;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
}
.hero-link .ico { margin-right: 7px; }
.hero-link .arrow { margin-left: auto; opacity: .85; }

.grid {
  background: #fff;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 22px 8px 26px;
  gap: 26px 0;
}
.grid a {
  text-decoration: none;
  color: #333;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.grid .emoji {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.06));
}
.grid .label { font-size: 14px; color: #333; }

/* ===== Generic blue sub-header (for inner pages) ===== */
.sub-hero {
  background: var(--blue);
  color: #fff;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 17px;
  font-weight: 600;
}
.sub-hero .l, .sub-hero .r {
  position: absolute;
  top: 0; height: 44px;
  display: flex; align-items: center;
  color: #fff; font-size: 20px; text-decoration: none;
}
.sub-hero .l { left: 14px; }
.sub-hero .r { right: 14px; }

/* ===== List page ===== */
.list-title {
  color: var(--blue);
  font-size: 15px;
  padding: 14px 18px 4px;
}
.list-item {
  background: #fff;
  padding: 16px 18px;
  font-size: 16px;
  border-bottom: 1px solid #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #333;
  text-decoration: none;
}
.list-item .val { color: #333; }
.list-item .chev { color: #bbb; margin-left: 8px; }
.list-item .num { color: #333; font-size: 15px; }

/* ===== Prices page top card ===== */
.price-card {
  background: linear-gradient(180deg, #2f83f6, #2b7bf3);
  margin: 0;
  padding: 16px;
}
.price-card .inner {
  background: #fff;
  border-radius: 10px;
  text-align: center;
  padding: 16px 10px;
}
.price-card .cap { color: #888; font-size: 14px; }
.price-card .amt { font-size: 34px; font-weight: 800; margin: 8px 0; color: #111; }
.price-card .set { color: var(--blue); font-size: 15px; }

/* ===== Fleet account ===== */
.avail-title { text-align: center; font-size: 20px; font-weight: 700; padding: 18px 0 12px; }
.avail-row {
  display: flex;
  background: #fff;
  margin: 0 14px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.avail-row .cell {
  flex: 1;
  text-align: center;
  padding: 14px 0;
}
.avail-row .cell + .cell { border-left: 1px solid #eee; }
.avail-row .cell .n { font-size: 24px; font-weight: 800; }
.avail-row .cell .n.red { color: var(--red); }
.avail-row .cell .n.green { color: var(--green); }
.avail-row .cell .t { font-size: 13px; color: #888; margin-top: 4px; }

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px 14px 22px;
}
.qcard {
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  background: #fbfdff;
  text-align: center;
  padding: 16px 6px;
}
.qcard .name { font-size: 17px; color: #333; }
.qcard .q { font-size: 20px; font-weight: 800; color: var(--red); margin-top: 8px; }

/* right-side alphabet index */
.az {
  position: absolute;
  right: 2px;
  top: 90px;
  display: flex;
  flex-direction: column;
  font-size: 10px;
  color: #666;
  line-height: 1.15;
  z-index: 5;
}
.az span:first-child { background:#333; color:#fff; padding:0 2px; border-radius:2px; }

/* ===== Accounting ===== */
.acc-hero { background: linear-gradient(180deg,#2f83f6,#2b7bf3); color:#fff; padding: 16px; }
.acc-month { text-align:center; font-size: 26px; font-weight: 800; color:#222; padding: 18px 0 14px; background:#fff;}
.acc-nums { display:flex; align-items:center; justify-content:center; gap: 0; background:#fff; padding-bottom: 18px;}
.acc-nums .arrow { color:#333; font-size: 22px; padding: 0 14px; }
.acc-nums .col { text-align:center; min-width: 120px; }
.acc-nums .col .lab { color:#888; font-size: 15px; }
.acc-nums .col .v { font-size: 30px; font-weight: 800; margin-top: 6px; }
.acc-nums .divider { width:1px; height:44px; background:#e5e5e5; }
.btn-blue {
  display:block; text-align:center; background: var(--blue); color:#fff;
  margin: 4px 16px 0; padding: 14px; border-radius: 8px; font-size: 17px;
  text-decoration:none; background:#fff;
}
.acc-wrap { background:#fff; padding-bottom: 18px; }
.acc-btn { display:block; text-align:center; background: var(--blue); color:#fff; margin: 0 16px; padding: 13px; border-radius:8px; font-size:16px; text-decoration:none; }
.tabs { display:flex; gap: 26px; padding: 18px 20px 0; font-size: 17px; color:#555; background:#fff; }
.tabs .tab.active { color:#111; font-weight:700; position:relative; }
.tabs .tab.active::after { content:""; position:absolute; left:0; right:0; bottom:-10px; height:3px; background:var(--blue); border-radius:2px; }
.acc-year { position:absolute; right:12px; top:8px; background:#fff; color:#333; border-radius:6px; padding:4px 10px; font-size:14px; }

/* ===== Chart page ===== */
.legend { display:flex; align-items:center; justify-content:center; gap:20px; padding:16px 0 4px; font-size:14px; color:#333; background:#fff;}
.legend .box { width:22px; height:13px; background:#1f2d4d; display:inline-block; vertical-align:middle; margin-right:6px;}
.legend .circle { width:13px;height:13px;border:2px solid #333;border-radius:50%; display:inline-block; vertical-align:middle; margin-right:6px;}
.chart-wrap { background:#fff; padding: 10px 10px 0; }
.chart {
  height: 260px;
  display:flex; align-items:flex-end; justify-content:center; gap: 40px;
  border-left: 1px solid #ccc; border-bottom: 1px solid #ccc;
  margin: 10px 30px;
  position: relative;
}
.bar { width: 74px; }
.bar.red { height: 82%; background:#8e2833; }
.bar.navy { height: 80%; background:#1f2d4d; }
.chart-label { text-align:center; color:#333; padding: 8px 0 14px; background:#fff;}

/* ===== Income ===== */
.income-blue { background: var(--blue); flex:1; }
.income-tabs { display:flex; align-items:center; gap: 22px; padding: 14px 18px; color:#dbe8ff; font-size:16px; border-bottom:1px solid rgba(255,255,255,.3);}
.income-tabs .active { color:#fff; font-weight:700; }
.income-date { margin-left:auto; font-size:15px; color:#fff; }

/* ===== Bottom tab bar ===== */
.tabbar {
  flex: 0 0 auto;
  display: flex;
  background: #fff;
  border-top: 1px solid #ececec;
  padding: 6px 0 8px;
}
.tabbar a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: #999;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.tabbar a.active { color: var(--blue); }
.tabbar svg { width: 24px; height: 24px; display:block; }

.empty { text-align:center; color:#999; padding: 24px 0; font-size:14px; }
