[hidden] {
  display: none !important;
}

:root {
  color-scheme: light;
  --bg: #f7fafb;
  --surface: #ffffff;
  --surface-muted: #f2f6f7;
  --text: #14212b;
  --muted: #5f6f7d;
  --border: #d8e1e5;
  --strong-border: #c3d0d6;
  --primary: #008c95;
  --primary-dark: #006f76;
  --success: #15976c;
  --warning: #d98316;
  --danger: #b94040;
  --info: #2868b8;
  --shadow: 0 18px 50px rgba(21, 38, 48, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: block;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 248px;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 18px;
  border-right: 1px solid var(--border);
  background: #fbfdfe;
  z-index: 10;
}

.sidebar-collapse {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: -16px 0 -12px auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--primary-dark);
  background: var(--surface);
}

.sidebar-collapse svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

body.sidebar-collapsed .sidebar {
  width: 76px;
  padding: 24px 12px;
  align-items: center;
}

body.sidebar-collapsed .content {
  margin-left: 76px;
}

body.sidebar-collapsed .brand {
  grid-template-columns: 1fr;
  padding: 0;
}

body.sidebar-collapsed .brand > div:last-child,
body.sidebar-collapsed .local-note {
  display: none;
}

body.sidebar-collapsed .brand-mark {
  width: 42px;
  height: 42px;
}

body.sidebar-collapsed .sidebar-collapse {
  margin: -12px 0 -8px;
  transform: rotate(180deg);
}

body.sidebar-collapsed .nav-list {
  width: 100%;
}

body.sidebar-collapsed .nav-item {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0;
  min-height: 46px;
  padding: 0;
  font-size: 0;
}

body.sidebar-collapsed .nav-icon {
  width: 24px;
  height: 24px;
}

body.sidebar-collapsed .nav-item .task-spinner {
  position: absolute;
  right: 10px;
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9;
  background: rgba(0, 0, 0, 0.35);
}

.brand {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 2px 10px;
}

.brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.brand-mark {
  width: 48px;
  height: 48px;
  color: var(--primary);
}

.brand-mark svg,
.nav-icon svg,
.status-icon svg,
.button-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}

.nav-item.active {
  background: #e9f5f6;
  color: var(--primary-dark);
}

.nav-icon {
  width: 24px;
  height: 24px;
}

.nav-item .task-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.nav-item.has-running-task .task-spinner {
  display: inline-block;
}

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

.local-note {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: auto;
  padding: 18px 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.local-note strong {
  display: block;
  font-size: 13px;
}

.local-note span:last-child {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--success);
}

.content {
  min-width: 0;
  margin-left: 248px;
  padding: 28px 28px 38px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  min-width: 360px;
}

.top-password {
  flex: 1;
  min-width: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.08;
  font-weight: 760;
  letter-spacing: 0;
}

.topbar p,
.panel-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.global-message {
  margin: -6px 0 18px;
}

.status-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  padding: 18px 20px;
}

.status-item > div {
  min-width: 0;
}

.status-item + .status-item {
  border-left: 1px solid var(--border);
}

.status-item span:not(.status-icon) {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.status-item strong {
  display: block;
  margin-top: 5px;
  max-width: 100%;
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.status-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #324352;
  background: var(--surface-muted);
}

.status-icon svg {
  width: 23px;
  height: 23px;
}

.status-icon.ok {
  color: var(--success);
  background: #eef9f4;
}

.status-icon.locked {
  color: var(--warning);
}

.status-icon.key {
  color: var(--primary-dark);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.main-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.panel,
.security-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px 20px;
}

.view-page {
  display: none;
}

.view-page.active {
  display: block;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}

.section-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.section-switch-item {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
}

.section-switch-item.active {
  color: var(--primary-dark);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(21, 38, 48, 0.08);
}

h2 {
  color: var(--primary-dark);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

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

.batch-grid {
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
}

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

.vault-grid {
  grid-template-columns: minmax(240px, 420px) auto;
}

.chain-grid {
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) auto;
}

.transfer-grid {
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) minmax(0, 1fr) minmax(110px, 150px) auto;
}

/* 转账表单专用：网络/币种/金额窄，转出与收款等宽（1fr），可选字段单独成行。 */
.transfer-pay-grid {
  grid-template-columns: minmax(96px, 130px) minmax(96px, 140px) minmax(0, 1fr) minmax(0, 1fr) minmax(110px, 150px) auto;
}

.transfer-pay-grid > #transferCustomContractLabel,
.transfer-pay-grid > #transferFeeLimitLabel {
  grid-column: 1 / -1;
}

.status-grid {
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) auto;
}

.secret-grid {
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 1fr) auto;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--strong-border);
  border-radius: 6px;
  outline: none;
  color: var(--text);
  background: #fff;
  font-size: 14px;
}

select {
  appearance: none;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 140, 149, 0.13);
}

.confirm-input-wrap {
  position: relative;
}

.confirm-input-wrap input {
  background: transparent;
  position: relative;
  z-index: 1;
}

.confirm-ghost {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 43px;
  line-height: 43px;
  padding: 0 12px;
  font-size: 14px;
  color: #bbb;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
}

.confirm-ghost .ghost-typed {
  visibility: hidden;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: 13px;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--primary);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.primary-button {
  border: 1px solid var(--primary);
  color: #fff;
  background: var(--primary);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  border: 1px solid var(--primary);
  color: var(--primary-dark);
  background: #eef9fa;
}

.ghost-button {
  border: 1px solid var(--border);
  color: #324352;
  background: #fff;
}

.danger-button {
  border: 1px solid var(--danger);
  color: #fff;
  background: var(--danger);
}

.ghost-button:hover,
.secondary-button:hover {
  border-color: var(--primary);
}

.danger-button:hover {
  background: #9f3333;
}

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

.button-icon {
  width: 19px;
  height: 19px;
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.message {
  min-height: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left-width: 5px;
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(21, 38, 48, 0.14);
  color: var(--text);
  background: #fff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: auto;
}

.message.info {
  border-left-color: var(--info);
  background: #f3f8ff;
  color: #234f8c;
}

.message.success {
  border-left-color: var(--success);
  background: #f0fbf6;
  color: #0d6f4e;
}

.message.error {
  border-left-color: var(--danger);
  background: #fff5f5;
  color: #903030;
}

.message.warning {
  border-left-color: var(--warning);
  background: #fff8ed;
  color: #794d0f;
}

.message.leaving {
  opacity: 0;
  transform: translateY(-6px);
}

.table-heading {
  align-items: center;
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
}

th {
  color: #334654;
  background: var(--surface-muted);
  font-weight: 760;
}

td {
  color: #22313d;
}

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

.address-cell {
  max-width: 300px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.source-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.source-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #324352;
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.source-vanity {
  border-color: #d4eadf;
  color: #0d6f4e;
  background: #effaf5;
}

.source-batch {
  border-color: #d7e5f8;
  color: #234f8c;
  background: #f3f8ff;
}

.source-mnemonic {
  border-color: #e0d4f0;
  color: #5b3a8c;
  background: #f6f0ff;
}

.source-imported {
  border-color: #f0e4d0;
  color: #8c6d2e;
  background: #fdf8ef;
}

.type-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  color: #5b3a8c;
  background: #f1ebfa;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.rule-summary {
  display: block;
  max-width: 220px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.row-action-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #324352;
  background: #fff;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.small-button:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.small-button.monitor-on {
  border-color: #b8dccc;
  color: var(--success);
  background: #effaf5;
}

.danger-small {
  border-color: #e3c7c7;
  color: var(--danger);
}

.fee-high {
  color: var(--danger);
}

.coin-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 2px;
  display: inline-block;
}

.coin-field,
.input-with-action {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.coin-field select,
.input-with-action input {
  flex: 1 1 auto;
  min-width: 0;
}

.coin-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.coin-pill .coin-icon {
  width: 22px;
  height: 22px;
  margin: 0;
}

.input-with-action .small-button {
  flex: 0 0 auto;
  height: 43px;
}

/* 按钮加载/禁用态，防止重复点击/重复广播 */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.is-loading {
  cursor: progress;
}

/* 地址簿备注可编辑输入框 */
.ab-label-input {
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.ab-label-input:focus {
  border-color: var(--strong-border);
  outline: none;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.table-footer {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.wallet-detail-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.chain-result {
  margin-top: 16px;
}

.batch-task-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.vanity-options {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  grid-column: 1 / span 3;
}

.task-panel {
  display: grid;
  gap: 12px;
}

.task-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.task-summary > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfdfe;
}

.task-summary span,
.progress-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef0;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 180ms ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.batch-task-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.estimate-panel {
  display: grid;
  gap: 10px;
}

.estimate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.estimate-item {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfdfe;
}

.estimate-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.estimate-item strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.batch-error {
  padding: 12px;
  border: 1px solid #e3c7c7;
  border-radius: 6px;
  color: var(--danger);
  background: #fff7f7;
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vanity-match-log {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.vanity-log-header {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.vanity-log-entry {
  padding: 6px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

.vanity-log-entry:last-child {
  border-bottom: none;
}

.vanity-log-index {
  color: var(--muted);
  margin-right: 8px;
  min-width: 28px;
  display: inline-block;
}

.vanity-log-address {
  word-break: break-all;
}

.estimate-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.warning-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.warning-list div {
  padding: 10px 12px;
  border: 1px solid #f0d7a5;
  border-radius: 6px;
  color: #7a5416;
  background: #fff9ec;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.broadcast-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.energy-warning {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(255, 170, 0, 0.12);
  border-left: 3px solid #ffaa00;
  color: #cc8800;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
}

.safety-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.broadcast-result {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.secret-card {
  display: grid;
  gap: 14px;
}

.secret-field {
  gap: 8px;
}

.secret-output {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--strong-border);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-all;
}

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

.empty-chain {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.info-cell {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfdfe;
}

.info-cell span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.info-cell strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.confirmation-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--strong-border);
  border-radius: 6px;
  background: #fbfdfe;
}

.confirmation-header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.confirmation-header span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.confirmation-text {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.raw-details {
  margin-top: 10px;
}

.raw-details summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 720;
}

.raw-details pre {
  max-height: 260px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0f1b24;
  color: #dce8ec;
  font-size: 12px;
  line-height: 1.45;
}

.security-panel {
  padding: 22px 22px 6px;
}

.security-panel ul {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.security-panel li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.security-panel strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.security-panel p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
}

.check::before {
  font-size: 14px;
  font-weight: 800;
}

.check.ok {
  background: var(--success);
}

.check.ok::before {
  color: #fff;
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.check.warn {
  border: 2px solid var(--warning);
}

.check.warn::before {
  color: var(--warning);
  content: "!";
}

.server-config-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
}

.config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.config-item:last-child {
  border-bottom: none;
}

.config-item label {
  color: var(--muted);
  font-weight: 500;
}

.config-item span {
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
  text-align: right;
  max-width: 60%;
}

.config-status-on {
  color: var(--success);
  font-weight: 600;
}

.config-status-off {
  color: var(--muted);
  font-weight: 600;
}

.config-toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.config-toggle-item strong {
  font-size: 14px;
}

.config-hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.btn {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-weight: 720;
}

.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-warn {
  border-color: var(--warning);
  background: var(--warning);
  color: #fff;
}

.btn-warn:hover {
  background: #c27412;
}

.btn-small {
  padding: 6px 14px;
  font-size: 13px;
  white-space: nowrap;
}

.btn-danger-active {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.btn-danger-active:hover {
  background: #a03636;
}

.config-confirm-form {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.config-confirm-form label {
  font-size: 13px;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}

.config-confirm-form input {
  width: 100%;
  margin-bottom: 8px;
}

.config-confirm-buttons {
  display: flex;
  gap: 8px;
}

.mode-switch {
  display: inline-flex;
  gap: 0;
  margin: 0 0 4px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.mode-option {
  display: flex;
  gap: 0;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  background: var(--surface-muted);
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

.mode-option:has(input:checked) {
  color: #fff;
  background: var(--primary);
}

.mode-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.mode-option + .mode-option {
  border-left: 1px solid var(--border);
}

.mode-description {
  margin: 4px 0 8px;
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 13px;
  line-height: 1.45;
}

.required-mark {
  color: var(--danger);
  font-weight: 700;
}

.mnemonic-options {
  display: grid;
  gap: 8px;
}

.mnemonic-backup-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 2px solid var(--warning);
  border-radius: 10px;
  background: #fffcf0;
}

.warning-box {
  padding: 10px 14px;
  border-radius: 6px;
  color: #7a5600;
  background: #fff3cd;
  font-size: 14px;
  font-weight: 600;
}

.mnemonic-display {
  width: 100%;
  min-height: 60px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 16px;
  line-height: 1.6;
  word-spacing: 6px;
  resize: none;
}

.import-grid {
  grid-template-columns: 1fr auto;
}

.import-mnemonic-label {
  grid-column: 1 / -1;
}

.import-mnemonic-label textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}

#loadTransactionsButton {
  margin-top: 14px;
}

.dir-in {
  color: var(--success);
  font-weight: 700;
}

.dir-out {
  color: var(--danger);
  font-weight: 700;
}

.tx-success {
  color: var(--success);
}

.tx-fail {
  color: var(--danger);
}

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

.tx-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  background: var(--surface);
}

.tx-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.tx-card-header .tx-time {
  color: #667;
  font-size: 12px;
}

.tx-card-header .tx-amount {
  font-weight: 700;
  font-size: 14px;
}

.tx-card-detail {
  font-size: 12px;
  color: #556;
  margin-bottom: 4px;
  line-height: 1.6;
  word-break: break-all;
}

.tx-card-detail a,
.tx-card-txid a {
  color: var(--primary-dark);
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tx-card-detail a:hover,
.tx-card-txid a:hover {
  text-decoration: underline;
}

.tx-card-txid {
  font-size: 11px;
  color: #778;
  word-break: break-all;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .menu-toggle {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 248px;
    height: 100vh;
    overflow-y: auto;
    flex-direction: column;
    gap: 20px;
    padding: 28px 18px;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    transition: left 0.22s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay.open {
    display: block;
  }

  .content {
    margin-left: 0;
    padding-top: 64px;
  }

  .nav-list {
    display: grid;
  }

  .local-note {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 64px 14px 30px;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    display: grid;
    min-width: 0;
  }

  h1 {
    font-size: 26px;
  }

  .status-strip,
  .form-grid,
  .generate-grid,
  .batch-grid,
  .vanity-grid,
  .vault-grid,
  .chain-grid,
  .transfer-grid,
  .transfer-pay-grid,
  .status-grid,
  .secret-grid,
  .import-grid,
  .broadcast-controls,
  .info-grid,
  .task-summary,
  .batch-task-grid {
    grid-template-columns: 1fr;
  }

  /* 详情卡片在移动端用两列，避免每条信息占满一整行、太长 */
  .info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .progress-meta {
    display: grid;
  }

  .vanity-options {
    grid-column: auto;
  }

  .confirmation-header {
    align-items: stretch;
    flex-direction: column;
  }

  .status-item + .status-item {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .brand span {
    display: none;
  }

  .panel-heading,
  .table-heading {
    display: grid;
  }

  .table-actions {
    justify-content: start;
  }
}

/* 多签权限 */
.perm-summary {
  margin-bottom: 12px;
}
.perm-summary p {
  margin: 4px 0;
}
.perm-block {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.perm-block h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--text);
}
.perm-block p {
  margin: 4px 0;
  font-size: 0.85rem;
}
.perm-keys-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 6px;
}
.perm-keys-table th,
.perm-keys-table td {
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
}
.perm-keys-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.78rem;
}
.perm-keys-table .mono {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.78rem;
  word-break: break-all;
}
.weight-bar {
  width: 100%;
  height: 8px;
  margin-top: 10px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.weight-bar-fill {
  height: 100%;
  background: var(--warning);
  border-radius: 4px;
  transition: width 0.25s ease;
}
.weight-bar-fill.reached {
  background: var(--success);
}
.sign-yes {
  color: var(--success);
  font-weight: 600;
  white-space: nowrap;
}
.sign-no {
  color: var(--muted);
  white-space: nowrap;
}
.multisig-tx-area {
  margin-bottom: 12px;
}
.multisig-tx-area textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8rem;
  resize: vertical;
  background: var(--surface);
  color: var(--text);
}
.multisig-tx-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.tx-link {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
  border-bottom: 1px dashed var(--primary);
}
.tx-link:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-dark);
}
.danger-note {
  color: var(--danger);
}
.perm-editor-toolbar {
  margin-top: 10px;
}
.perm-editor {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.perm-editor-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--surface);
}
.perm-active-block {
  margin-bottom: 10px;
}
.perm-editor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}
.perm-editor-head h4 {
  margin: 0;
  font-size: 14px;
  flex: 1 1 auto;
}
.perm-active-id {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}
.perm-name-label,
.perm-threshold-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.perm-name-label input,
.perm-threshold-label input {
  width: 110px;
}
.perm-threshold-label input {
  width: 70px;
}
.perm-members {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.perm-member-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.perm-member-address {
  flex: 1 1 auto;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8rem;
}
.perm-member-weight {
  width: 70px;
}
.perm-editor-actions {
  margin-top: 4px;
}
.auto-lock-select {
  width: auto;
  min-width: 120px;
  flex-shrink: 0;
}
