:root {
  font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;
  color:#243b43;
  background:#f4f7f6;
  font-size:14px;
  line-height:1.6;
  --accent:#13796b;
  --border:#dce5e1;
  --muted:#667d78
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
header {
  height:76px;
  padding:0 max(24px,calc((100vw - 1240px)/2));
  display:flex;
  align-items:center;
  gap:24px;
  background:#fff;
  border-bottom:1px solid var(--border)
}
.brand {
  font-size:20px;
  letter-spacing:-.5px;
  font-weight:750;
  color:#193e36;
  text-decoration:none;
  margin-right:auto
}
.subtle,.muted,small {
  color:var(--muted)
}
a.subtle {
  text-decoration:none
}
main {
  max-width:1288px;
  margin:36px auto;
  padding:0 24px;
  min-height:calc(100vh - 210px)
}
h1 {
  font-size:32px;
  letter-spacing:-1px;
  line-height:1.2;
  margin:10px 0 24px
}
h2 {
  font-size:19px;
  margin:8px 0 16px
}
.eyebrow {
  color:var(--accent);
  font-size:12px;
  font-weight:700;
  letter-spacing:1.4px
}
.card {
  background:white;
  border:1px solid var(--border);
  border-radius:14px;
  padding:24px;
  margin:20px 0;
  box-shadow:0 3px 10px #12352d03
}
.auth {
  max-width:470px;
  margin:65px auto;
  padding:36px
}
.auth h1 {
  font-size:30px
}
.auth form {
  display:grid;
  gap:18px
}
.tabs {
  display:flex;
  gap:5px;
  border-bottom:1px solid var(--border);
  margin:24px 0
}
.tabs button {
  border:0;
  border-radius:0;
  padding:12px 20px;
  background:transparent;
  color:var(--muted)
}
.tabs button.active {
  color:var(--accent);
  border-bottom:3px solid var(--accent);
  font-weight:700
}
label {
  display:grid;
  gap:7px;
  font-weight:600
}
input,select,textarea {
  font:inherit;
  background:#fff;
  border:1px solid #cddad4;
  border-radius:7px;
  padding:10px 12px;
  color:inherit;
  min-width:0
}
input:focus,select:focus,textarea:focus {
  outline:2px solid #93c8bb;
  outline-offset:1px
}
textarea {
  width:100%;
  resize:vertical;
  margin:12px 0;
  font-family:ui-monospace,monospace
}
button,.button {
  font:inherit;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  border:1px solid #ccdcd4;
  background:#fff;
  color:#2a4c42;
  border-radius:8px;
  padding:9px 15px;
  cursor:pointer;
  font-weight:600;
  text-decoration:none;
  white-space:nowrap
}
button:hover,.button:hover {
  background:#edf5f1
}
button:disabled {
  opacity:.5;
  cursor:wait
}
.primary {
  background:var(--accent);
  color:#fff;
  border-color:var(--accent)
}
.primary:hover {
  background:#0c6658
}
.danger {
  color:#b04235;
  border-color:#edd0cb
}
.title-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px
}
.title-row h1 {
  margin-bottom:10px
}
.actions {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap
}
.vehicle {
  display:flex;
  gap:28px;
  align-items:center;
  flex-wrap:wrap
}
.vehicle label {
  min-width:200px
}
.vehicle small {
  font-weight:400
}
.highlights {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px
}
.highlight {
  padding:24px;
  border:1px solid var(--border);
  background:#fff;
  border-radius:14px
}
.highlight strong {
  display:block;
  font-size:32px;
  margin:10px 0;
  color:#163e34
}
.highlight small {
  font-size:13px
}
.table-wrap {
  overflow-x:auto
}
table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  white-space:nowrap
}
th {
  font-weight:600;
  color:#60776e;
  font-size:12px;
  padding:13px 14px;
  background:#f6f9f7;
  border-bottom:1px solid var(--border)
}
td {
  padding:13px 14px;
  border-bottom:1px solid #eef2ef;
  font-variant-numeric:tabular-nums
}
tbody tr:last-child td {
  border-bottom:0
}
tbody tr:hover {
  background:#fbfdfb
}
table.records-table td {
  padding:9px 6px
}
.records-table input {
  width:110px;
  background:#fffdf4
}
.records-table [data-field=dateValue] {
  width:140px
}
.records-table [data-field=note] {
  width:170px
}
.records-table select {
  width:65px;
  background:#fffdf4
}
.error-text {
  color:#b04235
}
.pagination {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:20px;
  margin:20px
}
.charts {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px
}
.chart {
  min-width:0
}
.chart svg {
  width:100%;
  height:auto;
  display:block
}
.chart-title {
  font-weight:600;
  font-size:16px;
  margin-bottom:10px
}
.chart-label {
  font-size:11px;
  fill:#75877f
}
.chart-line {
  fill:none;
  stroke:#13796b;
  stroke-width:2.5
}
.chart-dot {
  fill:#13796b
}
.chart-grid {
  stroke:#e9efeb;
  stroke-width:1
}
.notes p {
  color:var(--muted);
  max-width:950px
}
.inline-form {
  display:flex;
  gap:14px;
  align-items:end
}
.inline-form input {
  width:180px
}
#message {
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translateX(-50%);
  max-width:min(700px,92vw);
  padding:14px 22px;
  background:#163f34;
  color:#fff;
  border-radius:10px;
  box-shadow:0 5px 30px #0002;
  z-index:10;
  white-space:pre-wrap
}
footer {
  text-align:center;
  padding:28px;
  color:#8b9e95;
  font-size:12px
}
[hidden] {
  display:none!important
}
code {
  font-family:ui-monospace,monospace;
  font-size:12px
}
button:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:3px
}
@media(max-width:780px) {
  header {
    padding:0 18px;
    gap:12px
  }
  .brand {
    font-size:17px
  }
  main {
    padding:0 16px;
    margin-top:24px
  }
  .title-row {
    align-items:start;
    flex-direction:column
  }
  .highlights,.charts {
    grid-template-columns:1fr
  }
  .vehicle {
    gap:16px
  }
  .card {
    padding:18px
  }
  .auth {
    margin:30px auto
  }
  .actions {
    gap:8px
  }
  .tabs button {
    padding:10px 12px
  }
  h1 {
    font-size:27px
  }
  .highlight strong {
    font-size:28px
  }
}
:root {
  color-scheme:light
}
input,select,textarea {
  font-size:16px
}
.records-table input {
  font-size:14px
}
#identity {
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:35vw;
  white-space:nowrap
}
.card.table-wrap {
  padding:0
}
.records-table td[data-label="备注"] input {
  min-width:0
}
@media(max-width:780px) {
  .records-table,.records-table tbody {
    display:block;
    width:100%
  }
  .records-table thead {
    display:none
  }
  .records-table tbody tr {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:8px 14px;
    border-bottom:1px solid var(--border);
    padding:18px
  }
  .records-table tbody td {
    display:block;
    border:0;
    padding:0;
    white-space:normal;
    overflow-wrap:anywhere;
    min-width:0
  }
  .records-table td:before {
    content:attr(data-label);
    display:block;
    color:var(--muted);
    font-size:12px;
    margin-bottom:5px
  }
  .records-table td:first-child {
    grid-column:1/-1;
    font-weight:700;
    color:var(--accent)
  }
  .records-table td:first-child:before {
    display:inline;
    margin-right:10px
  }
  .records-table td[data-label="备注"],.record-operation {
    grid-column:1/-1
  }
  .records-table input,.records-table [data-field=dateValue],.records-table [data-field=note],.records-table select {
    width:100%;
    font-size:16px;
    min-height:44px
  }
  .record-operation button {
    width:100%
  }
  .chart {
    overflow-x:auto
  }
  .chart svg {
    min-width:480px
  }
  button,.button {
    min-height:44px
  }
  .inline-form {
    flex-wrap:wrap
  }
  .inline-form label {
    flex:1
  }
  .inline-form input {
    width:100%
  }
  .auth {
    max-width:100%;
    padding:24px
  }
  header {
    position:sticky;
    top:0;
    z-index:5
  }
  .vehicle label {
    width:100%
  }
}
.records-table textarea {
  width:180px;
  font-size:14px;
  padding:8px;
  margin:0;
  background:#fffdf4
}
.records-table input[type=date] {
  min-width:0
}
@media(max-width:780px) {
  .records-table textarea {
    width:100%;
    font-size:16px;
    min-height:60px
  }
  .records-table input[type=date] {
    max-width:100%
  }
}
@media(max-width:780px) {
  .records-table td[data-label="日期"] {
    grid-column:1/-1
  }
}
