/* ============================================================
   ChenXin Cargo · 客户门户
   藏蓝 #0B1D3A + 哑光金 #C9A84C + 米白 #FAF7F0
   严禁灰色：所有弱化层级用藏蓝透明度实现
   ============================================================ */

[hidden] {
  display: none !important;
}

:root {
  color-scheme: light;

  /* 品牌色 */
  --navy: #0B1D3A;
  --navy-2: #16325C;
  --navy-3: #1F4076;
  --navy-4: #2E568F;
  --gold: #C9A84C;
  --gold-deep: #8A6D1F;
  --gold-soft: #E8D9A8;
  --cream: #FAF7F0;
  --paper: #FFFFFF;

  /* 语义色 */
  --color-background: var(--cream);
  --color-surface: var(--paper);
  --color-primary: var(--navy);
  --color-accent: var(--gold);
  --color-text: var(--navy);
  --color-text-2: rgba(11, 29, 58, 0.72);
  --color-text-3: rgba(11, 29, 58, 0.52);
  --color-text-4: rgba(11, 29, 58, 0.38);
  --color-muted-text: rgba(11, 29, 58, 0.72);
  --color-border: rgba(11, 29, 58, 0.14);
  --color-border-2: rgba(11, 29, 58, 0.08);
  --color-focus: var(--gold);
  --color-ok: #1E6B4F;
  --color-alert: #A8342A;

  /* 字体 */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans", Arial,
    sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans", Arial,
    sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* 字号 */
  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 1rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.625rem;

  /* 间距 */
  --space-unit: 0.25rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  /* 圆角 */
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-full: 999px;

  /* 层级 */
  --z-header: 20;
  --z-tabbar: 30;
  --z-sheet: 40;

  /* 尺寸 */
  --content-width: 30rem;
  --header-h: 3.5rem;
  --tabbar-h: 4.25rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--color-background);
  color: var(--color-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--navy);
  color: var(--paper);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 壳层 ---------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: var(--header-h);
  padding: 0 var(--space-4);
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-2);
}

.app-header__back {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: -0.5rem;
  border: 0;
  background: transparent;
  border-radius: var(--radius-full);
  color: var(--color-text);
  cursor: pointer;
}

.app-header__back svg {
  width: 1.25rem;
  height: 1.25rem;
}

.app-header__title {
  font-size: var(--text-base);
  font-weight: 650;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header__spacer {
  flex: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}

.brand__mark {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand__name {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}

.brand__sub {
  font-size: var(--text-xs);
  color: var(--color-text-3);
  letter-spacing: 0.02em;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--paper);
  cursor: pointer;
  flex: none;
}

.lang-toggle__opt {
  padding: 0.25rem 0.5rem;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--color-text-3);
  cursor: pointer;
  min-height: 1.75rem;
}

.lang-toggle__opt[aria-pressed="true"] {
  background: var(--navy);
  color: var(--paper);
}

.app-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) calc(var(--space-6) + env(safe-area-inset-bottom));
}

body.has-tabbar .app-main {
  padding-bottom: calc(var(--tabbar-h) + var(--space-5) + env(safe-area-inset-bottom));
}

body.has-action .app-main {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

/* ---------- 底部导航 ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-tabbar);
  display: flex;
  max-width: var(--content-width);
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--color-border-2);
}

.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--tabbar-h);
  padding: var(--space-2) 0;
  color: var(--color-text-3);
  font-size: var(--text-xs);
  font-weight: 600;
  position: relative;
}

.tabbar__item svg {
  width: 1.375rem;
  height: 1.375rem;
  stroke-width: 1.7;
}

.tabbar__item[aria-current="page"] {
  color: var(--navy);
}

.tabbar__item[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2rem;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--gold);
}

/* ---------- 排版 ---------- */

.page-head {
  margin-bottom: var(--space-5);
}

.page-head h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.page-head p {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-2);
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-3);
}

.section-title h2 {
  font-size: var(--text-lg);
  font-weight: 650;
  letter-spacing: -0.015em;
}

.section-title span {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-2);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--color-text-2);
}

.tiny {
  font-size: var(--text-sm);
  color: var(--color-text-3);
}

/* ---------- 卡片 ---------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.card + .card {
  margin-top: var(--space-3);
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.card__head h3 {
  font-size: var(--text-base);
  font-weight: 650;
  letter-spacing: -0.01em;
}

/* ---------- 徽标 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge--transit {
  background: rgba(201, 168, 76, 0.16);
  color: var(--gold-deep);
}

.badge--done {
  background: rgba(30, 107, 79, 0.12);
  color: var(--color-ok);
}

.badge--draft {
  background: rgba(11, 29, 58, 0.07);
  color: var(--color-text-2);
}

.badge--alert {
  background: rgba(168, 52, 42, 0.1);
  color: var(--color-alert);
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 3rem;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 650;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.16s ease,
    border-color 0.16s ease;
  text-align: center;
}

.btn:active {
  transform: scale(0.985);
}

.btn svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

.btn--primary {
  background: var(--navy);
  color: var(--paper);
}

.btn--primary:hover {
  background: var(--navy-2);
}

.btn--gold {
  background: var(--gold);
  color: var(--navy);
}

.btn--gold:hover {
  background: #D4B65F;
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--navy);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--sm {
  min-height: 2.5rem;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
}

/* ---------- 表单 ---------- */

.field {
  display: block;
}

.field + .field {
  margin-top: var(--space-4);
}

.field__label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--color-text);
}

.field__hint {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-3);
}

.input,
.select,
.textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--paper);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-4);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230B1D3A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: 2.5rem;
}

.textarea {
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.5;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.field-row .field {
  margin-top: 0;
}

/* 单选组 */

.radio-group {
  display: grid;
  gap: var(--space-2);
}

.radio {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--paper);
  cursor: pointer;
  min-height: 3.25rem;
}

.radio input {
  margin: 0.2rem 0 0;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--navy);
  flex: none;
}

.radio:has(input:checked) {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.07);
}

.radio__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.radio__title {
  font-size: var(--text-base);
  font-weight: 600;
}

.radio__desc {
  font-size: var(--text-sm);
  color: var(--color-text-3);
}

/* ---------- 提示条 ---------- */

.callout {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: rgba(201, 168, 76, 0.1);
  border-left: 3px solid var(--gold);
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.5;
}

.callout svg {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
  margin-top: 0.1rem;
  color: var(--gold-deep);
}

.callout strong {
  color: var(--navy);
  font-weight: 650;
}

/* ---------- 订单卡片 ---------- */

.order-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: border-color 0.16s ease, transform 0.12s ease;
}

.order-card + .order-card {
  margin-top: var(--space-3);
}

.order-card:hover {
  border-color: var(--color-border);
}

.order-card:active {
  transform: scale(0.995);
}

.order-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.order-card__no {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-2);
  letter-spacing: 0.01em;
}

.order-card__title {
  margin-top: var(--space-2);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.order-card__meta {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-3);
}

.order-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-2);
}

.order-card__amount {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.order-card__eta {
  font-size: var(--text-sm);
  color: var(--color-text-3);
  text-align: right;
}

/* 迷你进度 */

.mini-route {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: var(--space-3);
}

.mini-route__seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--color-border-2);
}

.mini-route__seg.is-done {
  background: var(--gold);
}

.mini-route__seg.is-current {
  background: linear-gradient(90deg, var(--gold) 55%, var(--color-border-2) 55%);
}

/* ---------- 筛选 chips ---------- */

.chips {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  min-height: 2.25rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-2);
  cursor: pointer;
  white-space: nowrap;
}

.chip[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--paper);
}

/* ---------- 路线进度条（标志性元素） ---------- */

.route-card {
  background: var(--navy);
  color: var(--paper);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-3) var(--space-3);
  overflow: hidden;
}

.route-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-1) var(--space-4);
}

.route-card__status {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.route-card__eta {
  margin-top: 0.15rem;
  font-size: var(--text-sm);
  color: rgba(232, 217, 168, 0.85);
}

.route-card__eta strong {
  color: var(--gold-soft);
  font-family: var(--font-mono);
  font-weight: 650;
}

.route-card__badge {
  flex: none;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(201, 168, 76, 0.2);
  color: var(--gold-soft);
  font-size: var(--text-xs);
  font-weight: 650;
  white-space: nowrap;
}

.route {
  display: grid;
  gap: 0;
  padding: 0;
}

.route__stop {
  position: relative;
  padding: 0 0 1.125rem 1.75rem;
}

.route__stop:last-child {
  padding-bottom: 0;
}

.route__stop::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 1.125rem;
  bottom: -0.5rem;
  width: 2px;
  background: rgba(255, 255, 255, 0.16);
}

.route__stop:last-child::before {
  display: none;
}

.route__stop.is-done::before,
.route__stop.is-current::before {
  background: var(--gold);
}

.route__dot {
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid rgba(255, 255, 255, 0.32);
  z-index: 1;
}

.route__stop.is-done .route__dot {
  background: var(--gold);
  border-color: var(--gold);
}

.route__stop.is-current .route__dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.24);
}

.route__name {
  display: block;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.55);
}

.route__stop.is-done .route__name,
.route__stop.is-current .route__name {
  color: var(--paper);
}

.route__date {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.38);
}

.route__stop.is-done .route__date,
.route__stop.is-current .route__date {
  color: var(--gold-soft);
}

/* ---------- 个人中心 ---------- */

.profile-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  background: var(--navy);
  color: var(--paper);
  border-radius: var(--radius-md);
}

.profile-head__avatar {
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--navy);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.profile-head__body {
  min-width: 0;
}

.profile-head__name {
  font-size: var(--text-lg);
  font-weight: 650;
  line-height: 1.25;
}

.profile-head__org {
  margin-top: 2px;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.68);
}

.profile-head__id {
  margin-top: var(--space-2);
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--gold-soft);
}

.list-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 3rem;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  color: inherit;
  border-top: 1px solid var(--color-border-2);
}

.list-row:first-child {
  border-top: 0;
}

.list-row__label {
  flex: 1;
  min-width: 0;
  font-size: var(--text-base);
}

.list-row__value {
  font-size: var(--text-sm);
  color: var(--color-text-3);
  font-family: var(--font-mono);
  text-align: right;
}

.switch {
  position: relative;
  flex: none;
  width: 2.875rem;
  height: 1.75rem;
  border-radius: var(--radius-full);
  background: rgba(11, 29, 58, 0.18);
  transition: background 0.18s ease;
}

.switch[aria-checked="true"] {
  background: var(--gold);
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(11, 29, 58, 0.24);
  transition: transform 0.18s ease;
}

.switch[aria-checked="true"]::after {
  transform: translateX(1.125rem);
}

.addr {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border-2);
}

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

.addr__body {
  flex: 1;
  min-width: 0;
}

.addr__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 600;
}

.addr__text {
  margin-top: 2px;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--color-text-3);
}

.addr__pick {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: grid;
  place-items: center;
}

.addr__pick[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold);
}

.addr__pick[aria-pressed="true"]::after {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--navy);
}

[data-addr-default-badge] {
  display: none;
}

.addr:has(.addr__pick[aria-pressed="true"]) [data-addr-default-badge] {
  display: inline-flex;
}

/* ---------- 照片墙 ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.photo {
  position: relative;
  aspect-ratio: 1;
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, var(--navy-3), var(--navy));
}

.photo[data-kind="pack"] {
  background: linear-gradient(155deg, var(--navy-4), var(--navy-2));
}

.photo[data-kind="load"] {
  background: linear-gradient(155deg, #335E9B, var(--navy));
}

.photo[data-kind="doc"] {
  background: linear-gradient(155deg, #1B3A68, #0B1D3A);
}

.photo__icon {
  width: 2.5rem;
  height: 2.5rem;
  color: rgba(232, 217, 168, 0.5);
  stroke-width: 1.4;
}

.photo__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem var(--space-2) 0.4rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gold-soft);
  background: linear-gradient(transparent, rgba(11, 29, 58, 0.88));
  display: flex;
  justify-content: space-between;
  gap: var(--space-1);
}

.photo__cap span:last-child {
  font-family: var(--font-mono);
  font-weight: 500;
  color: rgba(232, 217, 168, 0.7);
  flex: none;
}

/* ---------- 费用明细 ---------- */

.money-list {
  display: grid;
  gap: var(--space-3);
}

.money-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-base);
}

.money-row dt {
  color: var(--color-text-2);
}

.money-row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.money-row--total {
  margin-top: var(--space-1);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.money-row--total dt {
  font-weight: 650;
  color: var(--navy);
}

.money-row--total dd {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.money-note {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-3);
}

/* ---------- 信息行 ---------- */

.info-list {
  display: grid;
  gap: var(--space-3);
}

.info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-base);
}

.info-row dt {
  flex: none;
  color: var(--color-text-3);
  font-size: var(--text-sm);
}

.info-row dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.info-row dd.mono {
  font-weight: 600;
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.copy-btn {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-2);
  cursor: pointer;
  flex: none;
}

.copy-btn svg {
  width: 0.9375rem;
  height: 0.9375rem;
}

/* ---------- 底部固定操作 ---------- */

.sticky-action {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-tabbar);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4)
    calc(var(--space-3) + env(safe-area-inset-bottom));
  background: rgba(250, 247, 240, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--color-border-2);
  display: flex;
  gap: var(--space-3);
}

.sticky-action .btn {
  flex: 1;
}

/* ---------- 步骤条 ---------- */

.stepper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.stepper__seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--color-border-2);
}

.stepper__seg.is-done {
  background: var(--gold);
}

.stepper__seg.is-current {
  background: var(--navy);
}

.stepper__label {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-2);
  margin-left: var(--space-1);
}

/* ---------- 商品行 ---------- */

.item-block {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.item-block + .item-block {
  margin-top: var(--space-3);
}

.item-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.item-block__no {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gold-deep);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.remove-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2rem;
  padding: 0 var(--space-2);
  border: 0;
  background: transparent;
  color: var(--color-text-3);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.remove-btn svg {
  width: 0.9375rem;
  height: 0.9375rem;
}

.add-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 3.25rem;
  margin-top: var(--space-3);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-2);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
}

.add-item svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ---------- 空状态 ---------- */

.empty {
  display: grid;
  place-items: center;
  gap: var(--space-3);
  padding: var(--space-7) var(--space-4);
  text-align: center;
}

.empty__icon {
  width: 3rem;
  height: 3rem;
  color: var(--color-text-4);
}

.empty h3 {
  font-size: var(--text-lg);
  font-weight: 650;
}

.empty p {
  font-size: var(--text-sm);
  color: var(--color-text-3);
  max-width: 18rem;
}

/* ---------- 成功页 ---------- */

.success {
  display: grid;
  place-items: center;
  gap: var(--space-3);
  padding: var(--space-7) 0 var(--space-5);
  text-align: center;
}

.success__mark {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.14);
  color: var(--gold-deep);
}

.success__mark svg {
  width: 2.25rem;
  height: 2.25rem;
  stroke-width: 2;
}

.success h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.success p {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  max-width: 20rem;
}

/* ---------- 登录页 ---------- */

.login-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--paper);
  position: relative;
  overflow-x: hidden;
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 82% 12%,
      rgba(201, 168, 76, 0.16),
      transparent 42%
    ),
    radial-gradient(
      circle at 12% 78%,
      rgba(46, 86, 143, 0.5),
      transparent 46%
    );
  pointer-events: none;
}

.login-shell > * {
  position: relative;
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
}

.login-header .brand__name {
  color: var(--paper);
}

.login-header .brand__sub {
  color: rgba(232, 217, 168, 0.7);
}

.login-header .lang-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.login-header .lang-toggle__opt {
  color: rgba(255, 255, 255, 0.6);
}

.login-header .lang-toggle__opt[aria-pressed="true"] {
  background: var(--gold);
  color: var(--navy);
}

.login-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-5) var(--space-5) var(--space-4);
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
}

.login-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.login-hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.login-hero p {
  margin-top: var(--space-3);
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.66);
  max-width: 22rem;
  line-height: 1.5;
}

.login-actions {
  padding: var(--space-4) var(--space-5) var(--space-5);
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  gap: var(--space-3);
}

.btn--tg {
  background: var(--paper);
  color: var(--navy);
  min-height: 3.5rem;
}

.btn--tg svg {
  color: #229ED9;
}

.btn--tg:hover {
  background: #F2F6FA;
}

.login-actions__hint {
  text-align: center;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.45;
  padding: 0 var(--space-3);
}

.login-alt {
  text-align: center;
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.72);
  padding: var(--space-2);
}

.login-alt a {
  color: var(--gold);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom));
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.perk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.perk svg {
  width: 1.375rem;
  height: 1.375rem;
  color: var(--gold);
  stroke-width: 1.6;
}

.perk span {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.35;
}

/* ---------- 运费计算器 ---------- */

.quote-card {
  background: var(--navy);
  color: var(--paper);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-top: var(--space-4);
}

.quote-card__label {
  font-size: var(--text-sm);
  color: rgba(232, 217, 168, 0.8);
}

.quote-card__price {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.quote-card__price small {
  font-size: var(--text-base);
  font-weight: 600;
  color: rgba(232, 217, 168, 0.8);
  margin-left: 0.25rem;
  letter-spacing: 0;
}

.quote-card__total {
  margin-top: var(--space-1);
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.quote-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.quote-card__cell > span {
  display: block;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
}

.quote-card__cell strong {
  display: block;
  margin-top: 2px;
  font-size: var(--text-base);
  font-weight: 650;
  color: var(--paper);
}

/* ---------- 语言切换可见性 ---------- */

html[lang="ru"] [data-zh-only] {
  display: none !important;
}

html[lang="zh"] [data-ru-only] {
  display: none !important;
}

/* ---------- 减少动态效果 ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 窄屏微调 ---------- */

@media (max-width: 359px) {
  .login-hero h1 {
    font-size: 1.75rem;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .route__stop {
    padding-left: 1.5rem;
  }
}
