:root {
  color-scheme: light;
  --bg: #eef3f6;
  --surface: #ffffff;
  --surface-soft: #f6f8fa;
  --ink: #17202a;
  --muted: #6a7582;
  --line: #dce3e8;
  --brand: #0a7f6a;
  --brand-dark: #046251;
  --brand-soft: #e7f5f1;
  --blue: #276ef1;
  --blue-soft: #e8f0ff;
  --orange: #f08a24;
  --orange-soft: #fff2e5;
  --green: #129663;
  --green-soft: #e7f8ef;
  --danger: #d94b4b;
  --shadow: 0 18px 50px rgba(20, 36, 50, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(10, 127, 106, 0.14), transparent 34%),
    linear-gradient(315deg, rgba(39, 110, 241, 0.1), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(360px, 1fr);
  min-height: 100vh;
  gap: 24px;
  padding: 32px;
}

.prototype-nav {
  align-self: start;
  position: sticky;
  top: 32px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(220, 227, 232, 0.8);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.brand-title,
.brand-subtitle,
.eyebrow,
.label,
.muted,
.center-copy,
.page h1,
.page h2,
.page p {
  margin: 0;
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 8px;
  padding-top: 16px;
}

.nav-list a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav-list a.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.phone-stage {
  display: grid;
  place-items: start center;
}

.phone-frame {
  position: relative;
  width: min(430px, 100%);
  min-height: 860px;
  overflow: hidden;
  border: 10px solid #111820;
  border-radius: 36px;
  background: #f6f8fa;
  box-shadow: 0 26px 60px rgba(10, 24, 38, 0.26);
}

.customer-service {
  position: absolute;
  right: 14px;
  bottom: 92px;
  z-index: 30;
  display: block;
  width: 58px;
  height: 58px;
  padding: 4px;
  border: 1px solid rgba(220, 227, 232, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-dark);
  box-shadow: 0 10px 28px rgba(20, 36, 50, 0.18);
  backdrop-filter: blur(12px);
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.customer-service.dragging {
  cursor: grabbing;
  opacity: 0.92;
}

.customer-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  pointer-events: none;
}

.customer-call-badge {
  position: absolute;
  right: -4px;
  bottom: -3px;
  min-width: 30px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  line-height: 14px;
  font-weight: 850;
  text-align: center;
  pointer-events: none;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 34px;
  padding: 0 22px;
  background: #f9fbfc;
  color: #111820;
  font-size: 12px;
  font-weight: 800;
}

.page-root {
  height: 826px;
  overflow-y: auto;
  background: #f6f8fa;
}

.page-root::-webkit-scrollbar {
  width: 0;
}

.page {
  min-height: 826px;
  padding: 18px 16px 104px;
}

.page-header,
.section-title,
.order-card-head,
.dual-actions,
.bottom-actions,
.pay-line,
.driver-card,
.price-row {
  display: flex;
  align-items: center;
}

.page-header,
.section-title,
.order-card-head,
.price-row {
  justify-content: space-between;
  gap: 12px;
}

.page h1 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.18;
  font-weight: 850;
}

.page h2 {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}

.eyebrow,
.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.pill,
.tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill-blue,
.tag-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.tag-orange {
  background: var(--orange-soft);
  color: #b35b00;
}

.tag-green {
  background: var(--green-soft);
  color: var(--green);
}

.tag-gray {
  background: #edf1f4;
  color: #5d6874;
}

.source-card,
.section,
.order-card,
.quote-panel,
.status-card,
.pay-amount,
.driver-card {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(20, 36, 50, 0.05);
}

.source-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.source-card strong {
  display: block;
  margin: 4px 0;
  font-size: 15px;
}

.sync-status {
  align-self: start;
  min-width: 54px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.sync-status.manual {
  background: var(--blue-soft);
  color: var(--blue);
}

.section,
.quote-panel {
  padding: 14px;
}

.route-box {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  margin-top: 14px;
}

.route-box strong {
  display: block;
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.45;
}

.route-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 999px;
}

.route-start {
  background: var(--brand);
}

.route-end {
  background: var(--orange);
}

.route-line {
  width: 1px;
  height: 20px;
  margin: 2px 0 0 5px;
  background: var(--line);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented button {
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: var(--surface);
  color: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(20, 36, 50, 0.08);
}

.cargo-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.cargo-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.cargo-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.cargo-card-head strong {
  font-size: 14px;
}

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

.metric {
  min-width: 0;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 9px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.synced-photos {
  display: grid;
  grid-template-columns: 52px 52px 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.synced-photo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid #cbd5dc;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10, 127, 106, 0.16), rgba(39, 110, 241, 0.12)),
    #eef3f6;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.synced-photos span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.text-button,
.mini-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand-dark);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.text-button {
  min-height: 30px;
  padding: 0 10px;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
}

.secondary-button,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  font-weight: 850;
  white-space: nowrap;
}

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

.ghost-button,
.secondary-button {
  background: #fff;
  color: var(--brand-dark);
  border-color: var(--line);
}

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

.hidden {
  display: none !important;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.upload-cell {
  display: grid;
  place-items: center;
  min-height: 88px;
  border: 1px dashed #aeb9c2;
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
}

.upload-cell span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 20px;
  line-height: 1;
}

.upload-cell p {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.address-group {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.address-picker select {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.contact-row .field {
  min-width: 0;
  margin-top: 0;
}

.field textarea {
  resize: none;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
  color: var(--ink);
  line-height: 1.45;
}

.input-field input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 0 12px;
  color: var(--ink);
}

.bottom-actions {
  position: sticky;
  bottom: 0;
  z-index: 10;
  justify-content: space-between;
  gap: 10px;
  margin: 20px -16px -104px;
  padding: 12px 16px 18px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.bottom-actions a,
.bottom-actions button {
  flex: 1;
}

.center-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 826px;
  padding: 36px 22px;
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 42px;
  font-weight: 900;
}

.center-copy {
  max-width: 310px;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.status-card {
  width: 100%;
  padding: 16px;
  text-align: left;
}

.status-card strong {
  display: block;
  margin: 6px 0;
  font-size: 18px;
}

.stack-actions {
  display: grid;
  width: 100%;
  gap: 10px;
  margin-top: 18px;
}

.filter-row {
  display: flex;
  gap: 8px;
  margin: 16px -16px 0;
  padding: 0 16px 2px;
  overflow-x: auto;
}

.filter-row::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.filter-row button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 14px;
  font-weight: 800;
}

.filter-row button.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.order-card {
  position: relative;
  padding: 14px;
}

.highlight-card {
  border-color: rgba(240, 138, 36, 0.45);
}

.order-card h2 {
  margin-top: 4px;
  font-size: 16px;
}

.order-card .muted {
  margin-top: 8px;
}

.order-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--brand-dark);
  font-weight: 850;
}

.progress-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 14px;
}

.progress-line span {
  height: 5px;
  border-radius: 999px;
  background: var(--line);
}

.progress-line .done {
  background: var(--green);
}

.progress-line .current {
  background: var(--blue);
}

.detail-top {
  margin: -18px -16px 0;
  padding: 18px 16px 22px;
  background:
    linear-gradient(135deg, rgba(10, 127, 106, 0.95), rgba(4, 98, 81, 0.96)),
    var(--brand);
  color: #fff;
}

.detail-top .tag {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.detail-top h1 {
  margin-top: 12px;
}

.detail-top p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.back-link {
  display: inline-flex;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 800;
}

.pending-top {
  background:
    linear-gradient(135deg, rgba(93, 104, 116, 0.96), rgba(28, 42, 54, 0.96)),
    #2f3b47;
}

.completed-top {
  background:
    linear-gradient(135deg, rgba(18, 150, 99, 0.96), rgba(4, 98, 81, 0.96)),
    var(--green);
}

.quote-panel {
  border-color: rgba(240, 138, 36, 0.45);
}

.pending-quote {
  border-color: rgba(93, 104, 116, 0.24);
}

.completed-panel {
  border-color: rgba(18, 150, 99, 0.36);
}

.price-row {
  align-items: baseline;
  margin-top: 8px;
}

.price-row strong {
  color: #b35b00;
  font-size: 32px;
  line-height: 1;
}

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

.quote-panel .muted {
  margin-top: 10px;
}

.waiting-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  margin-top: 10px;
  align-items: center;
}

.waiting-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #edf1f4;
  color: #5d6874;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.waiting-row strong {
  display: block;
  font-size: 16px;
}

.dual-actions {
  gap: 10px;
  margin-top: 14px;
}

.dual-actions > * {
  flex: 1;
}

.timeline {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  color: var(--muted);
}

.timeline-item > span {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--line);
  box-shadow: 0 0 0 4px #f6f8fa;
}

.timeline-item strong {
  color: var(--ink);
  font-size: 14px;
}

.timeline-item p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
}

.timeline-item.done > span {
  background: var(--green);
}

.timeline-item.current > span {
  background: var(--blue);
}

.driver-record {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.driver-record strong {
  font-size: 14px;
}

.driver-record p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.driver-record > span {
  flex: 0 0 auto;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 850;
}

.driver-record.pending > span {
  color: var(--muted);
}

.info-list h2 {
  margin-bottom: 8px;
}

.info-list dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list dl div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
}

.info-list dt,
.info-list dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.info-list dt {
  color: var(--muted);
  font-weight: 700;
}

.info-list dd {
  font-weight: 700;
}

.cashier-page {
  background: #f3f6f9;
}

.cashier-header {
  margin: -18px -16px 0;
  padding: 24px 16px 80px;
  background: #1b2430;
  color: #fff;
}

.cashier-header .eyebrow,
.cashier-header p {
  color: rgba(255, 255, 255, 0.72);
}

.pay-amount {
  margin-top: -56px;
  padding: 20px 16px;
}

.pay-amount span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pay-amount strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.pay-line {
  justify-content: space-between;
  min-height: 36px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.pay-line:last-child {
  border-bottom: 0;
}

.pay-line span {
  color: var(--muted);
  font-weight: 700;
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  font-weight: 800;
}

.pay-method.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.driver-top {
  background:
    linear-gradient(135deg, rgba(39, 110, 241, 0.96), rgba(10, 127, 106, 0.92)),
    var(--blue);
}

.driver-card {
  gap: 12px;
  padding: 14px;
}

.driver-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 20px;
  font-weight: 900;
}

.driver-card strong {
  display: block;
  margin: 4px 0;
  font-size: 14px;
}

.driver-card .mini-button {
  margin-left: auto;
}

.cargo-summary {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #fbfcfd;
  border: 1px solid var(--line);
}

.cargo-summary strong {
  font-size: 14px;
}

.cargo-summary p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.photo-tile {
  display: grid;
  place-items: center;
  min-height: 78px;
  border: 1px solid #cbd5dc;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10, 127, 106, 0.12), rgba(39, 110, 241, 0.1)),
    #eef3f6;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.confirm-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.confirm-list div,
.bill-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.confirm-list div:last-child,
.bill-summary div:last-child {
  border-bottom: 0;
}

.confirm-list span,
.bill-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.confirm-list strong,
.bill-summary strong {
  text-align: right;
  font-size: 13px;
}

.bill-summary {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.bill-summary strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.alert-section {
  border-color: rgba(240, 138, 36, 0.4);
}

@media (max-width: 820px) {
  body {
    background: #f6f8fa;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .prototype-nav {
    position: static;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 10px 12px;
  }

  .brand-block {
    padding-bottom: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-top: 10px;
  }

  .nav-list::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .nav-list a {
    flex: 0 0 auto;
    min-height: 34px;
    white-space: nowrap;
  }

  .phone-frame {
    width: 100%;
    min-height: calc(100vh - 104px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .page-root {
    height: calc(100vh - 138px);
  }

  .page,
  .center-page {
    min-height: calc(100vh - 138px);
  }
}
