:root {
  --prototype-primary: #1268f3;
  --prototype-bg: #f4f7fb;
  --prototype-border: #e5eaf1;
  --prototype-text: #182230;
  --prototype-muted: #667085;
  --prototype-radius: 12px;
  --prototype-shadow: 0 8px 28px rgba(25, 45, 74, .055);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--prototype-bg); color: var(--prototype-text); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
button, input { font: inherit; }

.semi-prototype-shell { min-height: 100vh; background: var(--prototype-bg); }
.semi-prototype-sider { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; width: 216px; flex-direction: column; border-right: 1px solid var(--prototype-border); background: #fff; }
.semi-prototype-brand { display: flex; height: 68px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--prototype-border); padding: 0 16px; }
.semi-prototype-brand img { width: 132px; }
.semi-prototype-nav { min-height: 0; flex: 1; border: 0; padding: 12px 8px; }
.semi-prototype-nav .semi-navigation-item { margin-bottom: 3px; border-radius: 8px; }
.semi-prototype-sider-foot { display: flex; height: 52px; align-items: center; gap: 10px; border-top: 1px solid var(--prototype-border); padding: 0 20px; color: var(--prototype-muted); font-size: 12px; }
.semi-prototype-main { min-width: 0; margin-left: 216px; }
.semi-prototype-header { position: sticky; top: 0; z-index: 9; display: flex; height: 68px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(229,234,241,.9); background: rgba(255,255,255,.9); padding: 0 24px; backdrop-filter: blur(16px); }
.semi-prototype-header > div:first-child { display: flex; align-items: center; gap: 10px; }
.semi-prototype-header h3 { margin: 2px 0 0; font-size: 20px; }
.semi-prototype-content { width: 100%; max-width: 1680px; margin: 0 auto; padding: 24px; }
.semi-prototype-page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.semi-prototype-page-intro > div { display: grid; gap: 8px; }
.semi-prototype-page-intro h2 { margin: 0; font-size: clamp(24px, 2.1vw, 32px); letter-spacing: -.035em; }
.semi-prototype-filter-card, .semi-prototype-stat, .semi-prototype-results { border-color: var(--prototype-border); border-radius: var(--prototype-radius); box-shadow: var(--prototype-shadow); }
.semi-prototype-filter-card .semi-card-body { padding: 16px; }
.semi-prototype-filter-grid { display: grid; grid-template-columns: minmax(240px, 1.45fr) repeat(3, minmax(155px, .75fr)) auto; align-items: end; gap: 14px 12px; }
.semi-prototype-field { display: grid; min-width: 0; gap: 7px; }
.semi-prototype-field > span { font-size: 12px; font-weight: 600; }
.semi-prototype-filter-actions { align-self: end; }
.semi-prototype-quick-ranges { display: flex; grid-column: 1 / -1; align-items: center; gap: 2px; border-top: 1px solid #f0f2f5; padding-top: 12px; }
.semi-prototype-quick-ranges > span { margin-right: 8px; font-size: 12px; }
.semi-prototype-stats { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 14px; margin: 14px 0; }
.semi-prototype-stat .semi-card-body { display: flex; min-height: 126px; flex-direction: column; padding: 16px 18px; }
.semi-prototype-stat strong { margin: 10px 0 11px; color: var(--prototype-text); font-size: clamp(23px, 2vw, 30px); line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.semi-prototype-stat > .semi-card-body > div { display: grid; gap: 9px; margin-top: auto; }
.semi-prototype-stat.is-primary { overflow: hidden; border-color: #cadeff; background: linear-gradient(135deg, #f0f6ff 0%, #fff 72%); }
.semi-prototype-stat.is-primary strong { color: #0959cf; }
.semi-prototype-stat.is-warning { border-color: #f6dfbd; background: linear-gradient(135deg, #fff8ec 0%, #fff 72%); }
.semi-prototype-stat.is-warning strong { color: #b86408; }
.semi-prototype-results { overflow: hidden; }
.semi-prototype-results-head { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--prototype-border); padding: 13px 16px; }
.semi-prototype-results-head h4 { margin: 0 0 4px; font-size: 16px; }
.semi-prototype-table .semi-table-thead > .semi-table-row > .semi-table-row-head { height: 44px; background: #f7f9fc; color: #596579; font-size: 12px; }
.semi-prototype-table .semi-table-row { height: 60px; }
.semi-prototype-table .semi-table-tbody > .semi-table-row:hover > .semi-table-row-cell { background: #f7faff; }
.semi-prototype-vehicle-cell, .semi-prototype-total-cell { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.semi-prototype-vehicle-cell strong { color: #263448; font-size: 13px; }
.semi-prototype-vehicle-cell > span { max-width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.semi-prototype-mileage, .semi-prototype-total-cell strong { font-variant-numeric: tabular-nums; }
.semi-prototype-mileage { color: #344054; font-weight: 650; }
.semi-prototype-mileage small { color: #98a2b3; font-size: 9px; font-weight: 500; }
.semi-prototype-mileage.is-zero { color: #b4bdc9; font-weight: 500; }
.semi-prototype-total-cell { align-items: flex-end; }
.semi-prototype-total-cell strong { color: #0959cf; font-size: 13px; }
.semi-prototype-results-footer { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--prototype-border); padding: 10px 16px; }
.semi-prototype-mobile-nav { display: none; }

@media (max-width: 1180px) {
  .semi-prototype-filter-grid { grid-template-columns: minmax(240px, 1.4fr) repeat(2, minmax(150px, .8fr)) auto; }
  .semi-prototype-field:nth-child(4) { grid-column: 1 / 2; }
  .semi-prototype-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .semi-prototype-shell { min-height: 100dvh; }
  .semi-prototype-main { margin-left: 0; }
  .semi-prototype-header { height: 58px; padding: 0 12px; }
  .semi-prototype-header > div:first-child > img { width: 30px; height: 30px; }
  .semi-prototype-header h3 { font-size: 17px; }
  .semi-prototype-header .semi-typography-tertiary { display: none; }
  .semi-prototype-content { padding: 12px; }
  .semi-prototype-page-intro { align-items: flex-start; margin: 2px 0 12px; }
  .semi-prototype-page-intro > div { gap: 5px; }
  .semi-prototype-page-intro > div > .semi-tag { display: none; }
  .semi-prototype-page-intro h2 { font-size: 21px; }
  .semi-prototype-page-intro > span { display: none; }
  .semi-prototype-page-intro .semi-typography-secondary { font-size: 12px; line-height: 1.55; }
  .semi-prototype-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
  .semi-prototype-stat .semi-card-body { min-height: 102px; padding: 12px; }
  .semi-prototype-stat strong { margin: 8px 0; font-size: clamp(18px, 5.2vw, 23px); }
  .semi-prototype-stat .semi-typography-tertiary, .semi-prototype-stat .semi-typography-secondary { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .semi-prototype-results-head { min-height: 62px; padding: 10px 12px; }
  .semi-prototype-results-head h4 { font-size: 15px; }
  .semi-prototype-results-head > div > .semi-typography-secondary { display: none; }
  .semi-prototype-results-head .semi-button { min-width: 36px; padding: 0 9px; }
  .semi-prototype-table .semi-table-row { height: 56px; }
  .semi-prototype-table .semi-table-thead > .semi-table-row > .semi-table-row-head { height: 40px; font-size: 11px; }
  .semi-prototype-table .semi-table-row-cell { padding: 8px 10px; }
  .semi-prototype-vehicle-cell strong, .semi-prototype-total-cell strong { font-size: 12px; }
  .semi-prototype-vehicle-cell > span { font-size: 8px; }
  .semi-prototype-results-footer { min-height: 52px; padding: 8px 10px; }
  .semi-prototype-results-footer > span { display: none; }
  .semi-prototype-results-footer .semi-page { width: 100%; justify-content: center; }
  .semi-prototype-mobile-nav { position: fixed; z-index: 30; inset: auto 0 0; display: grid; height: calc(62px + env(safe-area-inset-bottom)); grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--prototype-border); background: rgba(255,255,255,.96); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -8px 24px rgba(28,44,68,.08); backdrop-filter: blur(18px); }
  .semi-prototype-mobile-nav button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; border: 0; background: transparent; color: #7b8798; font-size: 10px; }
  .semi-prototype-mobile-nav button.is-active { color: var(--prototype-primary); font-weight: 700; }
  .semi-prototype-filter-mobile { display: grid; gap: 16px; }
  .semi-prototype-filter-mobile .semi-prototype-field { gap: 8px; }
  .semi-prototype-filter-mobile .semi-prototype-filter-actions { display: none; }
  .semi-prototype-filter-mobile .semi-prototype-quick-ranges { overflow-x: auto; flex-wrap: nowrap; border-top: 0; padding-top: 0; }
  .semi-prototype-filter-mobile .semi-prototype-quick-ranges .semi-button { flex: 0 0 auto; }
  .semi-sidesheet-bottom .semi-sidesheet-inner-wrap { border-radius: 18px 18px 0 0; }
}

@media (max-width: 380px) {
  .semi-prototype-stat strong { font-size: 17px; }
  .semi-prototype-results-head .semi-button:first-child { display: none; }
}
