.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  min-height: 38px;
  padding: 9px 13px;
}

.button-primary {
  background: var(--green-dark);
  color: white;
}

.button-secondary {
  background: #e5f0e9;
  border-color: #bdd3c7;
  color: var(--green-dark);
}

.button-ghost {
  background: rgba(255, 253, 247, 0.78);
  border-color: var(--line);
  color: var(--ink);
}

.button-danger {
  background: #f5dada;
  border-color: #e1a7a7;
  color: var(--red);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.flow-action {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(217, 255, 103, 0.32), rgba(47, 107, 82, 0.1)),
    #fffdf7;
  border: 1px solid #c6dccd;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 18px;
}

.flow-action span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.flow-action strong {
  display: block;
  font-size: 18px;
}

.flow-action p {
  color: #4f625b;
  margin: 5px 0 0;
}

.flow-action-button {
  font-size: 16px;
  min-height: 46px;
  padding: 12px 18px;
}

.step-button {
  background: rgba(255, 250, 240, 0.06);
  border: 1px solid rgba(255, 250, 240, 0.14);
  border-radius: 6px;
  color: rgba(255, 250, 240, 0.74);
  display: grid;
  gap: 3px;
  padding: 12px;
  text-align: left;
}

.step-button strong {
  color: inherit;
}

.step-button span {
  font-size: 12px;
}

.step-button.active {
  background: #d9ff67;
  border-color: #d9ff67;
  color: #132820;
}

.step-button.done {
  border-color: rgba(217, 255, 103, 0.55);
  color: #fffaf0;
}

.step-button.active.done {
  background: #d9ff67;
  border-color: #d9ff67;
  color: #132820;
}

.step-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.status-card,
.metric-card {
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
}

.status-card span,
.metric-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}

.status-card strong,
.metric-card strong {
  display: block;
  font-size: 18px;
}

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

.section-head h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
}

.data-table {
  background: white;
  font-size: 13px;
  min-width: 1050px;
}

.data-table th {
  background: #eaf0ea;
  border-bottom: 1px solid var(--line);
  color: #33443e;
  font-size: 12px;
  padding: 10px;
  position: sticky;
  text-align: left;
  top: 0;
  white-space: nowrap;
  z-index: 1;
}

.data-table td {
  border-bottom: 1px solid #eef2ee;
  padding: 10px;
}

.data-table td[contenteditable="true"] {
  background: #fffaf0;
  outline-color: var(--green);
}

.data-table tr:hover td {
  background: #f8fbf8;
}

.tag {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  white-space: nowrap;
}

.tag-green {
  background: #dcefe5;
  color: var(--green-dark);
}

.tag-amber {
  background: #f7e4bf;
  color: #744a08;
}

.tag-red {
  background: #f5dada;
  color: var(--red);
}

.tag-small {
  font-size: 11px;
  margin-left: 6px;
  padding: 2px 7px;
  vertical-align: 1px;
}

.upload-zone {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(47, 107, 82, 0.08), rgba(21, 95, 122, 0.08)),
    var(--panel);
  border: 2px dashed #afc7b9;
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 28px;
  text-align: center;
}

.upload-zone input {
  max-width: 280px;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.file-pill {
  background: #edf5f0;
  border: 1px solid #cde0d5;
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 13px;
  padding: 6px 10px;
}

.car-grid,
.driver-grid {
  display: grid;
  gap: 12px;
}

.car-card,
.driver-card,
.route-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.car-card h3,
.driver-card h3,
.route-card h3 {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.car-card-head {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  margin-bottom: 18px;
}

.car-card-head h3 {
  font-size: 22px;
  margin-bottom: 0;
}

.car-card-head > span {
  display: none;
}

.detail-button {
  font-size: 16px;
  min-height: 44px;
  padding: 10px 18px;
}

.address-row,
.driver-row {
  align-items: center;
  border-top: 1px solid #eef2ee;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 120px;
  padding: 10px 0;
}

.address-row strong,
.driver-row strong {
  display: block;
}

.address-row span,
.driver-row span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.address-row .tag {
  display: inline-flex;
  margin-top: 0;
}

.remark-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.address-row .remark-list span {
  background: #f7faf7;
  border-left: 3px solid #bdd3c7;
  border-radius: 4px;
  color: #4f625b;
  display: block;
  padding: 5px 8px;
}

.select {
  background: white;
  border: 1px solid #cfdad4;
  border-radius: 6px;
  min-height: 36px;
  padding: 7px 9px;
  width: 100%;
}

.driver-map-grid {
  display: grid;
  gap: 12px;
}

.driver-map-card {
  background: #fbfcf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.driver-map-card h3 {
  align-items: center;
  display: flex;
  font-size: 15px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.driver-map-card h3 span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.map-panel {
  background:
    radial-gradient(circle at 20% 20%, rgba(217, 255, 103, 0.22), transparent 28%),
    radial-gradient(circle at 80% 25%, rgba(21, 95, 122, 0.13), transparent 24%),
    #eef3ed;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 220px;
  overflow: hidden;
  position: relative;
}

.map-panel svg {
  display: block;
  height: 220px;
  width: 100%;
}

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

.route-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.route-tab {
  background: #f6faf7;
  border: 1px solid #cfdad4;
  border-radius: 6px;
  color: var(--ink);
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 10px;
  text-align: left;
}

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

.route-tab span {
  color: var(--muted);
  font-size: 12px;
}

.route-tab.active {
  background: #d9ff67;
  border-color: #9fcf44;
}

.route-tab.active span {
  color: #274034;
}

.route-card.active {
  border-color: #8fb8a1;
  box-shadow: 0 0 0 2px rgba(47, 107, 82, 0.1);
}

.route-view-button {
  min-height: 32px;
  padding: 6px 10px;
}

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

.route-stop {
  border-left: 4px solid var(--green);
  padding-left: 10px;
}

.route-stop-head {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 120px;
}

.route-order-select {
  min-height: 32px;
  padding: 5px 8px;
}

.route-export-button {
  margin-top: 12px;
  width: 100%;
}

.route-stop .remark-list {
  margin-top: 8px;
}

.route-stop .remark-list span {
  background: #f7faf7;
  border-left: 3px solid #bdd3c7;
  border-radius: 4px;
  color: #4f625b;
  display: block;
  font-size: 12px;
  padding: 5px 8px;
}

.empty-state {
  align-items: center;
  border: 1px dashed #b6c7be;
  border-radius: var(--radius);
  color: var(--muted);
  display: grid;
  justify-items: center;
  min-height: 150px;
  padding: 24px;
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  margin-bottom: 4px;
}

@media (max-width: 720px) {
  .flow-action {
    align-items: stretch;
    flex-direction: column;
  }

  .flow-action-button {
    width: 100%;
  }

  .route-tabs {
    grid-template-columns: 1fr;
  }
}
