/* 搜运费 SouYunFei — 样式 */
:root {
  --navy: #0f3d5c;
  --navy-2: #0b2e45;
  --navy-3: #123f5e;
  --teal: #1f6f8c;
  --teal-2: #2b8caa;
  --bg: #f2f6f9;
  --card: #ffffff;
  --line: #e2e9ef;
  --line-strong: #cfdae3;
  --text: #12222e;
  --muted: #64798a;
  --muted-2: #8b9dab;
  --ok: #1a7f5a;
  --ok-bg: #e8f5ef;
  --warn: #9a6a12;
  --warn-bg: #fdf4e3;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --info-bg: #eaf2f7;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 61, 92, 0.06), 0 1px 3px rgba(15, 61, 92, 0.04);
  --shadow: 0 2px 6px rgba(15, 61, 92, 0.06), 0 18px 40px -18px rgba(15, 61, 92, 0.25);
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

/* 作者样式里的 display 会覆盖 UA 的 [hidden]，这里强制兜底 */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(31, 111, 140, 0.08), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(15, 61, 92, 0.07), transparent 55%),
    var(--bg);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }

/* ---------------------------- 顶栏 ---------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 17px;
  color: var(--navy);
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--navy), var(--teal));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.brand small {
  font-weight: 500;
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--muted);
  transition: 0.15s;
  white-space: nowrap;
}
.nav a:hover { color: var(--navy); background: #eef4f8; }
.nav a.active { color: var(--navy); background: #e8f1f6; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.demo-pill {
  font-size: 12px;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid #f0dfba;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--navy);
  white-space: nowrap;
}
.user-chip b { font-weight: 700; }
.user-chip i {
  font-style: normal;
  font-size: 11px;
  color: var(--teal);
  background: var(--teal-3);
  border-radius: 6px;
  padding: 2px 7px;
  font-weight: 600;
}

/* ---------------------------- 按钮 ---------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
  white-space: nowrap;
  background: #fff;
  color: var(--navy);
}
.btn-primary {
  background: linear-gradient(180deg, var(--teal-2), var(--teal));
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(31, 111, 140, 0.8);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost { border-color: var(--line-strong); color: var(--navy); background: #fff; }
.btn-ghost:hover { background: #f6fafc; border-color: var(--teal); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-link {
  background: none;
  border: none;
  color: var(--teal);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
}

/* ---------------------------- 卡片 ---------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title .sub { font-weight: 500; color: var(--muted); font-size: 12.5px; }

/* ---------------------------- 首页 ---------------------------- */
.hero { padding: 64px 0 20px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal);
  background: rgba(31, 111, 140, 0.09);
  border: 1px solid rgba(31, 111, 140, 0.16);
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.4px;
}
.hero h1 {
  margin: 18px 0 14px;
  font-size: 46px;
  line-height: 1.18;
  letter-spacing: -0.5px;
  color: var(--navy);
  font-weight: 800;
}
.hero h1 em { font-style: normal; color: var(--teal); }
.hero-lead { font-size: 16px; color: var(--muted); max-width: 560px; }
.hero-points { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; }
.hero-point { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--navy); font-weight: 600; }
.hero-point i {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok);
  display: grid; place-items: center; font-style: normal; font-size: 11px;
}

.hero-board {
  background: linear-gradient(160deg, var(--navy), #14506f 55%, var(--teal));
  border-radius: 18px;
  padding: 22px;
  color: #fff;
  box-shadow: 0 30px 60px -30px rgba(15, 61, 92, 0.7);
  position: relative;
  overflow: hidden;
}
.hero-board::after {
  content: "";
  position: absolute; inset: auto -40px -60px auto;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 70%);
}
.hb-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; opacity: 0.75; margin-bottom: 14px; }
.hb-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.hb-row:first-of-type { border-top: none; }
.hb-name { font-size: 13.5px; }
.hb-name b { display: block; font-size: 14px; font-weight: 600; }
.hb-name span { font-size: 11.5px; opacity: 0.7; }
.hb-price { text-align: right; font-weight: 700; font-size: 16px; }
.hb-price span { display: block; font-size: 11px; font-weight: 400; opacity: 0.65; }
.hb-foot { margin-top: 12px; font-size: 11.5px; opacity: 0.65; display: flex; justify-content: space-between; }

/* 搜索面板 */
.search-panel { margin-top: 26px; position: relative; z-index: 2; }
.search-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px 24px 24px;
}
.segmented {
  display: inline-flex;
  background: #eef3f7;
  padding: 4px;
  border-radius: 11px;
  gap: 2px;
}
.segmented button {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  transition: 0.15s;
}
.segmented button.active { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }

.search-row {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 0.85fr 0.85fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.2px; }
.input, select.input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14.5px;
  color: var(--text);
  outline: none;
  transition: 0.15s;
  appearance: none;
  font-family: inherit;
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%2364798a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31, 111, 140, 0.12); }
.swap-btn {
  width: 40px; height: 44px;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  color: var(--teal);
  font-size: 16px;
  display: grid; place-items: center;
}
.swap-btn:hover { border-color: var(--teal); background: #f4fafc; }
.search-submit { height: 44px; padding: 0 26px; }
.hot-lanes { margin-top: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--navy);
  cursor: pointer;
  transition: 0.15s;
}
.chip:hover { border-color: var(--teal); color: var(--teal); }

/* 首页区块 */
.section { padding: 56px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { font-size: 24px; color: var(--navy); letter-spacing: -0.2px; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-card { padding: 20px; }
.trust-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--info-bg); color: var(--teal);
  display: grid; place-items: center; font-size: 17px; margin-bottom: 12px;
}
.trust-card h3 { font-size: 15px; color: var(--navy); margin-bottom: 6px; }
.trust-card p { font-size: 13px; color: var(--muted); line-height: 1.7; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 22px; position: relative; }
.step-no {
  font-size: 12px; font-weight: 700; color: var(--teal);
  letter-spacing: 1px; margin-bottom: 8px;
}
.step h3 { font-size: 15px; color: var(--navy); margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--muted); }

.stat-strip {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.stat-item { padding: 20px 22px; border-left: 1px solid var(--line); }
.stat-item:first-child { border-left: none; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -0.3px; }
.stat-value small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------------------------- 列表页 ---------------------------- */
.page { padding: 30px 0 70px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs a:hover { color: var(--teal); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 28px; color: var(--navy); letter-spacing: -0.3px; }
.page-head .route-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 8px; }
.page-head .route-meta b { color: var(--text); font-weight: 600; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.sorts { display: inline-flex; gap: 4px; background: #eef3f7; padding: 4px; border-radius: 10px; }
.sorts button {
  border: none; background: none; padding: 7px 14px; border-radius: 7px;
  font-size: 13px; color: var(--muted); cursor: pointer; font-weight: 600;
}
.sorts button.active { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.result-count { font-size: 13.5px; color: var(--muted); }
.result-count b { color: var(--navy); font-size: 16px; }

.quote-list { display: flex; flex-direction: column; gap: 12px; }
.quote-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.8fr auto;
  gap: 18px;
  align-items: center;
  transition: 0.15s;
}
.quote-card:hover { border-color: #bfd2df; box-shadow: var(--shadow); }
.q-fw { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fw-name { font-size: 16px; font-weight: 700; color: var(--navy); }
.badge {
  font-size: 11.5px; padding: 2px 8px; border-radius: 6px; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-优选 { color: #0f6b4f; background: var(--ok-bg); border-color: #c9e8d9; }
.badge-认证 { color: #2b5c86; background: #e9f1f8; border-color: #d3e3f1; }
.badge-自营 { color: #8a5a06; background: var(--warn-bg); border-color: #f0dfba; }
.badge-现舱 { color: var(--teal); background: var(--info-bg); border-color: #d5e7ef; }
.score {
  font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px;
}
.score b { color: var(--ok); font-size: 13px; }
.q-tags { margin-top: 6px; font-size: 12.5px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.q-tags span { display: inline-flex; align-items: center; gap: 4px; }
.q-price .price { font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; }
.q-price .price small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.q-price .price-note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.q-price .price-note.up { color: var(--warn); }
.kv-row { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.kv { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.kv b { color: var(--text); font-weight: 600; }
.kv b.warn { color: var(--warn); }
.q-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }

.empty {
  text-align: center; padding: 60px 20px; background: #fff;
  border: 1px dashed var(--line-strong); border-radius: 16px;
}
.empty h3 { color: var(--navy); margin-bottom: 8px; }
.empty p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* ---------------------------- 详情页 ---------------------------- */
.detail-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 16px; }
.detail-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }

.fee-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fee-table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 8px 0; border-bottom: 1px solid var(--line); letter-spacing: 0.3px;
}
.fee-table td { padding: 10px 0; border-bottom: 1px dashed #edf2f6; vertical-align: top; }
.fee-table td.amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.fee-table td .detail { display: block; font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.fee-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--line-strong);
}.fee-total .label { font-size: 13px; color: var(--muted); }
.fee-total .value { font-size: 26px; font-weight: 800; color: var(--navy); letter-spacing: -0.4px; }
/* 五段费用 */
.seg-list { display: flex; flex-direction: column; gap: 10px; }
.seg-block { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.seg-block.seg-off { background: #fafcfd; border-style: dashed; }
.seg-head { display: flex; align-items: baseline; gap: 10px; }
.seg-name { font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.seg-desc { flex: 1; font-size: 12px; color: var(--muted); }
.seg-amt { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seg-amt.muted { color: var(--muted-2); font-weight: 600; }
.seg-empty { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.seg-opt { margin-top: 8px; padding: 6px 9px; border-radius: 7px; background: #f2f9fc; font-size: 12px; color: #2a6279; line-height: 1.6; }
.seg-opt-title { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.seg-opt-row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.seg-opt-row b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.seg-block .fee-table { margin-top: 6px; }
.q-scope { margin-top: 6px; font-size: 12px; color: var(--teal); }

/* 货代工作台：五段小标签 */
.seg-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 280px; }
.seg-chip {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f0f6fa;
  color: #2a6279;
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.seg-chip.off { background: #f7f8f9; color: var(--muted-2); }

/* 表格分页 */
.row-no { width: 44px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.table td.edit-no { vertical-align: top; padding-top: 14px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); }
.pager-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-btns .btn { min-width: 34px; justify-content: center; }
.pager-gap { color: var(--muted-2); padding: 0 4px; }
.btn.disabled { pointer-events: none; opacity: 0.45; }

/* 报价明细编辑 */
.fee-edit { padding: 6px 2px; }
.fee-edit-title { margin-bottom: 10px; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.fee-edit-seg { margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.fee-edit-cols { column-count: 2; column-gap: 14px; }
.fee-edit-cols .fee-edit-seg { break-inside: avoid; -webkit-column-break-inside: avoid; }
.fee-edit-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.fee-edit-head b { font-size: 13.5px; color: var(--navy); }
.fee-edit-total { margin-left: auto; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.fee-edit-row { display: grid; grid-template-columns: minmax(140px, 1fr) 78px 130px; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px dashed var(--line); }
.fee-edit-row:first-of-type { border-top: none; }
.fee-basis { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.fee-amount { display: flex; align-items: center; gap: 6px; }
.fee-unit { font-size: 12px; color: var(--muted); }
.fee-edit-name { font-size: 13px; }
.fee-edit-name i { margin-left: 6px; padding: 1px 5px; border-radius: 4px; background: #f1f3f4; color: var(--muted-2); font-size: 10px; font-style: normal; }
.fee-edit-row.is-optional { opacity: 0.78; }
.fee-edit-sub { text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fee-edit-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* 五段逐段编辑 */
.seg-edit { padding: 4px 2px; }
.seg-edit-title { margin-bottom: 10px; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.seg-edit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.seg-edit-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.seg-edit-grid .input { height: 36px; padding: 6px 10px; }
.seg-edit-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

/* 订舱装箱测算提示 */
.pack-hint {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2f9fc;
  border: 1px solid #d9ecf4;
  font-size: 12.5px;
  color: #2a6279;
  line-height: 1.7;
}
.pack-hint.err { background: #fdf3f0; border-color: #f3d3c8; color: var(--danger); }

.excludes {
  margin-top: 14px; background: #f8fafc; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: var(--muted);
}
.excludes b { color: var(--text); }

.contract {
  background: linear-gradient(180deg, #f7fbfd, #f2f8fb);
  border: 1px solid #d9e8f0;
  border-radius: 12px;
  padding: 16px 18px;
}
.contract h4 { font-size: 13.5px; color: var(--navy); margin-bottom: 8px; }
.contract ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.contract li { font-size: 12.5px; color: #33566b; padding-left: 18px; position: relative; }
.contract li::before {
  content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; font-size: 11px;
}

.fw-profile { display: flex; gap: 14px; align-items: flex-start; }
.avatar {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: linear-gradient(145deg, #e7f1f6, #d3e6ef);
  color: var(--teal); font-weight: 700; display: grid; place-items: center; font-size: 16px;
}
.fw-profile h3 { font-size: 16px; color: var(--navy); }
.fw-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fw-tag { font-size: 11.5px; color: var(--muted); background: #f2f6f9; padding: 2px 8px; border-radius: 6px; }
.fw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.fw-stat { background: #f8fafc; border-radius: 10px; padding: 10px 12px; }
.fw-stat b { display: block; font-size: 16px; color: var(--navy); }
.fw-stat span { font-size: 11.5px; color: var(--muted); }

.book-card { padding: 20px; }
.book-price { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.book-price .v { font-size: 28px; font-weight: 800; color: var(--navy); }
.book-price .l { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .field label { font-size: 11.5px; }
.form-grid .input { padding: 9px 11px; font-size: 13.5px; }
.form-note { font-size: 11.5px; color: var(--muted-2); margin-top: 10px; line-height: 1.6; }

/* ---------------------------- 订单 ---------------------------- */
.stepper { display: flex; gap: 0; margin: 6px 0 26px; }
.step-item { flex: 1; position: relative; text-align: center; font-size: 12.5px; color: var(--muted); }
.step-item::before {
  content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--line);
}
.step-item:first-child::before { display: none; }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%; margin: 0 auto 8px;
  background: #fff; border: 2px solid var(--line); color: var(--muted-2);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; position: relative; z-index: 1;
}
.step-item.done .step-dot { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.step-item.done::before { background: #bfe3d2; }
.step-item.current .step-dot { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 0 0 4px rgba(15, 61, 92, 0.12); }
.step-item.current { color: var(--navy); font-weight: 600; }

.status-badge { font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.st-pending { color: var(--warn); background: var(--warn-bg); }
.st-confirmed { color: #1d5f8a; background: #e7f1f8; }
.st-shipped { color: #4b4b9e; background: #ecebfa; }
.st-arrived { color: var(--ok); background: var(--ok-bg); }
.st-breached { color: var(--danger); background: var(--danger-bg); }
.st-paused { color: var(--muted); background: #eef3f7; }

.timeline { list-style: none; display: flex; flex-direction: column; gap: 0; }
.timeline li { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 6px; top: 18px; bottom: 0; width: 1px; background: var(--line);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--teal); margin-top: 5px; flex: none; z-index: 1; }
.timeline li.breach .tl-dot { background: var(--danger); }
.tl-body b { display: block; font-size: 13.5px; color: var(--navy); }
.tl-body p { font-size: 13px; color: var(--muted); }
.tl-body time { font-size: 11.5px; color: var(--muted-2); }

.alert {
  border-radius: 12px; padding: 14px 16px; font-size: 13.5px; border: 1px solid;
  display: flex; gap: 10px; align-items: flex-start;
}
.alert-danger { background: var(--danger-bg); border-color: #f3c9c4; color: #7d1a13; }
.alert-info { background: var(--info-bg); border-color: #d3e6ef; color: #204a61; }

/* ---------------------------- 表格 / 工作台 ---------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: #f8fafc;
}
.table td { padding: 12px; border-bottom: 1px solid #eef3f7; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.table input.mini {
  width: 92px; padding: 5px 8px; border: 1px solid var(--line-strong);
  border-radius: 7px; font-size: 13px; font-family: inherit;
}

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi { padding: 18px 20px; }
.kpi .k-label { font-size: 12.5px; color: var(--muted); }
.kpi .k-value { font-size: 27px; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; margin-top: 2px; }
.kpi .k-value small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.kpi .k-sub { font-size: 12px; color: var(--muted-2); margin-top: 2px; }

.bar-row { display: grid; grid-template-columns: 120px 1fr 96px; gap: 12px; align-items: center; padding: 8px 0; font-size: 13px; }
.bar-track { height: 8px; background: #eef3f7; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-2)); border-radius: 99px; }
.bar-val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.select-inline { display: flex; align-items: center; gap: 10px; }
.select-inline select { min-width: 200px; }

/* ---------------------------- 提示 ---------------------------- */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 100;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 11px;
  font-size: 14px; box-shadow: var(--shadow); max-width: 420px;
  animation: toast-in 0.2s ease;
}
.toast.err { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.loading { padding: 80px 0; text-align: center; color: var(--muted); }
.spinner {
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 12px;
  border: 3px solid #dbe6ee; border-top-color: var(--teal); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer {
  border-top: 1px solid var(--line);
  margin-top: 70px;
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 12.5px;
}
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-legal { margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.footer-legal a { color: var(--muted-2); font-size: 12px; }
.footer-legal a:hover { color: var(--teal); }

/* ---------------------------- 响应式 ---------------------------- */
.mobile-book-bar { display: none; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero h1 { font-size: 36px; }
  .search-row { grid-template-columns: 1fr 1fr; }
  .search-row .swap-btn { display: none; }
  .search-submit { grid-column: 1 / -1; width: 100%; }
  .trust-grid, .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(3) { border-left: none; }
  .stat-item:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .fee-edit-cols { column-count: 1; }
  .quote-card { grid-template-columns: 1fr auto; }
  .q-price { text-align: right; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .nav { overflow-x: auto; }
}

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .demo-pill { display: none; }

  /* 顶栏：品牌 + 账号占一行，导航单独一行横向滚动，避免挤压换行 */
  .topbar-inner {
    height: auto;
    padding: 10px 16px 0;
    gap: 8px;
    flex-wrap: wrap;
  }
  .brand { flex: 0 0 auto; gap: 8px; font-size: 16px; white-space: nowrap; }
  .brand-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
  .brand small { display: none; }
  .topbar-right { gap: 6px; }
  .user-chip { max-width: 132px; font-size: 12.5px; overflow: hidden; }
  .user-chip b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-chip i { display: none; }
  .nav {
    order: 3;
    flex: 1 0 100%;
    margin: 2px -16px 0;
    padding: 2px 16px 8px;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 12px; font-size: 13px; }

  .page { padding: 22px 0 56px; }
  .page-head { gap: 12px; }
  .detail-grid { gap: 14px; }
  .detail-main .card-pad, .detail-side .card-pad { padding: 16px; }
  .book-card { padding: 16px; }
  .detail-side { position: static; }

  /* 五段费用：段名与金额一行，说明另起一行 */
  .seg-head { flex-wrap: wrap; gap: 2px 8px; }
  .seg-name { font-size: 14px; }
  .seg-desc { order: 3; flex: 1 0 100%; margin-top: 2px; font-size: 11.5px; }
  .seg-amt { margin-left: auto; font-size: 14.5px; }
  .seg-block { padding: 12px; border-radius: 9px; }
  .seg-opt { font-size: 11.5px; line-height: 1.7; }
  .fee-table td { padding: 8px 0; font-size: 13px; }
  .fee-total .value { font-size: 21px; }
  .seg-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fee-edit-row { grid-template-columns: 1fr 64px 100px; }
  .fee-edit-sub { display: none; }

  /* 报价详情底部订舱条 */
  .page.has-book-bar { padding-bottom: 92px; }
  .mobile-book-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(10px);
  }
  .mbb-price { font-size: 21px; font-weight: 700; color: var(--navy); letter-spacing: -0.3px; }
  .mbb-label { margin-left: 6px; font-size: 11px; color: var(--muted); }
  .mobile-book-bar .btn { min-width: 120px; }

  .hero { padding: 38px 0 12px; }
  .hero h1 { font-size: 30px; }
  .hero-lead { font-size: 14.5px; }
  .hero-points { gap: 12px; }
  .search-box { padding: 16px; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding: 8px 6px; font-size: 13px; }
  .search-row { grid-template-columns: 1fr; gap: 10px; }
  .quote-card { grid-template-columns: 1fr; }
  .q-price { text-align: left; }
  .q-actions { flex-direction: row; }
  .q-actions .btn { flex: 1; }
  .trust-grid, .kpi-grid { grid-template-columns: 1fr 1fr; }
  .page-head h1 { font-size: 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .stepper { font-size: 11px; }
  .step-item span { display: block; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
