:root {
  --bg: #f6f1eb;
  --panel: #fffdf9;
  --ink: #321310;
  --muted: #78655e;
  --brand: #4a1714;
  --brand-deep: #2f0e0d;
  --accent: #f0b20e;
  --accent-deep: #d99b00;
  --blue: #4d81b2;
  --lime: #97de2f;
  --line: #eadfd4;
  --shadow: 0 18px 42px rgba(36, 20, 15, .06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(240, 178, 14, .1), transparent 26%),
    linear-gradient(135deg, #fffaf3, var(--bg));
  color: var(--ink);
  font: 14px/1.5 "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}
body.modal-open {
  overflow: hidden;
}
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; }
button:disabled {
  cursor: not-allowed;
  opacity: .62;
}
input, select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d8d0c7;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus {
  outline: none;
  border-color: rgba(77, 129, 178, .78);
  box-shadow: 0 0 0 3px rgba(77, 129, 178, .12);
}
input[readonly] {
  background: #f5f0e8;
  color: #6d645b;
}
input:disabled {
  background: #f2eee8;
  color: #aaa198;
  cursor: not-allowed;
}
.driver-body {
  background:
    radial-gradient(circle at top left, rgba(240, 178, 14, .12), transparent 22%),
    linear-gradient(180deg, #fbfaf7 0%, #f7f4ef 100%);
}
.mobile-page {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 18px 24px;
  background: rgba(255,255,255,.76);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.driver-header, .subnav, .admin-topbar, .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.driver-badge {
  flex: 0 0 auto;
  max-width: 145px;
  padding: 8px 10px;
  border: 1px solid #ddd6cb;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8f3ec, #f0e9df);
  color: #6d645b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
h1 { margin: 0; font-size: 24px; }
p { margin: 5px 0 0; color: var(--muted); }
.app-logo {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.header-logo {
  height: 46px;
  max-width: 160px;
  margin-bottom: 4px;
}
.login-logo {
  height: 62px;
  max-width: 210px;
}
.sidebar-logo {
  width: 94px;
  max-height: 48px;
  margin: 0 auto;
  border-radius: 6px;
}
.customer-name-title {
  margin-top: 2px;
  font-size: 18px;
}
.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}
.home-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
}
.entry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 94px;
  padding: 20px 18px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf9, #fbf6ef);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.entry-card::after {
  content: "›";
  color: var(--accent-deep);
  font-size: 30px;
  line-height: 1;
}
.entry-card strong { font-size: 22px; }
.hidden, .view.hidden, .toast.hidden, .result-modal.hidden { display: none !important; }
.view {
  animation: slideIn .18s ease-out;
}
.page-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  min-height: 100vh;
  padding: 14px 18px 24px;
  background:
    radial-gradient(circle at top left, rgba(240, 178, 14, .1), transparent 22%),
    linear-gradient(180deg, #fbfaf7 0%, #f7f4ef 100%);
  overflow-y: auto;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
.subnav { margin: 2px 0 14px; }
.form-panel, .history-panel, .card, .panel, .metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,253,248,.92);
  box-shadow: var(--shadow);
}
.form-panel { display: grid; gap: 13px; padding: 16px; }
label { display: grid; gap: 7px; font-size: 20px; }
.tank-matrix {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 12px;
  align-items: stretch;
  padding: 0;
}
.matrix-label,
.matrix-tab {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #d8d0c7;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}
.matrix-tab {
  justify-content: center;
  font-weight: 700;
}
.matrix-tab input {
  width: auto;
  height: auto;
  margin-right: 6px;
}
.matrix-tab.charge { background: #9be43b; }
.matrix-tab.discharge { background: #ffd0d4; }
.matrix-tab:has(input:not(:checked)) {
  opacity: .58;
}
.tank-matrix input {
  height: 38px;
  border-radius: 2px;
}
.matrix-wide {
  grid-column: span 2;
}
.primary, .lime, .ghost {
  height: 46px;
  padding: 0 18px;
  border-radius: 6px;
}
.primary { background: linear-gradient(180deg, #5a8dba, var(--blue)); color: #fff; }
.lime { background: linear-gradient(180deg, #a7ea3d, var(--lime)); color: #fff; }
.ghost { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.wide { width: 100%; font-size: 20px; font-weight: 700; }
.divider { height: 1px; background: var(--line); margin: 6px 0; }
.history-panel { margin-top: 16px; padding: 16px; }
#recordsView .history-panel { margin-top: 0; }
.section-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.record-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.date-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.date-range-row label {
  min-width: 0;
}
.record-filter-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.record-filter-actions button {
  height: 42px;
}
.record-list { display: grid; gap: 10px; }
.record-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.record-item strong { display: block; }
.record-item span { color: var(--muted); }
.record-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.record-headline strong {
  font-size: 17px;
}
.record-headline span {
  flex: 0 0 auto;
  font-size: 12px;
}
.record-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 10px;
}
.record-grid div {
  min-width: 0;
  color: var(--ink);
  word-break: break-word;
}
.record-grid span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}
.record-remark {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 40;
  min-width: min(260px, 82vw);
  max-width: 82vw;
  transform: translate(-50%, -50%);
  padding: 16px 18px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 50px rgba(31, 18, 14, .24);
}
.result-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(36, 20, 15, .24);
}
.modal-card {
  width: min(86vw, 280px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 14px 34px rgba(36, 20, 15, .16);
}
.modal-card strong {
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
}
.modal-card p {
  min-height: 20px;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 14px;
}
.modal-card .wide {
  height: 38px;
  font-size: 15px;
}
.customer-page {
  overflow-y: auto;
  overflow-x: hidden;
}
.customer-bind-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.customer-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.balance-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.balance-card span {
  color: var(--muted);
  font-size: 14px;
}
.balance-card strong {
  font-size: 30px;
  line-height: 1;
}
.customer-filter-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 72px;
  gap: 8px;
  align-items: end;
  width: 100%;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.customer-filter-card label {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}
.customer-filter-card input {
  height: 36px;
  padding: 0 8px;
  font-size: 13px;
}
.customer-filter-card button {
  width: 72px;
  height: 36px;
  padding: 0 10px;
  font-size: 14px;
}
.auto-confirm-note {
  margin-left: 8px;
  color: #d13a2f;
  font-size: 12px;
  font-weight: 700;
}
.customer-order-row {
  cursor: pointer;
}
.customer-order-row:hover {
  background: #fff8ed;
}
.order-no-compact {
  display: inline-block;
  max-width: none;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.35;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.customer-clock-title {
  margin: 18px 0 10px;
  font-size: 16px;
  font-weight: 800;
}
.customer-record {
  display: grid;
  gap: 4px;
}
.confirm-button {
  width: max-content;
  height: 36px;
  margin-top: 8px;
  padding: 0 14px;
}
.customer-table-wrap {
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.customer-consumption-table {
  min-width: 940px;
  table-layout: auto;
}
.customer-consumption-table th,
.customer-consumption-table td {
  white-space: nowrap;
  word-break: normal;
}
.customer-consumption-table th:nth-child(1),
.customer-consumption-table td:nth-child(1) {
  min-width: 138px;
}
.customer-consumption-table th:nth-child(2),
.customer-consumption-table td:nth-child(2) {
  min-width: 148px;
}
.customer-consumption-table th:nth-child(4),
.customer-consumption-table td:nth-child(4) {
  min-width: 96px;
}
.customer-consumption-table th:nth-child(3),
.customer-consumption-table td:nth-child(3),
.customer-consumption-table th:nth-child(8),
.customer-consumption-table td:nth-child(8) {
  min-width: 78px;
}
.customer-consumption-table th:nth-child(5),
.customer-consumption-table td:nth-child(5),
.customer-consumption-table th:nth-child(6),
.customer-consumption-table td:nth-child(6),
.customer-consumption-table th:nth-child(7),
.customer-consumption-table td:nth-child(7) {
  min-width: 78px;
  text-align: right;
}
.customer-consumption-table th:nth-child(9),
.customer-consumption-table td:nth-child(9),
.customer-consumption-table th:nth-child(10),
.customer-consumption-table td:nth-child(10) {
  min-width: 64px;
  text-align: center;
}
.customer-consumption-table .confirm-button {
  margin-top: 0;
}
.customer-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.customer-pager button {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
}
.admin-login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.admin-login-card {
  width: min(100%, 380px);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,253,249,.96);
  box-shadow: var(--shadow);
}
.admin-login-card h1 {
  font-size: 26px;
}
.admin-login-card label {
  font-size: 15px;
}
.admin-login-card .wide {
  font-size: 17px;
}
.login-brand {
  margin: 0;
  text-align: left;
  color: var(--brand);
}
.login-message {
  min-height: 21px;
  margin: 0;
  color: #a02d22;
}
.admin-shell { min-height: 100vh; }
.sidebar {
  width: 120px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  min-height: 100vh;
  padding: 18px 9px;
  background: linear-gradient(180deg, var(--brand-deep), #5b1d19);
  color: #fff;
  overflow-y: auto;
}
.brand { text-align: center; font-weight: 800; font-size: 18px; margin-bottom: 26px; }
.nav {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 6px;
  border-radius: 12px;
  background: rgba(255,255,255,.09);
  color: #fff;
}
.nav.active { background: linear-gradient(90deg, rgba(240,178,14,.28), rgba(255,255,255,.16)); }
.admin-main { min-height: 100vh; margin-left: 120px; padding: 28px 32px; overflow: auto; }
.admin-userbar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.admin-userbar .ghost {
  height: 34px;
  padding: 0 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
  margin: 22px 0;
}
.metric {
  position: relative;
  min-height: 112px;
  padding: 20px 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #fffdf9 0%, #fff7ea 100%);
}
.metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--accent);
}
.metric:nth-child(2)::before { background: var(--blue); }
.metric:nth-child(3)::before { background: #67a55b; }
.metric span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}
.metric strong {
  display: block;
  margin-top: 14px;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}
.grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.vehicle-tools {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 14px;
}
.vehicle-query {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}
.vehicle-query label {
  width: min(240px, 100%);
  font-size: 13px;
  color: var(--muted);
}
.vehicle-query input {
  height: 36px;
}
.vehicle-query button,
.vehicle-tools > button {
  height: 36px;
  padding: 0 12px;
}
.split-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.panel, .card { padding: 20px; }
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 14px;
}
.admin-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) max-content;
  gap: 10px;
  align-items: end;
  margin: 12px 0 18px;
}
.admin-form label {
  font-size: 14px;
}
.admin-form button {
  height: 34px;
  padding: 0 14px;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.action-row button {
  height: 36px;
  padding: 0 14px;
}
.small-modal {
  width: min(500px, 94vw);
}
.modal-form {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 0;
}
.modal-form button {
  width: max-content;
}
.admin-filters label {
  display: grid;
  grid-template-rows: 20px 34px;
  gap: 5px;
  width: min(240px, 100%);
  font-size: 14px;
}
.admin-filters input,
.admin-filters select {
  height: 34px;
  padding: 0 10px;
}
.admin-filters button {
  width: auto;
  height: 34px;
  padding: 0 12px;
  font-size: 14px;
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
}
.table-head {
  margin: 2px 0 12px;
}
.head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.pager {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.pager button {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
}
.orders-table {
  min-width: 2160px;
}
.orders-table th:nth-child(1) { width: 230px; }
.orders-table th:nth-child(2) { width: 88px; }
.orders-table th:nth-child(3) { width: 84px; }
.orders-table th:nth-child(4) { width: 108px; }
.orders-table th:nth-child(5) { width: 118px; }
.orders-table th:nth-child(6) { width: 118px; }
.orders-table th:nth-child(7) { width: 78px; }
.orders-table th:nth-child(8) { width: 86px; }
.orders-table th:nth-child(9) { width: 86px; }
.orders-table th:nth-child(10) { width: 92px; }
.orders-table th:nth-child(11) { width: 108px; }
.orders-table th:nth-child(12) { width: 92px; }
.orders-table th:nth-child(13) { width: 108px; }
.orders-table th:nth-child(14) { width: 92px; }
.orders-table th:nth-child(15) { width: 108px; }
.orders-table th:nth-child(16) { width: 108px; }
.orders-table th:nth-child(17) { width: 300px; }
.orders-table th:nth-child(8),
.orders-table th:nth-child(9),
.orders-table th:nth-child(10),
.orders-table th:nth-child(11),
.orders-table th:nth-child(12),
.orders-table th:nth-child(13),
.orders-table th:nth-child(14),
.orders-table th:nth-child(15),
.orders-table th:nth-child(16),
.orders-table td:nth-child(8),
.orders-table td:nth-child(9),
.orders-table td:nth-child(10),
.orders-table td:nth-child(11),
.orders-table td:nth-child(12),
.orders-table td:nth-child(13),
.orders-table td:nth-child(14),
.orders-table td:nth-child(15),
.orders-table td:nth-child(16) {
  text-align: right;
  white-space: nowrap;
}
.orders-table .action-col {
  width: 86px;
  text-align: center;
  white-space: nowrap;
}
.recharge-table {
  table-layout: fixed;
  min-width: 0;
}
.recharge-table th:nth-child(1) { width: 13%; }
.recharge-table th:nth-child(2) { width: 10%; }
.recharge-table th:nth-child(3),
.recharge-table th:nth-child(4),
.recharge-table th:nth-child(5) { width: 8%; }
.recharge-table th:nth-child(6),
.recharge-table th:nth-child(7) { width: 8%; }
.recharge-table th:nth-child(8) { width: 12%; }
.recharge-table th:nth-child(9) { width: 10%; }
.recharge-table th:nth-child(10) { width: 13%; }
.recharge-table td:nth-child(3),
.recharge-table td:nth-child(4),
.recharge-table td:nth-child(5) {
  text-align: right;
  white-space: nowrap;
}
.recharge-table td {
  overflow-wrap: anywhere;
}
.order-no {
  display: block;
  width: 100%;
  max-width: 206px;
  padding: 2px 4px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  vertical-align: top;
  text-align: left;
}
.remark-stack {
  display: grid;
  gap: 6px;
  line-height: 1.35;
}
.remark-stack div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
}
.remark-stack span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  border-radius: 6px;
  background: #eef5fb;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.muted-text {
  color: var(--muted);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  table-layout: fixed;
}
th, td {
  border: 1px solid #e5dfd7;
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
th { color: var(--brand); background: #fff7ea; font-weight: 700; }
tbody tr:nth-child(odd) td { background: #f7f7f7; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: #eef5fb; }
.link-button { background: transparent; color: var(--blue); padding: 0; height: auto; font-size: 14px; white-space: nowrap; }
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.status-badge.pending {
  background: #fff3cc;
  color: #8a5c00;
}
.status-badge.confirmed {
  background: #e2f6df;
  color: #237037;
}
.phase-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.phase-badge.charge {
  background: #e5f3ff;
  color: #1f5f9b;
}
.phase-badge.discharge {
  background: #e6f7df;
  color: #2d6f1f;
}
.phase-badge.exception {
  background: #ffe4e4;
  color: #a23131;
}
.phase-badge.unknown {
  background: #eee9e2;
  color: var(--muted);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(31, 18, 14, .45);
}
.modal {
  width: min(980px, 96vw);
  max-height: 88vh;
  overflow: auto;
  padding: 20px;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0,0,0,.24);
}
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.supplier-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.supplier-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.charging-point-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}
.charging-point-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 78px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.supplier-row input,
.supplier-row button,
.modal-actions button {
  height: 38px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.detail-list {
  display: grid;
  gap: 10px;
}
.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.detail-list span {
  color: var(--muted);
}
.detail-list strong {
  text-align: right;
}
.maintenance-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.maintenance-split h4 {
  margin: 0 0 10px;
  font-size: 16px;
}
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.photo-grid.zoom-active {
  display: block;
  max-height: calc(88vh - 110px);
  overflow: auto;
}
.photo-grid img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.photo-grid img.zoomable-image { cursor: zoom-in; }
.photo-grid img.zoomed {
  width: auto;
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
@media (max-width: 760px) {
  .admin-shell { display: block; }
  .sidebar { position: static; width: 100%; min-height: auto; display: flex; gap: 8px; align-items: center; }
  .brand { margin: 0 10px 0 0; }
  .metrics { grid-template-columns: 1fr; }
  .admin-main { margin-left: 0; padding: 18px; }
  .admin-filters { grid-template-columns: 1fr 1fr; }
  .vehicle-tools { align-items: stretch; flex-direction: column; }
  .vehicle-query label { flex: 1 1 160px; width: auto; }
  .customer-toolbar { grid-template-columns: 1fr; }
  .admin-form { grid-template-columns: 1fr 1fr; }
  .split-panels,
  .maintenance-split { grid-template-columns: 1fr; }
  table { min-width: 760px; }
  .panel { overflow-x: auto; }
}
@media (max-width: 380px) {
  .mobile-page {
    padding-left: 12px;
    padding-right: 12px;
  }
  .history-panel {
    padding-left: 12px;
    padding-right: 12px;
  }
  .customer-filter-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 58px;
    gap: 6px;
    padding: 8px;
  }
  .customer-filter-card input {
    height: 34px;
    padding: 0 4px;
    font-size: 11px;
  }
  .customer-filter-card button {
    width: 58px;
    height: 34px;
    padding: 0 6px;
    font-size: 13px;
  }
}
