* {
  box-sizing: border-box;
}
:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #172b2b;
  background: #f4f5f1;
  font-size: 14px;
  --green: #143e3b;
  --muted: #697774;
  --line: #dde3de;
  --amber: #96600b;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #7d9d41;
}
button {
  border: 1px solid #cbd5ce;
  background: white;
  border-radius: 7px;
  padding: 10px 14px;
  color: var(--green);
  cursor: pointer;
  white-space: nowrap;
}
button:hover {
  background: #eef2eb;
}
button:disabled {
  opacity: 0.4;
}
button.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
button.text-button {
  border: 0;
  background: none;
  padding: 0;
  color: #286c62;
}
a {
  color: #246c63;
}
.top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 4vw;
}
.top-inner {
  max-width: 1600px;
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-size: 25px;
  font-weight: 760;
  letter-spacing: -1px;
  text-decoration: none;
  flex: none;
}
.mark {
  font-size: 23px;
  background: var(--green);
  color: #d8ed80;
  border-radius: 9px;
  width: 37px;
  height: 37px;
  text-align: center;
  line-height: 37px;
}
.brand-note {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--muted);
  font-weight: 600;
  border-left: 1px solid var(--line);
  margin-left: 15px;
  padding-left: 25px;
}
.top-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}
.top-nav {
  display: flex;
  gap: 5px;
  margin-right: auto;
}
.top-nav button {
  border: 0;
  background: transparent;
  padding: 9px 12px;
  font-size: 12px;
  color: #61706a;
}
.top-nav .active {
  background: #eaf0e9;
  color: var(--green);
  font-weight: 700;
}
.top-nav span {
  background: #ebe4d2;
  color: #775a24;
  padding: 3px 6px;
  margin-left: 4px;
  border-radius: 4px;
  font-size: 9px;
}
.local {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.local i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7d9d41;
}
.top-actions {
  display: flex;
  gap: 7px;
}
.top-actions button {
  padding: 8px 11px;
  font-size: 12px;
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 36px 4vw;
}
.heading {
  margin-bottom: 22px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 750;
  color: #657469;
}
h1 {
  font-size: 36px;
  letter-spacing: -1.4px;
  margin: 9px 0;
}
h2 {
  font-size: 17px;
  margin: 0;
}
h3 {
  font-size: 14px;
}
p {
  line-height: 1.6;
}
.heading p {
  color: var(--muted);
  margin: 0;
}
.auth-card {
  max-width: 480px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 7vh auto;
  padding: 34px;
  box-shadow: 0 18px 70px #16302912;
}
.auth-card form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin: 26px 0;
}
.auth-card label {
  flex: 1;
}
.auth-card input {
  font-size: 22px;
  letter-spacing: 8px;
}
.error {
  color: #8a3b2c;
  min-height: 24px;
}
.notice {
  padding: 14px 18px;
  border: 1px solid #dfd5b9;
  border-left: 4px solid #ac811f;
  background: #faf6e9;
  border-radius: 6px;
  color: #654c20;
  margin-bottom: 22px;
}
.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 19px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  font-weight: 650;
  color: #53645e;
}
input,
select {
  background: #fff;
  color: #243b36;
  border: 1px solid #cdd6cf;
  border-radius: 6px;
  padding: 10px;
  min-height: 38px;
}
.search {
  flex: 1;
  min-width: 200px;
}
.scope {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 14px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 24px;
  overflow: hidden;
}
.metric {
  padding: 19px 17px;
  border-right: 1px solid var(--line);
}
.metric:last-child {
  border: 0;
}
.metric span {
  font-size: 11px;
  color: #5b6a63;
  display: block;
  min-height: 28px;
}
.metric strong {
  font-size: 26px;
  letter-spacing: -1px;
  display: block;
  font-variant-numeric: tabular-nums;
}
.metric small {
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 22px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 22px;
  min-width: 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}
.section-heading > span {
  color: var(--muted);
  font-size: 11px;
}
.table-wrap {
  overflow: auto;
}
#vehicles,
#trips {
  max-height: 440px;
}
#vehicles thead,
#trips thead {
  position: sticky;
  top: 0;
  z-index: 1;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th {
  text-align: left;
  color: #65736b;
  background: #f6f7f3;
  font-weight: 600;
  font-size: 10px;
  white-space: nowrap;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 12px 10px;
  border-bottom: 1px solid #eef1eb;
}
td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.plate,
.link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #286a5f;
}
.pill {
  display: inline-block;
  background: #faf0d6;
  color: #855a16;
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 4px;
}
.chart {
  height: 136px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin: 16px 8px 20px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
  font-size: 10px;
  color: #6c796e;
}
.bar {
  background: #80a197;
  width: 75%;
  max-width: 58px;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}
.location-list {
  padding: 0;
  list-style: none;
}
.location-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eef1eb;
  font-size: 11px;
}
.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  font-size: 11px;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  color: #7a857e;
  font-size: 10px;
  padding-bottom: 20px;
}
dialog {
  border: 1px solid #d2dbd1;
  border-radius: 14px;
  padding: 26px;
  width: min(870px, calc(100vw - 30px));
  max-height: 90vh;
  overflow: auto;
  color: #233a31;
  box-shadow: 0 20px 100px #15271b33;
}
dialog::backdrop {
  background: #172b2866;
  backdrop-filter: blur(2px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.detail-metrics,
.receipt-split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.detail-metrics > div,
.receipt-split > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.detail-metrics strong,
.receipt-split strong {
  display: block;
  font-size: 21px;
  margin-top: 5px;
}
.detail-metrics span,
.receipt-split span {
  font-size: 10px;
  color: var(--muted);
}
.receipt {
  border: 1px solid #d8ded7;
  border-radius: 9px;
  padding: 18px;
  margin: 20px 0;
}
.receipt-warning {
  padding: 11px 13px;
  margin: 12px 0;
  border-left: 4px solid #ac811f;
  border-radius: 5px;
  background: #faf6e9;
  color: #654c20;
  font-size: 12px;
  line-height: 1.5;
}
.receipt-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed #e2e6e0;
}
.tariff {
  background: #fcf8ec;
  border: 1px solid #e0d6b8;
  border-radius: 7px;
  padding: 15px;
  margin-top: 14px;
}
.muted {
  color: var(--muted);
  font-size: 11px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  padding: 14px 22px;
  border-radius: 8px;
  z-index: 20;
  box-shadow: 0 10px 35px #172b2840;
}
.toast-error {
  background: #8a3b2c;
}
[aria-busy="true"] {
  cursor: progress;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .top-inner {
    flex-wrap: wrap;
    padding: 15px 0;
    gap: 10px;
  }
  .top-menu {
    flex-basis: 100%;
    flex-wrap: wrap;
  }
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .brand-note {
    display: none;
  }
}
@media (max-width: 650px) {
  .top {
    padding: 0 16px;
  }
  .top-inner {
    padding: 13px 0;
  }
  .top-menu {
    display: grid;
    width: 100%;
  }
  .top-nav {
    width: 100%;
  }
  .top-nav button {
    flex: 1;
  }
  .local {
    position: absolute;
    right: 16px;
    top: 24px;
  }
  .top-actions {
    width: 100%;
  }
  .top-actions button {
    flex: 1;
    padding: 8px 6px;
  }
  .top-actions #settings {
    display: none;
  }
  main {
    padding: 25px 16px;
  }
  h1 {
    font-size: 30px;
  }
  .auth-card {
    margin: 3vh auto;
    padding: 24px;
  }
  .auth-card form {
    align-items: stretch;
    flex-direction: column;
  }
  .toolbar > label {
    flex: 1;
    min-width: 125px;
  }
  .toolbar .search {
    min-width: 100%;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric strong {
    font-size: 22px;
  }
  .scope,
  .section-heading,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .detail-metrics,
  .receipt-split {
    grid-template-columns: 1fr;
  }
}
.route-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px 16px;
  margin-top: 18px;
  background: #f7f8f4;
}
.route-panel p {
  margin: 3px 0 0;
}
.route-panel.map-ready {
  display: block;
}
.route-panel.map-ready p {
  margin: 10px 2px 0;
}
.route-map {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px;
  border: 1px solid var(--line);
}
@media (max-width: 650px) {
  .route-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .route-panel button {
    width: 100%;
  }
}
@media print {
  .top,
  .toolbar,
  .pager,
  .toast,
  dialog,
  .auth-card {
    display: none !important;
  }
  body,
  main {
    background: #fff;
    margin: 0;
    padding: 0;
  }
  .panel {
    break-inside: avoid;
  }
  .metrics {
    grid-template-columns: repeat(6, 1fr);
  }
  #report {
    display: block !important;
  }
}
