/* ============================================================
   cdk-console.css · 「港湾路由台」主题（Harbor Desk · 2026-07-21）
   ------------------------------------------------------------
   冷灰画布 + 青绿行动色，前后台共用同一套语义。
   不改任何 DOM / JS 钩子（id / class / data-*）。

   设计系统：
   - 画布：--paper 冷雾灰，--paper-2 白卡片，--paper-3 浅底嵌套区
   - 文字：--ink 深青墨，--ink-soft 次级，--muted 弱化
   - 行动色：--seal 青绿（主按钮/强调；错误态改用更深对比）
   - 语义：--ok 青绿 / --wait 琥珀 / --run 晴空蓝 / 错误仍走 seal-deep
   - 字体：标题窄体无衬线，数字等宽，正文系统无衬线
   - 形状：12–16px 圆角，浅线边框，少装饰
   ============================================================ */

:root {
  color-scheme: light;

  --paper: #eef3f6;
  --paper-2: #ffffff;
  --paper-3: #f5f8fa;
  --ink: #132029;
  --ink-soft: #3a4a57;
  --muted: #6a7a88;
  --line: #d7e0e7;
  --line-strong: #b9c6d0;
  --line-ink: #c5d0d9;

  --seal: #0f8a7a;
  --seal-deep: #0b6b5f;
  --seal-soft: #e4f5f2;
  --danger: #c23b4a;
  --danger-soft: #fdecee;

  --ok: #0f8a7a;
  --ok-soft: #e4f5f2;
  --wait: #b7791f;
  --wait-soft: #fef6e7;
  --run: #2b6cb0;
  --run-soft: #e8f1fb;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(19, 32, 41, 0.04), 0 14px 36px rgba(19, 32, 41, 0.07);
  --shadow-flat: 0 1px 2px rgba(19, 32, 41, 0.05);

  --font-sans: "IBM Plex Sans", "Segoe UI Variable", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-serif: "Sora", "Bahnschrift", "Segoe UI Variable", var(--font-sans);
  --font-mono: "IBM Plex Mono", "Cascadia Mono", "SFMono-Regular", Consolas, ui-monospace, monospace;

  font-family: var(--font-sans);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.hidden {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 页面隐藏时暂停装饰动画，省电省帧 */
html.is-page-hidden *,
html.is-page-hidden *::before,
html.is-page-hidden *::after {
  animation-play-state: paused !important;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(15, 138, 122, 0.12), transparent 60%),
    radial-gradient(760px 380px at 92% 8%, rgba(43, 108, 176, 0.1), transparent 55%),
    linear-gradient(180deg, #f4f8fa 0%, var(--paper) 42%, #e9f0f4 100%);
  font-family: var(--font-sans);
  line-height: 1.55;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3,
p,
code {
  overflow-wrap: anywhere;
}

::selection {
  background: var(--ink);
  color: var(--paper-3);
}

:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
}

/* ============================================================
   页面骨架
   ============================================================ */
.page-shell {
  width: min(100%, 880px);
  margin: 0 auto;
  padding: 28px 18px 52px;
  display: grid;
  gap: 16px;
}

/* ============================================================
   Hero · 品牌入口（单焦点）
   ============================================================ */
.hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 250, 0.98)),
    var(--paper-2);
  box-shadow: var(--shadow-card);
  padding: 28px 24px 24px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--seal), #2b6cb0 70%, transparent);
  pointer-events: none;
}

.hero::after {
  display: none;
}

.brand-line {
  display: inline-flex;
  align-items: center;
  max-width: min(100%, 720px);
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: none;
}

.brand-line > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-chip {
  display: inline-flex;
  min-width: 50px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--seal);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* 公告态：红头文件小条 */
.brand-line.is-notice {
  width: fit-content;
  max-width: min(calc(100vw - 36px), 460px);
  gap: 8px;
  border-color: var(--seal);
  background: var(--paper-3);
  color: var(--ink-soft);
}

.brand-line.is-notice .brand-chip {
  position: relative;
  background: var(--seal);
  padding: 0 9px;
}

.brand-line.is-notice > span:last-child {
  display: -webkit-box;
  max-width: 330px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12.3px;
  line-height: 1.35;
  text-align: left;
}

.hero h1 {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4.8vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

.hero p {
  width: min(100%, 560px);
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  text-wrap: balance;
}

.helper-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.helper-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.helper-actions button:hover {
  background: var(--seal-soft);
  border-color: rgba(15, 138, 122, 0.35);
  color: var(--ink);
  transform: translateY(-1px);
}

.helper-actions button:hover .helper-mark {
  background: var(--seal);
  color: #fff;
  border-color: var(--seal);
}

.helper-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.helper-mark svg {
  width: 14px;
  height: 14px;
  overflow: visible;
}

.helper-mark svg path,
.helper-mark svg circle {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.helper-mark.privacy { color: var(--ok); }
.helper-mark.faq { color: var(--run); }
.helper-mark.boost { color: var(--seal); }
.helper-mark.guide { color: var(--wait); }

/* ============================================================
   状态板 · 圆点图例 + 热度墙
   （白色圆角卡片：居中图例「● 数字 标签」，下方一整面小方格）
   ============================================================ */
.status-board {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  padding: 16px 18px 14px;
  box-shadow: var(--shadow-flat);
}

/* 同步状态：缩成右上角的小标记，不抢图例的位置 */
.live-connection {
  position: absolute;
  top: 10px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f7f7f7;
}

.live-connection strong {
  color: #8c8c8c;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.live-connection small {
  color: #bfbfbf;
  font-size: 10px;
  font-weight: 600;
}

.live-beacon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00a854;
}

.live-connection[data-state="connecting"] .live-beacon,
.live-connection[data-state="reconnecting"] .live-beacon {
  background: #faad14;
  animation: liveBeacon 1.2s ease-in-out infinite;
}

.live-connection[data-state="fallback"] .live-beacon {
  background: #bfbfbf;
}

@keyframes liveBeacon {
  50% { opacity: 0.35; }
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 26px;
  min-width: 0;
  margin-top: 6px;
}

.status-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-item strong {
  font-size: 14.5px;
  font-weight: 700;
  color: #262626;
  font-variant-numeric: tabular-nums;
}

.status-item em {
  color: #262626;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

/* 图例圆点：隐藏原 SVG 图标，只留纯色圆点 */
.status-pict {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.status-pict svg {
  display: none;
}

.status-success { background: var(--ok); }
.status-wait { background: var(--wait); }
.status-run { background: var(--run); }
.status-failed { background: var(--danger); }

.heat-caption {
  align-self: stretch;
  margin: -2px 0 -7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-align: left;
}

.heat-row {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(40, minmax(0, 1fr));
  gap: 3px;
  opacity: 0.78;
}

.heat-row span {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #e4eaee;
  transition: background-color 0.3s ease;
}

.heat-row span.active.success { background: var(--ok); }
.heat-row span.active.queued { background: var(--wait); }
.heat-row span.active.run { background: var(--run); }
.heat-row span.active.failed { background: var(--danger); }

/* ============================================================
   Geo 面板 · 分布报表（默认 hidden，由 JS 打开）
   ============================================================ */
.geo-board {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  padding: 16px;
  box-shadow: var(--shadow-flat);
}

.geo-map-panel {
  position: relative;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-3);
  overflow: hidden;
}

.geo-map-grid {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 35px, rgba(106, 122, 136, 0.07) 35px 36px),
    repeating-linear-gradient(180deg, transparent 0 35px, rgba(106, 122, 136, 0.07) 35px 36px);
  pointer-events: none;
}

.geo-map {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.geo-land path {
  fill: rgba(15, 138, 122, 0.08);
  stroke: rgba(58, 74, 87, 0.28);
  stroke-width: 1;
}

.geo-pulse-ring {
  fill: none;
  stroke: var(--seal);
  stroke-width: 1.4;
  opacity: 0;
  transform-origin: center;
  animation: geoPulse 2.4s ease-out infinite;
  animation-delay: var(--delay, 0s);
}

.geo-pulse-core {
  fill: var(--seal);
}

@keyframes geoPulse {
  0% { opacity: 0.8; transform: scale(0.4); }
  70%, 100% { opacity: 0; transform: scale(1.5); }
}

.geo-scanline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(193, 48, 28, 0.4);
  animation: geoScan 7s linear infinite;
  pointer-events: none;
}

@keyframes geoScan {
  0% { left: 0; }
  100% { left: 100%; }
}

.geo-copy {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.geo-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--seal);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.geo-kicker i {
  width: 16px;
  height: 1px;
  background: var(--seal);
}

.geo-heading h2 {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
}

.geo-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.geo-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
  padding: 10px 2px;
}

.geo-total strong {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.geo-total span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.geo-country-list {
  display: grid;
  gap: 6px;
}

.geo-country {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--paper-3);
  overflow: hidden;
}

/* 占比条：淡红墨水从左灌入 */
.geo-country i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--share, 0%);
  background: rgba(193, 48, 28, 0.1);
  pointer-events: none;
}

.geo-country b {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--seal);
}

.geo-country em {
  position: relative;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-style: normal;
  font-weight: 600;
}

.geo-country strong {
  position: relative;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.geo-empty {
  color: var(--muted);
  font-size: 12.5px;
}

/* ============================================================
   工具卡 · 主工作面
   ============================================================ */
.tool-card {
  position: relative;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.tool-card::before,
.tool-card::after {
  display: none;
  content: none;
}

.card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-3);
  padding: 12px 18px;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  padding: 3px;
}

.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tabs button:first-child {
  border-left: 0;
}

.tabs button:hover {
  color: var(--ink);
  background: rgba(15, 138, 122, 0.06);
}

.tabs button.active {
  background: var(--seal);
  color: #fff;
}

.tab-icon {
  width: 15px;
  height: 15px;
}

.tab-icon path,
.tab-icon rect {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.task-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--wait);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.tabs button.active .task-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.task-count.is-zero {
  background: var(--line);
  color: var(--muted);
}

/* 视图切换 */
.view {
  display: none;
}

.view.active {
  display: block;
}

.view.is-entering {
  animation: viewEnter 0.28s ease;
}

@keyframes viewEnter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   提取表单
   ============================================================ */
.extract-form {
  display: grid;
  gap: 16px;
  padding: 20px 22px 22px;
}

/* ---------- 通道选择 ---------- */
.method-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-3);
  padding: 12px;
}

.method-row label {
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.method-row input {
  position: absolute;
  opacity: 0;
}

.method-option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  padding: 13px 14px;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.method-option:hover {
  border-color: rgba(15, 138, 122, 0.4);
  box-shadow: 0 0 0 3px rgba(15, 138, 122, 0.08);
  transform: translateY(-1px);
}

.method-row strong,
.method-row small {
  display: block;
}

.method-option strong {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 800;
}

.method-row small {
  color: var(--muted);
  font-size: 12.5px;
}

/* 国别墨戳 */
.method-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  grid-row: span 2;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-3);
  color: var(--ink-soft);
}

.method-icon svg {
  display: none;
}

.method-upi::before { content: "IN"; }
.method-pix::before { content: "BR"; }
.method-paypal::before { content: "GB"; }
.method-paypal-us::before { content: "US"; }
.method-kakao::before { content: "KR"; }
.method-ideal::before { content: "NL"; }
.method-gopay::before { content: "ID"; }
.method-twint::before { content: "CH"; }
.method-momo::before { content: "VN"; }
.method-ph-short::before { content: "PH"; }

.method-upi::before,
.method-pix::before,
.method-paypal::before,
.method-paypal-us::before,
.method-kakao::before,
.method-ideal::before,
.method-gopay::before,
.method-twint::before,
.method-momo::before,
.method-ph-short::before {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.method-row input:checked + .method-option {
  border-color: var(--seal);
  background: var(--seal-soft);
  box-shadow: 0 0 0 3px rgba(15, 138, 122, 0.12);
}

.method-row input:checked + .method-option strong {
  color: var(--ink);
}

.method-row input:checked + .method-option small {
  color: var(--muted);
}

.method-row input:checked + .method-option .method-icon {
  border-color: rgba(15, 138, 122, 0.35);
  background: #fff;
  color: var(--seal);
}

.method-row input:checked + .method-option::before {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: var(--seal);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: none;
}

.method-row input:focus-visible + .method-option {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
}

/* 停用通道：直接不显示，剩余通道由 auto-fit 自动铺满 */
.method-row label.is-disabled {
  display: none;
}

/* ---------- 卡密栏 ---------- */
.cdk-field {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-3);
  padding: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cdk-field.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(194, 59, 74, 0.12);
}

/* 卡密可选时（后台关闭 requireCdk）：弱化“唯一提交凭证”标签 */
.cdk-field.is-optional .cdk-label small {
  opacity: 0.5;
}

.cdk-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cdk-label strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.cdk-label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.cdk-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--line-ink);
  background: var(--paper-2);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.cdk-input-wrap:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.cdk-input-wrap em {
  display: grid;
  place-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--line-strong);
  background: var(--paper-3);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

#cdkInput {
  min-height: 42px;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
}

#cdkInput:focus {
  outline: none;
}

#cdkInput::placeholder {
  color: rgba(124, 117, 102, 0.6);
  letter-spacing: 0.08em;
}

.cdk-help {
  color: var(--muted);
  font-size: 12px;
}

.cdk-verify-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cdk-remaining {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Session 面板 ---------- */
.session-panel {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-3);
  padding: 16px;
}

.session-input {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.session-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-title i {
  width: 14px;
  height: 1px;
  background: var(--seal);
}

.session-title strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.session-title small {
  border: 1px solid rgba(15, 138, 122, 0.35);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--seal);
  background: var(--seal-soft);
  font-size: 11px;
  font-weight: 700;
}

.session-textarea-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.session-textarea-wrap:focus-within {
  border-color: var(--seal);
  box-shadow: 0 0 0 3px rgba(15, 138, 122, 0.12);
}

#tokenInput {
  display: block;
  width: 100%;
  min-height: 130px;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
}

#tokenInput:focus {
  outline: none;
}

#tokenInput::placeholder {
  color: rgba(124, 117, 102, 0.6);
}

.session-email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.session-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.session-email.is-active {
  color: var(--ok);
  font-family: var(--font-mono);
  font-weight: 700;
}

.session-email.is-disabled {
  color: var(--muted);
  text-decoration: line-through;
}

.coupon-result {
  padding: 2px 8px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 700;
}

.coupon-result.is-eligible { color: var(--ok); background: var(--ok-soft); }
.coupon-result.is-ineligible { color: var(--wait); background: var(--wait-soft); }
.coupon-result.is-error { color: var(--danger); background: var(--danger-soft); }
.coupon-result.is-checking { color: var(--run); background: var(--run-soft); }

/* ============================================================
   通用按钮
   ============================================================ */
.primary-action,
.secondary-action,
.session-copy,
.coupon-check-btn,
#verifyCdkButton,
.open-link,
.record-link-copy,
.record-link-open,
.record-cancel,
.stop-task,
.record-page-btn,
.modal-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.secondary-action,
.session-copy,
.coupon-check-btn,
#verifyCdkButton,
.open-link {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 13px;
}

.secondary-action:hover,
.session-copy:hover,
.coupon-check-btn:hover,
#verifyCdkButton:hover,
.open-link:hover,
.record-link-copy:hover,
.record-link-open:hover,
.record-page-btn:hover:not(:disabled) {
  background: var(--seal-soft);
  border-color: rgba(15, 138, 122, 0.35);
  color: var(--ink);
}

#verifyCdkButton svg,
.session-copy svg,
.secondary-action svg,
.primary-action svg {
  width: 15px;
  height: 15px;
}

#verifyCdkButton svg path,
#verifyCdkButton svg rect,
.session-copy svg path,
.session-copy svg rect,
.secondary-action svg path,
.primary-action svg path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.primary-action {
  min-height: 46px;
  padding: 8px 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #129987, var(--seal));
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(15, 138, 122, 0.28);
}

.primary-action:hover {
  background: linear-gradient(180deg, #0f8a7a, var(--seal-deep));
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 138, 122, 0.34);
}

.primary-action:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(15, 138, 122, 0.22);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ============================================================
   结果区 · 回执联
   ============================================================ */
.result-area {
  position: relative;
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(139, 125, 96, 0.07) 27px 28px),
    var(--paper-2);
  padding: 14px;
}

.empty-result {
  display: grid;
  place-content: center;
  gap: 6px;
  min-height: 150px;
  text-align: center;
}

.empty-result strong {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 900;
  color: var(--ink-soft);
}

.empty-result span {
  color: var(--muted);
  font-size: 12.5px;
}

.result-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-ink);
  background: var(--paper-3);
  padding: 14px;
  box-shadow: var(--shadow-flat);
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 10px;
}

.result-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.result-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
}

.result-meta span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.result-head-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.stop-task {
  min-height: 28px;
  padding: 3px 10px;
  border-color: var(--seal);
  color: var(--seal);
  font-size: 12px;
}

.stop-task:hover:not(:disabled) {
  background: var(--seal);
  color: #fff;
}

/* 状态戳：mark 元素 */
#jobStatus {
  flex: 0 0 auto;
  padding: 3px 10px;
  border: 1px solid currentColor;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

#jobStatus.is-queued { color: var(--wait); background: var(--wait-soft); }
#jobStatus.is-processing { color: var(--run); background: var(--run-soft); }
#jobStatus.is-done { color: var(--ok); background: var(--ok-soft); }
#jobStatus.is-failed { color: var(--danger); background: var(--danger-soft); }

/* 进度 */
.progress-panel {
  display: grid;
  gap: 8px;
}

.progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.progress-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.progress-percent {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  position: relative;
  height: 10px;
  border: 1px solid var(--line-ink);
  background: var(--paper-2);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 0.4s ease;
}

/* 运行中：墨色斜纹滚动（印刷走纸感） */
.progress-track.is-working span {
  background:
    repeating-linear-gradient(135deg, var(--ink) 0 8px, var(--ink-soft) 8px 16px);
  background-size: 23px 23px;
  animation: progressStripes 0.9s linear infinite;
}

@keyframes progressStripes {
  from { background-position: 0 0; }
  to { background-position: 23px 0; }
}

.progress-zero-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  background: var(--paper-2);
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
}

.progress-zero-status span {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.progress-zero-status strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 800;
  text-align: right;
}

.progress-zero-status[data-state="checking"] {
  border-left-color: var(--run);
  background: var(--run-soft);
}

.progress-zero-status[data-state="checking"] strong {
  color: var(--run);
}

.progress-zero-status[data-state="zero"] {
  border-left-color: var(--ok);
  background: var(--ok-soft);
}

.progress-zero-status[data-state="zero"] strong {
  color: var(--ok);
}

.progress-zero-status[data-state="nonzero"] {
  border-left-color: var(--seal);
  background: var(--seal-soft);
}

.progress-zero-status[data-state="nonzero"] strong {
  color: var(--seal-deep);
}

.progress-eta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--muted);
  font-size: 12px;
}

.eta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.eta-item svg {
  width: 13px;
  height: 13px;
}

.eta-item svg path,
.eta-item svg circle {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.eta-item strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.progress-step {
  color: var(--ink-soft);
  font-size: 12.5px;
}

.result-error {
  border: 1px solid var(--seal);
  background: var(--seal-soft);
  padding: 8px 12px;
  color: var(--seal-deep);
  font-size: 13px;
  font-weight: 600;
}

/* 金额行 */
.result-amount {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border: 1px dashed var(--line-strong);
  background: var(--paper-2);
  padding: 8px 12px;
}

.result-amount span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-amount strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.result-amount em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.result-amount.is-nonzero strong {
  color: var(--seal);
}

/* 提取结果 */
.field.compact {
  display: grid;
  gap: 8px;
}

.field.compact > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

#resultLink {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-ink);
  background: var(--paper-2);
  padding: 8px 12px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

#resultLink:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--ink);
}

/* 支付状态条 */
.result-payment {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  padding: 7px 12px;
}

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

.result-payment strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.result-payment em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.result-payment.is-payment-succeeded { border-color: var(--ok); background: var(--ok-soft); }
.result-payment.is-payment-succeeded strong { color: var(--ok); }
.result-payment.is-payment-failed { border-color: var(--danger); background: var(--danger-soft); }
.result-payment.is-payment-failed strong { color: var(--danger); }
.result-payment.is-payment-expired { border-color: var(--wait); background: var(--wait-soft); }
.result-payment.is-payment-expired strong { color: var(--wait); }
.result-payment.is-payment-extracting strong { color: var(--run); }

/* Pix 回执：二维码是扫描入口，右侧只承载复制码与操作，避免中等宽度被放大成单列。 */
.payment-qr-panel {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px dashed var(--line-strong);
  background: var(--paper-2);
  padding: 14px;
}

.payment-qr-frame {
  position: relative;
  display: grid;
  box-sizing: border-box;
  inline-size: 144px;
  block-size: 144px;
  place-items: center;
  border: 1px solid var(--line-ink);
  background: #fff;
  padding: 7px;
}

.payment-qr-frame::after {
  content: "PIX · BR";
  position: absolute;
  right: 7px;
  bottom: 5px;
  padding: 1px 4px;
  background: var(--paper-3);
  color: var(--seal);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.payment-qr-frame img,
#paymentQrImage {
  display: block;
  inline-size: 128px;
  block-size: 128px;
  max-inline-size: 100%;
  object-fit: contain;
}

.pix-code-block {
  display: grid;
  grid-template-rows: auto minmax(82px, 1fr);
  gap: 9px;
  min-width: 0;
}

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

.pix-code-head > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pix-code-head .secondary-action {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

#pixCode,
.record-pix-code textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  border: 1px solid var(--line-strong);
  background: var(--paper-3);
  min-block-size: 82px;
  padding: 9px 10px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   表单底栏
   ============================================================ */
.form-footer {
  display: grid;
  gap: 10px;
  border-top: 1px dashed var(--line-strong);
  padding-top: 14px;
}

.form-message {
  min-height: 18px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.form-message.is-error { color: var(--danger); }
.form-message.is-success { color: var(--ok); }
.form-message.is-working { color: var(--run); }
.form-message.is-suppressed { visibility: hidden; }

.form-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.form-hint-mark {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.form-hint-mark path {
  fill: none;
  stroke: var(--ok);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================
   任务列表 · 记录联
   ============================================================ */
#recordsView {
  padding: 18px 22px 22px;
}

.records-retention-hint {
  margin-bottom: 14px;
  border-left: 3px solid var(--seal);
  background: var(--paper-3);
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12.5px;
}

.record-list {
  display: grid;
  gap: 12px;
}

.record-list.is-page-leaving {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.record-list.is-page-entering {
  animation: viewEnter 0.24s ease;
}

.records-empty {
  border: 1px dashed var(--line-strong);
  background: var(--paper-3);
  padding: 26px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.record-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--muted);
  background: var(--paper-3);
  padding: 13px 14px;
  box-shadow: var(--shadow-flat);
}

.record-card.is-done { border-left-color: var(--ok); }
.record-card.is-failed { border-left-color: var(--danger); }
.record-card.is-processing { border-left-color: var(--run); }
.record-card.is-queued { border-left-color: var(--wait); }
.record-card.is-cancelled { border-left-color: var(--line-strong); }

.record-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.record-channel {
  padding: 2px 8px;
  background: var(--ink);
  color: var(--paper-3);
  font-size: 12px;
  font-weight: 700;
}

.record-status {
  padding: 2px 8px;
  border: 1px solid currentColor;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.record-status.is-done { color: var(--ok); background: var(--ok-soft); }
.record-status.is-failed { color: var(--danger); background: var(--danger-soft); }
.record-status.is-processing { color: var(--run); background: var(--run-soft); }
.record-status.is-queued { color: var(--wait); background: var(--wait-soft); }
.record-status.is-cancelled { color: var(--muted); background: var(--paper-2); }

.record-time {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.record-cancel {
  min-height: 28px;
  padding: 3px 10px;
  border-color: var(--seal);
  color: var(--seal);
  font-size: 12px;
}

.record-cancel:hover {
  background: var(--seal);
  color: #fff;
}

.record-cancel svg {
  width: 13px;
  height: 13px;
}

.record-cancel svg path,
.record-cancel svg circle {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.record-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.record-account-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  flex: 0 0 auto;
}

.record-account-icon svg {
  width: 13px;
  height: 13px;
}

.record-account-icon svg path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.record-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
}

.record-account-amount {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-left: auto;
}

.raa-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.record-account-amount strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.record-account-amount.is-nonzero strong {
  color: var(--seal);
}

.record-account-amount em {
  color: var(--muted);
  font-size: 11.5px;
  font-style: normal;
}

.record-payment-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  font-size: 11.5px;
}

.record-payment-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.record-payment-pill.is-payment-succeeded { border-color: var(--ok); background: var(--ok-soft); }
.record-payment-pill.is-payment-succeeded .record-payment-dot { background: var(--ok); }
.record-payment-pill.is-payment-succeeded strong { color: var(--ok); }
.record-payment-pill.is-payment-failed { border-color: var(--danger); background: var(--danger-soft); }
.record-payment-pill.is-payment-failed .record-payment-dot { background: var(--danger); }
.record-payment-pill.is-payment-failed strong { color: var(--danger); }
.record-payment-pill.is-payment-expired { border-color: var(--wait); background: var(--wait-soft); }
.record-payment-pill.is-payment-expired .record-payment-dot { background: var(--wait); }
.record-payment-pill.is-payment-expired strong { color: var(--wait); }
.record-payment-pill.is-payment-waiting .record-payment-dot,
.record-payment-pill.is-payment-extracting .record-payment-dot {
  background: var(--run);
  animation: liveBeacon 1.2s ease-in-out infinite;
}

.record-payment-pill-label {
  color: var(--muted);
  font-weight: 700;
}

.record-payment-pill strong {
  color: var(--ink);
  font-weight: 800;
}

.record-payment-note {
  color: var(--muted);
  font-size: 11px;
}

.record-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.record-progress-track {
  display: block;
  height: 8px;
  border: 1px solid var(--line-ink);
  background: var(--paper-2);
  overflow: hidden;
}

.record-progress-track span {
  display: block;
  height: 100%;
  background:
    repeating-linear-gradient(135deg, var(--ink) 0 8px, var(--ink-soft) 8px 16px);
  background-size: 23px 23px;
  animation: progressStripes 0.9s linear infinite;
  transition: width 0.4s ease;
}

.record-progress-num {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.record-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border-top: 1px dashed var(--line-strong);
  padding-top: 10px;
}

.record-payment-qr {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px dashed var(--line-strong);
  padding-top: 10px;
}

.record-payment-qr-image {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-ink);
  background: #fff;
  padding: 8px;
}

.record-payment-qr-image img {
  display: block;
  width: 132px;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.record-pix-code {
  display: grid;
  grid-template-rows: auto minmax(72px, 1fr) auto;
  gap: 7px;
  min-width: 0;
}

.record-pix-code > span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
}

.record-pix-code .record-link-copy {
  justify-self: start;
}

.record-link-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.record-link-label svg {
  width: 13px;
  height: 13px;
}

.record-link-label svg path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.record-link-input {
  min-width: 0;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  padding: 4px 10px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
}

.record-link-input:focus {
  outline: none;
  border-color: var(--ink);
}

.record-link-copy,
.record-link-open {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 12.5px;
}

.record-fail {
  border: 1px solid var(--seal);
  background: var(--seal-soft);
  padding: 7px 11px;
  color: var(--seal-deep);
  font-size: 12.5px;
}

.record-cancelled-hint {
  border: 1px dashed var(--line-strong);
  background: var(--paper-2);
  padding: 7px 11px;
  color: var(--muted);
  font-size: 12.5px;
}

.record-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

.record-page-btn {
  min-height: 32px;
  padding: 4px 14px;
  font-size: 12.5px;
}

.record-page-btn:disabled {
  border-color: var(--line);
  color: var(--muted);
  box-shadow: none;
}

.record-page-info {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   悬浮工具（在线人数 + 语言）
   ============================================================ */
.floating-tools {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.online-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-ink);
  background: var(--paper-3);
  padding: 5px 12px;
  box-shadow: var(--shadow-flat);
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: liveBeacon 2s ease-in-out infinite;
}

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

.online-count {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.language-switch {
  display: inline-flex;
  border: 1px solid var(--line-ink);
  background: var(--paper-3);
  box-shadow: var(--shadow-flat);
}

.language-switch button {
  min-height: 32px;
  padding: 4px 12px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.language-switch button:first-child {
  border-left: 0;
}

.language-switch button.active {
  background: var(--ink);
  color: var(--paper-3);
}

.language-switch.is-switching {
  animation: langFlip 0.5s ease;
}

@keyframes langFlip {
  0% { opacity: 1; }
  40% { opacity: 0.35; }
  100% { opacity: 1; }
}

/* ============================================================
   弹窗 · 附页
   ============================================================ */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33, 30, 24, 0.5);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(84vh, 640px);
  overflow-y: auto;
  border: 1px solid var(--line-ink);
  background: var(--paper-3);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  animation: viewEnter 0.22s ease;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.modal-head h2 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 900;
  color: var(--ink);
}

.modal-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid currentColor;
  flex: 0 0 auto;
}

.modal-icon svg {
  width: 17px;
  height: 17px;
}

.modal-icon svg path,
.modal-icon svg circle {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.modal-icon.privacy { color: var(--ok); background: var(--ok-soft); }
.modal-icon.faq { color: var(--run); background: var(--run-soft); }
.modal-icon.boost { color: var(--seal); background: var(--seal-soft); }
.modal-icon.guide { color: var(--wait); background: var(--wait-soft); }

/* 新手指引 · 像一张可逐项勾过的操作票，而不是泛用公告框。 */
.guide-dialog {
  width: min(100%, 640px);
  padding: 0;
}

.guide-dialog .modal-head {
  margin: 0;
  padding: 20px 22px 14px;
  background:
    linear-gradient(90deg, rgba(138, 100, 16, 0.08), transparent 48%),
    var(--paper-3);
}

.guide-dialog .modal-head > div {
  min-width: 0;
}

.guide-dialog .modal-head h2 {
  margin: 2px 0 0;
  line-height: 1.25;
}

.guide-kicker {
  display: block;
  color: var(--wait);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.guide-lead {
  margin: 16px 22px 0;
}

.guide-steps {
  counter-reset: guide-step;
  display: grid;
  gap: 9px;
  margin: 14px 22px 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  counter-increment: guide-step;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--wait);
  background: var(--paper-2);
  padding: 8px 12px 8px 10px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
}

.guide-steps li::before {
  content: counter(guide-step, decimal-leading-zero);
  color: var(--wait);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.guide-note {
  margin: 14px 22px 0;
  border-left-color: var(--wait);
}

.guide-dialog .modal-foot {
  margin: 16px 22px 0;
  padding: 14px 0 20px;
}

@media (max-width: 620px) {
  .guide-dialog .modal-head {
    padding: 17px 16px 13px;
  }

  .guide-lead,
  .guide-steps,
  .guide-note,
  .guide-dialog .modal-foot {
    margin-left: 16px;
    margin-right: 16px;
  }

  .guide-steps li {
    grid-template-columns: 30px minmax(0, 1fr);
    padding-right: 10px;
  }
}

.modal-close {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
  background: var(--ink);
  color: var(--paper-3);
}

.modal-close svg {
  width: 14px;
  height: 14px;
}

.modal-close svg path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.modal-lead {
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
}

.modal-list {
  margin: 12px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.modal-list.checks {
  list-style: none;
  padding-left: 2px;
}

.modal-list.checks li {
  position: relative;
  padding-left: 22px;
}

.modal-list.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--ok);
  font-weight: 900;
}

.modal-list.plain {
  list-style: none;
  padding-left: 2px;
}

.modal-list.plain b,
.modal-list.plain strong {
  color: var(--ink);
}

.modal-list.steps li::marker {
  color: var(--seal);
  font-family: var(--font-mono);
  font-weight: 700;
}

.modal-note {
  margin-top: 12px;
  border-left: 3px solid var(--seal);
  background: var(--paper-2);
  padding: 8px 12px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  border-top: 1px dashed var(--line-strong);
  padding-top: 14px;
}

.modal-confirm {
  min-height: 38px;
  padding: 6px 18px;
  border-color: var(--seal-deep);
  background: var(--seal);
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 2px 0 var(--seal-deep);
}

.modal-confirm:hover {
  background: var(--seal-deep);
}

/* ============================================================
   加载屏 / 维护屏
   ============================================================ */
.site-loader,
.maintenance-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--paper);
  transition: opacity 0.35s ease;
}

.site-loader.is-hiding {
  opacity: 0;
  pointer-events: none;
}

.site-loader-card,
.maintenance-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(100% - 40px, 380px);
  border: 1px solid var(--line-ink);
  background: var(--paper-3);
  padding: 34px 26px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.site-loader-card strong {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
}

.site-loader-card span {
  color: var(--muted);
  font-size: 12.5px;
}

.site-loader-card i {
  display: block;
  width: 44px;
  height: 2px;
  background: var(--seal);
}

/* 三环墨圈加载器 */
.site-wifi-loader {
  position: relative;
  width: 64px;
  height: 64px;
}

.site-wifi-loader svg {
  position: absolute;
  inset: 0;
  margin: auto;
}

.site-wifi-loader .circle-outer { width: 64px; height: 64px; }
.site-wifi-loader .circle-middle { width: 46px; height: 46px; }
.site-wifi-loader .circle-inner { width: 28px; height: 28px; }

.site-wifi-loader circle {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.site-wifi-loader .back {
  stroke: var(--line);
}

.site-wifi-loader .front {
  stroke: var(--ink);
  stroke-dasharray: 60 200;
  transform-origin: center;
  animation: loaderSpin 1.4s linear infinite;
}

.site-wifi-loader .circle-middle .front {
  stroke: var(--seal);
  animation-duration: 1.1s;
  animation-direction: reverse;
}

.site-wifi-loader .circle-inner .front {
  stroke: var(--muted);
  stroke-dasharray: 30 120;
  animation-duration: 0.9s;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

/* 维护屏 */
.maintenance-loader-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 900;
  color: var(--muted);
}

.maintenance-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-ink);
  background: var(--paper-2);
  color: var(--ink);
}

.maintenance-icon svg {
  width: 22px;
  height: 22px;
}

.maintenance-icon svg path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.maintenance-badge {
  padding: 2px 10px;
  border: 1px solid var(--seal);
  background: var(--seal-soft);
  color: var(--seal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.maintenance-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}

.maintenance-text {
  color: var(--ink-soft);
  font-size: 13px;
}

.maintenance-progress {
  width: 100%;
  height: 8px;
  border: 1px solid var(--line-ink);
  background: var(--paper-2);
  overflow: hidden;
}

.maintenance-progress span {
  display: block;
  width: 40%;
  height: 100%;
  background:
    repeating-linear-gradient(135deg, var(--ink) 0 8px, var(--ink-soft) 8px 16px);
  animation: maintenanceSlide 1.6s ease-in-out infinite alternate;
}

@keyframes maintenanceSlide {
  from { transform: translateX(-30%); }
  to { transform: translateX(180%); }
}

.maintenance-foot {
  color: var(--muted);
  font-size: 12px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 760px) {
  .page-shell {
    padding: 16px 12px 90px;
  }

  .hero {
    padding: 26px 18px 24px;
  }

  .hero::after {
    width: 52px;
    height: 52px;
    top: 12px;
    right: 12px;
    font-size: 10px;
  }

  .status-board {
    padding: 26px 14px 14px;
  }

  .status-legend {
    gap: 6px 16px;
    margin-top: 0;
  }

  .status-item strong,
  .status-item em {
    font-size: 12.5px;
  }

  /* 窄屏减半列数，格子不至于小到看不见 */
  .heat-row {
    grid-template-columns: repeat(20, minmax(0, 1fr));
    gap: 4px;
  }

  .geo-board {
    grid-template-columns: 1fr;
  }

  .tool-card::before,
  .tool-card::after {
    display: none;
  }

  .card-toolbar {
    padding: 10px 14px;
  }

  .extract-form {
    padding: 14px;
  }

  #recordsView {
    padding: 14px;
  }

  .method-row {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
  }

  .record-link {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .record-link-label {
    grid-column: 1 / -1;
  }

  .record-payment-qr {
    grid-template-columns: 1fr;
  }

  .record-payment-qr-image {
    justify-self: stretch;
  }

  .actions {
    justify-content: stretch;
  }

  .actions .primary-action {
    flex: 1 1 auto;
  }
}

@media (max-width: 520px) {
  .payment-qr-panel {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .pix-code-block {
    inline-size: 100%;
  }
}

/* 桌面分栏：左输入右回执，结果卡吸顶跟随 */
@media (min-width: 1024px) {
  .page-shell {
    width: min(100% - 40px, 1240px);
  }

  /* 列数随可见通道数量自适应，通道被隐藏后不留空位 */
  .method-row {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .session-panel {
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
  }

  .session-panel > .session-input {
    position: sticky;
    top: 16px;
  }

  .result-area {
    min-height: 100%;
  }

  .result-area .result-card,
  .result-area .empty-result {
    position: sticky;
    top: 16px;
  }

  .form-footer {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 18px;
  }

  .form-footer .actions {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (min-width: 1280px) {
  .session-panel {
    grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
  }
}

/* ============================================================
   动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Route Flow v2 · Magic UI / Stitch inspired workspace refresh
   Subject: a live payment-route workstation, not a landing page.
   Signature: one animated signal lane from Session to Pay Link.
   Palette: Porcelain / Midnight / Signal Indigo / Route Aqua / Alert Coral.
   ============================================================ */

:root {
  --paper: #f4f7fb;
  --paper-2: rgba(255, 255, 255, 0.92);
  --paper-3: #f7f9fc;
  --ink: #0d1526;
  --ink-soft: #34425a;
  --muted: #718096;
  --line: #dce3ee;
  --line-strong: #bcc8da;
  --line-ink: #cad4e2;
  --seal: #5756d9;
  --seal-deep: #4140ad;
  --seal-soft: #eeefff;
  --ok: #00a69d;
  --ok-soft: #e5f8f5;
  --wait: #d8872f;
  --wait-soft: #fff4e5;
  --run: #3478d4;
  --run-soft: #eaf2ff;
  --danger: #d84961;
  --danger-soft: #ffedf1;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-card: 0 1px 2px rgba(13, 21, 38, 0.04), 0 20px 55px rgba(48, 61, 92, 0.09);
  --shadow-flat: 0 1px 2px rgba(13, 21, 38, 0.04), 0 10px 30px rgba(48, 61, 92, 0.055);
  --font-sans: "Manrope", "Segoe UI Variable", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-serif: "Space Grotesk", "Manrope", "Segoe UI Variable", var(--font-sans);
}

body {
  background:
    linear-gradient(rgba(87, 86, 217, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 86, 217, 0.032) 1px, transparent 1px),
    radial-gradient(900px 520px at 8% -10%, rgba(106, 103, 255, 0.16), transparent 62%),
    radial-gradient(780px 500px at 96% 4%, rgba(0, 166, 157, 0.12), transparent 58%),
    linear-gradient(180deg, #fafbfe 0%, #f2f6fa 55%, #eef3f8 100%);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 22%, rgba(255, 255, 255, 0.52) 46%, transparent 72%);
  pointer-events: none;
  content: "";
}

.page-shell {
  width: min(calc(100% - 32px), 1320px);
  gap: 16px;
  padding: 24px 0 56px;
}

.hero,
.status-board,
.geo-board,
.tool-card {
  border-color: rgba(188, 200, 218, 0.72);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.hero {
  order: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  align-items: center;
  gap: clamp(28px, 4vw, 58px);
  min-height: 300px;
  padding: clamp(30px, 4vw, 44px);
  text-align: left;
}

.hero::before {
  inset: 0;
  width: 1px;
  height: auto;
  background: linear-gradient(180deg, transparent, var(--seal) 24%, var(--ok) 76%, transparent);
  box-shadow: 0 0 22px rgba(87, 86, 217, 0.28);
}

.hero::after {
  position: absolute;
  top: -140px;
  left: 14%;
  display: block;
  width: 520px;
  height: 300px;
  border-radius: 50%;
  background: rgba(116, 113, 255, 0.07);
  filter: blur(20px);
  pointer-events: none;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.brand-line {
  border-color: #d8dff0;
  background: rgba(248, 250, 255, 0.9);
  color: #44506a;
  box-shadow: 0 6px 20px rgba(70, 76, 120, 0.06);
}

.brand-chip {
  background: linear-gradient(135deg, var(--seal), #7774ff);
  box-shadow: 0 5px 14px rgba(87, 86, 217, 0.24);
}

.hero h1 {
  max-width: 720px;
  margin-top: 18px;
  font-size: clamp(38px, 4.7vw, 56px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.hero h1 span {
  display: block;
  width: fit-content;
  margin-top: 8px;
  color: transparent;
  background: linear-gradient(100deg, #5150d2 0%, #6d68ee 42%, #00a69d 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero p {
  width: min(100%, 650px);
  margin: 14px 0 0;
  color: #627086;
  font-size: 15px;
  line-height: 1.7;
  text-align: left;
}

.helper-actions {
  justify-content: flex-start;
  margin-top: 18px;
}

.helper-actions button {
  min-height: 38px;
  border-color: #d8e0ec;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 5px 16px rgba(44, 58, 88, 0.045);
  transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.helper-actions button:hover {
  border-color: #b8b7f0;
  color: var(--seal-deep);
  background: #ffffff;
  box-shadow: 0 9px 22px rgba(87, 86, 217, 0.1);
  transform: translateY(-2px);
}

.route-visual {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: space-between;
  min-height: 220px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(125, 134, 170, 0.28);
  border-radius: 20px;
  color: #e9ecff;
  background:
    linear-gradient(rgba(151, 160, 205, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 160, 205, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 78% 18%, rgba(88, 205, 194, 0.17), transparent 32%),
    radial-gradient(circle at 18% 84%, rgba(113, 108, 255, 0.2), transparent 40%),
    #11182a;
  background-size: 22px 22px, 22px 22px, auto, auto, auto;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.09), 0 24px 55px rgba(16, 24, 42, 0.24);
}

.route-visual::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, 0.06) 48%, transparent 66%);
  background-size: 220% 100%;
  animation: routeGlint 7s ease-in-out infinite;
  pointer-events: none;
  content: "";
}

.route-visual-head,
.route-visual-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
}

.route-visual-head > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f3f5ff;
  font-weight: 700;
}

.route-visual-head > span i,
.route-visual-foot strong i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ce4d5;
  box-shadow: 0 0 0 5px rgba(92, 228, 213, 0.1), 0 0 18px rgba(92, 228, 213, 0.7);
  animation: routePulse 1.8s ease-in-out infinite;
}

.route-visual-head em,
.route-visual-foot span {
  color: #8e99b8;
  font-style: normal;
}

.route-flow {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(28px, 1fr) auto minmax(28px, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.route-node {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 76px;
  padding: 12px 10px;
  border: 1px solid rgba(151, 160, 205, 0.22);
  border-radius: 12px;
  background: rgba(18, 26, 46, 0.78);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.route-node small {
  color: #7986a8;
  font-family: var(--font-mono);
  font-size: 9px;
}

.route-node b {
  color: #f5f6ff;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.route-node > i {
  position: absolute;
  top: 10px;
  right: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5ce4d5;
}

.route-line {
  position: relative;
  height: 1px;
  overflow: visible;
  background: rgba(137, 147, 185, 0.28);
}

.route-line i {
  position: absolute;
  top: -2px;
  left: 0;
  width: 18px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #6c68ff, #5ce4d5, transparent);
  filter: drop-shadow(0 0 6px rgba(92, 228, 213, 0.72));
  animation: routeTravel 2.4s linear infinite;
}

.route-line:nth-of-type(2) i {
  animation-delay: 1.2s;
}

.route-visual-foot strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #63ded1;
  font-size: 10px;
}

.status-board {
  order: 2;
  align-items: stretch;
  gap: 12px;
  padding: 16px;
}

.live-connection {
  top: 15px;
  right: 16px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #dbe3ee;
  background: rgba(249, 251, 254, 0.92);
}

.status-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-right: 150px;
  margin: 0;
}

.status-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid #e0e6ef;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 253, 0.9));
}

.status-pict {
  grid-row: 1 / span 2;
  align-self: center;
  width: 10px;
  height: 32px;
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(87, 86, 217, 0.035);
}

.status-item strong {
  align-self: end;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1;
}

.status-item em {
  align-self: start;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.heat-caption {
  margin: 0;
  color: #7b879a;
  font-family: var(--font-mono);
  font-size: 10px;
}

.heat-row {
  gap: 4px;
  opacity: 1;
}

.heat-row span {
  border: 1px solid rgba(210, 220, 232, 0.55);
  border-radius: 4px;
  background: #edf1f6;
}

.heat-row span:nth-child(n + 81) {
  display: none;
}

.geo-board {
  order: 3;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  padding: 16px;
}

.geo-map-panel {
  min-height: 154px;
  border-color: #242e47;
  background:
    linear-gradient(rgba(126, 139, 183, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 139, 183, 0.09) 1px, transparent 1px),
    #121a2c;
  background-size: 28px 28px;
}

.geo-map-grid {
  opacity: 0.35;
}

.geo-land path {
  fill: rgba(92, 228, 213, 0.09);
  stroke: rgba(166, 179, 220, 0.46);
}

.geo-scanline {
  width: 2px;
  background: linear-gradient(180deg, transparent, #5ce4d5, transparent);
  box-shadow: 0 0 18px rgba(92, 228, 213, 0.7);
}

.tool-card {
  order: 4;
  overflow: hidden;
}

.tool-card::before {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: block;
  width: auto;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #5756d9 28%, #00a69d 52%, #5756d9 74%, transparent 100%);
  background-size: 220% 100%;
  animation: routeGlint 6s linear infinite;
  content: "";
}

.card-toolbar {
  padding: 14px 18px;
  background: rgba(247, 249, 253, 0.84);
  backdrop-filter: blur(12px);
}

.workspace-edition {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #78859a;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.workspace-edition i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ce4d5;
  box-shadow: 0 0 0 5px rgba(92, 228, 213, 0.1), 0 0 14px rgba(92, 228, 213, 0.55);
}

.workflow-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  padding: 12px 15px;
  border: 1px solid #dce3ee;
  border-radius: 17px;
  background:
    linear-gradient(rgba(87, 86, 217, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 86, 217, 0.025) 1px, transparent 1px),
    linear-gradient(135deg, #fafaff, #f5fbfa);
  background-size: 22px 22px, 22px 22px, auto;
}

.workflow-strip > span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  min-width: 0;
}

.workflow-strip > span > i {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #d0d8e6;
  border-radius: 11px;
  color: var(--seal);
  background: #ffffff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(48, 61, 92, 0.055);
}

.workflow-strip b {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.workflow-strip small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.workflow-strip > em {
  position: relative;
  height: 1px;
  overflow: visible;
  background: #d4dce8;
}

.workflow-strip > em i {
  position: absolute;
  top: -2px;
  left: -6px;
  width: 18px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--seal), var(--ok), transparent);
  filter: drop-shadow(0 0 5px rgba(0, 166, 157, 0.42));
  animation: workflowTravel 2.6s linear infinite;
}

.workflow-strip > em:nth-of-type(2) i {
  animation-delay: 1.3s;
}

.tabs {
  border-color: #d9e0eb;
  border-radius: 13px;
  background: #ffffff;
}

.tabs button {
  border-radius: 10px;
}

.tabs button.active {
  background: linear-gradient(135deg, var(--seal), #706cec);
  box-shadow: 0 7px 16px rgba(87, 86, 217, 0.2);
}

.method-row {
  gap: 11px;
  padding: 14px;
  border: 1px solid #e0e6ef;
  border-radius: 18px;
  background:
    linear-gradient(rgba(87, 86, 217, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 86, 217, 0.025) 1px, transparent 1px),
    #f8fafe;
  background-size: 22px 22px;
}

.method-option {
  min-height: 82px;
  border-color: #dbe3ed;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(35, 48, 75, 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.method-option:hover {
  border-color: #bcbaf0;
  box-shadow: 0 12px 26px rgba(87, 86, 217, 0.09);
  transform: translateY(-2px);
}

.method-row input:checked + .method-option {
  border-color: #7774ec;
  background: linear-gradient(135deg, rgba(241, 241, 255, 0.98), rgba(231, 250, 247, 0.9));
  box-shadow: 0 0 0 3px rgba(87, 86, 217, 0.1), 0 14px 30px rgba(87, 86, 217, 0.12);
}

.method-row input:checked + .method-option::before {
  color: #ffffff;
  background: linear-gradient(135deg, var(--seal), #7774ec);
}

.cdk-field,
.session-panel {
  border-color: #dce4ef;
  background: rgba(247, 249, 253, 0.9);
}

.cdk-field {
  margin: 16px;
  border-radius: 17px;
}

.session-panel {
  margin: 0 16px 16px;
  border-radius: 18px;
}

input,
textarea,
select {
  border-color: #d2dbe8;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.94);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #7774ec;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(87, 86, 217, 0.1);
}

.empty-result,
.result-card {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
}

.progress-track {
  background: #e5eaf2;
}

.progress-track > span,
#progressBar {
  background: linear-gradient(90deg, var(--seal), #6e69ed 48%, var(--ok));
  box-shadow: 0 0 16px rgba(87, 86, 217, 0.26);
}

.primary-action,
.open-link,
.modal-confirm {
  border-color: transparent;
  background: linear-gradient(135deg, var(--seal), #6e69ed 58%, #16a7a0);
  box-shadow: 0 10px 24px rgba(87, 86, 217, 0.22);
}

.primary-action:hover,
.open-link:hover,
.modal-confirm:hover {
  box-shadow: 0 14px 28px rgba(87, 86, 217, 0.3);
  transform: translateY(-2px);
}

.secondary-action,
.coupon-check-btn,
.session-copy,
#verifyCdkButton {
  border-color: #d6deea;
  background: rgba(255, 255, 255, 0.9);
}

.floating-tools {
  border: 1px solid rgba(198, 208, 222, 0.8);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 40px rgba(35, 48, 75, 0.12);
  backdrop-filter: blur(16px);
}

.modal-dialog {
  border-color: rgba(190, 201, 218, 0.8);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(20, 28, 47, 0.25);
  backdrop-filter: blur(22px);
}

@keyframes routeTravel {
  from { left: -16px; }
  to { left: calc(100% - 2px); }
}

@keyframes routePulse {
  50% { opacity: 0.55; transform: scale(0.8); }
}

@keyframes routeGlint {
  0%, 18% { background-position: 120% 0; }
  70%, 100% { background-position: -120% 0; }
}

@keyframes workflowTravel {
  from { left: -10px; }
  to { left: calc(100% - 3px); }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .route-visual {
    min-height: 190px;
  }

  .status-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 0;
    padding-top: 38px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(calc(100% - 16px), 1320px);
    gap: 10px;
    padding: 8px 0 24px;
  }

  .hero {
    min-height: 0;
    gap: 18px;
    padding: 20px 18px 18px;
    border-radius: 18px;
  }

  .hero h1 {
    margin-top: 16px;
    font-size: clamp(32px, 10.5vw, 42px);
  }

  .hero h1 span {
    margin-top: 4px;
  }

  .hero p {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.65;
  }

  .helper-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .helper-actions button {
    justify-content: flex-start;
    min-width: 0;
    min-height: 36px;
  }

  .route-visual {
    min-height: 164px;
    padding: 14px;
    border-radius: 17px;
  }

  .route-flow {
    gap: 5px;
  }

  .route-node {
    min-width: 0;
    padding: 10px 7px;
  }

  .route-node b {
    font-size: 7.5px;
  }

  .route-visual-head em,
  .route-visual-foot span {
    display: none;
  }

  .status-board {
    padding: 12px;
    border-radius: 18px;
  }

  .live-connection {
    position: static;
    align-self: flex-start;
  }

  .status-legend {
    gap: 7px;
    padding-top: 0;
  }

  .status-item {
    min-height: 58px;
    padding: 9px;
  }

  .status-item strong {
    font-size: 18px;
  }

  .heat-row {
    grid-template-columns: repeat(20, minmax(0, 1fr));
  }

  .geo-board {
    padding: 12px;
    border-radius: 18px;
  }

  .geo-map-panel {
    min-height: 140px;
  }

  .workflow-strip {
    margin: 10px 10px 0;
    padding: 11px;
  }

  .floating-tools {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: calc(100% - 16px);
    margin: 0 auto 16px;
    border-radius: 14px;
    box-shadow: var(--shadow-flat);
    transform: none;
  }

  .floating-online {
    justify-content: flex-start;
  }

  .tool-card {
    border-radius: 18px;
  }

  .workspace-edition {
    display: none;
  }

  .workflow-strip {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 10px 10px 0;
    padding: 12px;
  }

  .workflow-strip > em {
    width: 1px;
    height: 15px;
    margin-left: 16px;
  }

  .workflow-strip > em i {
    display: none;
  }

  .cdk-field,
  .session-panel {
    margin-right: 10px;
    margin-left: 10px;
  }
}
