/* ============================================================
   Zap ⚡ Wallet — mobile-first dark theme
   Inspired by Wallet of Satoshi
   ============================================================ */

/* ── Design tokens ── */
:root {
  --bg:              #080a14;
  --surface:         #0f1320;
  --surface-alt:     #141926;
  --surface-raised:  #1a2035;
  --border:          #1e2a42;
  --border-light:    #263354;

  --primary:         #7c3aed;
  --primary-hover:   #6d32d4;
  --primary-muted:   rgba(124, 58, 237, 0.15);
  --primary-glow:    rgba(124, 58, 237, 0.3);

  --orange:          #f7931a;
  --orange-light:    #fbbf24;
  --orange-muted:    rgba(247, 147, 26, 0.15);

  --green:           #10b981;
  --green-muted:     rgba(16, 185, 129, 0.15);
  --red:             #ef4444;
  --red-muted:       rgba(239, 68, 68, 0.15);
  --yellow:          #f59e0b;

  --text:            #f1f5f9;
  --text-secondary:  #94a3b8;
  --text-muted:      #475569;

  --radius-sm:       8px;
  --radius-md:       14px;
  --radius-lg:       20px;
  --radius-xl:       28px;
  --radius-pill:     999px;

  --nav-height:      64px;
  --top-height:      56px;
  --page-pad:        16px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.5;
}

a { color: var(--primary-light, #a78bfa); text-decoration: none; }
a:hover { text-decoration: underline; }

button { cursor: pointer; font-family: inherit; }

input, textarea, button, select {
  font-family: inherit;
  font-size: 1rem;
}

ul { list-style: none; }

img { display: block; max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── App shell ── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

#app.has-nav {
  padding-top: var(--top-height);
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
}

/* ── Top bar ── */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--top-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-pad);
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.top-bar-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-bar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.top-bar-logout:hover {
  background: var(--surface-2, #1e293b);
  color: var(--text);
}

/* Zap [bolt] Wallet */
.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: inherit;
}
.brand-wordmark__bolt {
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
  color: var(--orange);
}
.auth-wordmark .brand-wordmark {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.auth-wordmark .brand-wordmark__bolt {
  width: 0.88em;
  height: 0.88em;
}

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(8, 10, 20, 0.95);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--nav-height);
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
  font-size: 0.65rem;
  font-weight: 500;
}

.nav-item svg {
  width: 22px; height: 22px;
  flex-shrink: 0;
}

.nav-item.active,
.nav-item:hover { color: var(--primary); }

/* ── Flash messages ── */
.flash-stack {
  position: fixed;
  top: calc(var(--top-height) + 8px);
  left: var(--page-pad);
  right: var(--page-pad);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideDown 0.2s ease;
  backdrop-filter: blur(12px);
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.flash-success { background: var(--green-muted);  border: 1px solid rgba(16,185,129,0.4); color: #6ee7b7; }
.flash-error   { background: var(--red-muted);    border: 1px solid rgba(239,68,68,0.4);  color: #fca5a5; }
.flash-info    { background: var(--primary-muted); border: 1px solid var(--primary-glow);  color: #c4b5fd; }
.flash-warning { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.4); color: #fcd34d; }

.flash-close {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  font-size: 0.8rem;
  padding: 0 4px;
  flex-shrink: 0;
}
.flash-close:hover { opacity: 1; }

/* ── Main content ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--page-pad);
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

/* ── Balance card ── */
.balance-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #1c1447 0%, #2d1b69 45%, #1a0e46 100%);
  border-radius: var(--radius-xl);
  padding: 28px 24px 26px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.2), 0 0 0 1px rgba(255,255,255,0.03);
}

.balance-card-inner { position: relative; z-index: 2; }

.balance-deco-1,
.balance-deco-2 {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

.balance-deco-1 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(139,92,246,0.25) 0%, transparent 70%);
  top: -80px; right: -60px;
}

.balance-deco-2 {
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(247,147,26,0.1) 0%, transparent 70%);
  bottom: -40px; left: 20px;
}

.balance-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(196, 181, 253, 0.7);
  margin-bottom: 10px;
}

.balance-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.balance-sats {
  font-size: 2.75rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1;
  letter-spacing: -1px;
}

.balance-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 0.02em;
}

.balance-btc {
  font-size: 0.8rem;
  color: rgba(196, 181, 253, 0.6);
  font-variant-numeric: tabular-nums;
}

/* ── Action row (Send / Receive) ── */
.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
  -webkit-user-select: none;
  user-select: none;
}

.action-btn:hover { background: var(--surface-alt); text-decoration: none; }
.action-btn:active { transform: scale(0.97); }

.action-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.action-icon svg { width: 22px; height: 22px; }

.action-icon-send    { background: var(--primary-muted); color: var(--primary); }
.action-icon-receive { background: var(--green-muted);   color: var(--green); }

/* ── Section cards ── */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.section-card.no-padding { padding: 0; overflow: hidden; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.section-header .section-label { margin-bottom: 0; }

.section-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
}

/* ── Lightning address chip ── */
.address-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

.address-chip:hover { background: var(--surface-raised); border-color: var(--primary); }
.address-chip-lg    { font-size: 0.95rem; padding: 14px 18px; }
.address-chip-static { cursor: default; }
.address-chip-static:hover { background: var(--surface-alt); border-color: var(--border-light); }

.chip-bolt { width: 16px; height: 16px; color: var(--orange); flex-shrink: 0; }
.chip-copy { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; margin-left: auto; }

.address-chip span { overflow: hidden; text-overflow: ellipsis; }

/* ── Transaction list ── */
.tx-list { display: flex; flex-direction: column; }

.tx-item {
  border-bottom: 1px solid var(--border);
  padding: 0;
  transition: background 0.1s;
}

.tx-item:last-child { border-bottom: none; }

.tx-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}

.tx-item-link:hover { background: var(--surface-alt); }
.tx-item-link:active { background: var(--surface-raised); }
.tx-list .tx-item:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.tx-list .tx-item:last-child  { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.section-card .tx-list .tx-item:first-child { border-radius: 0; }

.tx-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tx-icon svg { width: 18px; height: 18px; }

.tx-receive .tx-icon { background: var(--green-muted);  color: var(--green); }
.tx-send    .tx-icon { background: var(--orange-muted); color: var(--orange); }

.tx-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tx-desc {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tx-amount,
.tx-amount-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.tx-amt-in  { font-size: 0.9rem; font-weight: 700; color: var(--green); }
.tx-amt-out { font-size: 0.9rem; font-weight: 700; color: var(--text);  }

.tx-unit { font-size: 0.7rem; font-weight: 500; color: var(--text-muted); }

.tx-fee { font-size: 0.7rem; color: var(--text-muted); }

.tx-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tx-badge-pending { background: rgba(245,158,11,0.15); color: var(--yellow); }
.tx-badge-expired { background: var(--red-muted);      color: var(--red);    }
.tx-badge-failed  { background: var(--red-muted);      color: var(--red);    }
.tx-badge-complete { background: rgba(34,197,94,0.15); color: var(--green); }

/* ── Transaction detail ── */
.page-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 4px;
}

.page-header-row .page-title { margin: 0; }

.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: -8px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  flex-shrink: 0;
}

.back-link:hover { color: var(--text); background: var(--surface-alt); }

.tx-detail-hero {
  text-align: center;
  padding: 22px 18px 20px;
  margin-bottom: 14px;
}

.tx-detail-hero .tx-icon {
  margin: 0 auto 12px;
}

.tx-detail-kind {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.tx-detail-primary {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
  line-height: 1.15;
}

.tx-detail-primary .tx-unit {
  font-size: 1rem;
  font-weight: 600;
  vertical-align: middle;
}

.tx-detail-subtle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 8px 0 0;
}

.tx-detail-fee-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.tx-detail-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 12px 0 4px;
}

.tx-detail-label:first-child { margin-top: 0; }

.tx-detail-value {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0;
}

.tx-detail-value.strong { font-weight: 700; }

.tx-detail-card { margin-bottom: 14px; }

.tx-detail-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.tx-detail-dl dt {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 12px;
}

.tx-detail-dl dt:first-child { margin-top: 0; }

.tx-detail-dl dd {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--text);
}

.tx-detail-mono {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  word-break: break-all;
  color: var(--text-secondary);
  margin: 0 0 10px;
}

.tx-detail-break { margin-top: 4px; }

.tx-detail-pre {
  margin: 0 0 10px;
  padding: 12px;
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: 0.65rem;
  line-height: 1.4;
  word-break: break-all;
  white-space: pre-wrap;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  max-height: 180px;
  overflow-y: auto;
}

.tx-detail-copy { margin-top: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; pointer-events: none; }

.btn-full  { width: 100%; }
.btn-sm    { padding: 9px 16px; font-size: 0.825rem; }

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
}
.btn-primary:hover { background: linear-gradient(135deg, #6d32d4 0%, #5b21b6 100%); }

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239,68,68,0.3);
}
.btn-danger:hover { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }

.btn-ghost {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--surface-raised); color: var(--text); }

/* ── Forms ── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 12px 14px;
  width: 100%;
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

.invoice-textarea {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.85rem;
  word-break: break-all;
  resize: none;
  line-height: 1.5;
}

.input-addon-wrap {
  position: relative;
}

.input-addon {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
}

.input-addon-wrap input { padding-right: 90px; }

.input-sats-wrap {
  position: relative;
}

.input-unit {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--orange);
  pointer-events: none;
}

.input-sats-wrap input { padding-right: 52px; }

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.field-row {
  margin-bottom: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ── Auth pages ── */
.landing-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 6px 0 24px;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
}

.landing-brand:hover {
  text-decoration: none;
}


.landing-login-btn {
  min-width: 92px;
}

.landing-hero {
  background: linear-gradient(140deg, #161f3e 0%, #1a2551 45%, #101834 100%);
  border: 1px solid #22325f;
  border-radius: var(--radius-xl);
  padding: 28px 20px;
}

.landing-kicker {
  font-size: 0.78rem;
  color: #b9cdfa;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.landing-hero h1 {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.7px;
  margin-bottom: 10px;
}

.landing-subtext {
  color: #b6c2df;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-section h2 {
  font-size: 1.2rem;
  letter-spacing: -0.3px;
}

.landing-section > p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.landing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.landing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.landing-card h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.landing-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.landing-faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.landing-faq-item h3 {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.landing-faq-item p {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  padding: 40px var(--page-pad) 32px;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

h1.auth-wordmark {
  display: flex;
  justify-content: center;
  margin: 0 0 10px;
  font: inherit;
}

.auth-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  width: 100%;
}

.auth-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-sub {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.auth-card h2 + form,
.auth-card h2 ~ .auth-sub + form { margin-top: 20px; }
.auth-card form { margin-top: 20px; }

.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 18px;
}

/* ── Page headers ── */
.page-header {
  padding: 6px 0 4px;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ── Receive page ── */
.qr-wrap {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.qr-img {
  width: 220px; height: 220px;
  border-radius: var(--radius-md);
  border: 3px solid var(--border-light);
}

.invoice-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange);
  text-align: center;
  margin-top: 6px;
}
.invoice-amount .unit { font-size: 1rem; font-weight: 600; color: var(--text-secondary); }

.invoice-string-wrap {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.invoice-string {
  display: block;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
  word-break: break-all;
  line-height: 1.5;
}

.hint-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── Send / Confirm card ── */
.confirm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  text-align: center;
}

.confirm-icon {
  width: 56px; height: 56px;
  background: var(--primary-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--primary);
}
.confirm-icon svg { width: 24px; height: 24px; }

.confirm-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.confirm-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.confirm-sats {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}

.confirm-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--orange);
}

.confirm-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.confirm-amountless {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.balance-hint {
  text-align: center;
  font-size: 0.825rem;
  color: var(--text-muted);
  padding: 4px 0 8px;
}

.balance-hint strong { color: var(--text-secondary); }

/* ── Filter tabs ── */
.filter-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
}

.filter-tab {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-radius: var(--radius-pill);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.filter-tab:hover { color: var(--text); text-decoration: none; }
.filter-tab.active {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ── Empty state ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px; height: 48px;
  opacity: 0.4;
}

.empty-state p { font-size: 0.9rem; }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 4px;
}

.page-indicator {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* ── Utility ── */
.mt-sm  { margin-top: 10px; }
.mb-sm  { margin-bottom: 10px; }
.text-center { text-align: center; }

/* ── Scroll smoothing ── */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ── Notch / safe-area adjustments ── */
@supports (padding: max(0px)) {
  .top-bar  { padding-left: max(var(--page-pad), env(safe-area-inset-left)); }
  .bottom-nav { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .main-content { padding-left: max(var(--page-pad), env(safe-area-inset-left)); }
}

/* ── Desktop fallback (wider screens) ── */
@media (min-width: 520px) {
  .main-content {
    padding-top: 20px;
    padding-bottom: 24px;
  }

  .balance-sats { font-size: 3rem; }

  #app.has-nav {
    padding-top: var(--top-height);
  }
}

/* ── Settings page ── */
.settings-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.settings-info-row:last-child { border-bottom: none; }

.settings-info-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.settings-info-value {
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
  word-break: break-all;
  text-align: right;
}
