* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #111827;
  background: #f5f7fb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 220px;
  padding: 24px 16px;
  background: #111827;
}

.brand {
  margin-bottom: 28px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.nav {
  display: block;
  width: 100%;
  height: 44px;
  margin-bottom: 10px;
  color: #cbd5e1;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  text-align: left;
  padding: 0 14px;
  cursor: pointer;
}

.nav.active,
.nav:hover {
  color: #fff;
  background: #0f766e;
}

.main {
  margin-left: 220px;
  padding: 28px;
}

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

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

.build {
  color: #667085;
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: 28px;
}

p {
  margin: 8px 0 0;
  color: #667085;
}

button {
  height: 36px;
  padding: 0 14px;
  color: #fff;
  background: #0f766e;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  color: #0f766e;
  background: #e6f5f3;
}

button.danger {
  color: #b42318;
  background: #fff1f0;
}

input,
select {
  height: 36px;
  padding: 0 12px;
  color: #111827;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  outline: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.metric,
.panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.05);
}

.metric {
  padding: 20px;
}

.metric span {
  display: block;
  color: #667085;
  margin-bottom: 10px;
}

.metric strong {
  font-size: 30px;
}

.panel {
  padding: 20px;
}

.panel-title {
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 900;
}

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

.panel-head .panel-title {
  margin-bottom: 0;
}

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

.toolbar input {
  width: 260px;
}

.toolbar button {
  white-space: nowrap;
}

.item {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid #eef2f7;
}

.order-item {
  grid-template-columns: minmax(240px, 1.5fr) minmax(160px, 0.8fr) minmax(330px, auto);
}

.item:first-child {
  border-top: 0;
}

.title {
  font-weight: 800;
}

.muted {
  margin-top: 6px;
  color: #667085;
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  color: #0f766e;
  background: #e6f5f3;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.status-matching {
  color: #b42318;
  background: #fff1f0;
}

.status-accepted,
.status-arrived {
  color: #b54708;
  background: #fff7e6;
}

.status-driving {
  color: #175cd3;
  background: #eff8ff;
}

.status-completed {
  color: #0f766e;
  background: #e6f5f3;
}

.status-canceled {
  color: #667085;
  background: #f2f4f7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.flags span {
  padding: 3px 8px;
  color: #344054;
  background: #f2f4f7;
  border-radius: 6px;
  font-size: 12px;
}

.detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.detail div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.detail span {
  color: #667085;
}

.detail strong {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.settings-grid label {
  display: grid;
  gap: 8px;
  color: #667085;
  font-size: 13px;
}

.settings-grid input,
.settings-grid select {
  width: 100%;
}

.second-panel {
  margin-top: 18px;
}

.empty {
  padding: 28px;
  color: #667085;
  text-align: center;
}

.bill {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid #eef2f7;
}

@media (max-width: 860px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .main {
    margin-left: 0;
    padding: 18px;
  }

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

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

  .panel-head,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar input {
    width: 100%;
  }

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

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