:root {
  color-scheme: light;
  --bg: #eef2f1;
  --surface: #ffffff;
  --surface-soft: #f7f9f7;
  --ink: #111816;
  --muted: #5e6965;
  --line: #d9dfdc;
  --brand: #0b7a5b;
  --brand-strong: #074d3c;
  --blue: #2f6fb2;
  --amber: #b4770a;
  --red: #b23a3a;
  --violet: #6650a4;
  --shadow: 0 12px 34px rgba(17, 24, 22, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.admin-app {
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #121917;
  color: #eef6f2;
}

.brand-block {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}

.brand-block strong,
.brand-block span {
  display: block;
}

.brand-block span {
  color: #aebbb6;
  font-size: 13px;
}

.brand-mark,
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 500;
}

.brand-mark {
  width: 42px;
  height: 42px;
  background: var(--brand);
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cdd8d3;
  text-align: left;
}

.side-item span {
  width: 22px;
  color: #8fa09a;
  text-align: center;
}

.side-item.active,
.side-item:hover {
  background: #21302b;
  color: #fff;
}

.operator-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid #2d3d38;
  border-radius: 8px;
  background: #18221f;
}

.operator-card span,
.operator-card p {
  color: #aebbb6;
  font-size: 12px;
}

.operator-card strong {
  display: block;
  margin: 4px 0 6px;
}

.operator-card p {
  margin: 0;
  line-height: 1.45;
}

.workspace {
  min-width: 0;
  padding: 20px;
}

.workspace-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 36vw);
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.solid-button,
.outline-button,
.small-button,
.text-button,
.filter-tabs button,
.segmented button {
  min-height: 38px;
  border-radius: 8px;
  font-weight: 500;
}

.solid-button {
  border: 0;
  background: var(--brand);
  color: #fff;
  padding: 0 14px;
}

.outline-button,
.small-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--brand-strong);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric-row.compact {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 14px;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin: 6px 0 3px;
  font-size: 26px;
  line-height: 1.1;
}

.metric-card p {
  margin-bottom: 0;
  font-size: 13px;
}

.metric-card.warning {
  border-color: #e5c47e;
}

.metric-card.danger {
  border-color: #e6b2b2;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(380px, 1.6fr) minmax(280px, 1fr) minmax(260px, 0.9fr);
  gap: 14px;
}

.dashboard-grid.operations-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.panel {
  min-width: 0;
  padding: 14px;
}

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

.live-panel {
  min-height: 430px;
}

.ops-map {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid #cbd5d0;
  border-radius: 8px;
  background:
    linear-gradient(rgba(22, 42, 38, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 42, 38, 0.07) 1px, transparent 1px),
    #e4ebe7;
  background-size: 42px 42px;
}

.dashboard-driver-map {
  height: 430px;
  min-height: 430px;
  background: #e7eeeb;
}

.dashboard-driver-map > div:first-child:not(.map-loading) {
  min-height: 430px;
}

.ops-map.large {
  min-height: 610px;
}

.map-road,
.map-river {
  position: absolute;
  pointer-events: none;
}

.map-road {
  height: 32px;
  width: 120%;
  background: rgba(255, 255, 255, 0.8);
}

.road-a {
  left: -10%;
  top: 44%;
  transform: rotate(18deg);
}

.road-b {
  left: -20%;
  top: 60%;
  transform: rotate(-26deg);
}

.map-river {
  left: 36%;
  top: -10%;
  width: 92px;
  height: 125%;
  transform: rotate(13deg);
  border-radius: 70px;
  background: rgba(47, 111, 178, 0.18);
}

.map-zone {
  position: absolute;
  min-height: 34px;
  border: 0;
  border-radius: 18px;
  background: #fff5d8;
  color: #6d4e09;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(17, 24, 22, 0.12);
}

.zone-one {
  left: 43%;
  top: 32%;
}

.zone-two {
  right: 14%;
  top: 43%;
}

.zone-three {
  right: 8%;
  bottom: 12%;
  background: #e4efff;
  color: #164a83;
}

.car-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(17, 24, 22, 0.08);
}

.car-dot.idle {
  background: var(--brand);
}

.car-dot.busy {
  background: var(--red);
}

.car-dot.pickup {
  background: var(--amber);
}

.car-a {
  left: 35%;
  top: 56%;
}

.car-b {
  right: 30%;
  top: 35%;
}

.car-c {
  right: 18%;
  bottom: 30%;
}

.car-d {
  left: 18%;
  top: 44%;
}

.stack-list,
.driver-list,
.zone-rule-list {
  display: grid;
  gap: 10px;
}

.job-item,
.review-item,
.driver-row,
.rule-row,
.customer-card,
.queue-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.job-item,
.rule-row {
  padding: 12px;
}

.job-item p,
.rule-row p {
  margin-bottom: 0;
}

.job-item.urgent {
  border-color: #e4bd78;
  background: #fff9eb;
}

.operation-button {
  width: 100%;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.review-item,
.driver-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px;
}

.avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  background: #e4f1ec;
  color: var(--brand-strong);
}

.avatar.blue {
  background: #e7f0fb;
  color: var(--blue);
}

.avatar.red {
  background: #ffe9e9;
  color: var(--red);
}

.review-item {
  justify-content: flex-start;
}

.review-item p,
.driver-row p {
  margin: 2px 0 0;
  font-size: 13px;
}

.driver-row.muted {
  opacity: 0.68;
}

.dispatch-layout {
  display: grid;
  grid-template-columns: minmax(440px, 1.7fr) minmax(260px, 0.8fr) minmax(280px, 0.9fr);
  gap: 14px;
}

.dispatch-map-panel {
  min-height: 690px;
}

.dispatch-map-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-driver-map {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e7eeeb;
}

.live-driver-map > div:first-child:not(.map-loading) {
  min-height: 610px;
}

.map-loading,
.map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.coordinate-map {
  position: absolute;
  inset: 0;
  background-color: #e9efec;
  background-image: linear-gradient(rgba(81, 104, 95, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(81, 104, 95, 0.12) 1px, transparent 1px);
  background-size: 42px 42px;
}

.coordinate-map::after {
  content: "测试坐标视图 · 配置 Google 网页密钥后显示正式地图";
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 11px;
}

.vehicle-map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 34px;
  min-height: 34px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(17, 24, 22, 0.22);
  cursor: pointer;
}

.vehicle-map-marker.offline,
.vehicle-map-marker.stale {
  background: #7b8682;
}

.segmented,
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.segmented button,
.filter-tabs button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 0 10px;
}

.segmented button.active,
.filter-tabs button.active {
  border-color: #b9d8cc;
  background: #e4f1ec;
  color: var(--brand-strong);
}

.queue-row {
  min-height: 46px;
  padding: 0 12px;
  color: var(--ink);
  text-align: left;
}

.queue-row.selected {
  border-color: #b9d8cc;
  background: #e4f1ec;
}

.notice {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #eef4ff;
  color: #1e4b80;
  font-size: 13px;
}

.split-view {
  display: grid;
  grid-template-columns: minmax(420px, 1.25fr) minmax(340px, 0.75fr);
  gap: 14px;
}

.detail-panel {
  align-self: start;
}

.detail-panel .metric-row.compact {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.backend-panel {
  margin-top: 14px;
}

.queue-heading {
  margin: 18px 0 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.backend-refresh {
  margin-bottom: 14px;
}

.application-documents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.document-thumbnail,
.missing-document {
  display: grid;
  gap: 6px;
  color: #24312d;
  font-size: 12px;
  text-decoration: none;
}

.document-thumbnail {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: zoom-in;
}

.document-thumbnail img,
.missing-document {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid #d9dfdb;
  border-radius: 6px;
  background: #f4f6f5;
  object-fit: cover;
}

.document-thumbnail small {
  color: var(--brand-strong);
}

.missing-document {
  place-content: center;
  text-align: center;
}

.panel-header + .queue-heading {
  margin-top: 14px;
}

.driver-card {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  cursor: pointer;
}

.driver-card:hover,
.driver-card:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.driver-card.selected {
  border-color: #b9d8cc;
  background: #edf8f4;
}

.driver-card-action {
  color: var(--brand-strong);
  font-weight: 500;
}

.driver-card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.driver-card-status small {
  color: var(--muted);
}

.doc-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.doc-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.danger-button {
  min-height: 38px;
  border: 1px solid #e0b3b3;
  border-radius: 8px;
  background: #fff0f0;
  color: var(--red);
  font-weight: 500;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.review-complete {
  padding: 10px 12px;
  border-radius: 8px;
  background: #edf8f4;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.review-complete.rejected {
  background: #fff0f0;
  color: var(--red);
}

.admin-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid #b9d8cc;
  border-radius: 8px;
  background: #133e32;
  color: #fff;
  box-shadow: 0 12px 34px rgba(17, 24, 22, 0.22);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.admin-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.warning { background: #8a5b08; }
.admin-toast.error { background: #9b3535; }

.admin-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 22, 0.58);
}

.admin-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(17, 24, 22, 0.3);
}

.admin-dialog > header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.admin-dialog > header h2 {
  margin: 0;
  font-size: 18px;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 24px;
}

.dialog-body {
  padding: 16px;
}

.image-dialog .admin-dialog {
  width: min(960px, 100%);
}

.document-full-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  background: #eef1f0;
}

.image-preview-tip {
  margin: 10px 0 0;
  color: var(--muted);
  text-align: center;
}

.dialog-form {
  display: grid;
  gap: 12px;
}

.wide-dialog .admin-dialog {
  width: min(760px, calc(100vw - 32px));
}

.order-place-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.order-place-field gmp-place-autocomplete {
  width: 100%;
  color: var(--ink);
  font: inherit;
}

.order-map-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.order-map-toolbar .active {
  border-color: var(--brand);
  background: #e4f1ec;
  color: var(--brand-strong);
}

.order-location-map {
  width: 100%;
  height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef1f0;
}

.order-location-map .map-empty {
  display: grid;
  height: 100%;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.order-tracking-section {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.tracking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tracking-heading strong,
.tracking-heading small { display: block; }
.tracking-heading small { margin-top: 4px; color: var(--muted); }

.order-tracking-map {
  width: 100%;
  height: 340px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef1f0;
}

.order-tracking-map .map-empty,
.geofence-preview .map-empty,
.fence-editor .map-empty {
  display: grid;
  height: 100%;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.dialog-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.dialog-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.customer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.customer-card {
  padding: 14px;
}

.customer-card strong {
  display: block;
  margin-top: 10px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 14px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 500;
}

.status-pill.green {
  background: #e4f1ec;
  color: var(--brand-strong);
}

.status-pill.amber {
  background: #fff4dc;
  color: var(--amber);
}

.status-pill.red {
  background: #ffe9e9;
  color: var(--red);
}

.status-pill.gray {
  background: #edf0ee;
  color: #58635f;
}

.rule-form {
  display: grid;
  gap: 12px;
}

.rule-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.rule-form input,
.rule-form select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
}

@media (max-width: 1120px) {
  .admin-app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .operator-card {
    display: none;
  }

  .dashboard-grid,
  .dispatch-layout,
  .split-view,
  .customer-grid,
  .metric-row,
  .metric-row.compact {
    grid-template-columns: 1fr;
  }

  .workspace-top,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .workspace,
  .sidebar {
    padding: 12px;
  }

  .side-nav {
    grid-template-columns: 1fr 1fr;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dispatch-map-panel,
  .live-panel {
    min-height: 0;
  }
}

.metric-link {
  width: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.metric-link:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(11, 122, 91, 0.1);
}

.queue-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.backend-review-panel {
  grid-column: 1 / -1;
}

.application-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.selectable-driver label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  cursor: pointer;
}

.selectable-driver input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.selectable-driver.selected,
.recommended-driver {
  border-color: #b9d8cc;
  background: #edf8f4;
}

.dispatch-confirm {
  width: 100%;
  margin-top: 10px;
}

.full-action {
  grid-column: 1 / -1;
}

.danger-notice {
  background: #fff0f0;
  color: var(--red);
}

.insurance-expiry {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.customer-button {
  min-height: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.customer-button:hover {
  border-color: #b9d8cc;
  background: #f7faf8;
}

.section-search {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.section-search input,
.dialog-form select,
.dialog-form textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
}

.dialog-form textarea {
  min-height: 88px;
  resize: vertical;
}

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

.pricing-box {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #edf8f4;
  color: var(--brand-strong);
}

.pricing-box strong {
  font-size: 22px;
}

.pricing-box small {
  margin-left: auto;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 16px;
  margin: 0;
}

.detail-grid dt {
  color: var(--muted);
}

.detail-grid dd {
  margin: 0;
  color: var(--ink);
}

.security-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.section-panel,
.pricing-config-panel {
  margin-top: 18px;
}

.panel-actions,
.inline-actions,
.editor-heading,
.activity-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-heading,
.activity-card-head {
  justify-content: space-between;
}

.fleet-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
}

.fleet-row.selected {
  border-color: #8fc3b1;
  background: #edf8f4;
}

.fleet-row span:first-child,
.fleet-row small {
  display: block;
}

.fleet-row small,
.member-row small,
.fleet-recruit small {
  margin-top: 4px;
  color: var(--muted);
}

.fleet-recruit {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: center;
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fleet-recruit img {
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.member-list h3,
.list-heading {
  margin: 14px 0 8px;
  font-size: 14px;
}

.member-row,
.transfer-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.transfer-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.danger-text { color: var(--red); }

.order-detail-layout {
  display: grid;
  gap: 18px;
}

.order-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.timeline-item {
  position: relative;
  padding-top: 22px;
  color: var(--muted);
}

.timeline-item::before {
  position: absolute;
  top: 7px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--line);
  content: "";
}

.timeline-item > span {
  position: absolute;
  z-index: 1;
  top: 2px;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid #bcc7c2;
  border-radius: 50%;
  background: #fff;
}

.timeline-item.done > span { border-color: var(--brand); background: var(--brand); }
.timeline-item.done { color: var(--ink); }
.timeline-item strong,
.timeline-item small { display: block; }
.timeline-item small { margin-top: 4px; font-size: 11px; }
.order-detail-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.check-line {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}

.check-line input { width: auto !important; }

.pricing-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.pricing-summary > div {
  min-width: 0;
  padding: 12px;
  background: #fff;
}

.pricing-summary span,
.pricing-summary strong,
.pricing-summary small {
  display: block;
}

.pricing-summary strong { margin: 6px 0; font-size: 17px; }
.pricing-summary small { color: var(--muted); }

.geofence-preview,
.fence-editor {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #f2f5f3;
  background-image: linear-gradient(#dce4e0 1px, transparent 1px), linear-gradient(90deg, #dce4e0 1px, transparent 1px);
  background-size: 34px 34px;
}

.geofence-preview { height: 460px; }

.fence-editor { cursor: crosshair; }
.fence-editor svg,
.preview-fence svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-grid-label { position: absolute; top: 10px; left: 10px; color: var(--muted); font-size: 12px; }
.fence-point { position: absolute; z-index: 2; display: grid; width: 22px; height: 22px; place-items: center; transform: translate(-50%, -50%); border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; }
.preview-fence span { position: absolute; z-index: 2; padding: 4px 6px; transform: translate(-10%, -120%); border-radius: 4px; background: #fff; box-shadow: 0 2px 8px rgba(18, 38, 31, .16); font-size: 11px; }
.wide-dialog .admin-dialog { width: min(760px, calc(100vw - 32px)); }

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

.activity-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.activity-card > strong { display: block; margin-top: 12px; font-size: 16px; }
.activity-card > p,
.activity-card > small { color: var(--muted); }
.activity-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.activity-card dl div { padding: 8px; background: #fff; }
.activity-card dt { color: var(--muted); font-size: 11px; }
.activity-card dd { margin: 4px 0 0; font-weight: 600; }

@media (max-width: 900px) {
  .pricing-summary,
  .activity-grid { grid-template-columns: 1fr 1fr; }
  .order-timeline { grid-template-columns: 1fr; gap: 8px; }
  .timeline-item { padding: 0 0 0 24px; }
  .timeline-item::before { top: 0; left: 5px; width: 2px; height: 100%; }
  .timeline-item > span { top: 1px; left: 0; }
  .fleet-recruit { grid-template-columns: 100px 1fr; }
  .fleet-recruit img { width: 100px; }
}

.rule-row,
.staff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.staff-list {
  display: grid;
  gap: 10px;
}

.staff-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.empty-cell,
.empty-copy {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.logout-button {
  display: block;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  font-size: 12px;
  text-align: left;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #eef1f0;
}

.login-panel {
  width: min(400px, 100%);
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(17, 24, 22, 0.12);
}

.login-panel h1,
.login-panel p {
  margin: 0;
}

.login-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.login-panel input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
}

.login-copy {
  color: var(--muted);
  line-height: 1.6;
}

.login-error {
  min-height: 18px;
  color: var(--red);
  font-size: 13px;
}

@media (max-width: 760px) {
  .application-review-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .pricing-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .pricing-box small {
    margin-left: 0;
  }

  .order-location-map {
    height: 220px;
  }

  .order-map-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .dashboard-driver-map,
  .dashboard-driver-map > div:first-child:not(.map-loading) {
    height: 320px;
    min-height: 320px;
  }
}
