:root {
  color-scheme: light;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #17231f;
  background: #eef2f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

[hidden] {
  display: none !important;
}

main {
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  background: #f7f9f8;
  padding-bottom: 76px;
}

.hero {
  background: #14362f;
  color: #fff;
  padding: 24px 20px 26px;
}

.brand-row {
  align-items: baseline;
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.brand-row strong {
  font-size: 22px;
}

.brand-row span {
  color: #cce4dd;
  font-size: 13px;
}

h1 {
  font-size: 30px;
  line-height: 1.18;
  margin: 0 0 10px;
}

p {
  color: #dcebe7;
  line-height: 1.7;
  margin: 0;
}

.workspace {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.app-tabs {
  background: #ffffff;
  border: 1px solid #dde5e1;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 4px;
  position: sticky;
  top: 0;
  z-index: 3;
}

.app-tab {
  background: transparent;
  border-radius: 6px;
  color: #41514b;
  font-size: 13px;
  min-height: 36px;
  padding: 7px 6px;
}

.app-tab.active {
  background: #286653;
  color: #fff;
}

.bottom-tabs {
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #dde5e1;
  bottom: 0;
  box-shadow: 0 -10px 24px rgba(20, 54, 47, 0.08);
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  left: 50%;
  max-width: 720px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  position: fixed;
  transform: translateX(-50%);
  width: 100%;
  z-index: 10;
}

.bottom-tab {
  background: transparent;
  border-radius: 8px;
  color: #5f6f69;
  font-size: 12px;
  min-height: 42px;
  padding: 6px 4px;
}

.bottom-tab.active {
  background: #edf5f2;
  color: #286653;
}

.auth-strip {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dde5e1;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

#customerState {
  color: #41514b;
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  background: #fff;
  border: 1px solid #dde5e1;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

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

.order-tools {
  display: flex;
  gap: 8px;
}

h2 {
  font-size: 18px;
  margin: 0;
}

#apiState,
#supportState,
#stationState,
.tag {
  background: #edf5f2;
  border-radius: 999px;
  color: #286653;
  font-size: 12px;
  padding: 5px 9px;
  white-space: nowrap;
}

#supportState.success {
  background: #e8f6ee;
  color: #17613b;
}

#supportState.error-text {
  background: #fff1f1;
  color: #b42318;
}

label {
  color: #41514b;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

input,
select,
textarea {
  border: 1px solid #cfd8d4;
  border-radius: 8px;
  color: #17231f;
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  min-height: 74px;
  resize: vertical;
}

input:disabled,
select:disabled {
  background: #f0f4f2;
  color: #7a8782;
}

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

.check-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.check-row input {
  min-height: 18px;
  width: 18px;
}

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

.service-detail {
  background: #f7f9f8;
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.service-detail[hidden] {
  display: none;
}

.service-detail-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.service-detail-head strong {
  font-size: 14px;
}

.assist-state {
  color: #708079;
  font-size: 12px;
  line-height: 1.5;
}

.assist-state.success {
  color: #286653;
}

.assist-state.error-text {
  color: #9b341d;
}

.route-detail {
  background: #f5f7f6;
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  color: #5f6f69;
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 12px;
}

.quote-box {
  align-items: center;
  background: #fff7e8;
  border: 1px solid #f1d19a;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 12px;
}

.quote-box span {
  color: #73521c;
  font-size: 13px;
  font-weight: 700;
}

.quote-box strong {
  color: #b54322;
  font-size: 24px;
}

.fee-breakdown {
  background: #f7f9f8;
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  color: #5f6f69;
  display: grid;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  line-height: 1.45;
  padding: 10px 12px;
}

.fee-breakdown div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.fee-breakdown strong {
  color: #17231f;
  white-space: nowrap;
}

.fee-breakdown.compact {
  grid-template-columns: 1fr 1fr;
}

button {
  background: #d94f2b;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 12px;
}

button:disabled {
  background: #b9c4bf;
  cursor: not-allowed;
}

.ghost {
  background: #edf5f2;
  color: #286653;
  font-size: 13px;
  min-height: 34px;
  padding: 7px 10px;
}

.dev-only {
  background: #fff7e8;
  color: #8a4b12;
}

.orders {
  display: grid;
  gap: 10px;
}

.order-status-tabs {
  background: #f2f6f4;
  border: 1px solid #dde5e1;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 4px;
}

.order-status-tab {
  background: transparent;
  border-radius: 6px;
  color: #41514b;
  font-size: 13px;
  min-height: 34px;
  padding: 7px 6px;
}

.order-status-tab.active {
  background: #286653;
  color: #fff;
}

.order-status-tab strong {
  font-size: 12px;
  margin-left: 2px;
}

.empty {
  color: #708079;
  font-size: 14px;
}

.empty-card {
  background: #f7f9f8;
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.empty-card strong {
  color: #17231f;
  font-size: 16px;
}

.empty-card span {
  color: #708079;
  font-size: 13px;
  line-height: 1.6;
}

.loading,
.error {
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  color: #708079;
  font-size: 14px;
  line-height: 1.6;
  padding: 12px;
}

.error {
  background: #fff3ef;
  border-color: #f0c5b6;
  color: #9b341d;
}

.order-card {
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.order-head,
.order-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.order-head {
  align-items: flex-start;
}

.order-head > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-head > div:first-child span {
  color: #708079;
  font-size: 12px;
}

.order-actions button {
  flex: 1;
}

.sign-form {
  background: #f7f9f8;
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.upload-inline {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.upload-inline input[type="file"] {
  background: #fff;
  font-size: 12px;
  min-height: 36px;
  padding: 7px 8px;
}

.upload-inline .upload-state {
  color: #708079;
  font-size: 12px;
  grid-column: 1 / -1;
  line-height: 1.5;
  min-height: 18px;
  overflow-wrap: anywhere;
}

.order-head strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.status-badge {
  align-items: center;
  background: #edf5f2;
  border-radius: 999px;
  color: #286653;
  display: inline-flex;
  flex-shrink: 0;
  gap: 6px;
  padding: 6px 9px;
}

.status-badge span:first-child {
  align-items: center;
  background: #286653;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.status-badge span:last-child {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.order-meta {
  color: #5f6f69;
  display: grid;
  font-size: 13px;
  gap: 4px;
  line-height: 1.5;
}

.order-amount-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.order-amount-row span {
  color: #708079;
  font-size: 13px;
}

.order-amount-row strong {
  color: #b54322;
  font-size: 22px;
}

.inline-timeline {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.inline-timeline li {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: 18px 1fr auto;
  padding-bottom: 9px;
  position: relative;
}

.inline-timeline li::before {
  background: #dce5e1;
  content: "";
  height: 100%;
  left: 8px;
  position: absolute;
  top: 15px;
  width: 2px;
}

.inline-timeline li:last-child {
  padding-bottom: 0;
}

.inline-timeline li:last-child::before {
  display: none;
}

.inline-timeline strong {
  color: #17231f;
  font-size: 13px;
}

.inline-timeline span:last-child,
.order-progress-hint {
  color: #708079;
  font-size: 12px;
  line-height: 1.5;
}

.inline-timeline-dot {
  background: #286653;
  border-radius: 999px;
  height: 14px;
  margin-top: 3px;
  width: 14px;
  z-index: 1;
}

.order-detail {
  border-top: 1px solid #eef2f0;
  padding-top: 4px;
}

.order-detail summary {
  color: #286653;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-height: 30px;
  padding: 6px 0;
}

.detail-section {
  display: grid;
  gap: 8px;
  padding: 8px 0;
}

.detail-section > strong {
  font-size: 13px;
}

.detail-section p {
  color: #5f6f69;
  font-size: 13px;
}

.station-panel {
  border-color: #cfded7;
}

.inline-form {
  display: grid;
  gap: 10px;
}

.demo-hint {
  background: #f7fbf9;
  border: 1px dashed #b8cbc4;
  border-radius: 8px;
  color: #4d625b;
  font-size: 12px;
  line-height: 1.6;
  padding: 9px 10px;
}

.compact-title h2 {
  font-size: 15px;
}

.wallet-summary {
  background: #edf5f2;
  border: 1px solid #d3e4dd;
  border-radius: 8px;
  color: #286653;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  padding: 10px 12px;
}

.wallet-accounts,
.withdraw-form,
.withdraw-list,
.station-task-workspace,
.station-tasks {
  display: grid;
  gap: 10px;
}

.task-summary {
  background: #edf5f2;
  border: 1px solid #d3e4dd;
  border-radius: 8px;
  color: #286653;
  display: grid;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 10px 12px;
}

.task-summary strong {
  display: block;
  font-size: 18px;
  margin-top: 2px;
}

.task-filters {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr 1.5fr auto;
}

.station-task-card {
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.station-task-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.station-task-form {
  background: #f7f9f8;
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  padding: 8px 10px;
}

.station-task-form summary {
  color: #286653;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-height: 28px;
  padding: 4px 0;
}

.station-task-form[open] {
  display: grid;
  gap: 10px;
}

.error-text {
  color: #9b341d;
}

.wallet-card {
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.wallet-card strong {
  display: block;
  font-size: 14px;
}

.wallet-card span {
  color: #708079;
  font-size: 12px;
}

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

.mini-table {
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  display: grid;
  overflow: hidden;
}

.mini-table div {
  align-items: center;
  border-bottom: 1px solid #eef2f0;
  display: grid;
  gap: 8px;
  grid-template-columns: 1.3fr 0.9fr auto;
  min-width: 0;
  padding: 9px 10px;
}

.mini-table div:last-child {
  border-bottom: 0;
}

.mini-table span,
.mini-table strong {
  font-size: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mini-table span {
  color: #708079;
}

.timeline {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  background: #f7f9f8;
  border: 1px solid #e1e7e4;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
}

.timeline span {
  color: #708079;
  font-size: 12px;
}

.waybill {
  background: #fff;
  border: 1px dashed #9aa9a3;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
}

.waybill-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.waybill-head span {
  color: #708079;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.qr-box {
  align-items: center;
  aspect-ratio: 1;
  background:
    linear-gradient(90deg, #17231f 10px, transparent 10px) 0 0 / 22px 22px,
    linear-gradient(#17231f 10px, transparent 10px) 0 0 / 22px 22px,
    #fff;
  border: 8px solid #fff;
  box-shadow: inset 0 0 0 1px #d5ddd9;
  display: grid;
  font-size: 24px;
  font-weight: 800;
  justify-items: center;
  letter-spacing: 0;
  margin: 0 auto;
  max-width: 170px;
  width: 55%;
}

.waybill-grid {
  display: grid;
  gap: 7px 10px;
  grid-template-columns: 64px 1fr;
}

.waybill-grid span {
  color: #708079;
  font-size: 12px;
}

.waybill-grid strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.print-button {
  justify-self: stretch;
}

@media (max-width: 420px) {
  .grid-2,
  .option-grid,
  .fee-breakdown,
  .fee-breakdown.compact {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 20px 16px 22px;
  }

  .workspace {
    padding: 10px;
  }

  .app-tabs {
    top: 0;
  }

  .app-tab,
  .bottom-tab {
    font-size: 12px;
  }

  .panel {
    padding: 14px;
  }

  .order-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .order-tools {
    display: grid;
  }

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

  .wallet-amounts,
  .mini-table div,
  .task-summary,
  .task-filters,
  .upload-inline,
  .station-task-actions {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #fff;
  }

  .hero,
  .app-tabs,
  .bottom-tabs,
  form,
  .section-title,
  .order-actions,
  .detail-section,
  .print-button {
    display: none !important;
  }

  main {
    max-width: none;
  }

  .workspace,
  .panel,
  .orders,
  .order-card {
    border: 0;
    padding: 0;
  }

  .order-card:not(:has(.order-detail[open])) {
    display: none;
  }

  .waybill {
    border: 1px solid #222;
  }
}
