/* Bollard 支付网关 · 共用样式
   色彩：港湾蓝（墨色/侧栏）+ 航标橙（主操作）+ 潮汐青（链上信息）
   标志元素：确认刻度 .ticks —— 每格是一个区块确认 */
:root {
  --ink: #0f1e2e;
  --ink-2: #33475b;
  --mute: #6b7b8d;
  --fog: #f2f4f7;
  --card: #ffffff;
  --line: #e1e6ed;
  --line-2: #cfd7e1;
  --buoy: #f2542d;
  --buoy-deep: #d9431f;
  --buoy-soft: #fff0eb;
  --tide: #0e7c86;
  --tide-soft: #e3f3f4;
  --kelp: #1e7a4f;
  --kelp-soft: #e5f4ec;
  --amber: #a86400;
  --amber-soft: #fff4dc;
  --coral: #c0362c;
  --coral-soft: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 30, 46, 0.06), 0 6px 24px rgba(15, 30, 46, 0.06);
  --sans: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --display: "Bricolage Grotesque", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fog); color: var(--ink); font: 15px/1.6 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--tide); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--buoy); outline-offset: 2px; border-radius: 4px; }

.display { font-family: var(--display); letter-spacing: -0.01em; }
.mono, code, pre { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.mute { color: var(--mute); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }

/* ---------- 按钮与表单 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--card); color: var(--ink); font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { border-color: var(--ink-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--buoy); border-color: var(--buoy); color: #fff; }
.btn-primary:hover { background: var(--buoy-deep); border-color: var(--buoy-deep); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(15, 30, 46, .06); border-color: transparent; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 16px; border-radius: 10px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 6px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.input, select.input {
  height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); width: 100%;
}
.input:focus { outline: 2px solid var(--buoy); outline-offset: -1px; border-color: transparent; }

/* ---------- 状态 ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 5px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--fog); color: var(--ink-2);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.ok { background: var(--kelp-soft); color: var(--kelp); }
.pill.wait { background: var(--amber-soft); color: var(--amber); }
.pill.bad { background: var(--coral-soft); color: var(--coral); }
.pill.chain { background: var(--tide-soft); color: var(--tide); }
.pill.plain::before { display: none; }

/* ---------- 标志元素：确认刻度 ---------- */
.ticks { display: inline-flex; gap: 3px; vertical-align: middle; }
.ticks i { width: 9px; height: 14px; border-radius: 2px; background: var(--line-2); display: block; }
.ticks i.on { background: var(--tide); }
.ticks i.next { background: var(--tide); animation: tick-pulse 1.1s ease-in-out infinite; }
.ticks.done i { background: var(--kelp); }
.ticks.bad i { background: var(--coral); }
@keyframes tick-pulse { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .ticks i.next { animation: none; opacity: .5; } }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--mute); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.r, .table th.r { text-align: right; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: #f8fafc; }
.empty { padding: 40px 16px; text-align: center; color: var(--mute); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.panel-body { padding: 18px; }

.codebox { background: var(--ink); color: #dbe6f1; border-radius: 10px; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.65; }
.codebox .k { color: #ff9b7d; }
.codebox .s { color: #9fe0d5; }
.codebox .c { color: #7f93a8; }

.copy { cursor: pointer; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 500;
  transition: opacity .18s, transform .18s; z-index: 50; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--coral); }
