/* ============================================================
   Bitcoin Wallet — Clean Dark Theme
   ============================================================ */

:root {
  --bg-primary: #0f1117;
  --bg-secondary: #161822;
  --bg-tertiary: #1c1f2e;
  --bg-hover: #252838;
  --bg-active: #2a2d3f;
  --border: #2a2d3f;
  --border-light: #363a50;

  --text-primary: #e4e6f0;
  --text-secondary: #8b8fa3;
  --text-tertiary: #5c6078;

  --accent: #f7931a;
  --accent-hover: #ffb04a;
  --accent-dim: rgba(247, 147, 26, 0.12);

  --green: #30d158;
  --green-dim: rgba(48, 209, 88, 0.12);
  --red: #ff453a;
  --red-dim: rgba(255, 69, 58, 0.12);
  --blue: #0a84ff;
  --blue-dim: rgba(10, 132, 255, 0.12);
  --yellow: #ffd60a;
  --yellow-dim: rgba(255, 214, 10, 0.12);

  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --sidebar-width: 260px;
  --header-height: 72px;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ---- Layout ---- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #000;
}

.sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-logo-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.sidebar-section {
  padding: 16px 12px;
}

.sidebar-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: 0 8px;
  margin-bottom: 8px;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 500;
}

.sidebar-nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-nav-badge {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.sidebar-wallets {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 16px 12px;
}

.sidebar-wallet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-wallet-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-wallet-item.active {
  background: var(--bg-active);
  color: var(--text-primary);
}

.sidebar-wallet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.sidebar-wallet-dot.locked {
  background: var(--yellow);
}

.sidebar-wallet-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-wallet-fp {
  margin-left: auto;
  font-size: 10px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text-tertiary);
}

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Balance Header ---- */
.balance-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-height);
}

.balance-group {
  flex: 1;
}

.balance-btc {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.balance-btc-value {
  color: var(--text-primary);
}

.balance-btc-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.balance-fiat {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.balance-fiat-rate {
  color: var(--text-tertiary);
  font-size: 12px;
}

.balance-actions {
  display: flex;
  gap: 8px;
}

.balance-actions .btn {
  padding: 8px 20px;
  font-size: 14px;
}

.header-spacer {
  flex: 1;
}

.header-refresh {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
}

.header-refresh:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.header-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.header-refresh.spinning {
  animation: spin 1s linear infinite;
}

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

/* ---- Tab Content ---- */
.tab-content {
  padding: 24px 28px;
  flex: 1;
}

.section {
  margin-bottom: 28px;
}

.section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

/* ---- Stat Cards ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.stat-value.mono {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 18px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ---- Tables ---- */
.wallet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.wallet-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.wallet-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.wallet-table tr:last-child td {
  border-bottom: none;
}

.wallet-table tbody tr {
  transition: background 0.1s;
}

.wallet-table tbody tr:hover {
  background: var(--bg-hover);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

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

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

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

.btn-danger:hover:not(:disabled) {
  background: #ff6961;
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
}

.btn-icon:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

/* ---- Inputs ---- */
.input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
}

.input:focus {
  border-color: var(--accent);
}

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

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-suffix {
  position: relative;
}

.input-suffix .input {
  padding-right: 60px;
}

.input-suffix-text {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-tertiary);
  pointer-events: none;
}

/* ---- Typography helpers ---- */
.mono {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-tertiary {
  color: var(--text-tertiary);
}

.text-accent {
  color: var(--accent);
}

.text-green {
  color: var(--green);
}

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

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-green {
  background: var(--green-dim);
  color: var(--green);
}

.badge-yellow {
  background: var(--yellow-dim);
  color: var(--yellow);
}

.badge-red {
  background: var(--red-dim);
  color: var(--red);
}

.badge-blue {
  background: var(--blue-dim);
  color: var(--blue);
}

.badge-accent {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.empty-state-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ---- Error / Alert ---- */
.error-box {
  background: var(--red-dim);
  border: 1px solid rgba(255, 69, 58, 0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--red);
  margin-bottom: 16px;
}

.warn-box {
  background: var(--yellow-dim);
  border: 1px solid rgba(255, 214, 10, 0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--yellow);
  margin-bottom: 16px;
}

.success-box {
  background: var(--green-dim);
  border: 1px solid rgba(48, 209, 88, 0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--green);
  margin-bottom: 16px;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ---- QR Code ---- */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
}

.qr-canvas-wrapper {
  background: #fff;
  padding: 16px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-address {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
  text-align: center;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s;
}

.qr-address:hover {
  border-color: var(--border-light);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-primary);
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.2s ease-out;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ---- Password modal ---- */
.password-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.password-modal-body .input {
  text-align: center;
  font-size: 16px;
  letter-spacing: 0.1em;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* ---- Wallet Creation page ---- */
.wallet-creation-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-primary);
}

.wallet-creation-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 100%;
  max-width: 560px;
}

.wallet-creation-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.wallet-creation-card .subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ---- Seed display ---- */
.seed-display {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
  color: var(--accent);
  word-spacing: 8px;
  margin-bottom: 16px;
  user-select: all;
}

/* ---- Send form ---- */
.send-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.send-summary {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.send-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.send-summary-row .label {
  color: var(--text-secondary);
}

.send-summary-row .value {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
}

.fee-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-primary);
  outline: none;
  margin: 8px 0;
}

.fee-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-secondary);
}

/* ---- PSBT display ---- */
.psbt-display {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  word-break: break-all;
  color: var(--text-secondary);
  max-height: 120px;
  overflow-y: auto;
  user-select: all;
  cursor: pointer;
  margin-bottom: 12px;
}

/* ---- Info rows ---- */
.info-grid {
  display: grid;
  gap: 1px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 14px;
}

.info-label {
  color: var(--text-secondary);
}

/* ---- UTXO tree ---- */
.utxo-node {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.utxo-node-spent {
  opacity: 0.5;
}

.utxo-node-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.utxo-node-spent-by {
  font-size: 12px;
  color: var(--text-tertiary);
}

.utxo-node-label {
  font-size: 12px;
}

/* ---- Multisig specific ---- */
.multisig-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px;
  max-width: 640px;
  margin: 0 auto;
}

.participant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.participant-row .input {
  flex: 1;
}

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

.participant-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  font-size: 14px;
}

.participant-summary {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.multisig-quorum {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.balance-display {
  text-align: center;
  padding: 20px;
  margin: 16px 0;
}

.balance-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

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

.meta-label {
  color: var(--text-secondary);
  font-size: 13px;
}

.addr-copy {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sig-progress {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sig-progress-bar {
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
}

.sig-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.psbt-output {
  margin: 16px 0;
}

.psbt-hex {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  word-break: break-all;
  color: var(--text-secondary);
  max-height: 100px;
  overflow-y: auto;
  cursor: pointer;
  user-select: all;
}

.psbt-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

/* ---- Send result states ---- */
.send-done,
.send-error {
  text-align: center;
  padding: 24px;
}

.success-icon {
  font-size: 48px;
  color: var(--green);
  margin-bottom: 12px;
}

.error-icon {
  font-size: 48px;
  color: var(--red);
  margin-bottom: 12px;
}

.tx-status {
  margin: 16px 0;
}

.status-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.status-label {
  color: var(--text-secondary);
}

/* ---- Send preview ---- */
.send-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.preview-row .label {
  color: var(--text-secondary);
}

/* ---- Confirmations ---- */
.confirmations {
  font-weight: 600;
  color: var(--yellow);
}

.confirmations.confirmed {
  color: var(--green);
}

/* ---- Copy feedback ---- */
.copy-feedback {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
}

/* ---- Creation view nested ---- */
.creation-view {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
}

.creation-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.creation-header h4 {
  font-size: 15px;
  font-weight: 600;
}

.creation-back {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.creation-back:hover {
  color: var(--accent-hover);
}

/* ---- Label editing ---- */
.label-tag {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  transition: background 0.15s;
}

.label-tag:hover {
  background: var(--bg-hover);
}

.label-edit {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  width: 120px;
  outline: none;
}

/* ---- Network info ---- */
.network-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }

  .balance-header {
    padding: 12px 16px;
  }

  .tab-content {
    padding: 16px;
  }

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