/* ═══════════════════════════════════════════════════════════════════════════
   WCAHT Wallet Extension – Popup Styles
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg:          #f8f9fb;
  --bg-card:     #ffffff;
  --bg-input:    #f3f4f6;
  --border:      #e5e7eb;
  --text:        #111827;
  --text-muted:  #6b7280;
  --accent:      #6366f1;
  --accent-dim:  #6366f122;
  --accent-blue: #3b82f6;
  --red:         #ef4444;
  --red-dim:     #ef444422;
  --yellow:      #f59e0b;
  --green:       #10b981;
  --radius:      10px;
  --radius-sm:   6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  width: 380px;
  min-height: 540px;
  max-height: 600px;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  transition: width 0.2s ease;
  padding-bottom: 28px;
}

/* ── Screens ─────────────────────────────────────────────────────────────── */
.screen { padding: 16px; }

/* ── Lock Screen ─────────────────────────────────────────────────────────── */
.ls-screen {
  padding: 0;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  background: #f8f9fb;
}

.ls-hero {
  text-align: center;
  padding: 40px 24px 24px;
  background: #ffffff;
  border-bottom: 1px solid #eaecf0;
}
.ls-logo {
  width: 72px; height: 72px; border-radius: 18px;
  background: #ffffff;
  color: #111827; font-size: 30px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}
.ls-logo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}
.ls-video-logo {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 24px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}
.ls-hero-video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.ls-video-fallback {
  position: absolute;
  inset: 18px;
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  object-fit: contain;
}
.ls-title {
  font-size: 18px; font-weight: 700; color: #111827; margin-bottom: 4px;
}
.ls-subtitle {
  color: #6b7280; font-size: 13px;
}

.ls-form {
  flex: 1;
  background: #ffffff;
  padding: 20px 20px 24px;
}

/* Mode toggle tabs */
.ls-mode-tabs {
  display: flex; gap: 0; margin-bottom: 18px;
  background: #f3f4f6; border-radius: 10px; padding: 3px;
}
.ls-mode-tab {
  flex: 1; padding: 8px 0; border: none; background: transparent;
  font-size: 13px; font-weight: 600; color: #6b7280;
  border-radius: 8px; cursor: pointer; transition: all 0.15s;
}
.ls-mode-tab.active {
  background: #ffffff; color: #111827;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

.ls-input {
  display: block; width: 100%;
  background: #f3f4f6;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px; color: #111827;
  outline: none;
  margin-bottom: 12px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.ls-input:focus { border-color: #6366f1; }
.ls-input::placeholder { color: #9ca3af; }

.ls-unlock-btn {
  display: block; width: 100%;
  background: #6366f1;
  color: #fff;
  font-size: 14px; font-weight: 700;
  border: none; border-radius: 10px;
  padding: 13px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 10px;
}
.ls-unlock-btn:hover { background: #4f46e5; }

.ls-forgot-btn {
  display: block; width: 100%;
  background: none; border: none; cursor: pointer;
  color: #9ca3af; font-size: 12px;
  text-decoration: underline; text-underline-offset: 2px;
  transition: color 0.15s;
}
.ls-forgot-btn:hover { color: #6366f1; }

/* PIN pad */
.pin-dots {
  display: flex; gap: 12px; justify-content: center;
  margin: 4px 0 12px;
}
.pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #d1d5db; background: transparent;
  transition: background 0.1s, border-color 0.1s;
}
.pin-dot.filled {
  background: #6366f1; border-color: #6366f1;
}
.pin-pad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 8px;
}
.pin-key {
  padding: 14px 0; border: 1.5px solid #e5e7eb;
  border-radius: 10px; background: #f9fafb;
  font-size: 18px; font-weight: 600; color: #111827;
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
  text-align: center;
}
.pin-key:hover { background: #f0f0ff; border-color: #c7d2fe; }
.pin-key:active { background: #e0e7ff; }
.pin-clear { font-size: 16px; color: #6b7280; }
.pin-ok {
  background: #6366f1; border-color: #6366f1;
  color: #fff; font-size: 14px;
}
.pin-ok:hover { background: #4f46e5; border-color: #4f46e5; }

/* ── Forgot Password Modal ───────────────────────────────────────────────── */
.fp-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.fp-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  width: 100%; max-width: 340px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.fp-icon { text-align: center; font-size: 32px; margin-bottom: 10px; }
.fp-title {
  text-align: center; font-size: 16px; font-weight: 700;
  color: var(--text); margin-bottom: 10px;
}
.fp-body {
  font-size: 12px; color: var(--text-muted); line-height: 1.65;
  margin-bottom: 16px; text-align: center;
}
.fp-body strong { color: var(--red); }
.fp-phrase-wrap { margin-bottom: 16px; }
.fp-label {
  display: block; font-size: 11px; color: var(--text-muted);
  margin-bottom: 6px; font-weight: 600;
}
.fp-seed-input {
  width: 100%; padding: 9px 11px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 13px;
  font-family: inherit; outline: none;
  transition: border-color 0.2s;
  display: block;
}
.fp-seed-input:focus { border-color: var(--red); }
.fp-seed-error {
  font-size: 11px; color: var(--red); margin-top: 5px; min-height: 16px;
}
.fp-actions { display: flex; gap: 8px; }
.fp-btn-cancel {
  flex: 1; padding: 9px 0; border-radius: 8px;
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.fp-btn-cancel:hover { background: var(--border); }
.fp-btn-reset {
  flex: 1; padding: 9px 0; border-radius: 8px;
  background: var(--red); border: none;
  color: #fff; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: filter 0.15s;
}
.fp-btn-reset:hover { filter: brightness(1.1); }

/* ── Mandatory new-wallet backup ────────────────────────────────────────── */
.backup-modal { max-width: 360px; }
.backup-shield {
  width: fit-content; margin: 0 auto 10px; padding: 5px 10px;
  border-radius: 999px; background: #fff4d6; color: #8a5a00;
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
}
.backup-addresses { display: grid; gap: 6px; margin-bottom: 12px; }
.backup-addresses div { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: center; }
.backup-addresses span { color: var(--text-muted); font-size: 10px; font-weight: 700; }
.backup-addresses code { overflow: hidden; text-overflow: ellipsis; color: var(--text); font-size: 9px; }
.backup-secret-wrap { margin-bottom: 10px; }
.backup-secret {
  min-height: 54px; padding: 9px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-input); color: var(--text-muted); font: 10px/1.45 monospace;
  overflow-wrap: anywhere; white-space: pre-wrap; user-select: text;
}
.backup-actions-row { display: grid; grid-template-columns: 0.7fr 1fr 1.35fr; gap: 6px; margin-bottom: 12px; }
.backup-actions-row .btn { padding: 8px 5px; font-size: 10px; }
.backup-confirm { display: flex; gap: 8px; align-items: flex-start; color: var(--text-muted); font-size: 11px; line-height: 1.4; cursor: pointer; }
.backup-confirm input { margin-top: 2px; accent-color: var(--primary); }
.fp-btn-reset:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.input {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; outline: none;
  transition: border-color 0.2s;
  margin-bottom: 10px;
}
.input:focus { border-color: var(--accent); }
.input-sm { padding: 6px 8px; font-size: 12px; margin-bottom: 0; flex: 1; }
.textarea { resize: vertical; font-family: monospace; }

.input-hint {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--text-muted); margin-top: -6px; margin-bottom: 8px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: none; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 10px; font-size: 11px; }
.link-btn {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font-size: 11px; font-weight: 600;
}
.icon-btn {
  background: none; border: none; cursor: pointer;
  font-size: 16px; padding: 4px; filter: grayscale(0.5);
}
.icon-btn:hover { filter: grayscale(0); }
.back-btn {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  width: 32px; height: 32px; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.copy-btn {
  background: none; border: none; cursor: pointer;
  font-size: 14px; padding: 2px 4px;
}

/* ══════════════════════════════════════════════════════════════════════════
   MAIN SCREEN – Animated Hero Theme (ms-* classes)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Main Screen ─────────────────────────────────────────────────────────── */
.ms-screen {
  padding: 0;
  background: #f8f9fb;
  min-height: 540px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.ms-hero {
  position: sticky; top: 0; z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid #eaecf0;
}
.ms-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; height: 52px;
  background: transparent;
}
.ms-header-left { display: flex; align-items: center; gap: 9px; }
.ms-logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #111827; font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ms-logo img {
  width: 24px !important;
  height: 24px !important;
  object-fit: contain;
}
.ms-brand {
  font-weight: 700; font-size: 14px; color: #111827;
  letter-spacing: 0.3px;
}
.ms-header-right { display: flex; align-items: center; gap: 4px; }

.ms-net-pill {
  display: flex; align-items: center; gap: 5px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 20px; padding: 4px 10px 4px 7px;
  cursor: default;
}
.ms-net-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e; flex-shrink: 0;
}
.ms-net-dot.offline { background: #f87171; }
.ms-net-select {
  background: transparent; border: none; outline: none;
  color: #374151; font-size: 11px; font-weight: 600;
  cursor: pointer; padding: 0; max-width: 60px;
}
.ms-net-select option { background: #fff; color: #111827; }

.ms-icon-btn {
  background: #f3f4f6; border: 1px solid #e5e7eb;
  border-radius: 8px; width: 32px; height: 32px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #374151; transition: background 0.15s;
}
.ms-icon-btn:hover { background: #e5e7eb; }
.ms-icon-btn.lock:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }

/* ── Wallet Selector Bar ─────────────────────────────────────────────────── */
.ms-wallet-selector {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: #ffffff;
  border-bottom: 1px solid #eaecf0;
}
.ms-wallet-sel {
  flex: 1;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 9px; color: #111827; font-size: 13px; font-weight: 500;
  padding: 7px 10px; outline: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.ms-wallet-sel option { background: #fff; color: #111827; }

.ms-sel-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px; width: 34px; height: 34px;
  cursor: pointer; color: #374151;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; flex-shrink: 0;
}
.ms-sel-btn:hover { background: #e5e7eb; }

/* ── Balance Card ────────────────────────────────────────────────────────── */
.ms-balance-card {
  margin: 0;
  padding: 28px 20px 24px;
  background: #ffffff;
  border-radius: 0;
  text-align: center;
  color: #111827;
  border-bottom: 1px solid #eaecf0;
}
.ms-bal-label {
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
  color: #9ca3af; text-transform: uppercase;
  margin-bottom: 10px;
}
.ms-bal-main {
  font-size: 30px; font-weight: 800; margin: 0 0 5px;
  color: #111827; line-height: 1.15; letter-spacing: 0;
}
.ms-bal-sub {
  font-size: 13px; color: #6b7280;
  margin-bottom: 18px; font-weight: 500;
}
.ms-addr-row {
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ms-evm-row { margin-top: 7px; }
.ms-addr-text {
  font-family: 'SF Mono', 'Courier New', monospace; font-size: 11px;
  color: #6b7280;
  max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: #f3f4f6;
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid #e5e7eb;
}
.ms-copy-btn {
  background: #f3f4f6; border: 1px solid #e5e7eb;
  cursor: pointer; font-size: 12px; padding: 4px 8px;
  border-radius: 8px; transition: background 0.15s; color: #374151;
}
.ms-copy-btn:hover { background: #e5e7eb; }
.ms-wallet-note {
  margin-top: 10px;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.4;
}

/* ── Action Row ──────────────────────────────────────────────────────────── */
.ms-action-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; padding: 0;
  background: #ffffff;
  border-bottom: 1px solid #eaecf0;
  margin-top: 0;
}
.ms-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: transparent; border: none;
  border-right: 1px solid #f0f0f0;
  padding: 14px 6px 12px; cursor: pointer;
  color: #374151; font-size: 11px; font-weight: 600;
  transition: background 0.14s;
}
.ms-action-btn:last-child { border-right: none; }
.ms-action-btn:hover { background: #f8f9fb; }
.ms-action-btn:active { background: #f3f4f6; }

.ms-action-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.ms-action-icon.send    { background: #fef2f2; color: #ef4444; }
.ms-action-icon.recv    { background: #f0fdf4; color: #16a34a; }
.ms-action-icon.refresh { background: #eff6ff; color: #3b82f6; }
.ms-action-icon.acct    { background: #f5f3ff; color: #7c3aed; }

/* ── Status Bar ──────────────────────────────────────────────────────────── */
.ms-status-bar {
  margin: 12px 14px 6px;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 10px;
  font-size: 11px; font-weight: 500;
  color: #9ca3af; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* ── Section ─────────────────────────────────────────────────────────────── */
.ms-section { padding: 4px 14px 16px; }
.ms-section-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; color: #9ca3af;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 10px; padding-top: 6px;
}
.ms-section-header::after {
  content: ''; flex: 1; height: 1px; background: #eaecf2;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.logo-sm {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #fff; font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.brand { font-weight: 700; font-size: 15px; }
.net-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
}
.net-dot.offline { background: var(--red); }
.net-select {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 11px; padding: 4px 6px;
}

/* ── Wallet Selector ─────────────────────────────────────────────────────── */
.wallet-selector {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
}
.wallet-sel {
  flex: 1; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 13px; padding: 8px 10px;
}

/* ── Balance Card ────────────────────────────────────────────────────────── */
.balance-card {
  margin: 0 16px; padding: 20px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border: 1px solid #c7d2fe; border-radius: var(--radius);
  text-align: center;
}
.bal-label { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.bal-main { font-size: 28px; font-weight: 700; margin: 4px 0; color: var(--accent); }
.bal-sub { color: var(--text-muted); font-size: 12px; margin-bottom: 12px; }
.addr-row { display: flex; align-items: center; justify-content: center; gap: 4px; }
.addr-text {
  font-family: monospace; font-size: 11px; color: var(--text-muted);
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Action Row ──────────────────────────────────────────────────────────── */
.action-row {
  display: flex; justify-content: center; gap: 12px;
  padding: 16px;
}
.action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; cursor: pointer;
  color: var(--text); font-size: 11px; min-width: 68px;
  transition: all 0.2s;
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-icon { font-size: 20px; }

/* ── Status Bar ──────────────────────────────────────────────────────────── */
.status-bar {
  margin: 0 16px; padding: 6px 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 11px;
  color: var(--text-muted); text-align: center;
}

/* ── Section ─────────────────────────────────────────────────────────────── */
.section { padding: 12px 16px; }
.section-header {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* ── TX List ─────────────────────────────────────────────────────────────── */
.tx-list { display: flex; flex-direction: column; gap: 6px; }
.tx-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.tx-left { display: flex; align-items: center; gap: 8px; }
.tx-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.tx-icon.send { background: var(--red-dim); }
.tx-icon.recv { background: var(--accent-dim); }
.tx-type { font-weight: 600; font-size: 12px; }
.tx-addr { font-family: monospace; font-size: 10px; color: var(--text-muted); }
.tx-amount { font-weight: 600; font-size: 13px; text-align: right; }
.tx-amount.neg { color: var(--red); }
.tx-amount.pos { color: var(--green); }
.tx-time { font-size: 10px; color: var(--text-muted); text-align: right; }
.empty-tx { text-align: center; padding: 24px; color: var(--text-muted); font-size: 12px; }

/* ── Sub Views ───────────────────────────────────────────────────────────── */
.sub-view {
  padding: 16px;
  background: #ffffff;
  min-height: 540px;
  color: #111827;
}
.sub-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f0f0;
}
.sub-header h3 { font-size: 16px; font-weight: 700; color: #111827; }

.sub-view .back-btn {
  background: #f3f4f8; border: 1.5px solid #e5e7eb;
  border-radius: 8px; color: #374151;
  width: 32px; height: 32px; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.sub-view .back-btn:hover { background: #e5e7eb; }

.sub-view .input {
  background: #f9fafb; border: 1.5px solid #e5e7eb;
  color: #111827; border-radius: 10px;
}
.sub-view .input::placeholder { color: #9ca3af; }
.sub-view .input:focus { border-color: #a5b4fc; background: #fff; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  color: #374151; margin-bottom: 6px;
}

.input-hint {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: #6b7280; margin-top: -4px; margin-bottom: 8px;
}
.sub-view .link-btn { color: #6366f1; font-weight: 700; }

.fee-row {
  display: flex; justify-content: space-between; font-size: 12px;
  color: #6b7280; padding: 10px 0; border-top: 1px solid #f0f0f0;
}
#sendFundingSource { display: block; line-height: 1.4; }
#sendFee { max-width: 235px; text-align: right; line-height: 1.4; }

.sub-view .btn-primary {
  background: #6366f1; color: #fff;
  border-radius: 10px; font-size: 14px; padding: 13px;
}
.sub-view .btn-primary:hover { background: #4f46e5; }

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 16px; }
.empty-state h3 { margin-bottom: 8px; font-size: 18px; }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; font-size: 13px; }

/* ── Receive ─────────────────────────────────────────────────────────────── */
.receive-card { text-align: center; padding: 20px; }
.qr-canvas-wrap {
  width: 180px; height: 180px; margin: 0 auto 16px;
  background: #fff; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #e5e7eb;
  padding: 8px; box-sizing: border-box;
}
.qr-canvas-wrap canvas { width: 100% !important; height: 100% !important; }
.recv-addr {
  font-family: monospace; font-size: 11px; color: #374151;
  word-break: break-all; margin-bottom: 12px; padding: 8px 10px;
  background: #f3f4f8; border: 1.5px solid #e5e7eb;
  border-radius: 10px;
}
.recv-label {
  text-align: left;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 6px;
  text-transform: uppercase;
}
.sub-view .btn-outline {
  background: #f9fafb; border: 1.5px solid #e5e7eb;
  color: #374151; border-radius: 10px; font-size: 14px;
  padding: 13px; transition: background 0.15s, border-color 0.15s;
}
.sub-view .btn-outline:hover { background: #f0f0ff; border-color: #a5b4fc; color: #4f46e5; }

/* ── Settings ────────────────────────────────────────────────────────────── */
.settings-list { display: flex; flex-direction: column; gap: 10px; }
.setting-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12px;
}
.setting-item span { flex-shrink: 0; }
.setting-item.danger { border-color: #f8514944; }

/* ── Error / Toast ───────────────────────────────────────────────────────── */
.error-msg {
  font-size: 12px; padding: 4px 0; min-height: 20px;
  transition: all 0.2s;
}
.error-msg.error { color: var(--red); }
.error-msg.success { color: var(--green); }

.toast {
  position: fixed; bottom: -60px; left: 50%; transform: translateX(-50%);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 20px;
  font-size: 12px; color: var(--text);
  transition: bottom 0.3s ease;
  z-index: 201; max-width: 340px; text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.toast.show { bottom: 36px; }
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }

/* ── 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(--text-muted); }

/* ── Coin Price Ticker ───────────────────────────────────────────────────── */
.popup-ticker {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 28px; background: #0f172a;
  border-top: 1px solid #1e293b;
  display: flex; align-items: center;
  overflow: hidden; z-index: 200;
  flex-shrink: 0;
}
.popup-ticker-track {
  display: inline-flex; align-items: center;
  white-space: nowrap; width: max-content; height: 28px;
  animation: popup-ticker-scroll 300s linear infinite;
  will-change: transform;
}
.popup-ticker:hover .popup-ticker-track { animation-play-state: paused; }
@keyframes popup-ticker-scroll {
  0% { transform: translateX(0); } 100% { transform: translateX(-50%); }
}
.pt-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 12px; font-size: 10px; font-weight: 600;
  color: #cbd5e1; border-right: 1px solid #1e293b;
  height: 28px; white-space: nowrap; flex-shrink: 0;
  cursor: default;
}
.pt-item img { width: 12px; height: 12px; border-radius: 50%; object-fit: cover; }
.pt-item .pt-sym { color: #f1f5f9; font-weight: 700; text-transform: uppercase; }
.pt-item .pt-price { color: #94a3b8; }
.pt-item .pt-chg.up { color: #10b981; }
.pt-item .pt-chg.down { color: #f87171; }
.pt-item .pt-chg.flat { color: #64748b; }

/* ── Wallet List (All Wallets) ───────────────────────────────────────────── */
.wallets-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 400px; overflow-y: auto;
}
.wl-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s;
}
.wl-item:hover { border-color: var(--accent); }
.wl-item.active { border-color: var(--accent); background: var(--accent-dim); }
.wl-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wl-info { flex: 1; min-width: 0; }
.wl-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-addr { font-family: monospace; font-size: 10px; color: var(--text-muted); }
.wl-bal { text-align: right; flex-shrink: 0; }
.wl-bal-main { font-weight: 600; font-size: 13px; color: var(--accent); }
.wl-bal-sub { font-size: 10px; color: var(--text-muted); }
.wl-active-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}
.wl-empty {
  text-align: center; padding: 32px 16px;
  color: var(--text-muted); font-size: 13px;
}

/* ── Dashboard Account ───────────────────────────────────────────────────── */
.acct-hero { text-align: center; margin-bottom: 20px; }
.acct-icon { font-size: 40px; margin-bottom: 8px; }
.acct-hero h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.acct-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.acct-profile {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px;
}
.acct-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.acct-name { font-weight: 700; font-size: 14px; }
.acct-addr { font-family: monospace; font-size: 10px; color: var(--text-muted); word-break: break-all; }

.acct-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-muted);
}
.acct-badge {
  background: var(--accent-dim); color: var(--accent);
  padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
}

/* ── Embedded Dashboard View – Light Professional ──────────────────────────── */
#dashView {
  width: 420px;
}

.dv-root {
  display: flex;
  flex-direction: column;
  min-height: 560px;
  max-height: 600px;
  background: #f4f6f9;
  color: #1a1d23;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Override CSS vars for light theme so dynamic tab content inherits them */
  --bg: #f4f6f9;
  --bg-card: #ffffff;
  --bg-input: #f0f2f5;
  --border: #e5e7eb;
  --text: #1a1d23;
  --text-muted: #6b7280;
  --accent: #00b894;
  --accent-dim: rgba(0,184,148,0.10);
  --red: #dc2626;
  --red-dim: rgba(220,38,38,0.08);
  --green: #16a34a;
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.dv-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.dv-back-btn {
  width: 30px; height: 30px;
  background: #f3f4f6;
  border: 1px solid #e0e3e8;
  border-radius: 7px;
  cursor: pointer;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  color: #374151;
  flex-shrink: 0;
  transition: background 0.15s;
}
.dv-back-btn:hover { background: #e5e7eb; }

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

.dv-logo {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #00b894, #0ea5e9);
  color: #fff; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.dv-brand-name {
  font-weight: 700;
  font-size: 13px;
  color: #1a1d23;
  white-space: nowrap;
}

.dv-topbar-actions {
  display: flex; align-items: center; gap: 5px;
  flex-shrink: 0;
}

.dv-chip-btn {
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  background: #00b894; color: #fff;
  border: none;
  transition: filter 0.15s;
  white-space: nowrap;
}
.dv-chip-btn:hover { filter: brightness(1.08); }
.dv-chip-btn.outline {
  background: #fff; color: #374151;
  border: 1px solid #d1d5db;
}
.dv-chip-btn.outline:hover { border-color: #00b894; color: #00b894; }

.dv-signout-btn {
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  background: #fff1f2; color: #dc2626;
  border: 1px solid #fecdd3;
  white-space: nowrap;
  transition: background 0.15s;
}
.dv-signout-btn:hover { background: #ffe4e6; }

.dv-settings-btn {
  width: 30px; height: 30px;
  background: #f3f4f6;
  border: 1px solid #e0e3e8;
  border-radius: 7px;
  cursor: pointer;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  color: #374151;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.dv-settings-btn:hover { background: #e5e7eb; color: #00b894; }

/* ── Staking tab cards ───────────────────────────────────────────────────── */
.sk-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}
.sk-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f2f5;
  background: #fafbfc;
}
.sk-section-title {
  font-size: 11px; font-weight: 700; color: #374151;
  text-transform: uppercase; letter-spacing: .5px;
}
.sk-section-badge {
  font-size: 10px; color: #9ca3af;
}
.sk-section-body { padding: 12px 14px; }
.sk-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.sk-stat {
  background: #f8fafc;
  border: 1px solid #f0f2f5;
  border-radius: 9px; padding: 10px 12px;
}
.sk-stat-label {
  font-size: 9px; color: #9ca3af; text-transform: uppercase;
  letter-spacing: .4px; margin-bottom: 4px;
}
.sk-stat-val {
  font-size: 16px; font-weight: 700; color: #1a1d23; line-height: 1.1;
}
.sk-stat-val.accent { color: #00b894; }
.sk-stat-val.danger { color: #dc2626; }
.sk-stat-sub {
  font-size: 9px; color: #b0b7c3; margin-top: 2px;
}
.sk-status-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.sk-status-title { font-size: 13px; font-weight: 700; color: #1a1d23; }
.sk-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px; font-size: 10px; font-weight: 600;
}
.sk-badge.online { background: #dcfce7; color: #16a34a; }
.sk-badge.offline { background: #fee2e2; color: #dc2626; }
.sk-validator-row {
  display: flex; align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid #f0f2f5;
  gap: 10px;
  transition: background 0.1s;
}
.sk-validator-row:last-child { border-bottom: none; }
.sk-validator-row:hover { background: #fafbfc; }
.sk-validator-row.me { background: #f0fdf9; }
.sk-val-dot { font-size: 8px; flex-shrink: 0; }
.sk-val-addr {
  font-family: monospace; font-size: 10.5px; color: #374151;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.sk-val-addr.me { font-weight: 700; color: #00a37a; }
.sk-val-stake { font-size: 11px; font-weight: 600; color: #1a1d23; flex-shrink: 0; }
.sk-val-slash { font-size: 10px; color: #9ca3af; flex-shrink: 0; min-width: 28px; text-align: right; }
.sk-val-slash.danger { color: #dc2626; font-weight: 700; }
.sk-refresh-btn {
  width: 100%; padding: 9px 0;
  background: #f3f4f6; border: 1px solid #e0e3e8;
  border-radius: 9px; cursor: pointer; font-size: 12px;
  color: #374151; font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.sk-refresh-btn:hover { background: #e5e7eb; color: #00b894; }
.sk-not-validator {
  text-align: center; padding: 18px 0;
}
.sk-nv-icon { font-size: 30px; margin-bottom: 8px; }
.sk-nv-label { font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.sk-nv-sub { font-size: 11px; color: #9ca3af; }

/* ── Wallet chips strip ──────────────────────────────────────────────────── */
.dv-wlt-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: #fafbfc;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  min-height: 48px;
}
.dv-wlt-strip::-webkit-scrollbar { display: none; }

.dv-wlt-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 6px;
  border-radius: 20px;
  border: 1.5px solid #e0e3e8;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.dv-wlt-chip:hover { border-color: #00b894; background: #f0fdf9; }
.dv-wlt-chip.active {
  border-color: #00b894;
  background: #ecfdf5;
  box-shadow: 0 0 0 2px rgba(0,184,148,0.15);
}

.dv-wlt-chip-av {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #00b894, #0ea5e9);
  color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.dv-wlt-chip-name {
  font-size: 11px; font-weight: 600; color: #374151;
  max-width: 72px; overflow: hidden; text-overflow: ellipsis;
}
.dv-wlt-chip.active .dv-wlt-chip-name { color: #00b894; }

.dv-wlt-chip-bal {
  font-size: 10px; font-weight: 600; color: #00b894;
}

/* ── Balance card ────────────────────────────────────────────────────────── */
.dv-balance-card {
  margin: 10px 12px 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f2b1e 100%);
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  overflow: hidden;
}

.dv-balance-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 0;
}

.dv-balance-wlt-info {
  display: flex; align-items: center; gap: 9px;
}

.dv-bal-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.22);
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.dv-wlt-name {
  font-size: 13px; font-weight: 700; color: #fff;
}

.dv-wlt-addr {
  font-family: monospace; font-size: 9px;
  color: rgba(255,255,255,0.48);
  max-width: 185px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

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

.dv-icon-action {
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: rgba(255,255,255,0.80);
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.dv-icon-action:hover { background: rgba(255,255,255,0.20); }
.dv-icon-action.accent { color: #00e5bb; border-color: rgba(0,229,187,0.35); }

.dv-balance-body {
  padding: 8px 14px 14px;
}

.dv-bal-lbl {
  font-size: 10px; color: rgba(255,255,255,0.45);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.dv-bal-main {
  font-size: 28px; font-weight: 800;
  color: #00e5bb; line-height: 1.1;
}

.dv-bal-sub {
  font-size: 11px; color: rgba(255,255,255,0.40); margin-top: 2px;
}

/* ── Stats strip ─────────────────────────────────────────────────────────── */
.dv-stats-strip {
  display: flex; align-items: stretch;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin: 10px 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.dv-stat-item {
  flex: 1; text-align: center; padding: 10px 6px;
}

.dv-stat-sep {
  width: 1px; background: #e5e7eb; flex-shrink: 0;
  margin: 8px 0;
}

.dv-stat-val {
  font-size: 20px; font-weight: 700; color: #1a1d23; line-height: 1;
}
.dv-stat-val.sent { color: #dc2626; }
.dv-stat-val.recv { color: #16a34a; }

.dv-stat-lbl {
  font-size: 9px; color: #9ca3af;
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px;
}

/* ── Tab bar ─────────────────────────────────────────────────────────────── */
.dv-tabs {
  display: flex;
  background: #fff;
  border-bottom: 2px solid #e5e7eb;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.dv-tabs::-webkit-scrollbar { display: none; }

.dash-tab {
  background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: #9ca3af;
  cursor: pointer;
  padding: 9px 13px;
  font-size: 11px; font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
}
.dash-tab:hover { color: #374151; }
.dash-tab.active { color: #00b894; border-bottom-color: #00b894; font-weight: 600; }

/* ── Tab body ────────────────────────────────────────────────────────────── */
.dv-tab-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  background: #f4f6f9;
}

