/* 运价雷达 · UI */
:root {
  --bg: #f3efe7;
  --bg-deep: #ebe4d7;
  --surface: #fffdf8;
  --surface-2: #f8f4eb;
  --surface-3: #f1eadf;
  --ink: #142019;
  --ink-2: #33423a;
  --muted: #6f7b74;
  --muted-2: #8b958f;
  --line: #e4ded2;
  --line-strong: #d4cbbc;
  --accent: #f05a32;
  --accent-deep: #cf4420;
  --accent-soft: #ffe7dd;
  --green: #0c7d55;
  --green-deep: #07583c;
  --green-soft: #ddf6e8;
  --amber: #a96c00;
  --amber-soft: #fff1cc;
  --danger: #b83232;
  --header: #111c17;
  --shadow-sm: 0 2px 10px rgba(36, 46, 40, .05);
  --shadow: 0 14px 40px rgba(36, 46, 40, .085);
  --shadow-lg: 0 30px 90px rgba(10, 16, 13, .22);
  --radius: 22px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1100px 500px at 8% -8%, rgba(240, 154, 121, .13), transparent 58%),
    radial-gradient(900px 500px at 95% 2%, rgba(127, 161, 135, .13), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 3px solid rgba(240, 90, 50, .35); outline-offset: 2px; }

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
.icon {
  width: 18px;
  height: 18px;
  flex: none;
}
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 42px; height: 42px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #f7f3ea;
  background:
    radial-gradient(900px 480px at 82% -18%, rgba(240, 90, 50, .25), transparent 62%),
    radial-gradient(780px 420px at 2% 34%, rgba(130, 168, 139, .16), transparent 62%),
    linear-gradient(145deg, #121e19 0%, #101a16 55%, #0c1612 100%);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .032) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
  pointer-events: none;
}
.site-header::after {
  content: "";
  position: absolute;
  right: -180px;
  top: 40px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  box-shadow:
    0 0 0 90px rgba(255, 255, 255, .018),
    0 0 0 180px rgba(255, 255, 255, .012);
  z-index: -1;
  pointer-events: none;
}
.header-inner {
  position: relative;
  max-width: 1544px;
  margin: 0 auto;
  padding: 0 30px 66px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 78px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  border-radius: 13px;
  color: #1a110c;
  background: var(--accent);
  box-shadow: 0 7px 22px rgba(240, 90, 50, .28);
  transform: rotate(-3deg);
}
.brand-mark .icon { transform: rotate(3deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 18px; letter-spacing: .04em; font-weight: 700; }
.brand-text span {
  margin-top: 4px;
  font-size: 8.5px;
  letter-spacing: .19em;
  color: rgba(247, 243, 234, .42);
  font-weight: 600;
}
.save-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 16px;
  color: rgba(247, 243, 234, .5);
  font-size: 11.5px;
  white-space: nowrap;
}
.save-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7ed7a7;
  box-shadow: 0 0 0 3px rgba(126, 215, 167, .12);
  flex: none;
}
.save-state.is-warn .save-dot { background: #ffc35b; box-shadow: 0 0 0 3px rgba(255, 195, 91, .13); }
.save-state.is-error .save-dot { background: #ff806d; box-shadow: 0 0 0 3px rgba(255, 128, 109, .13); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 41px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 16px; height: 16px; }
.btn-dark {
  color: #f8f4ec;
  background: rgba(255, 255, 255, .055);
  border-color: rgba(255, 255, 255, .155);
}
.btn-dark:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); }
.btn-primary {
  color: #21130d;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 7px 20px rgba(240, 90, 50, .2);
}
.btn-primary:hover { background: #ff7049; border-color: #ff7049; box-shadow: 0 9px 24px rgba(240, 90, 50, .28); }
.btn-soft {
  color: var(--ink-2);
  background: var(--surface-2);
  border-color: var(--line);
}
.btn-soft:hover { background: #fffaf1; border-color: var(--line-strong); }
.btn-ghost {
  color: var(--ink-2);
  background: transparent;
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { min-height: 35px; padding: 0 12px; font-size: 12px; border-radius: 9px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 41px;
  height: 41px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink-2);
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); transform: translateY(-1px); }
.icon-btn-dark {
  color: rgba(247, 243, 234, .8);
  background: rgba(255, 255, 255, .045);
  border-color: rgba(255, 255, 255, .15);
}
.icon-btn-dark:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .24); }
.icon-btn-soft {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
}
.icon-btn-soft .icon { width: 16px; height: 16px; }
.split { position: relative; display: flex; }
.split-main { border-radius: 11px 0 0 11px; border-right-color: rgba(255, 255, 255, .07); }
.split-toggle {
  width: 33px;
  padding: 0;
  border-radius: 0 11px 11px 0;
  border-left-color: rgba(255, 255, 255, .07);
}
.menu-anchor { position: relative; }
.menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 60;
  min-width: 264px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(25, 34, 29, .2);
  animation: menuIn .15s ease both;
}
.export-menu { min-width: 286px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.menu-item strong { font-size: 12.5px; font-weight: 600; }
.menu-item small { margin-top: 1px; color: var(--muted); font-size: 10.5px; }
.menu-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-2);
  flex: none;
}
.menu-icon .icon { width: 15px; height: 15px; }
.menu-danger { color: var(--danger); }
.menu-danger .menu-icon { color: var(--danger); background: #fbe8e5; }
.menu-sep { height: 1px; margin: 5px 7px; background: var(--line); }
.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.text-btn:hover { color: var(--ink); }
.text-danger { color: var(--danger); }
.text-danger:hover { color: #8e2020; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 490px;
  gap: 58px;
  align-items: end;
  padding-top: 54px;
}
.hero-copy { min-width: 0; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.2;
  letter-spacing: .18em;
  font-weight: 700;
  text-transform: uppercase;
}
.eyebrow-light { color: rgba(247, 243, 234, .48); }
.eyebrow-line {
  width: 22px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}
.hero h1 {
  margin-top: 18px;
  max-width: 780px;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.14;
  letter-spacing: -.045em;
  font-weight: 700;
  color: #fbf7ef;
}
.hero h1 span { color: #ff9470; }
.hero p {
  max-width: 620px;
  margin-top: 20px;
  color: rgba(247, 243, 234, .62);
  font-size: 14px;
  line-height: 1.8;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 24px;
  color: rgba(247, 243, 234, .45);
  font-size: 11.5px;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust .icon { color: rgba(255, 148, 112, .7); }
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-card {
  position: relative;
  min-height: 113px;
  padding: 15px 16px 14px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 16px;
  background: rgba(255, 255, 255, .045);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -46px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 50%;
}
.stat-card-accent {
  background: rgba(240, 90, 50, .115);
  border-color: rgba(240, 90, 50, .25);
}
.stat-label {
  display: block;
  color: rgba(247, 243, 234, .48);
  font-size: 10px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.stat-value { display: flex; align-items: baseline; gap: 5px; margin-top: 8px; }
.stat-value strong {
  color: #fffaf1;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.stat-value em { color: rgba(247, 243, 234, .48); font-size: 10px; font-style: normal; }
.stat-sub { display: block; margin-top: 8px; color: rgba(247, 243, 234, .35); font-size: 9.5px; white-space: nowrap; }
.stat-card-accent .stat-value strong { color: #ffb195; }

/* ---------- Filter ---------- */
.shell {
  position: relative;
  z-index: 4;
  max-width: 1544px;
  margin: 0 auto;
  padding: 0 30px;
}
.filter-card {
  position: relative;
  margin-top: -43px;
  padding: 16px 20px 15px;
  border: 1px solid rgba(213, 204, 190, .8);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 16px 45px rgba(31, 42, 35, .12);
}
.filter-grid {
  display: grid;
  grid-template-columns: 210px 176px minmax(0, 1fr);
  align-items: end;
  gap: 10px 18px;
}
.filter-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.region-field, .courier-field { width: auto; }
.band-field { grid-column: 1 / -1; min-width: 0; }
.filter-field > label, .filter-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
}
.filter-label-row { display: flex; align-items: center; justify-content: flex-start; gap: 8px; min-height: 15px; }
.label-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}
.label-action:hover { text-decoration: underline; }
.select-shell {
  position: relative;
  display: flex;
  align-items: center;
  height: 45px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink-2);
  transition: border-color .18s ease, background .18s ease;
}
.select-shell:focus-within { border-color: var(--accent); background: var(--surface); }
.select-shell > .icon:first-child { width: 16px; height: 16px; color: var(--accent); flex: none; }
.select-shell select {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 24px 0 8px;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.select-chevron {
  position: absolute;
  right: 9px;
  width: 14px;
  height: 14px;
  pointer-events: none;
  color: var(--muted);
}
.filter-label em { color: var(--muted-2); font-style: normal; font-weight: 400; }
.multi-shell { position: relative; height: 45px; }
.multi-shell-sm { height: 35px; min-width: 142px; }
.multi-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 100%;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
  transition: border-color .16s ease, background .16s ease;
}
.multi-trigger:hover, .multi-shell.is-open .multi-trigger { border-color: var(--line-strong); background: var(--surface); }
.multi-trigger > .icon:first-child { width: 16px; height: 16px; color: var(--accent); flex: none; }
.multi-trigger span { flex: 1; min-width: 0; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.multi-shell-sm .multi-trigger { border-radius: 9px; padding: 0 9px; }
.multi-shell-sm .multi-trigger span { font-size: 10.5px; font-weight: 500; }
.multi-trigger b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 17px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 8px;
  font-weight: 700;
}
.multi-trigger .chevron-icon { width: 14px; height: 14px; flex: none; color: var(--muted); transition: transform .15s ease; }
.multi-shell.is-open .multi-trigger .chevron-icon { transform: rotate(180deg); }
.multi-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 220px);
  max-width: 280px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 16px 44px rgba(20, 30, 24, .18);
  animation: menuIn .15s ease both;
}
.multi-shell-sm .multi-menu { right: 0; left: auto; }
.multi-search { padding: 2px 2px 5px; }
.multi-search .input { width: 100%; min-height: 28px; padding: 0 8px; font-size: 8.5px; }
.multi-tools { display: flex; gap: 4px; padding: 2px 2px 6px; border-bottom: 1px solid var(--line); margin-bottom: 3px; }
.multi-tool {
  flex: 1;
  min-height: 24px;
  border: 0;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
}
.multi-tool:hover { color: var(--ink); background: var(--surface-3); }
.multi-options { max-height: 245px; overflow: auto; }
.promo-multi .multi-options { max-height: 185px; }
.promo-selected { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; min-height: 17px; max-height: 68px; overflow: auto; }
.promo-selected .selected-empty { color: var(--muted-2); font-size: 8px; }
.promo-selected .promo-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border: 1px solid #e8dfd2;
  border-radius: 4px;
  background: #fffaf2;
  color: var(--ink-2);
  font-size: 8px;
}
.promo-selected .promo-tag button {
  display: inline-grid;
  place-items: center;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}
.promo-selected .promo-tag button:hover { background: #f2dfd4; color: var(--red); }
.promo-time-help { margin: -2px 0 7px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.promo-quick-start { margin-bottom: 2px; }
.multi-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 9.5px;
  cursor: pointer;
}
.multi-option:hover { background: var(--surface-2); }
.multi-option input { accent-color: var(--accent); margin: 0; }
.multi-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-option small { margin-left: auto; color: var(--muted-2); font-size: 7.5px; }
.multi-empty { padding: 14px 8px; color: var(--muted); font-size: 9px; text-align: center; }
.chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 45px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf8f1;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.chip:hover { border-color: var(--line-strong); background: #fffaf1; }
.chip.is-active {
  color: #fffaf1;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 3px 9px rgba(20, 32, 25, .18);
}
.chip-mini { min-height: 27px; padding: 0 9px; font-size: 10.5px; border-radius: 7px; }
#bandChips { gap: 3px; }
#bandChips .chip { min-height: 31px; padding: 0 7px; border-radius: 8px; font-size: 10px; }
.filter-side {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 13px;
  padding-bottom: 1px;
}
.filter-count { color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.filter-count strong { color: var(--ink); font-weight: 700; }
.filter-jumps { display: flex; align-items: center; gap: 5px; }
.jump-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease;
}
.jump-link:hover { background: #fffaf1; border-color: var(--line-strong); }
.jump-link .icon { width: 13px; height: 13px; color: var(--accent); }
.jump-link b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Layout ---------- */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}
.main-column { min-width: 0; }
.side-column { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.table-card { overflow: hidden; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 23px 17px;
}
.title-group h2, .side-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -.025em;
  font-weight: 700;
}
.scope-line { margin-top: 5px; color: var(--muted); font-size: 11px; }
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.count-badge-amber { background: var(--amber-soft); color: var(--amber); }
.head-tools { display: flex; align-items: center; gap: 15px; padding-top: 8px; }
.legend { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.dot-low { background: #b9e9ce; box-shadow: inset 0 0 0 1px #70c99a; }
.dot-promo { background: #ffe5a3; box-shadow: inset 0 0 0 1px #e7bf5f; }

/* ---------- Table ---------- */
.table-wrap {
  position: relative;
  max-height: 662px;
  overflow: auto;
  border-top: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: #c9c0b2 transparent;
}
.table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.table-wrap::-webkit-scrollbar-thumb { background: #d1c8ba; border: 3px solid var(--surface); border-radius: 10px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.rate-table {
  width: 100%;
  min-width: 840px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.rate-table th, .rate-table td { padding: 0; }
.rate-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 58px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-strong);
  background: #faf5ec;
  color: var(--ink-2);
  text-align: left;
  font-weight: 600;
}
.rate-table thead th.region-col {
  left: 0;
  z-index: 7;
  width: 104px;
  padding-left: 18px;
  border-right: 1px solid var(--line);
  background: #f5efe4;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .04em;
}
.rate-table thead th.band-col {
  left: 104px;
  z-index: 7;
  width: 113px;
  border-right: 1px solid var(--line);
  background: #f5efe4;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .04em;
}
.rate-table th.courier-col { width: 124px; position: sticky; top: 0; }
.rate-table th.courier-col.recommended {
  background: #fff6ed;
  box-shadow: inset 0 3px 0 var(--accent);
}
.courier-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.courier-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #fff;
  background: var(--courier, #6f7b74);
  font-size: 11px;
  font-weight: 700;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.courier-avatar.avatar-small { width: 25px; height: 25px; border-radius: 7px; font-size: 10px; }
.courier-meta-wrap { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.courier-name {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.courier-sub { color: var(--muted); font-size: 9px; line-height: 1.2; white-space: nowrap; }
.rec-pill {
  display: inline-flex;
  flex: none;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--accent);
  color: #22130c;
  font-size: 8px;
  line-height: 1.35;
  font-weight: 700;
}
.rate-table tbody tr { background: var(--surface); }
.rate-table tbody tr.row-alt { background: #fdf9f2; }
.rate-table tbody tr.group-start td { border-top: 1px solid var(--line-strong); }
.rate-table tbody td {
  height: 58px;
  border-bottom: 1px solid #eee8dd;
  vertical-align: middle;
}
.rate-table tbody tr:last-child td { border-bottom: 0; }
.rate-table td.region-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 104px;
  padding: 13px 12px 12px 18px;
  border-right: 1px solid var(--line);
  background: #fdf9f2;
  vertical-align: top;
}
.rate-table tr.row-alt td.region-cell { background: #fbf6ed; }
.region-name { display: block; color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.3; }
.region-sub { display: block; margin-top: 3px; color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.rate-table td.band-cell {
  position: sticky;
  left: 104px;
  z-index: 3;
  width: 113px;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  background: #fdf9f2;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.rate-table tr.row-alt td.band-cell { background: #fbf6ed; }
.band-cell .band-kg { display: block; font-size: 9px; color: var(--muted-2); font-weight: 500; margin-top: -1px; }
.rate-table td.price-td {
  position: relative;
  padding: 0;
  text-align: center;
  transition: background .14s ease;
}
.rate-table td.price-td:hover { background: #fff7ec; }
.rate-table td.price-td.lowest {
  background:
    linear-gradient(180deg, rgba(221, 246, 232, .82), rgba(235, 249, 240, .78));
  box-shadow: inset 0 0 0 1px rgba(83, 178, 128, .3);
}
.rate-table td.price-td.has-promo:not(.lowest) { background: #fffbf0; }
.price-hit {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  height: 58px;
  padding: 5px 7px 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: default;
}
.price-value { display: flex; align-items: baseline; justify-content: center; line-height: 1.1; }
.price-value .currency { margin-right: 1px; font-size: 9px; font-weight: 600; opacity: .65; }
.price-value .amount { font-size: 16px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.price-td.lowest .price-value .amount { color: var(--green-deep); }
.price-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.2;
  white-space: nowrap;
}
.price-meta .promo-dot { width: 4px; height: 4px; border-radius: 50%; background: #d9a42b; flex: none; }
.price-meta .old-price { text-decoration: line-through; opacity: .85; }
.estimate-mark { margin-right: 1px; color: var(--amber); font-size: 11px; font-weight: 700; }
.formula-tag { color: var(--amber); font-weight: 600; }
.price-td.is-estimated:not(.lowest) .price-value .amount { color: #8a5a00; }
.low-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 8px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 2px 5px rgba(12, 125, 85, .18);
}
.empty-price {
  display: grid;
  place-items: center;
  width: 100%;
  height: 58px;
  color: #bfb7aa;
  font-size: 15px;
  font-weight: 400;
}
.empty-price .icon { width: 14px; height: 14px; opacity: 0; transition: opacity .15s ease; }
.price-td:hover .empty-price .icon { opacity: 1; }
.price-td:hover .empty-price .dash { display: none; }

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 45px;
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  background: #fcf8f0;
  color: var(--muted);
  font-size: 10px;
}
.table-hint { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.table-hint .icon { color: var(--accent); }

.empty-state { padding: 66px 24px 68px; text-align: center; }
.empty-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-2);
  color: var(--accent);
  transform: rotate(-4deg);
}
.empty-state h3 { font-size: 18px; letter-spacing: -.02em; }
.empty-state p { max-width: 390px; margin: 7px auto 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-actions { display: flex; justify-content: center; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.privacy-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 2px 5px;
  color: var(--muted);
  font-size: 10px;
}
.privacy-strip .icon { width: 14px; height: 14px; color: var(--accent); }
.privacy-strip strong { color: var(--ink-2); font-weight: 600; }

/* ---------- Global overview & advice ---------- */
.insight-card {
  scroll-margin-top: 18px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.insight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 21px 24px 15px;
}
.insight-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.025em;
  font-weight: 700;
}
.insight-head .title-group p { margin-top: 5px; color: var(--muted); font-size: 10.5px; }
.insight-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; padding-top: 4px; }
.search-shell {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 35px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.search-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240, 90, 50, .08); }
.search-shell .icon { width: 14px; height: 14px; flex: none; }
.search-shell input {
  width: 126px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 10.5px;
}
.search-shell input::placeholder { color: var(--muted-2); }
.search-shell input::-webkit-search-cancel-button { opacity: .45; }
.insight-select { min-width: 142px; height: 35px; border-radius: 9px; }
.insight-select select { font-size: 10.5px; font-weight: 500; }
.overview-strip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 24px 14px;
}
.overview-stat {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
}
.overview-stat strong { color: var(--ink); font-size: 15px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.overview-stat.is-accent { border-color: #cfe9da; background: #f0fbf5; color: var(--green-deep); }
.overview-stat.is-accent strong { color: var(--green-deep); }
.overview-stat.is-warm { border-color: #f0dfb9; background: #fff9e9; color: var(--amber); }
.overview-stat.is-warm strong { color: var(--amber); }
.global-table-wrap, .advice-table-wrap {
  max-height: 492px;
  overflow: auto;
  border-top: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: #c9c0b2 transparent;
}
.advice-table-wrap { max-height: 500px; }
.global-table-wrap::-webkit-scrollbar, .advice-table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.global-table-wrap::-webkit-scrollbar-thumb, .advice-table-wrap::-webkit-scrollbar-thumb { background: #d1c8ba; border: 3px solid var(--surface); border-radius: 10px; }
.insight-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.insight-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 38px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line-strong);
  background: #f8f2e8;
  color: var(--muted);
  text-align: left;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}
.insight-table thead th:first-child { padding-left: 24px; }
.global-table thead th.gc-courier-head { width: 120px; padding-left: 24px; }
.global-table thead th.gc-region-head { width: 92px; }
.global-table thead th.gc-band-head { width: 72px; padding-left: 5px; padding-right: 5px; text-align: center; }
.global-table thead th.gc-win-head { width: 86px; text-align: center; }
.global-table tbody td.gc-courier-cell {
  width: 120px;
  padding: 9px 8px 9px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fbf7ef;
  vertical-align: top;
}
.global-table tbody td.gc-region-cell {
  width: 92px;
  padding: 0 8px;
  border-right: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}
.gc-courier-main { display: flex; align-items: center; gap: 6px; }
.gc-courier-main .courier-avatar { width: 24px; height: 24px; border-radius: 6px; font-size: 9px; }
.gc-courier-main > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.gc-courier-main strong { overflow: hidden; color: var(--ink); font-size: 9.5px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.gc-courier-main small { margin-top: 2px; color: var(--muted); font-size: 7.5px; }
.gc-courier-total {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 9px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 8px;
  font-weight: 700;
}
.gc-courier-total::after { content: "段最低"; font-weight: 500; }
.global-table tbody tr.courier-start td { border-top: 2px solid var(--line-strong); }
.global-table tbody td.gc-cell {
  position: relative;
  width: 72px;
  height: 43px;
  padding: 0;
  border-right: 1px solid #f2ece2;
  border-bottom: 1px solid #f0eae0;
  text-align: center;
}
.global-table tbody td.gc-cell.is-empty { background: #fdfaf5; }
.global-table tbody td.gc-cell.is-low { background: linear-gradient(180deg, rgba(221, 246, 232, .85), rgba(235, 249, 240, .78)); box-shadow: inset 0 0 0 1px rgba(83, 178, 128, .25); }
.gc-price {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 100%;
  height: 43px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gc-cell.is-low .gc-price { color: var(--green-deep); font-weight: 700; }
.gc-currency { margin-right: 1px; font-size: 7.5px; opacity: .65; }
.gc-approx { color: var(--amber); font-size: 9px; font-weight: 700; }
.gc-promo-dot { width: 4px; height: 4px; border-radius: 50%; background: #d9a42b; }
.gc-low {
  position: absolute;
  top: 3px;
  right: 3px;
  padding: 0 3px;
  border-radius: 3px;
  background: var(--green);
  color: #fff;
  font-size: 6.5px;
  line-height: 1.4;
  font-weight: 700;
}
.gc-empty { color: #c8c0b3; font-size: 10px; }
.global-table tbody td.gc-win-cell {
  width: 86px;
  padding: 0 7px;
  border-bottom: 1px solid #f0eae0;
  text-align: center;
  color: var(--muted);
  white-space: nowrap;
}
.gc-win-cell strong { color: var(--green-deep); font-size: 12px; font-weight: 700; }
.gc-win-cell span { margin-left: 2px; font-size: 8px; }
.global-table tbody td.gc-courier-cell { vertical-align: top; }
.global-table tbody td.gc-region-cell { vertical-align: middle; }
.insight-table tbody td {
  border-bottom: 1px solid #f0eae0;
  background: var(--surface);
  font-size: 10px;
  vertical-align: middle;
}
.global-region-row td {
  height: 34px;
  padding: 7px 16px 7px 24px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  background: #f7f1e6;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}
.global-region-row:first-child td { border-top: 0; }
.global-region-row .region-count {
  margin-left: 7px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 500;
}
.global-region-row .region-count em { margin-left: 6px; color: var(--green-deep); font-style: normal; }
.global-table td.global-band { padding: 0 10px 0 24px; color: var(--ink-2); font-size: 10px; font-weight: 600; white-space: nowrap; }
.global-table td.price-td { position: relative; padding: 0; text-align: center; transition: background .14s ease; }
.global-table td.price-td:hover { background: #fff7ec; }
.global-table td.price-td.lowest { background: linear-gradient(180deg, rgba(221, 246, 232, .82), rgba(235, 249, 240, .78)); box-shadow: inset 0 0 0 1px rgba(83, 178, 128, .28); }
.global-table td.price-td.has-promo:not(.lowest) { background: #fffbf0; }
.insight-table .price-hit { height: 43px; }
.insight-table .price-value .amount { font-size: 13px; }
.insight-table .price-meta { font-size: 7.5px; }
.insight-table .low-badge { top: 3px; right: 3px; font-size: 7px; padding: 0 4px; }
.global-pick { padding: 0 12px; color: var(--ink-2); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.global-pick.is-empty { color: var(--muted-2); }
.insight-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  padding: 9px 24px;
  border-top: 1px solid var(--line);
  background: #fcf8f0;
  color: var(--muted);
  font-size: 9px;
}
.insight-note { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.insight-note .icon { color: var(--accent); }
.insight-table .estimate-mark { margin-right: 1px; color: var(--amber); font-size: 10px; font-weight: 600; }
.insight-table .formula-tag { color: var(--amber); }

/* Advice */
.advice-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 24px 13px;
}
.advice-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}
.advice-stat .advice-stat-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
}
.advice-stat .advice-stat-icon .icon { width: 13px; height: 13px; }
.advice-stat.is-green { border-color: #cfe9da; background: #f0fbf5; }
.advice-stat.is-green .advice-stat-icon { color: var(--green-deep); background: #ddf6e8; }
.advice-stat.is-warm { border-color: #f0dfb9; background: #fff9e9; }
.advice-stat.is-warm .advice-stat-icon { color: var(--amber); background: var(--amber-soft); }
.advice-stat div { display: flex; flex-direction: column; line-height: 1.2; }
.advice-stat strong { color: var(--ink); font-size: 14px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.advice-stat span { margin-top: 1px; color: var(--muted); font-size: 8px; }
.advice-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 24px 12px;
}
.advice-hint { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--muted-2); font-size: 8.5px; }
.advice-hint .icon { color: var(--accent); }
.advice-table thead th:nth-child(1) { width: 92px; }
.advice-table thead th:nth-child(2) { width: 105px; }
.advice-table thead th:nth-child(3) { width: 148px; }
.advice-table thead th:nth-child(4) { width: 92px; }
.advice-table thead th:nth-child(5) { width: 145px; }
.advice-table thead th:nth-child(6) { width: 80px; }
.advice-table thead th:nth-child(7) { width: auto; }
.advice-table tbody tr:hover td { background: #fffaf3; }
.advice-table tbody td { height: 47px; padding: 6px 10px; border-bottom: 1px solid #f0eae0; }
.advice-table tbody td:first-child { padding-left: 24px; color: var(--ink); font-weight: 600; }
.advice-band { color: var(--ink-2); font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.advice-winner { display: flex; align-items: center; gap: 6px; min-width: 0; }
.advice-winner .courier-avatar { width: 22px; height: 22px; border-radius: 6px; font-size: 8px; }
.advice-name { overflow: hidden; color: var(--ink); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.advice-price { color: var(--green-deep); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.advice-runner { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.advice-saving {
  display: inline-flex;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.advice-saving.is-zero { background: var(--surface-3); color: var(--muted); }
.advice-text { display: flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 9.5px; line-height: 1.45; }
.advice-text .advice-warn {
  display: inline-flex;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}
.advice-text .advice-tie {
  display: inline-flex;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e8eef9;
  color: #31578d;
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}
.advice-empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 11px; }
.advice-empty strong { display: block; margin-bottom: 4px; color: var(--ink-2); font-size: 14px; }

/* ---------- Spotlight ---------- */
.spotlight {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 21px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--radius);
  background:
    radial-gradient(260px 200px at 100% 0%, rgba(240, 90, 50, .22), transparent 65%),
    linear-gradient(145deg, #16231d 0%, #111b17 100%);
  color: #f8f4ec;
  box-shadow: 0 18px 44px rgba(24, 34, 28, .2);
}
.spotlight::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -56px;
  bottom: -86px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255, 255, 255, .014), 0 0 0 90px rgba(255, 255, 255, .01);
}
.spotlight-head { display: flex; align-items: center; justify-content: space-between; }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(126, 215, 167, .2);
  border-radius: 999px;
  background: rgba(126, 215, 167, .075);
  color: #8fe0b5;
  font-size: 8.5px;
  font-weight: 600;
}
.live-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #71d8a2;
  box-shadow: 0 0 0 3px rgba(113, 216, 162, .1);
  animation: livePulse 2.4s ease infinite;
}
.spotlight-skeleton { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.spotlight-skeleton span { height: 14px; border-radius: 6px; background: rgba(255, 255, 255, .075); animation: shimmer 1.4s ease infinite; }
.spotlight-skeleton span:nth-child(1) { width: 46%; }
.spotlight-skeleton span:nth-child(2) { width: 72%; height: 30px; }
.spotlight-skeleton span:nth-child(3) { width: 100%; height: 62px; margin-top: 5px; }
.spotlight-skeleton span:nth-child(4) { width: 34%; }
.pick-hero { display: flex; align-items: center; gap: 11px; margin-top: 18px; min-width: 0; }
.pick-orb {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--c, #f05a32);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  flex: none;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .22);
}
.pick-who { min-width: 0; }
.pick-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fffaf2;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pick-context { margin-top: 3px; color: rgba(248, 244, 236, .45); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 15px;
  color: #ffb092;
}
.pick-price .currency { font-size: 18px; font-weight: 600; }
.pick-price .amount { font-size: 45px; line-height: 1; letter-spacing: -.06em; font-weight: 700; font-variant-numeric: tabular-nums; }
.pick-price .suffix { margin-left: 1px; color: rgba(248, 244, 236, .38); font-size: 10px; font-weight: 500; letter-spacing: 0; }
.pick-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.fact-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 6px;
  background: rgba(255, 255, 255, .045);
  color: rgba(248, 244, 236, .65);
  font-size: 9px;
  font-weight: 500;
}
.fact-pill.is-saving { color: #8fe0b5; border-color: rgba(126, 215, 167, .18); background: rgba(126, 215, 167, .07); }
.fact-pill.is-promo { color: #ffd17c; border-color: rgba(255, 209, 124, .18); background: rgba(255, 209, 124, .07); }
.pick-rank { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.rank-title { display: flex; align-items: center; justify-content: space-between; color: rgba(248, 244, 236, .35); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; }
.rank-row { display: flex; align-items: center; gap: 7px; min-height: 28px; margin-top: 3px; }
.rank-courier { display: flex; align-items: center; gap: 6px; width: 104px; flex: none; color: rgba(248, 244, 236, .72); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-courier .courier-avatar { width: 19px; height: 19px; border-radius: 5px; font-size: 8px; }
.rank-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.22; overflow: hidden; }
.rank-who > span { overflow: hidden; text-overflow: ellipsis; }
.rank-who small { margin-top: 1px; color: rgba(248, 244, 236, .34); font-size: 7.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.rank-row.is-first .rank-courier { color: #fffaf2; font-weight: 600; }
.rank-bar { flex: 1; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .075); }
.rank-bar i { display: block; width: var(--w, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f05a32, #ffad8d); }
.rank-row.is-first .rank-bar i { background: linear-gradient(90deg, #35b77e, #8fe0b5); }
.rank-value { width: 39px; flex: none; color: rgba(248, 244, 236, .58); font-size: 9px; text-align: right; font-variant-numeric: tabular-nums; }
.spotlight-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 37px;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 9px;
  background: rgba(255, 255, 255, .065);
  color: #fbf7ee;
  font-size: 10.5px;
  font-weight: 600;
  transition: background .18s ease, border-color .18s ease;
}
.spotlight-cta:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .22); }
.spotlight-cta .icon { width: 14px; height: 14px; }
.spotlight-empty { padding: 28px 0 10px; color: rgba(248, 244, 236, .55); font-size: 11.5px; line-height: 1.7; }
.spotlight-empty strong { display: block; margin-bottom: 4px; color: #fffaf2; font-size: 15px; }

/* ---------- Promo panel ---------- */
.side-card {
  padding: 19px 19px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.side-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.side-head h2 { font-size: 17px; }
.promo-summary { margin-top: 7px; color: var(--muted); font-size: 10.5px; }
.promo-list { margin-top: 10px; }
.promo-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 11px 2px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  color: var(--ink);
}
.promo-item:hover .promo-name { color: var(--accent-deep); }
.promo-status-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--amber); flex: none; }
.promo-status-dot.is-active { background: var(--green); box-shadow: 0 0 0 3px rgba(12, 125, 85, .1); }
.promo-status-dot.is-over { background: #b7b0a5; }
.promo-item-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.promo-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.promo-name { overflow: hidden; font-size: 11.5px; font-weight: 600; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; transition: color .15s ease; }
.promo-badge { flex: none; padding: 1px 4px; border-radius: 4px; background: var(--green-soft); color: var(--green-deep); font-size: 7.5px; font-weight: 700; }
.promo-badge.is-scheduled { color: var(--amber); background: var(--amber-soft); }
.promo-scope { margin-top: 3px; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-time { display: flex; align-items: center; gap: 3px; margin-top: 4px; color: var(--muted-2); font-size: 8.5px; }
.promo-time .icon { width: 10px; height: 10px; }
.promo-offer { flex: none; padding-top: 2px; color: var(--accent-deep); font-size: 10px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.promo-offer small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 7.5px; font-weight: 500; }
.promo-empty {
  margin: 12px 0 2px;
  padding: 16px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}
.promo-empty strong { display: block; margin-bottom: 2px; color: var(--ink-2); font-size: 11px; }
.panel-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  margin-top: 3px;
  padding: 9px 0 5px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.panel-link:hover { color: var(--ink); }
.panel-link .icon { width: 12px; height: 12px; transition: transform .15s ease; }
.panel-link:hover .icon { transform: translateX(2px); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 42px; border-top: 1px solid rgba(210, 201, 187, .7); background: rgba(255, 253, 248, .45); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1544px;
  margin: 0 auto;
  padding: 20px 30px 28px;
  color: var(--muted);
  font-size: 10px;
}
.footer-brand { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-weight: 600; }
.footer-brand .icon { width: 15px; height: 15px; color: var(--accent); }
.footer-meta { text-align: right; }

/* ---------- Modals ---------- */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 22, 18, .61);
  backdrop-filter: blur(7px);
  animation: scrimIn .18s ease both;
}
.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 620px);
  max-height: min(90vh, 860px);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modalIn .23s cubic-bezier(.2, .8, .2, 1) both;
}
.modal-lg { width: min(100%, 880px); }
.modal-xl { width: min(100%, 1180px); }
.modal-md { width: min(100%, 680px); }
.modal-sm { width: min(100%, 590px); }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 25px 17px;
  border-bottom: 1px solid var(--line);
}
.modal-title-block .eyebrow { margin-bottom: 0; }
.modal-title-block h2 { margin-top: 5px; font-size: 23px; line-height: 1.2; letter-spacing: -.035em; font-weight: 700; }
.modal-title-block p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.modal-body { padding: 20px 25px; overflow: auto; overscroll-behavior: contain; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 25px;
  border-top: 1px solid var(--line);
  background: #fcf8f0;
  border-radius: 0 0 24px 24px;
}
.foot-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.foot-note { color: var(--muted); font-size: 9.5px; line-height: 1.5; max-width: 370px; }

/* Import */
.dropzone {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  min-height: 230px;
  padding: 28px;
  border: 1.5px dashed #cec4b4;
  border-radius: 17px;
  background:
    radial-gradient(380px 180px at 50% 0%, rgba(240, 90, 50, .05), transparent 70%),
    #fbf7ef;
  text-align: center;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--accent); background: #fff9f2; }
.dropzone.is-drag { transform: scale(.995); }
.drop-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 13px;
  border: 1px solid #f0d3c6;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  transform: rotate(-3deg);
}
.dropzone strong { font-size: 15px; letter-spacing: -.01em; }
.dropzone > span { margin-top: 5px; color: var(--muted); font-size: 10.5px; }
.drop-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 15px; }
.drop-badges span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 8.5px;
}
.import-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 120px;
  color: var(--muted);
  font-size: 12px;
}
.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid #e6ded1;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.file-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}
.file-strip-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 9px;
  background: #e8f3e9;
  color: var(--green-deep);
  flex: none;
}
.file-strip-main > div:last-child { display: flex; flex-direction: column; min-width: 0; }
.file-strip-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.file-strip-main span { margin-top: 1px; color: var(--muted); font-size: 9px; }
.file-strip-actions { display: flex; align-items: center; gap: 9px; flex: none; }
.select-shell-sm {
  height: 34px;
  padding: 0 9px;
  background: var(--surface);
  border-radius: 8px;
}
.select-shell-sm select { padding-right: 19px; font-size: 10.5px; font-weight: 500; }
.select-shell-sm .select-chevron { width: 12px; height: 12px; right: 7px; }
.detect-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 15px; }
.format-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.format-pill.is-wide { background: #e8eef9; color: #31578d; }
.detect-note { color: var(--muted); font-size: 9.5px; }
.import-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 13px; }
.import-stat {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.import-stat strong { display: block; font-size: 17px; line-height: 1.2; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.import-stat span { display: block; margin-top: 1px; color: var(--muted); font-size: 8.5px; }
.preview-block { margin-top: 15px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: #faf6ee;
  border-bottom: 1px solid var(--line);
}
.preview-head strong { font-size: 10px; }
.preview-head span { color: var(--muted); font-size: 8.5px; }
.preview-wrap { max-height: 190px; overflow: auto; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 9.5px; }
.preview-table th {
  position: sticky;
  top: 0;
  padding: 7px 9px;
  background: #fcf8f0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.preview-table td { padding: 6px 9px; border-bottom: 1px solid #f0ebe1; color: var(--ink-2); white-space: nowrap; }
.preview-table tr:last-child td { border-bottom: 0; }
.preview-table td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.import-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.import-mode > .field-label { grid-column: 1 / -1; }
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.radio-card:hover { border-color: var(--line-strong); background: #fffaf1; }
.radio-card:has(input:checked) { border-color: var(--accent); background: #fff7f0; box-shadow: inset 0 0 0 1px rgba(240, 90, 50, .15); }
.radio-card input { margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.radio-card span { display: flex; flex-direction: column; min-width: 0; }
.radio-card strong { font-size: 10.5px; }
.radio-card small { margin-top: 2px; color: var(--muted); font-size: 8.5px; line-height: 1.45; }
.inline-alert {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 13px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 9.5px;
  line-height: 1.6;
  white-space: pre-line;
}
.inline-alert-error { border-color: #f0ceca; background: #fdf0ee; color: #972f27; }
.inline-alert-warn { border-color: #efdfb9; background: #fff9e8; color: #88620c; }
.inline-alert ul { margin: 0; padding-left: 14px; }
.inline-alert li { margin: 1px 0; }

/* Forms */
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.span-2 { grid-column: 1 / -1; }
.field-label { color: var(--ink-2); font-size: 9.5px; font-weight: 600; letter-spacing: .01em; }
.field-label em { color: var(--muted-2); font-style: normal; font-weight: 400; }
.input {
  width: 100%;
  min-height: 39px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.input:hover { border-color: var(--line-strong); }
.input:focus { border-color: var(--accent); background: #fffdf8; box-shadow: 0 0 0 3px rgba(240, 90, 50, .09); }
.input::placeholder { color: #b4ada1; }
.input.is-invalid { border-color: #d96a5f; background: #fff8f6; box-shadow: 0 0 0 3px rgba(217, 106, 95, .1); }
select.input { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, #857d70 50%), linear-gradient(135deg, #857d70 50%, transparent 50%); background-position: calc(100% - 14px) 17px, calc(100% - 9px) 17px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.textarea { min-height: 61px; resize: vertical; line-height: 1.5; }
.input-affix { position: relative; display: flex; align-items: center; }
.input-affix .input { padding-left: 27px; padding-right: 30px; }
.affix-prefix { position: absolute; left: 10px; color: var(--muted); font-size: 11px; pointer-events: none; }
.affix-suffix { position: absolute; right: 10px; color: var(--muted-2); font-size: 9px; pointer-events: none; }
.price-preview {
  display: flex;
  align-items: center;
  min-height: 39px;
  padding: 6px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: #fcf9f3;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}
.price-preview strong { color: var(--green-deep); font-size: 12px; margin: 0 2px; }
.quick-dates { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: -4px; }
.quick-dates > span { margin-right: 3px; color: var(--muted); font-size: 9px; }
.form-hint { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.form-hint .icon { margin-top: 1px; color: var(--accent); }

/* Band / courier management */
.band-manage-summary, .courier-manage-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.manage-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
}
.manage-chip strong { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.band-manage-list, .courier-manage-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 315px;
  overflow: auto;
  padding-right: 2px;
}
.band-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.band-row .band-index {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}
.band-range { flex: 1; color: var(--ink); font-size: 11px; font-weight: 600; }
.band-meta { color: var(--muted); font-size: 8.5px; white-space: nowrap; }
.band-actions { display: flex; gap: 3px; }
.courier-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.courier-row-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.courier-row-main .courier-avatar { width: 29px; height: 29px; border-radius: 8px; font-size: 10px; }
.courier-row-main > div { min-width: 0; }
.courier-row-main strong { display: block; overflow: hidden; color: var(--ink); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.courier-row-main small { display: block; margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.courier-row-actions { display: flex; align-items: center; gap: 4px; }
.courier-action {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 8.5px;
  white-space: nowrap;
}
.courier-action:hover { color: var(--ink); border-color: var(--line-strong); }
.courier-action.is-danger:hover { color: var(--danger); border-color: #e4bfba; background: #fdf3f1; }
.courier-action.is-accent { color: var(--accent-deep); border-color: #f0d0c3; background: #fff7f1; }
.band-editor {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.band-editor-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.band-editor-head strong { font-size: 11px; }
.band-editor-head span { color: var(--muted); font-size: 8.5px; }
.band-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  align-items: end;
  gap: 8px;
  margin-top: 8px;
}
.band-editor-grid .btn { min-height: 39px; padding: 0 11px; font-size: 10px; }
.band-editor .inline-alert { margin-top: 8px; }

/* Weight calculator */
.calc-bar {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  padding: 0 24px 14px;
}
.calc-field { display: flex; flex-direction: column; gap: 4px; width: 150px; }
.calc-field > span { color: var(--muted); font-size: 8.5px; }
.calc-field .input { min-height: 38px; }
.calc-field-region { width: 190px; }
.calc-field .input-affix .input { padding-right: 30px; }
.calc-field > .input { appearance: auto; }
.calc-hint { margin-left: auto; align-self: center; color: var(--muted); font-size: 8.5px; }
.calc-hint code, .formula-preview code { padding: 1px 4px; border-radius: 4px; background: var(--surface-3); font-family: var(--mono); }
.calc-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 0 24px 16px;
}
.calc-empty {
  grid-column: 1 / -1;
  padding: 28px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.calc-card {
  position: relative;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.calc-card.is-low { border-color: #b9e7cf; background: #f0fbf5; box-shadow: inset 0 0 0 1px rgba(12, 125, 85, .08); }
.calc-card-head { display: flex; align-items: center; gap: 6px; }
.calc-card-head .courier-avatar { width: 25px; height: 25px; border-radius: 7px; font-size: 9px; }
.calc-card-head strong { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.calc-price { margin-top: 7px; color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.calc-card.is-low .calc-price { color: var(--green-deep); }
.calc-price small { margin-left: 6px; color: var(--muted); font-size: 8px; font-weight: 400; letter-spacing: 0; }
.calc-source { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.calc-source strong { color: var(--accent-deep); font-weight: 600; }
.calc-low-tag {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--green);
  color: #fff;
  font-size: 7px;
  font-weight: 700;
}
.calc-formula-note { margin-top: 4px; color: var(--amber); font-size: 8px; line-height: 1.4; }
.calc-missing { padding: 12px; color: var(--muted); font-size: 9px; }
.formula-list { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow: auto; margin-bottom: 14px; }
.formula-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.formula-item-main { flex: 1; min-width: 0; }
.formula-item-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.formula-item-title strong { font-size: 10px; }
.formula-item-title span { padding: 1px 4px; border-radius: 3px; background: var(--surface-2); color: var(--muted); font-size: 7.5px; }
.formula-item-code { margin-top: 3px; color: var(--accent-deep); font-family: var(--mono); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.formula-item-note { margin-top: 2px; color: var(--muted); font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.formula-item-actions { display: flex; gap: 3px; }
.formula-editor { padding-top: 12px; border-top: 1px solid var(--line); }
.formula-editor-head { display: flex; align-items: center; justify-content: space-between; }
.formula-editor-head strong { font-size: 12px; }
.formula-range { display: flex; align-items: center; gap: 5px; }
.formula-range .input { min-width: 0; }
.formula-range > span { color: var(--muted); font-size: 10px; }
.formula-input { font-family: var(--mono); font-size: 11px; }
.formula-preview { padding: 7px 9px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.formula-preview strong { color: var(--green-deep); }
.formula-actions { display: flex; justify-content: flex-end; }
.formula-empty { padding: 16px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); font-size: 9px; text-align: center; }

/* Region hierarchy picker */
.region-picker-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 45px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
}
.region-picker-trigger:hover { border-color: var(--line-strong); background: var(--surface); }
.region-picker-trigger > .icon:first-child { width: 16px; height: 16px; color: var(--accent); flex: none; }
.region-picker-trigger span { flex: 1; min-width: 0; overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.region-picker-trigger .chevron-icon { transform: rotate(90deg); }
.region-picker-search { position: relative; margin-bottom: 9px; }
.region-picker-search > .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted); }
.region-picker-search .input { min-height: 36px; padding-left: 31px; font-size: 10px; }
.region-picker-columns { display: grid; grid-template-columns: 1fr 1.15fr 1.25fr; gap: 8px; }
.region-column { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.region-column h4 { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 7px 8px; border-bottom: 1px solid var(--line); background: #faf5eb; font-size: 9px; font-weight: 700; }
.region-column h4 small { color: var(--muted-2); font-size: 7px; font-weight: 400; }
.region-column-list { height: 260px; overflow: auto; padding: 3px; }
.region-node {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 27px;
  padding: 2px 5px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-2);
  text-align: left;
  font-size: 8.5px;
}
.region-node:hover { background: var(--surface-2); }
.region-node.is-active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.region-node input { margin: 0; accent-color: var(--accent); }
.region-node button { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-node span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-node small { color: var(--muted-2); font-size: 6.5px; }
.region-picker-results { max-height: 310px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.region-result { display: flex; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 5px; font-size: 8.5px; cursor: pointer; }
.region-result:hover { background: var(--surface-2); }
.region-result input { accent-color: var(--accent); }
.region-result strong { font-size: 9px; }
.region-result small { margin-left: auto; color: var(--muted-2); font-size: 7px; }
.region-picker-selected-wrap { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.region-picker-selected-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; margin-bottom: 5px; }
.region-picker-selected { display: flex; flex-wrap: wrap; gap: 4px; max-height: 75px; overflow: auto; }
.region-picker-selected .promo-tag { background: #fffaf2; }
.region-picker-selected .promo-tag small { color: var(--muted-2); font-size: 6.5px; }
.multi-options.is-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 4px; }
.multi-options.is-grid .multi-option { min-width: 0; padding: 3px 5px; font-size: 8.5px; }
.time-input-wrap { position: relative; }
.time-input-wrap .input { padding-right: 35px; }
.time-picker-btn {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}
.time-picker-btn:hover { background: var(--surface-2); color: var(--accent); }
.native-time-picker { position: absolute; right: 4px; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Settings & audit */
.settings-online {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(145deg, #fffdf8, #f7f1e7);
  margin-bottom: 18px;
}
.settings-mode { display: flex; align-items: flex-start; gap: 9px; }
.settings-mode-badge {
  flex: none;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}
.settings-mode-badge.is-offline { background: var(--amber-soft); color: var(--amber); }
.settings-mode strong { display: block; font-size: 12px; }
.settings-mode p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.settings-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.settings-meta { margin-top: 7px; color: var(--muted); font-size: 8.5px; font-variant-numeric: tabular-nums; }
.settings-device { display: grid; grid-template-columns: 1fr 1.1fr; gap: 12px; align-items: end; margin-top: 11px; }
.settings-device-row { display: flex; gap: 5px; }
.settings-device-row .input { flex: 1; min-width: 0; }
.settings-link { color: var(--muted); font-size: 7.5px; line-height: 1.45; word-break: break-all; }
.settings-link strong { display: block; margin-bottom: 2px; color: var(--ink-2); font-size: 8px; }
.history-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 9px; }
.history-head h3 { font-size: 15px; letter-spacing: -.03em; }
.history-head p { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.history-tools { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.history-search { width: 170px; min-height: 31px; font-size: 9px; }
.history-type { width: 130px; min-height: 31px; font-size: 9px; }
.history-list { display: flex; flex-direction: column; gap: 7px; max-height: 390px; overflow: auto; padding-right: 2px; }
.history-entry {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  background: var(--surface);
}
.history-entry.is-import { border-left-color: var(--green); }
.history-entry.is-promo { border-left-color: var(--amber); }
.history-entry.is-formula { border-left-color: #8b72d8; }
.history-entry-head { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.history-entry-head strong { font-size: 10px; }
.history-action { padding: 2px 5px; border-radius: 3px; background: var(--surface-2); color: var(--muted); font-size: 7.5px; }
.history-time { margin-left: auto; color: var(--muted-2); font-size: 7.5px; font-variant-numeric: tabular-nums; }
.history-actor { color: var(--muted); font-size: 7.5px; }
.history-summary { margin-top: 4px; color: var(--ink-2); font-size: 9px; line-height: 1.5; }
.history-counts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.history-count { padding: 2px 5px; border-radius: 3px; background: var(--surface-2); color: var(--muted); font-size: 7px; }
.history-detail { margin-top: 6px; }
.history-detail summary { color: var(--muted); font-size: 8px; cursor: pointer; user-select: none; }
.history-changes { display: flex; flex-direction: column; gap: 2px; max-height: 165px; overflow: auto; margin-top: 5px; padding: 5px 6px; border-radius: 5px; background: #fbf8f2; }
.history-change { display: flex; gap: 5px; font-size: 7.5px; line-height: 1.5; }
.history-change-op { flex: none; width: 26px; color: var(--accent-deep); font-weight: 600; }
.history-change-op.is-removed { color: var(--red); }
.history-change-op.is-added { color: var(--green-deep); }
.history-change-label { flex: 1; min-width: 0; color: var(--ink-2); word-break: break-all; }
.history-change-detail { flex: 1.2; min-width: 0; color: var(--muted); word-break: break-all; }
.history-empty { padding: 28px 12px; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--muted); font-size: 9px; text-align: center; }
.history-more { width: 100%; margin-top: 7px; }
.history-loading { padding: 12px; color: var(--muted); font-size: 9px; text-align: center; }

/* Courier price detail */
.detail-summary { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 11px; }
.detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 11px; }
.detail-hint { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8.5px; }
.detail-hint .icon { color: var(--accent); }
.price-group-list { display: flex; flex-direction: column; gap: 7px; }
.price-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.price-group.is-open { border-color: #d6c8b8; box-shadow: 0 3px 12px rgba(36, 46, 40, .06); }
.price-group-head {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}
.price-group-head:hover { background: #fffaf2; }
.price-group-count {
  flex: none;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}
.price-group-regions { flex: 1; min-width: 0; overflow: hidden; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.price-group-meta { flex: none; color: var(--muted); font-size: 8px; white-space: nowrap; }
.chevron-icon { width: 14px; height: 14px; flex: none; color: var(--muted); transition: transform .15s ease; }
.price-group.is-open .chevron-icon { transform: rotate(180deg); }
.detail-table-wrap { overflow: auto; border-top: 1px solid var(--line); max-height: 410px; }
.detail-table { width: 100%; min-width: 1350px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.detail-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 34px;
  padding: 5px 6px;
  border-bottom: 1px solid var(--line-strong);
  background: #f8f2e8;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}
.detail-table th.detail-region-head { left: 0; z-index: 5; width: 88px; text-align: left; padding-left: 11px; }
.detail-table th.detail-op-head { width: 44px; }
.detail-table td { height: 44px; padding: 0; border-bottom: 1px solid #f0eae0; border-right: 1px solid #f5eee4; background: var(--surface); }
.detail-table td.detail-region-cell { position: sticky; left: 0; z-index: 2; width: 88px; padding: 0 9px; border-right: 1px solid var(--line); background: #fdf9f3; color: var(--ink); font-size: 9px; font-weight: 600; white-space: nowrap; }
.detail-table td.detail-op-cell { width: 44px; text-align: center; }
.detail-price-cell { width: 70px; text-align: center; }
.detail-price-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  height: 44px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 9.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.detail-price-btn:hover { background: #fff5e9; color: var(--accent-deep); }
.detail-price-btn small { display: block; width: 100%; overflow: hidden; color: var(--muted-2); font-size: 6.5px; font-weight: 400; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.detail-price-cell.is-formula { background: #fffcf2; }
.detail-price-empty {
  width: 100%;
  height: 44px;
  border: 0;
  background: transparent;
  color: #c4bcb0;
  font-size: 13px;
}
.detail-price-empty:hover { background: #f6fbf7; color: var(--green); }
.input.is-readonly { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

/* Import target */
.import-target {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 15px;
  padding: 10px 12px;
  border: 1px solid #cfe9da;
  border-radius: 9px;
  background: #f2fbf6;
  color: var(--green-deep);
}
.import-target .icon { width: 16px; height: 16px; margin-top: 1px; flex: none; }
.import-target div { display: flex; flex-direction: column; }
.import-target strong { font-size: 10.5px; }
.import-target span { margin-top: 2px; color: #4c7662; font-size: 8.5px; }

/* Quick price popover */
.price-popover {
  position: fixed;
  z-index: 170;
  width: 276px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(16, 27, 21, .24);
  animation: menuIn .15s ease both;
}
.pp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pp-head > div { display: flex; flex-direction: column; }
.pp-eyebrow { color: var(--accent-deep); font-size: 7px; letter-spacing: .16em; font-weight: 700; }
.pp-head strong { margin-top: 2px; font-size: 13px; }
.pp-context { margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.pp-form { margin-top: 10px; }
.pp-field { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 8.5px; }
.pp-hint { min-height: 12px; margin-top: 5px; color: var(--amber); font-size: 8px; line-height: 1.4; }
.pp-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.pp-actions .text-btn { font-size: 8.5px; }

/* Promo manager */
.promo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 13px; }
.mini-tabs { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.mini-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  white-space: nowrap;
}
.mini-tab:hover { color: var(--ink); }
.mini-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(31, 42, 35, .08); font-weight: 600; }
.mini-tab span { color: var(--muted-2); font-size: 8px; font-variant-numeric: tabular-nums; }
.toolbar-hint { display: inline-flex; align-items: center; gap: 4px; color: var(--muted-2); font-size: 8.5px; }
.toolbar-hint .icon { width: 12px; height: 12px; }
.promo-manage-list { display: flex; flex-direction: column; gap: 8px; }
.promo-manage-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.promo-manage-item.is-active { border-left: 3px solid var(--green); background: #fbfefb; }
.promo-manage-item.is-scheduled { border-left: 3px solid #e0b34c; background: #fffdf7; }
.promo-manage-item.is-expired { border-left: 3px solid #bdb5a9; background: #fbf9f4; opacity: .8; }
.promo-manage-main { min-width: 0; }
.promo-manage-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.promo-manage-title strong { font-size: 12px; }
.status-pill { padding: 2px 6px; border-radius: 4px; font-size: 8px; font-weight: 700; }
.status-pill.is-active { background: var(--green-soft); color: var(--green-deep); }
.status-pill.is-scheduled { background: var(--amber-soft); color: var(--amber); }
.status-pill.is-expired { background: #eee9df; color: var(--muted); }
.promo-manage-scope { margin-top: 4px; color: var(--muted); font-size: 9.5px; }
.promo-manage-time { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.promo-manage-time .icon { width: 11px; height: 11px; }
.promo-manage-side { display: flex; align-items: flex-end; flex-direction: column; justify-content: space-between; gap: 8px; }
.promo-manage-value { color: var(--accent-deep); font-size: 12px; font-weight: 700; white-space: nowrap; text-align: right; }
.promo-manage-value small { display: block; color: var(--muted); font-size: 8px; font-weight: 400; }
.promo-manage-actions { display: flex; gap: 3px; }
.mini-icon-btn {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
}
.mini-icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.mini-icon-btn.is-danger:hover { color: var(--danger); border-color: #e6c2be; background: #fdf3f1; }
.mini-icon-btn .icon { width: 12px; height: 12px; }
.promo-list-empty { padding: 34px 20px; border: 1px dashed var(--line-strong); border-radius: 12px; text-align: center; color: var(--muted); font-size: 10px; }
.promo-list-empty strong { display: block; margin-bottom: 3px; color: var(--ink-2); font-size: 13px; }

/* Guide */
.guide-list { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; }
.guide-list li { display: flex; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.guide-list li:last-child { border-bottom: 0; }
.guide-index { font-family: var(--mono); color: var(--accent-deep); font-size: 10px; font-weight: 700; padding-top: 2px; flex: none; }
.guide-list strong { font-size: 12.5px; }
.guide-list p { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.guide-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.guide-note .icon { width: 15px; height: 15px; color: var(--accent); margin-top: 1px; flex: none; }
.guide-note div { display: flex; flex-direction: column; }
.guide-note strong { font-size: 10px; }
.guide-note span { margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.guide-note code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 8.5px;
}

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed;
  z-index: 200;
  left: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 11px;
  background: #16221c;
  color: #fbf7ee;
  box-shadow: 0 15px 38px rgba(14, 22, 18, .25);
  animation: toastIn .23s cubic-bezier(.2, .8, .2, 1) both;
  pointer-events: auto;
}
.toast.is-out { animation: toastOut .2s ease both; }
.toast-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(126, 215, 167, .13);
  color: #8fe0b5;
  flex: none;
}
.toast-icon .icon { width: 14px; height: 14px; }
.toast.is-error .toast-icon { background: rgba(255, 128, 109, .13); color: #ff9a89; }
.toast.is-warn .toast-icon { background: rgba(255, 195, 91, .12); color: #ffc35b; }
.toast-content { display: flex; flex-direction: column; min-width: 0; }
.toast-content strong { font-size: 10.5px; font-weight: 600; }
.toast-content span { margin-top: 2px; color: rgba(248, 244, 236, .58); font-size: 9px; line-height: 1.5; }
[data-focus-key].is-flashing, tr.is-flashing td { animation: rowFlash 1.5s ease; }
tr.is-flashing td.price-td.lowest { animation: lowFlash 1.5s ease; }
.noscript { padding: 30px; background: #fbe8e5; color: #7c241c; text-align: center; }

@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes shimmer { 0%, 100% { opacity: .45; } 50% { opacity: .85; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(5px); } }
@keyframes rowFlash { 0%, 100% { background-color: transparent; } 22% { background-color: rgba(240, 90, 50, .15); } 55% { background-color: rgba(240, 90, 50, .07); } }
@keyframes lowFlash { 0%, 100% { box-shadow: inset 0 0 0 1px rgba(83, 178, 128, .3); } 30% { box-shadow: inset 0 0 0 3px rgba(12, 125, 85, .65); } }

/* ---------- Responsive ---------- */
@media (max-width: 1320px) {
  .hero { grid-template-columns: minmax(0, 1fr) 430px; gap: 40px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 332px; }
  .rate-table th.courier-col { width: 120px; }
  .rank-courier { width: 95px; }
}
@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
  .stat-card { min-height: 104px; }
  .workspace { grid-template-columns: 1fr; }
  .side-column { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .table-wrap { max-height: 590px; }
}
@media (max-width: 900px) {
  .header-inner { padding-bottom: 58px; }
  .save-state { display: none; }
  .hero { padding-top: 42px; }
  .hero h1 { font-size: clamp(34px, 6vw, 46px); }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .filter-card { margin-top: -36px; }
  .filter-grid { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .region-field { grid-column: 1; grid-row: 1; width: auto; }
  .courier-field { grid-column: 2; grid-row: 1; }
  .band-field { grid-column: 1 / -1; grid-row: 2; }
  .filter-side { grid-column: 1 / -1; grid-row: 3; width: 100%; justify-content: space-between; padding-top: 0; }
  .head-tools .legend { display: none; }
  .insight-head { flex-direction: column; gap: 12px; }
  .insight-tools { width: 100%; justify-content: flex-start; padding-top: 0; }
  .advice-hint { margin-left: 0; width: 100%; }
}
@media (max-width: 700px) {
  .header-inner, .shell { padding-left: 16px; padding-right: 16px; }
  .header-inner { padding-bottom: 50px; }
  .topbar { flex-wrap: wrap; padding: 13px 0; min-height: 0; gap: 11px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-text strong { font-size: 16px; }
  .header-actions { width: 100%; margin-left: 0; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .header-actions::-webkit-scrollbar { display: none; }
  .header-actions > * { flex: none; }
  .header-actions .btn { min-height: 38px; padding: 0 12px; }
  .header-actions .btn span { font-size: 11.5px; }
  .hero { padding-top: 30px; gap: 26px; }
  .hero h1 { margin-top: 14px; font-size: 33px; line-height: 1.17; }
  .hero p { margin-top: 14px; font-size: 12.5px; line-height: 1.7; }
  .hero-trust { margin-top: 17px; gap: 7px 14px; font-size: 10px; }
  .hero-stats { gap: 8px; }
  .stat-card { min-height: 93px; padding: 12px 13px; }
  .stat-value strong { font-size: 25px; }
  .stat-label { font-size: 9px; }
  .stat-sub { font-size: 8.5px; margin-top: 6px; }
  .filter-card { margin-top: -27px; padding: 13px 13px 11px; border-radius: 16px; }
  .filter-grid { grid-template-columns: 1fr; gap: 12px; }
  .region-field { grid-column: 1; grid-row: 1; width: 100%; }
  .courier-field { grid-column: 1; grid-row: 2; }
  .band-field { grid-column: 1; grid-row: 3; }
  .filter-side { grid-column: 1; grid-row: 4; }
  .chip-row { min-height: 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { flex: none; min-height: 32px; }
  .filter-side { width: 100%; justify-content: space-between; padding: 0; margin-top: -1px; }
  .workspace { gap: 14px; margin-top: 15px; }
  .card { border-radius: 18px; }
  .card-head { padding: 17px 16px 13px; }
  .title-group h2 { font-size: 17px; }
  .head-tools { gap: 6px; padding-top: 3px; }
  .head-tools .btn span { display: none; }
  .head-tools .btn { width: 33px; padding: 0; overflow: hidden; }
  .table-wrap { max-height: 62vh; }
  .rate-table { min-width: 760px !important; }
  .rate-table th.region-col, .rate-table td.region-cell { width: 88px; padding-left: 12px; }
  .rate-table th.band-col, .rate-table td.band-cell { left: 88px; width: 100px; }
  .table-foot { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 15px; }
  .side-column { grid-template-columns: 1fr; }
  .spotlight { padding: 18px; }
  .side-card { padding: 16px 16px 11px; }
  .privacy-strip { font-size: 9px; margin-top: 10px; }
  .filter-jumps { order: 3; width: 100%; }
  .jump-link { flex: 1; justify-content: center; }
  .insight-card { margin-top: 14px; border-radius: 18px; }
  .insight-head { padding: 17px 16px 13px; }
  .insight-head h2 { font-size: 17px; }
  .overview-strip, .advice-summary, .advice-toolbar { padding-left: 16px; padding-right: 16px; }
  .insight-tools { gap: 6px; }
  .search-shell { flex: 1 1 150px; }
  .search-shell input { width: 100%; }
  .insight-select { flex: 1 1 120px; min-width: 0; }
  .global-table-wrap, .advice-table-wrap { max-height: 58vh; }
  .insight-foot { flex-direction: column; align-items: flex-start; gap: 3px; padding: 9px 16px; }
  .advice-stat { flex: 1 1 42%; }
  .advice-hint { display: none; }
  .advice-table tbody td:first-child, .insight-table thead th:first-child { padding-left: 16px; }
  .global-table td.global-band { padding-left: 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; padding: 17px 16px 25px; gap: 5px; }
  .footer-meta { text-align: left; }
  .modal-layer { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 94dvh; border-radius: 20px 20px 0 0; border-bottom: 0; }
  .modal-head { padding: 19px 17px 14px; }
  .modal-title-block h2 { font-size: 20px; }
  .modal-body { padding: 16px 17px; }
  .modal-foot { padding: 12px 17px; border-radius: 0; flex-wrap: wrap; }
  .foot-note { display: none; }
  .dropzone { min-height: 190px; padding: 22px 16px; }
  .import-stats { grid-template-columns: 1fr 1fr; }
  .file-strip { align-items: flex-start; flex-direction: column; gap: 8px; }
  .file-strip-actions { width: 100%; justify-content: space-between; }
  .file-strip-actions .select-shell { flex: 1; }
  .import-mode { grid-template-columns: 1fr; }
  .band-editor-grid { grid-template-columns: 1fr 1fr; }
  .band-editor-grid .btn { grid-column: auto; }
  .courier-row { grid-template-columns: 1fr; gap: 7px; }
  .courier-row-actions { justify-content: flex-end; flex-wrap: wrap; }
  .detail-toolbar { flex-direction: column; align-items: flex-start; }
  .price-group-head { flex-wrap: wrap; }
  .price-group-meta { order: 5; width: 100%; padding-left: 2px; }
  .calc-bar { padding: 0 16px 12px; align-items: stretch; }
  .calc-field, .calc-field-region { width: 100%; }
  .calc-hint { width: 100%; margin: 0; }
  .calc-results { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px 14px; }
  .region-picker-columns { grid-template-columns: 1fr; }
  .region-column-list { height: 150px; }
  .settings-device { grid-template-columns: 1fr; }
  .history-head { align-items: flex-start; }
  .history-tools { width: 100%; }
  .history-search { flex: 1; width: auto; }
  .history-type { width: 120px; }
  .history-time { width: 100%; margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .promo-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-hint { display: none; }
  .promo-manage-item { grid-template-columns: 1fr; gap: 7px; }
  .promo-manage-side { flex-direction: row; align-items: center; }
  .promo-manage-actions { align-items: center; }
  .toast-stack { left: 12px; bottom: 12px; }
  .modal-layer { z-index: 100; }
  #promoEditorModal, #rateModal { z-index: 110; }
}
@media (max-width: 430px) {
  .hero h1 { font-size: 29px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 86px; }
  .stat-value strong { font-size: 22px; }
  .header-actions { gap: 6px; }
  .header-actions .btn { padding: 0 9px; font-size: 10.5px; }
  .header-actions .btn .icon { width: 14px; height: 14px; }
  .header-actions .split-toggle { width: 26px; padding: 0; }
  .header-actions .icon-btn { width: 38px; height: 38px; }
  .pick-price .amount { font-size: 40px; }
  .modal-foot { align-items: stretch; }
  .modal-foot .foot-actions { margin-left: auto; }
  .modal-foot .text-btn { font-size: 10px; }
  .import-mode { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
