* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --brand: #2e8fff;
  --brand-dark: #1f6fe0;
  --bg: #f2f3f5;
  --card: #ffffff;
  --text: #1a1a1a;
  --sub: #8a8f99;
  --warn: #ff8f1f;
  --danger: #fa5151;
  --ok: #07c160;
  --line: #ebedf0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: 60px;
}
.app-header {
  position: sticky; top: 0; z-index: 20;
  height: 48px; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.app-main { max-width: 480px; margin: 0 auto; padding: 12px; }
.page { animation: fade .2s; }
.hidden { display: none !important; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* 概览 */
.hero { background: linear-gradient(135deg,var(--brand),var(--brand-dark)); color:#fff; border-radius: 12px; padding: 18px; }
.hero-company { font-size: 20px; font-weight: 700; }
.hero-date { font-size: 13px; opacity: .9; margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 12px; }
.stat-card { background: var(--card); border-radius: 12px; padding: 14px; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.stat-card.warn .stat-num { color: var(--warn); }
.stat-num { font-size: 26px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--sub); margin-top: 2px; }
.block-title { font-size: 14px; font-weight: 600; margin: 18px 4px 10px; display:flex; justify-content:space-between; align-items:center;}
.link { color: var(--brand); font-weight: 400; font-size: 13px; text-decoration: none; }
.cost-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.cost-item { background: var(--card); border-radius: 12px; padding: 14px 6px; text-align: center; }
.cost-num { font-size: 17px; font-weight: 700; color: var(--brand); }
.cost-label { font-size: 12px; color: var(--sub); margin-top: 2px; }

/* 提醒列表 */
.rem-list { display: flex; flex-direction: column; gap: 10px; }
.rem-item { background: var(--card); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); border-left: 4px solid var(--warn); }
.rem-item.overdue { border-left-color: var(--danger); }
.rem-item.soon { border-left-color: var(--brand); }
.rem-badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #fff3e0; color: var(--warn); white-space: nowrap; }
.rem-badge.overdue { background: #ffeaea; color: var(--danger); }
.rem-badge.soon { background: #e7f1ff; color: var(--brand); }
.rem-main { flex: 1; min-width: 0; }
.rem-plate { font-weight: 600; }
.rem-sub { font-size: 12px; color: var(--sub); }
.rem-push { font-size: 12px; padding: 6px 10px; border-radius: 8px; background: var(--brand); color:#fff; border:none; white-space:nowrap; }
.rem-push:disabled { background: #c8c9cc; }

/* 车辆列表 */
.search-bar { margin-bottom: 10px; }
.search-bar input { width: 100%; height: 38px; border: none; border-radius: 10px; padding: 0 14px; background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.04); font-size: 14px; }
.veh-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 70px; }
.veh-item { background: var(--card); border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.veh-top { display: flex; justify-content: space-between; align-items: center; }
.veh-plate { font-size: 16px; font-weight: 700; }
.veh-model { font-size: 13px; color: var(--sub); }
.veh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 8px; background: #f2f3f5; color: var(--sub); }
.tag.danger { background: #ffeaea; color: var(--danger); }
.tag.warn { background: #fff3e0; color: var(--warn); }
.veh-actions { margin-top: 10px; display: flex; gap: 8px; }
.veh-actions button { flex: 1; font-size: 13px; padding: 7px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--brand); }
.fab { position: fixed; right: max(16px, calc(50% - 240px + 16px)); bottom: 76px; width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 28px; border: none; box-shadow: 0 4px 12px rgba(46,143,255,.4); z-index: 15; }

/* 筛选 */
.filter-row { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.filter-row select { flex: 1; height: 36px; border: none; border-radius: 10px; padding: 0 10px; background: var(--card); }
.btn-mini { height: 36px; padding: 0 14px; border: none; border-radius: 10px; background: var(--brand); color: #fff; font-size: 13px; }

/* Tabbar */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: 56px; background: #fff; display: flex; border-top: 1px solid var(--line); z-index: 20; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--sub); }
.tab .ico { font-size: 20px; line-height: 1; margin-bottom: 2px; }
.tab.active { color: var(--brand); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.modal-panel { position: relative; width: 100%; max-width: 480px; margin: 0 auto; background: #fff; border-radius: 16px 16px 0 0; padding: 18px; max-height: 86vh; overflow-y: auto; animation: slideup .25s; }
@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 4px; }
.field input, .field select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 14px; background: #fafafa; }
.switch-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0 12px; font-size: 14px; }
.btn-primary { flex: 1; height: 42px; border: none; border-radius: 10px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 600; }
.btn-ghost { flex: 1; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--sub); font-size: 15px; }
.form-card { background: var(--card); border-radius: 12px; padding: 14px; }
.hint { font-size: 12px; color: var(--ok); margin-top: 8px; }
.about { background: var(--card); border-radius: 12px; padding: 14px; font-size: 13px; color: var(--sub); line-height: 1.6; }

/* 油费 */
.fuel-list { margin-bottom: 12px; max-height: 30vh; overflow-y: auto; }
.fuel-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fuel-row .del { color: var(--danger); border: none; background: none; font-size: 13px; }

.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 60; }
.empty { text-align: center; color: var(--sub); padding: 40px 0; font-size: 14px; }
