:root {
  --bg: #edf2f5;
  --ink: #101828;
  --muted: #667085;
  --panel: #ffffff;
  --line: #d0d5dd;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --blue: #2563eb;
  --yellow: #f59e0b;
  --red: #dc2626;
  --shadow: 0 18px 44px rgba(16, 24, 40, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.header,
.nav,
.panel,
.brand,
.panel-title,
.driver-actions,
.list-item,
.services div {
  border-radius: 8px;
}

.header {
  min-height: 74px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0b1220;
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--brand);
  font-weight: 800;
  font-size: 20px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #cbd5e1;
}

.nav {
  margin: 16px 0;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
}

.nav-item {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.nav-item.active {
  color: #fff;
  background: var(--brand);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
}

.admin-layout {
  margin-top: 16px;
}

.panel {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  letter-spacing: 0;
  margin-bottom: 20px;
}

h2 {
  font-size: 21px;
}

.kicker {
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

input,
select {
  min-height: 46px;
  width: 100%;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.primary,
.secondary {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
}

.primary {
  color: #fff;
  background: var(--brand);
}

.secondary {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
}

.secondary.light {
  color: var(--brand-dark);
  background: #ecfdf3;
  border-color: #99f6e4;
}

.quote,
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quote {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quote div,
.stats article {
  padding: 14px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f8fafc;
}

small {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.quote strong,
.stats strong {
  font-size: 22px;
}

.route-card,
.directions article {
  padding: 14px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f8fafc;
}

.route-card strong,
.route-card span,
.directions strong {
  display: block;
}

.route-card span {
  color: var(--muted);
  margin-top: 6px;
  font-size: 13px;
}

.map-credit {
  color: var(--muted);
  font-size: 12px;
}

.search-results {
  display: grid;
  gap: 8px;
}

.result-option {
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  cursor: pointer;
}

.result-option:hover {
  border-color: var(--brand);
  background: #f0fdfa;
}

.result-option strong,
.result-option span {
  display: block;
}

.result-option span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #075985;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.neutral {
  color: #475467;
  background: #f2f4f7;
}

.map {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid #bdd7d3;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 48%, #c7d2fe 48% 53%, transparent 53%),
    linear-gradient(0deg, transparent 35%, #bae6fd 35% 42%, transparent 42%),
    linear-gradient(135deg, #d1fae5 0 42%, #f8fafc 42% 58%, #dbeafe 58%);
}

.route-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.route-path {
  fill: none;
  stroke: var(--brand);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 9 8;
}

.traffic-heavy {
  stroke: var(--red);
}

.traffic-medium {
  stroke: var(--yellow);
}

.pin {
  position: absolute;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  color: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.24);
  font-weight: 800;
}

.pin.from {
  background: var(--brand);
}

.pin.to {
  background: var(--red);
}

.pin.driver {
  background: var(--blue);
}

.pin.assigned {
  background: var(--yellow);
}

.pin.client {
  background: #7c3aed;
}

.place-label {
  position: absolute;
  transform: translate(-50%, 22px);
  padding: 4px 7px;
  color: #344054;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-panel {
  margin-top: 16px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.step {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.step.done {
  border-color: var(--brand);
  background: #ecfdf3;
}

.step strong,
.step small {
  display: block;
}

.directions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.driver-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.list,
.services {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.list-item,
.services div {
  padding: 12px;
  border: 1px solid #e4e7ec;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.list-item p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.services strong {
  color: var(--brand-dark);
}

.admin-form {
  margin-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e4e7ec;
}

.admin-form + .list {
  margin-top: 14px;
}

.admin-subtitle {
  margin-top: 18px;
}

.approve-button {
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.empty-note {
  color: var(--muted);
  font-size: 13px;
}

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 860px) {
  .layout,
  .stats,
  .directions {
    grid-template-columns: 1fr;
  }

  .map {
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 18px, 1180px);
  }

  .header,
  .panel-title,
  .driver-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .quote {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 26px;
  }
}
