:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f7fa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f7fa;
}

a {
  color: #116071;
}

.table-action {
  font-weight: 900;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 32px 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.15;
}

h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

.topbar p,
.hint {
  color: #5c6879;
  margin-top: 6px;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 0 32px;
  border-bottom: 1px solid #d8e1ea;
}

.tabs a {
  display: block;
  padding: 16px 20px;
  color: #536276;
  text-decoration: none;
  font-weight: 800;
  border-bottom: 4px solid transparent;
}

.tabs a.active {
  color: #116071;
  background: white;
  border-radius: 8px 8px 0 0;
  border-bottom-color: #116071;
}

main {
  padding: 28px 32px 44px;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card,
.panel {
  background: white;
  border: 1px solid #dae3ec;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
}

.login-card p {
  color: #5c6879;
  margin: 8px 0 24px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid.two {
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  align-items: start;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metrics div {
  background: white;
  border: 1px solid #dae3ec;
  border-radius: 8px;
  padding: 18px;
}

.metrics span {
  color: #687688;
  display: block;
  font-weight: 700;
}

.metrics strong {
  display: block;
  font-size: 34px;
  margin-top: 8px;
}

.toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.actions {
  display: flex;
  gap: 10px;
}

.filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 180px 260px auto;
}

.tracking-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
  margin-bottom: 24px;
}

.tracking-map-card,
.tracking-side {
  background: white;
  border: 1px solid #dae3ec;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
  padding: 18px;
}

.tracking-map-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tracking-map {
  border: 1px solid #cfd9e4;
  border-radius: 8px;
  height: 560px;
  overflow: hidden;
  width: 100%;
}

.driver-card {
  background: #f8fafc;
  border: 1px solid #e5edf4;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 14px;
}

.driver-card span {
  color: #687688;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.driver-card strong {
  overflow-wrap: anywhere;
}

.operator-marker {
  align-items: center;
  background: #116071;
  border: 4px solid white;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgb(15 23 42 / 30%);
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.operator-marker div {
  background: #7dd3fc;
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.checkpoint-marker {
  align-items: center;
  background: white;
  border: 2px solid #116071;
  border-radius: 999px;
  color: #116071;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  color: #394557;
  display: grid;
  font-weight: 800;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd9e4;
  border-radius: 7px;
  color: #172033;
  font: inherit;
  font-weight: 500;
  min-height: 48px;
  padding: 12px 14px;
}

textarea {
  resize: vertical;
}

button,
.button {
  align-items: center;
  background: #116071;
  border: 0;
  border-radius: 7px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  text-decoration: none;
}

button.secondary,
.button.secondary {
  background: white;
  border: 1px solid #b7c8d5;
  color: #116071;
}

.split {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.detail-list,
.detail-grid {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-grid {
  grid-template-columns: 180px 1fr;
}

.detail-list dt,
.detail-grid dt {
  color: #687688;
  font-weight: 900;
}

.detail-list dd,
.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.json-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 16px;
}

.json-grid div {
  background: #f8fafc;
  border: 1px solid #e5edf4;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.json-grid span {
  color: #687688;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.json-grid strong {
  overflow-wrap: anywhere;
}

.json-pre {
  background: #0f172a;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.5;
  overflow: auto;
  padding: 16px;
}

.wrap {
  overflow-wrap: anywhere;
}

.media-preview-cell {
  min-width: 180px;
}

.media-thumb,
.media-video {
  background: #f8fafc;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  display: block;
  margin-bottom: 8px;
  max-height: 140px;
  max-width: 180px;
}

.notice {
  background: #e1f5ff;
  border: 1px solid #9bd7ee;
  border-radius: 8px;
  color: #075985;
  font-weight: 800;
  margin-bottom: 20px;
  padding: 14px 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e5edf4;
  padding: 13px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #536276;
  font-size: 14px;
  text-transform: uppercase;
}

.empty {
  color: #687688;
  text-align: center;
}

@media (max-width: 860px) {
  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs {
    overflow-x: auto;
  }

  .grid.two,
  .tracking-shell,
  .metrics,
  .detail-grid,
  .split,
  .filters {
    grid-template-columns: 1fr;
  }
}
