/* ==========================================================================
   TRC-20 Energy · 用户门户
   深色金融科技风 · TRON 红强调色 · 无外部字体/图片/CDN
   ========================================================================== */

:root {
  --bg: #f4f7fb;
  --bg-soft: #f8fafc;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --panel-3: #eef2f8;
  --border: #dbe3ee;
  --border-strong: #c5d0df;
  --text: #142033;
  --text-dim: #344258;
  --muted: #5b6b80;
  --faint: #8492a6;
  --tron: #c8102e;
  --tron-bright: #e11d48;
  --tron-soft: rgba(200, 16, 46, 0.08);
  --green: #0f8a5f;
  --green-soft: rgba(15, 138, 95, 0.1);
  --amber: #b45309;
  --amber-soft: rgba(180, 83, 9, 0.1);
  --blue: #1d4ed8;
  --blue-soft: rgba(29, 78, 216, 0.1);
  --red: #c0392b;
  --red-soft: rgba(192, 57, 43, 0.1);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --ring: 0 0 0 3px rgba(200, 16, 46, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(200, 16, 46, 0.06), transparent 60%),
    radial-gradient(800px 380px at 95% 0%, rgba(29, 78, 216, 0.05), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 45%, #eef3f9 100%);
  background-attachment: fixed;
}

h1,
h2,
h3,
p,
dl,
dd,
dt,
ol {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 650;
  letter-spacing: 0.01em;
}

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

button {
  cursor: pointer;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}

::selection {
  background: rgba(235, 0, 41, 0.4);
  color: #fff;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.94em;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.addr {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.hint-warn {
  color: var(--amber);
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.error-text {
  color: var(--red);
  word-break: break-word;
}

.num {
  text-align: right;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 120;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--tron);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px clamp(16px, 3vw, 34px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #ff3b30, #b40020);
  box-shadow: 0 10px 26px rgba(235, 0, 41, 0.35), inset 0 1px 0 rgba(15, 23, 42, 0.1);
}

.brand-text h1 {
  font-size: 17px;
  line-height: 1.2;
}

.brand-text p {
  color: var(--muted);
  font-size: 12px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 12px;
  background: rgba(15, 23, 42, 0.04);
}

.user-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16);
}

/* ---------- 布局 ---------- */

.main {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 34px) 8px;
}

.portal {
  display: block;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 16px;
  align-items: start;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

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

.login-view {
  display: flex;
  justify-content: center;
  padding: 34px 0 46px;
  min-height: calc(100vh - 210px);
  align-items: flex-start;
}

.login-card {
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(235, 0, 41, 0.12), transparent 190px),
    var(--panel);
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand h1 {
  font-size: 19px;
  line-height: 1.2;
}

.login-brand p {
  color: var(--muted);
  font-size: 12px;
}

.test-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 11px;
  border: 1px solid rgba(245, 165, 36, 0.28);
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  color: var(--text-dim);
  font-size: 12px;
}

.test-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--tron);
  box-shadow: 0 4px 14px rgba(235, 0, 41, 0.32);
}

.demo-hint {
  text-align: center;
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ---------- 主界面提示条 ---------- */

.test-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(245, 165, 36, 0.1), rgba(15, 23, 42, 0.04));
}

.test-banner .sep {
  color: var(--faint);
}

.status-meta {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

/* ---------- 面板 ---------- */

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.04), transparent 160px),
    var(--panel);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04) inset, 0 14px 32px rgba(15, 23, 42, 0.08);
  overflow: clip;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), transparent);
}

.panel-head h2 {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- 余额 ---------- */

.balance-panel {
  padding: 0;
}

.balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(560px 220px at 0% 0%, rgba(235, 0, 41, 0.2), transparent 70%),
    linear-gradient(150deg, rgba(15, 23, 42, 0.04), transparent 60%),
    var(--bg-soft);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04) inset;
}

.balance-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

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

.balance-value {
  color: #fff;
  font-size: clamp(26px, 4.2vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  word-break: break-all;
}

.balance-user {
  color: var(--text-dim);
  font-size: 12px;
}

.balance-panel .inline-error {
  margin: 0 16px 16px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-label {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input::placeholder {
  color: var(--faint);
}

.input:hover {
  border-color: #94a3b8;
}

.input:focus {
  outline: none;
  border-color: var(--tron);
  background: #ffffff;
  box-shadow: var(--ring);
}

.input.input-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 91, 91, 0.18);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-sm {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(160deg, #ff3b30, #c80526 72%);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 24px rgba(235, 0, 41, 0.32), inset 0 1px 0 rgba(15, 23, 42, 0.1);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(160deg, #ff564c, #d6082c 72%);
  box-shadow: 0 12px 28px rgba(235, 0, 41, 0.42), inset 0 1px 0 rgba(15, 23, 42, 0.1);
}

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

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--border-strong);
}

.btn-secondary {
  color: var(--text);
  background: var(--panel-3);
  border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: #e2e8f0;
  border-color: #3d4859;
}

.btn[data-loading="true"] {
  cursor: progress;
  opacity: 0.85;
}

.btn[data-loading="true"]::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

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

/* ---------- 徽章 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1.6;
  white-space: nowrap;
  color: var(--text-dim);
  background: rgba(15, 23, 42, 0.04);
}

.badge-neutral {
  color: var(--muted);
}

.badge-success {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(52, 211, 153, 0.32);
}

.badge-danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(255, 91, 91, 0.32);
}

.badge-warn {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(245, 165, 36, 0.32);
}

.badge-info {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(90, 169, 255, 0.32);
}

.badge-testnet {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(90, 169, 255, 0.36);
}

.badge-mainnet {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(255, 91, 91, 0.4);
}

/* ---------- SKU ---------- */

.sku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.sku-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px;
  color: inherit;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease,
    box-shadow 0.15s ease;
}

.sku-card:hover {
  transform: translateY(-1px);
  border-color: #3d4859;
  background: #f8fafc;
}

.sku-card[aria-checked="true"] {
  border-color: var(--tron);
  background:
    linear-gradient(150deg, rgba(235, 0, 41, 0.15), transparent 70%),
    #f8fafc;
  box-shadow: 0 0 0 1px rgba(235, 0, 41, 0.4), 0 14px 26px rgba(235, 0, 41, 0.14);
}

.sku-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sku-name {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.sku-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: transparent;
  font-size: 11px;
  line-height: 1;
}

.sku-card[aria-checked="true"] .sku-check {
  color: #fff;
  background: var(--tron);
  border-color: var(--tron);
}

.sku-desc {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sku-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 7px;
  border-top: 1px dashed var(--border);
}

.sku-energy {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
}

.sku-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.sku-price .label {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.sku-price .value {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 报价 / 订单 ---------- */

.quote-card,
.order-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.quote-card {
  border-top: 2px solid var(--tron);
  background:
    linear-gradient(180deg, rgba(235, 0, 41, 0.1), transparent 120px),
    var(--bg-soft);
}

.order-card {
  border-top: 2px solid var(--border-strong);
}

.quote-head,
.order-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quote-head h3,
.order-head h3 {
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.countdown {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(245, 165, 36, 0.3);
  white-space: nowrap;
}

.countdown.urgent {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(255, 91, 91, 0.36);
  animation: pulse-soft 1s ease-in-out infinite;
}

.countdown.expired {
  color: var(--muted);
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--border-strong);
  animation: none;
}

@keyframes pulse-soft {
  50% {
    opacity: 0.62;
  }
}

.poll-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--blue);
  font-size: 11px;
  white-space: nowrap;
}

.poll-indicator.paused {
  color: var(--muted);
}

.poll-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(90, 169, 255, 0.16);
  animation: pulse-soft 1.6s ease-in-out infinite;
}

.poll-indicator.paused .poll-dot {
  animation: none;
  box-shadow: none;
}

.kv {
  display: grid;
  gap: 7px;
}

.kv > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.kv dt {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}

.kv dd {
  min-width: 0;
  color: var(--text);
  font-size: 12.5px;
  text-align: right;
  word-break: break-word;
}

/* ---------- 时间线 ---------- */

.timeline {
  display: flex;
  flex-direction: column;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 0 0 14px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--border-strong);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  flex: none;
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--panel);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.timeline-label {
  font-size: 12.5px;
  color: var(--text-dim);
}

.timeline-time {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.timeline-item.is-done .timeline-dot {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14);
}

.timeline-item.is-done .timeline-label {
  color: var(--text);
}

.timeline-item.is-active .timeline-dot {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(90, 169, 255, 0.16);
  animation: pulse-soft 1.6s ease-in-out infinite;
}

.timeline-item.is-active .timeline-label {
  color: var(--blue);
}

.timeline-item.is-error .timeline-dot {
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 91, 91, 0.16);
}

.timeline-item.is-error .timeline-label {
  color: var(--red);
}

.timeline-item.is-pending .timeline-label {
  color: var(--faint);
}

/* ---------- 表格 ---------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.table-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #394454;
  border: 2px solid #f1f5f9;
  border-radius: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table thead th {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-align: left;
  white-space: nowrap;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-strong);
}

.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(35, 42, 53, 0.7);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.04);
}

.data-table .amount-pos {
  color: var(--green);
}

.data-table .amount-neg {
  color: var(--red);
}

/* ---------- 最近订单 ---------- */

.order-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.order-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

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

.order-item-price {
  margin-left: auto;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.order-item-title {
  color: var(--text-dim);
  font-size: 12.5px;
  word-break: break-word;
}

.order-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 11px;
  font-family: var(--font-mono);
}

.order-item-error {
  color: var(--red);
  font-size: 11.5px;
  word-break: break-word;
}

.view-order-btn {
  margin-left: auto;
}

.order-item .view-order-btn {
  padding: 2px 9px;
  font-size: 11px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.order-item .view-order-btn:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--border-strong);
}

/* ---------- 空状态 / 错误 ---------- */

.empty {
  padding: 18px 12px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.04);
}

.inline-error {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 12px;
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
  background: var(--red-soft);
  border: 1px solid rgba(255, 91, 91, 0.26);
  border-radius: var(--radius-sm);
  word-break: break-word;
}

.inline-error .btn {
  margin-left: auto;
}

/* ---------- Toast ---------- */

.toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
  background: #eef2f8;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: toast-in 0.18s ease-out;
}

.toast.is-success {
  border-left-color: var(--green);
}

.toast.is-error {
  border-left-color: var(--red);
}

.toast.is-warn {
  border-left-color: var(--amber);
}

.toast .toast-close {
  margin-left: auto;
  padding: 0 4px;
  color: var(--faint);
  font-size: 15px;
  line-height: 1;
  background: none;
  border: 0;
}

.toast .toast-close:hover {
  color: var(--text);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- 页脚 ---------- */

.footer {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 34px) 30px;
  color: var(--faint);
  font-size: 11.5px;
}

.footer strong {
  color: var(--text-dim);
}

.footer-meta {
  margin-top: 2px;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 300;
  padding: 14px;
  color: var(--text);
  text-align: center;
  background: var(--red-soft);
  border: 1px solid rgba(255, 91, 91, 0.4);
  border-radius: var(--radius-sm);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 13.5px;
  }

  .topbar {
    padding: 12px 14px;
  }

  .brand-text h1 {
    font-size: 15.5px;
  }

  .brand-text p {
    font-size: 11px;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .main {
    padding: 14px 12px 4px;
  }

  .login-view {
    padding: 14px 0 30px;
  }

  .login-card {
    padding: 20px 16px;
  }

  .panel-body {
    padding: 13px;
  }

  .balance-card {
    padding: 15px;
  }

  .balance-value {
    font-size: 27px;
  }

  .test-banner {
    font-size: 11px;
  }

  .status-meta {
    width: 100%;
    margin-left: 0;
  }

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

  .countdown,
  .poll-indicator {
    margin-left: 0;
  }

  .actions .btn {
    flex: 1 1 auto;
  }

  .toast-root {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }
}

@media (max-width: 420px) {
  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .kv > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }

  .kv dd {
    text-align: left;
  }

  .order-item-price {
    margin-left: 0;
  }
}

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

/* ==========================================================================
   标签页
   ========================================================================== */

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
}

.tab {
  min-height: 36px;
  padding: 6px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.tab:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}

.tab.is-active {
  color: #fff;
  background: linear-gradient(160deg, #ff3b30, #c80526);
  box-shadow: 0 6px 16px rgba(235, 0, 41, 0.3);
}

.tab-panel {
  display: block;
}

/* ==========================================================================
   钱包
   ========================================================================== */

.wallet-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.wallet-intro {
  min-width: 0;
}

.wallet-intro h2 {
  font-size: 16px;
}

.wallet-intro .hint {
  margin-top: 4px;
  max-width: 720px;
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.wallet-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.04), transparent 140px),
    var(--panel);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04) inset, 0 12px 28px rgba(0, 0, 0, 0.2);
}

.wallet-card-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wallet-card-name {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  word-break: break-word;
}

.wallet-card-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.wallet-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
}

.wallet-address {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.wallet-balances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.wallet-balance {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
}

.wallet-balance .label {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.05em;
}

.wallet-balance .value {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.wallet-balance .value.is-empty {
  color: var(--faint);
}

.wallet-balance-error {
  color: var(--amber);
  font-size: 11px;
  line-height: 1.4;
}

.wallet-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 11px;
}

.wallet-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.wallet-actions .btn {
  flex: 1 1 auto;
}

.wallet-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  color: var(--muted);
  font-size: 12px;
}

.loading-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--tron);
  animation: pulse-soft 1s ease-in-out infinite;
}

.wallet-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 16px;
}

.wallet-empty p:first-child {
  color: var(--text);
  font-weight: 600;
}

/* ==========================================================================
   复制按钮
   ========================================================================== */

.copy-btn {
  flex: none;
  padding: 1px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(15, 23, 42, 0.04);
}

/* ==========================================================================
   弹窗
   ========================================================================== */

.dialog {
  width: min(480px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dialog-wide {
  width: min(640px, calc(100vw - 28px));
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.dialog-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 18px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head h2 {
  font-size: 16px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(160deg, #ff3b30, #b40020);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 8px 20px rgba(235, 0, 41, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(160deg, #ff564c, #c80526);
}

.btn.danger {
  color: var(--red);
  border-color: rgba(255, 91, 91, 0.34);
}

.btn.danger:hover:not(:disabled) {
  background: var(--red-soft);
  border-color: rgba(255, 91, 91, 0.45);
}

.notice-danger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 91, 91, 0.36);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  background: var(--red-soft);
}

.notice-danger strong {
  color: var(--red);
  font-size: 12.5px;
}

.notice-danger p {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.55;
}

.created-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.created-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
}

.created-name {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  word-break: break-word;
}

.created-address {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
  word-break: break-all;
}

.created-item .copy-btn {
  align-self: flex-start;
  margin-top: 2px;
}

.secret-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.secret-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.secret-value {
  margin: 0;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  color: #ffd9d9;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff1f2;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.secret-mnemonic {
  color: #ffe1a8;
}

.secret-key {
  color: #ffb4b4;
  word-break: break-all;
}

/* ==========================================================================
   响应式（钱包 / 标签页 / 弹窗）
   ========================================================================== */

@media (max-width: 760px) {
  .tabs {
    display: flex;
    width: 100%;
    margin-bottom: 12px;
  }

  .tab {
    flex: 1;
    padding: 6px 10px;
  }

  .wallet-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .wallet-toolbar .actions {
    justify-content: flex-end;
  }

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

  .wallet-actions .btn {
    flex: 1 1 45%;
  }

  .wallet-balances {
    grid-template-columns: minmax(0, 1fr);
  }

  .dialog {
    width: calc(100vw - 20px);
  }

  .dialog-form {
    padding: 15px;
  }

  .secret-value {
    font-size: 11.5px;
  }
}

@media (max-width: 420px) {
  .wallet-actions .btn {
    flex: 1 1 100%;
  }

  .dialog-actions .btn {
    flex: 1 1 auto;
  }
}

/* ==========================================================================
   单笔发送
   ========================================================================== */

.transfer-history-panel {
  margin-top: 14px;
}

.transfer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transfer-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

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

.transfer-asset {
  padding: 1px 8px;
  color: var(--text-dim);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}

.transfer-amount {
  margin-left: auto;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.transfer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
}

.transfer-item-error {
  color: var(--red);
  font-size: 11.5px;
  word-break: break-word;
}

.asset-switch {
  display: inline-flex;
  align-self: flex-start;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
}


.asset-btn {
  min-height: 32px;
  padding: 4px 22px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  background: transparent;
  border: 0;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.asset-btn:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}

.asset-btn.is-active {
  color: #fff;
  background: linear-gradient(160deg, #ff3b30, #c80526);
  box-shadow: 0 6px 14px rgba(235, 0, 41, 0.3);
}

/* 单笔转账报价 */
.transfer-quote-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px;
  background: linear-gradient(180deg, rgba(235, 0, 41, 0.09), transparent 100px), var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--tron);
  border-radius: var(--radius-sm);
}
.transfer-quote-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.transfer-quote-foot .countdown { margin-left: 0; }

/* 钱包列表 */
.wallet-list-head {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(220px, 1.6fr) minmax(140px, 0.9fr) 140px 520px;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
  padding: 9px 14px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.wallet-list { display: flex; flex-direction: column; gap: 8px; }
.wallet-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(220px, 1.6fr) minmax(140px, 0.9fr) 140px 520px;
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.wallet-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wallet-row-name-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wallet-row-name { font-size: 14px; font-weight: 650; line-height: 1.35; word-break: break-word; }
.wallet-row-note { color: var(--muted); font-size: 12px; line-height: 1.45; word-break: break-word; }
.wallet-row-address { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wallet-row-address-body { display: flex; align-items: flex-start; gap: 7px; min-width: 0; }
.wallet-address-full {
  flex: 1;
  min-width: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.wallet-row-balances { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wallet-balance-inline { display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 11px; }
.wallet-balance-inline strong {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.wallet-row-created { color: var(--muted); font-family: var(--font-mono); font-size: 11.5px; }
.wallet-row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.wallet-field-label { display: none; }
.wallet-address-index {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 7px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.wallet-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.wallet-search { flex: 1 1 240px; min-width: 180px; }
.wallet-search .input { width: 100%; }
.wallet-usage { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; color: var(--muted); font-size: 11.5px; }
.wallet-usage .btn { flex: none; }

/* 能量档位 */
.energy-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.energy-option {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-start;
  padding: 16px;
  color: inherit;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.energy-option:hover { border-color: #3d4859; }
.energy-option.is-active {
  border-color: var(--tron);
  background: linear-gradient(150deg, rgba(235, 0, 41, 0.14), transparent 70%), #f8fafc;
  box-shadow: 0 0 0 1px rgba(235, 0, 41, 0.38), 0 10px 22px rgba(235, 0, 41, 0.12);
}
.energy-option-value { color: #fff; font-family: var(--font-mono); font-size: clamp(20px, 3vw, 26px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.energy-option-unit { color: var(--muted); font-size: 11px; letter-spacing: 0.05em; }
.energy-option-price { margin-top: 6px; color: var(--tron-bright); font-family: var(--font-mono); font-size: 13px; }

/* 通用选择器/复制/详情 */
.select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.check-row { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 12.5px; cursor: pointer; }
.check-row input { width: 15px; height: 15px; accent-color: var(--tron); }
.export-select-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.export-wallet-list {
  display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #94a3b8 #f1f5f9;
}
.export-wallet-row {
  display: flex; align-items: flex-start; gap: 9px; padding: 8px 10px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.export-wallet-row input { margin-top: 3px; width: 15px; height: 15px; accent-color: var(--tron); }
.export-wallet-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.export-wallet-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.export-wallet-main strong { font-size: 12.5px; }
.export-wallet-address { color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; word-break: break-all; }
.purchase-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 12px;
  background: var(--tron-soft); border: 1px solid rgba(235, 0, 41, 0.35); border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 12px;
}
.purchase-total strong { color: #fff; font-family: var(--font-mono); font-size: 16px; }
.detail-block { display: flex; flex-direction: column; gap: 7px; padding-top: 10px; border-top: 1px solid var(--border); }
.detail-block:first-child { padding-top: 0; border-top: 0; }
.detail-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.detail-block-head h3 { color: var(--text-dim); font-size: 12.5px; letter-spacing: 0.03em; }
.detail-list { display: flex; flex-direction: column; gap: 6px; }
.detail-row { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; }
.detail-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-row-title { font-size: 12.5px; }
.detail-row-meta { color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.detail-row-sub { color: var(--faint); font-family: var(--font-mono); font-size: 10px; word-break: break-all; }

/* 收款钱包选择 */
.input-with-action { display: flex; align-items: stretch; gap: 8px; }
.input-with-action .input { flex: 1; min-width: 0; }
.input-with-action .btn { flex: none; white-space: nowrap; }
.selected-wallet { margin-top: 5px; color: var(--green); }
.wallet-picker-list {
  display: flex; flex-direction: column; gap: 7px; max-height: 340px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #94a3b8 #f1f5f9;
}
.wallet-picker-row {
  display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 10px 12px;
  color: inherit; text-align: left; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.wallet-picker-row:hover { border-color: var(--border-strong); background: var(--panel-2); }
.wallet-picker-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.wallet-picker-name { font-size: 13px; font-weight: 650; }
.wallet-picker-balances { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }
.wallet-picker-balances strong { color: #fff; font-weight: 600; }
.wallet-picker-address { color: var(--text-dim); font-family: var(--font-mono); font-size: 10.5px; word-break: break-all; }

/* 隔离钱包弹窗与手动钱包 */
.iso-dialog { width: min(900px, calc(100vw - 28px)); }
.iso-dialog-title-wrap h2 { font-size: 16px; }
.iso-dialog-title-wrap .hint { margin-top: 2px; }
.iso-dialog-meta { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding: 8px 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.iso-history { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: rgba(15, 23, 42, 0.04); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.iso-history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.iso-history-head h3 { color: var(--text-dim); font-size: 12.5px; letter-spacing: 0.03em; }
.iso-history-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.iso-history-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #94a3b8 #f1f5f9; }
.iso-history-job { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; }
.iso-history-job-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.iso-history-job-title { color: var(--text); font-size: 12px; }
.iso-history-job-time { margin-left: auto; color: var(--faint); font-family: var(--font-mono); font-size: 10.5px; }
.iso-history-layers { display: flex; flex-direction: column; gap: 5px; }
.iso-layer { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 11px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.iso-layer-idx { display: grid; place-items: center; width: 26px; height: 26px; color: var(--text); font-family: var(--font-mono); font-size: 12px; font-weight: 700; background: var(--panel-3); border-radius: 8px; }
.iso-layer-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iso-layer-address { color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; line-height: 1.5; word-break: break-all; }
.iso-layer-balance { display: flex; align-items: baseline; gap: 4px; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }
.iso-layer-balance strong { color: #fff; font-size: 11.5px; font-weight: 600; }
.iso-layer-txid { color: var(--faint); font-family: var(--font-mono); font-size: 10.5px; word-break: break-all; }
.iso-layer-error { color: var(--red); font-size: 11px; word-break: break-word; }
.iso-layer-status { text-align: right; }
.iso-mode-switch { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; background: rgba(15, 23, 42, 0.04); border: 1px solid var(--border); border-radius: 999px; }
.iso-mode-btn { min-height: 32px; padding: 4px 20px; color: var(--muted); font-size: 12.5px; font-weight: 650; background: transparent; border: 0; border-radius: 999px; }
.iso-mode-btn:hover { color: var(--text); background: rgba(15, 23, 42, 0.04); }
.iso-mode-btn.is-active { color: #fff; background: linear-gradient(160deg, #ff3b30, #c80526); box-shadow: 0 6px 14px rgba(235, 0, 41, 0.3); }
.iso-form { display: flex; flex-direction: column; gap: 10px; }
.iso-job-panel { display: flex; flex-direction: column; gap: 9px; padding-top: 12px; border-top: 1px solid var(--border); }
.iso-job-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.iso-job-head h3 { color: var(--text-dim); font-size: 12.5px; letter-spacing: 0.03em; }
.iso-job-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.iso-deposit-box { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--tron-soft); border: 1px solid rgba(235, 0, 41, 0.4); border-radius: var(--radius-sm); }
.iso-deposit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-dim); font-size: 12px; }
.iso-deposit-box code { display: block; padding: 8px 10px; color: #ffd9d9; background: #fff1f2; border: 1px solid var(--border); border-radius: 8px; }
.iso-job-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.iso-mock { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.iso-mock .input { width: 180px; }
.iso-layers { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.iso-manual-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.iso-manual-head h4 { color: var(--text-dim); font-size: 11.5px; letter-spacing: 0.04em; }
.iso-manual-note { margin: 0 0 2px; }
.iso-manual-list { display: flex; flex-direction: column; gap: 6px; }
.iso-manual-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1.5fr) minmax(150px, 0.8fr) 120px auto;
  gap: 10px; align-items: center; padding: 8px 10px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
}
.iso-manual-layer { display: inline-flex; align-items: center; justify-content: center; min-height: 22px; padding: 2px 8px; color: #ffd9d9; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; white-space: nowrap; background: var(--tron-soft); border: 1px solid rgba(235, 0, 41, 0.4); border-radius: 999px; }
.iso-manual-address { color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; line-height: 1.5; word-break: break-all; }
.iso-manual-balances { display: flex; flex-direction: column; gap: 1px; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }
.iso-manual-balances strong { color: #fff; font-size: 11.5px; font-weight: 600; }
.iso-manual-created { color: var(--faint); font-family: var(--font-mono); font-size: 10.5px; }
.iso-manual-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.iso-manual-row-error { grid-column: 1 / -1; color: var(--red); font-size: 11px; word-break: break-word; }

/* 账单页 */
.billing-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; align-items: start; }
.billing-summary-panel { position: sticky; top: 16px; }
.billing-balance-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; background: linear-gradient(150deg, rgba(235, 0, 41, 0.14), transparent 75%), var(--bg-soft); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.billing-balance-card span { color: var(--muted); font-size: 11px; letter-spacing: 0.04em; }
.billing-balance-card strong { color: #fff; font-family: var(--font-mono); font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; }
.billing-toolbar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.billing-toolbar .field { flex: 1 1 320px; }
.billing-toolbar .input { width: 100%; }
.billing-list { display: flex; flex-direction: column; gap: 7px; }
.billing-row { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; }
.billing-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.billing-amount { margin-left: auto; font-family: var(--font-mono); font-size: 13px; }
.billing-amount.is-positive { color: var(--green); }
.billing-amount.is-negative { color: var(--red); }
.billing-time { margin-left: auto; color: var(--faint); font-family: var(--font-mono); font-size: 10.5px; }
.billing-row-meta { display: flex; align-items: baseline; gap: 8px 14px; flex-wrap: wrap; color: var(--muted); font-size: 10.5px; }
.billing-ref { color: var(--faint); font-family: var(--font-mono); font-size: 10px; word-break: break-all; }
.billing-address { color: var(--text-dim); font-family: var(--font-mono); font-size: 10.5px; word-break: break-all; }
.billing-note { color: var(--faint); font-size: 10.5px; }

/* HD 导出 */
.secret-meta { margin: 0; padding: 8px 10px; color: var(--text-dim); font-size: 11.5px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; word-break: break-all; }
.mnemonic-address-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #94a3b8 #f1f5f9; }
.mnemonic-address-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; }
.mnemonic-address-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; }
.mnemonic-address-value { color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; word-break: break-all; }

/* 充值页 */
.recharge-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 14px; align-items: start; }
.recharge-address-box { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--tron-soft); border: 1px solid rgba(235, 0, 41, 0.4); border-radius: var(--radius-sm); }
.recharge-address-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-dim); font-size: 12px; }
.recharge-address-box code { display: block; padding: 8px 10px; color: #ffd9d9; background: #fff1f2; border: 1px solid var(--border); border-radius: 8px; }
.recharge-mock-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: rgba(255, 196, 0, 0.07); border: 1px solid rgba(255, 196, 0, 0.35); border-radius: var(--radius-sm); }
.recharge-section-title { margin: 12px 0 6px; color: var(--text-dim); font-size: 12px; letter-spacing: 0.03em; }
.recharge-record-list { display: flex; flex-direction: column; gap: 6px; }
.recharge-record { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; }
.recharge-record-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.recharge-record-amount { margin-left: auto; font-family: var(--font-mono); font-size: 13px; color: var(--green); }
.recharge-record-meta { color: var(--muted); font-size: 10.5px; word-break: break-all; }

/* 账号页与登录链接 */
.login-links { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.login-links a { color: var(--tron-bright); }
.account-title { margin: 0 0 8px; font-size: 24px; }
.account-links { text-align: center; margin: 4px 0 8px; }
.account-links a { color: var(--tron-bright); }
.account-success { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.account-success h2 { margin: 0 0 6px; font-size: 20px; }
.secret-box { display: flex; align-items: center; gap: 8px; margin: 12px 0; padding: 12px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--panel-2); }
.secret-box code { flex: 1; font-size: 16px; letter-spacing: 0.08em; word-break: break-all; }
.plugin-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 响应式 */
@media (max-width: 1280px) {
  .wallet-list-head { display: none; }
  .wallet-row { display: flex; flex-direction: column; gap: 9px; }
  .wallet-row-actions { justify-content: flex-start; width: 100%; }
  .wallet-field-label { display: block; color: var(--faint); font-size: 10px; letter-spacing: 0.05em; }
  .wallet-row-balances { flex-direction: row; flex-wrap: wrap; gap: 14px; }
  .wallet-usage { margin-left: 0; width: 100%; }
}

@media (max-width: 1080px) {
  .billing-layout, .recharge-layout { grid-template-columns: minmax(0, 1fr); }
  .billing-summary-panel { position: static; }
}

@media (max-width: 760px) {
  .wallet-tools { align-items: stretch; }
  .wallet-search { flex: 1 1 100%; }
  .wallet-usage { align-items: flex-start; gap: 6px; }
  .wallet-usage .btn { flex: 1 1 auto; }
  .wallet-row-actions .btn { flex: 1 1 30%; }
  .input-with-action { flex-direction: column; }
  .input-with-action .btn { width: 100%; }
  .wallet-picker-balances { margin-left: 0; width: 100%; }
  .iso-dialog { width: calc(100vw - 20px); }
  .iso-mode-switch { align-self: stretch; }
  .iso-mode-btn { flex: 1; }
  .iso-layer { grid-template-columns: 30px minmax(0, 1fr); }
  .iso-layer-status { grid-column: 2; text-align: left; }
  .iso-manual-row { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .iso-manual-layer, .iso-manual-address, .iso-manual-balances, .iso-manual-created { grid-column: 1; justify-self: flex-start; }
  .iso-manual-actions { grid-column: 1; grid-row: auto; flex-direction: row; align-items: center; justify-content: flex-end; }
  .iso-history-actions { width: 100%; }
  .iso-history-actions .btn { flex: 1 1 auto; }
  .billing-toolbar .field { flex: 1 1 100%; }
  .billing-amount { margin-left: 0; }
  .energy-option { padding: 13px; }
  .secret-box { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .wallet-row-actions .btn { flex: 1 1 48%; }
}

.recharge-asset-switch {
  margin-bottom: 4px;
}
.recharge-address-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.recharge-address-row .wallet-address-full {
  flex: 1 1 220px;
}
.recharge-qr {
  flex: none;
  width: 112px;
  height: 112px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.recharge-card-panel .kv {
  margin-top: 2px;
}
@media (max-width: 760px) {
  .recharge-address-row {
    align-items: flex-start;
  }
  .recharge-qr {
    width: 96px;
    height: 96px;
  }
}



/* ===== 正式浅色主题覆盖 ===== */
.topbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.login-card {
  background: linear-gradient(180deg, rgba(200, 16, 46, 0.05), transparent 190px), #ffffff;
}
.panel {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.panel-head {
  background: #f8fafc;
}
.balance-card {
  background: radial-gradient(560px 220px at 0% 0%, rgba(200, 16, 46, 0.08), transparent 70%), linear-gradient(150deg, rgba(15, 23, 42, 0.03), transparent 60%), #ffffff;
}
.dialog {
  background: #ffffff;
}
.dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.input {
  background: #ffffff;
}
.btn-secondary:hover:not(:disabled) {
  background: #eef2f8;
  border-color: var(--border-strong);
}
.data-table thead th {
  background: #f1f5f9;
  color: var(--muted);
}
.data-table td {
  border-bottom-color: var(--border);
}
.data-table tbody tr:hover {
  background: #f8fafc;
}
.balance-value,
.sku-price .value,
.order-item-price,
.wallet-balance .value,
.transfer-amount,
.wallet-balance-inline strong,
.energy-option-value,
.purchase-total strong,
.wallet-picker-balances strong,
.iso-layer-balance strong,
.iso-manual-balances strong,
.billing-balance-card strong {
  color: var(--text);
}
.badge-success { border-color: rgba(15, 138, 95, 0.25); }
.badge-danger { border-color: rgba(192, 57, 43, 0.25); }
.badge-warn { border-color: rgba(180, 83, 9, 0.25); }
.badge-info,
.badge-testnet { border-color: rgba(29, 78, 216, 0.22); }
.badge-mainnet { border-color: rgba(200, 16, 46, 0.22); }
.secret-value,
.iso-deposit-box code,
.recharge-address-box code {
  color: #7f1d1d;
  background: #fff5f5;
  border-color: #f3d1d1;
}
.secret-block,
.secret-box {
  background: #f8fafc;
  border-color: var(--border);
}

.service-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 4px;
  padding: 10px 14px;
  color: #7f1d1d;
  font-size: 12px;
  background: #fff5f5;
  border: 1px solid #f3d1d1;
  border-radius: var(--radius-sm);
}
.service-bar .status-meta {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.test-notice,
.test-banner {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}
.test-pill,
.prototype-pill {
  background: #c8102e;
  color: #ffffff;
}
.icon-btn {
  background: transparent;
}
.icon-btn:hover {
  background: #f1f5f9;
}

.tabs {
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .tabs .tab {
    flex: 1 1 40%;
  }
  .recharge-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}


.qr-dialog-form { align-items: center; text-align: center; }
.qr-canvas-wrap { display: flex; justify-content: center; padding: 10px 0 6px; }
.qr-canvas { display: block; width: 240px; height: 240px; background: #fff; border-radius: 12px; image-rendering: pixelated; }
.qr-address { margin: 4px auto 12px; max-width: 100%; text-align: center; word-break: break-all; color: var(--muted); font-size: 12px; }
.copy-btn[data-qr-text] { white-space: nowrap; }

.recharge-address-actions { display: inline-flex; gap: 6px; align-items: center; }
.recharge-expiry-warn { color: #b42318 !important; font-weight: 600; }

.wallet-address-full.is-expired { color: #b42318; font-weight: 600; }

.topbar-balance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.topbar-balance strong {
  color: var(--text);
  font-weight: 600;
}
.user-chip-label {
  color: var(--muted);
  font-size: 11px;
}

.site-notice {
  overflow: hidden;
  margin: 10px auto 0;
  max-width: 1200px;
  padding: 8px 0;
  border: 1px solid #f3d1d1;
  border-radius: var(--radius-sm);
  background: #fff7f8;
  color: #b3122f;
  font-size: 12px;
}
.site-notice-text {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  animation: site-notice-scroll 22s linear infinite;
}
@keyframes site-notice-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .site-notice-text { animation: none; padding-left: 14px; }
}

.support-content {
  white-space: pre-wrap;
  color: var(--muted);
  line-height: 1.8;
  font-size: 13px;
  padding: 4px 0 8px;
}

.hd-wallet-panel {
  margin: 0 0 14px;
}

.wallet-import-textarea {
  min-height: 82px;
  resize: vertical;
  font-family: var(--font-mono);
  line-height: 1.6;
}
.hd-wallet-panel .panel-head {
  align-items: flex-start;
}
.hd-wallet-panel .panel-body {
  padding-top: 0;
}

.hd-wallet-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 2px 0 10px;
}
.hd-wallet-name {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-top: 2px;
}
.hd-wallet-address-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.hd-wallet-address {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.hd-wallet-balances {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.hd-wallet-balances strong {
  color: var(--text);
  font-size: 14px;
}
.hd-wallet-balances .btn {
  margin-left: auto;
}
.hd-wallet-meta {
  margin-top: 10px;
}


