/* ============================================================
   Pages · 首页 / 记录 / 统计 / 我的 专属版式
   ============================================================ */

/* ---------- 页面标题区 ---------- */
.page-head { margin: 6px 2px 16px; }
.page-head__sub { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.page-tools { display: grid; gap: 10px; margin: 12px 0 14px; }
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-nav__title { font-size: 17px; font-weight: 650; }
.filter-summary { font-size: 12px; color: var(--text-secondary); }

/* ---------- 首页：车辆数字仪表盘 ---------- */
.hero { position: relative; overflow: hidden; border-radius: 26px; background: var(--hero-tint); border: 0.5px solid var(--hairline-highlight); box-shadow: var(--shadow-hero); color: var(--hero-ink); }
.hero__media { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--card-muted); overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__art { width: 78%; max-width: 340px; height: auto; }
.hero__plate { position: absolute; top: 14px; left: 14px; min-height: 30px; display: flex; align-items: center; padding: 0 11px; border-radius: 9px; font-size: 13px; font-weight: 650; letter-spacing: 0.02em; background: rgba(255, 255, 255, 0.85); color: #1C1C1E; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero__switch { position: absolute; top: 12px; right: 12px; min-height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, 0.85); color: #1C1C1E; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform var(--dur-fast) var(--ease); }
.hero__switch:active { transform: scale(0.95); }
:root[data-theme="dark"] .hero__plate, :root[data-theme="dark"] .hero__switch { background: rgba(38, 38, 42, 0.82); color: #F5F5F7; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__plate, :root:not([data-theme="light"]) .hero__switch { background: rgba(38, 38, 42, 0.82); color: #F5F5F7; }
}
.hero__body { padding: 16px 18px 18px; }
.hero__brand { font-size: 13px; font-weight: 550; color: var(--text-secondary); }
.hero__name { font-size: clamp(22px, 6vw, 26px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; margin-top: 2px; }
.hero__meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.hero__metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.hero__metric { min-width: 0; padding: 12px 5px; border-radius: 15px; background: var(--card); text-align: center; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.035); }
.hero__metric__v { font-size: clamp(15px, 4.4vw, 19px); font-weight: 700; line-height: 1.2; }
.hero__metric__u { font-size: 11px; font-weight: 500; color: var(--text-secondary); }
.hero__metric__l { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }
.hero__metric__v--accent { color: var(--accent); }
.hero__metric__v--warn { color: var(--warning); }
.hero__metric__v--danger { color: var(--danger); }

/* 快捷操作 */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 84px; padding: 12px 4px; border-radius: var(--radius-md); background: var(--card); box-shadow: var(--shadow-card); border: 0.5px solid var(--hairline-highlight); transition: transform var(--dur-fast) var(--ease); }
.quick:active { transform: scale(0.94); }
.quick__icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.quick__icon--charge { background: var(--success-soft); color: var(--success); }
.quick__icon--service { background: var(--warning-soft); color: var(--warning); }
.quick__icon--repair { background: var(--danger-soft); color: var(--danger); }
.quick__label { font-size: 12px; font-weight: 550; }

/* 倒计时 */
.countdown { display: flex; align-items: center; gap: 14px; }
.countdown__num { font-size: 34px; font-weight: 700; line-height: 1; }
.countdown__unit { font-size: 13px; color: var(--text-secondary); }

/* ---------- 记录行 / 时间线 ---------- */
.record { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 16px; text-align: left; }
.record__icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.record__icon--fuel { background: var(--warning-soft); color: var(--warning); }
.record__icon--charge { background: var(--success-soft); color: var(--success); }
.record__icon--expense { background: var(--fill-soft); color: var(--text-secondary); }
.record__body { flex: 1; min-width: 0; }
.record__title { font-size: 15px; font-weight: 560; }
.record__sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.record__amount { font-size: 16px; font-weight: 650; flex: none; }
.record__amount--muted { color: var(--text-secondary); font-weight: 500; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 1px; background: var(--separator); }
.timeline__item { position: relative; padding: 8px 0 14px; }
.timeline__item::before { content: ""; position: absolute; left: -23px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- 统计 ---------- */
.stat-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-tile { min-width: 0; padding: 16px; border-radius: var(--radius-card); background: var(--card); box-shadow: var(--shadow-card); border: 0.5px solid var(--hairline-highlight); }
.stat-tile__label { font-size: 12px; color: var(--text-secondary); }
.stat-tile__value { font-size: clamp(21px, 6.2vw, 28px); font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; }
.stat-tile__sub { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }
.chart-card { padding: 18px; }
.chart-wrap { width: 100%; overflow: hidden; }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.donut-center { font-size: 21px; font-weight: 700; fill: var(--text); }
.donut-sub { font-size: 11px; fill: var(--text-secondary); }
.bar { transform-box: fill-box; transform-origin: center bottom; animation: barGrow var(--dur-slow) var(--ease) both; }
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.donut__segments > * { animation: donutIn var(--dur-slow) var(--ease) both; }
@keyframes donutIn { from { opacity: 0; } to { opacity: 1; } }
.chart-axis-label { font-size: 10px; fill: var(--text-tertiary); }
.legend { display: grid; gap: 9px; }
.legend__item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend__dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend__bar { flex: 1; height: 5px; border-radius: 3px; background: var(--fill-softer); overflow: hidden; }
.legend__bar > i { display: block; height: 100%; border-radius: 3px; transition: width var(--dur-slow) var(--ease); }
.breakdown-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px; }
.breakdown-row + .breakdown-row { border-top: 0.5px solid var(--separator); }
.big-money { font-size: clamp(30px, 9vw, 40px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.unit-yuan { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-left: 3px; }

/* ---------- 车库 / 照片 ---------- */
.garage-card { display: flex; gap: 14px; align-items: center; width: 100%; padding: 14px; border-radius: var(--radius-card); background: var(--card); box-shadow: var(--shadow-card); border: 0.5px solid var(--hairline-highlight); text-align: left; transition: transform var(--dur-fast) var(--ease); }
.garage-card:active { transform: scale(0.985); }
.garage-card.is-active { outline: 2px solid var(--accent); outline-offset: -2px; }
.garage-card__thumb { width: 72px; height: 56px; border-radius: 12px; background: var(--card-muted); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--text-tertiary); }
.garage-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.garage-card__name { font-size: 16px; font-weight: 620; }
.garage-card__sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.garage-card__body { flex: 1; min-width: 0; }
.photo-drop { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: var(--card-muted); display: grid; place-items: center; border: 1px dashed var(--separator-strong); }
.photo-drop img { width: 100%; height: 100%; object-fit: cover; }
.photo-drop__hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: var(--radius-pill); background: var(--nav-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 12px; font-weight: 550; white-space: nowrap; }
.photo-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-thumbs__item { position: relative; }
.photo-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.photo-thumbs__del { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--danger); color: #fff; display: grid; place-items: center; }

/* ---------- 提醒 ---------- */
.reminder { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.reminder + .reminder { border-top: 0.5px solid var(--separator); }
.reminder__days { min-width: 52px; text-align: center; padding: 6px 4px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.reminder__days b { display: block; font-size: 18px; line-height: 1.05; }
.reminder__days span { font-size: 10px; }
.reminder__days--warn { background: var(--warning-soft); color: var(--warning); }
.reminder__days--danger { background: var(--danger-soft); color: var(--danger); }
.backup-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
