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

:root {
  --bg:          #0a0e1a;
  --surface:     #111827;
  --surface2:    #1c2436;
  --border:      #2a3550;
  --gold:        #f5c518;
  --gold-dim:    #c9a014;
  --gold-glow:   rgba(245,197,24,.18);
  --green:       #22c55e;
  --red:         #ef4444;
  --blue:        #3b82f6;
  --text:        #e2e8f0;
  --muted:       #64748b;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 4px 32px rgba(0,0,0,.45);
  --transition:  .2s ease;
}

html { font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── Typography ──────────────────────────────────────────────────────────── */
h1,h2,h3,h4 { font-weight: 700; letter-spacing: -.02em; }
.mono { font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 220px;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.logo-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 0 6px rgba(245,197,24,.5));
}

.logo-text { font-size: 1.25rem; font-weight: 800; color: var(--gold); }
.logo-sub  { font-size: .7rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  cursor: pointer;
  border-radius: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  user-select: none;
}

.nav-item:hover  { background: var(--surface2); color: var(--text); }
.nav-item.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: var(--gold-glow);
}
.nav-item .icon { font-size: 1.1rem; width: 22px; text-align: center; }

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

.chain-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: .75rem; color: var(--muted);
}

.chain-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* ── Main Content ─────────────────────────────────────────────────────────── */
.main {
  margin-left: 220px;
  padding: 32px 36px;
  min-height: 100vh;
}

/* ── Pages ───────────────────────────────────────────────────────────────── */
.page { display: none; animation: fadeIn .25s ease; }
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 8px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ── Balance Card ─────────────────────────────────────────────────────────── */
.balance-card {
  background: linear-gradient(135deg, #1c2436 0%, #0f1829 100%);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: var(--gold-glow);
  border-radius: 50%;
  pointer-events: none;
}

.balance-amount {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin: 8px 0;
}

.balance-currency {
  font-size: .85rem;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ── Address Box ──────────────────────────────────────────────────────────── */
.address-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 16px;
}

.address-text {
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: .75rem;
  color: var(--muted);
  flex: 1;
  word-break: break-all;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: #0a0e1a;
}
.btn-primary:hover { background: #e8b800; transform: translateY(-1px); box-shadow: 0 4px 20px var(--gold-glow); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-ghost {
  background: var(--surface2);
  color: var(--text);
}
.btn-ghost:hover { background: var(--border); }

.btn-danger {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--red);
}
.btn-danger:hover { background: rgba(239,68,68,.25); }

.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }

/* ── Quick Actions ────────────────────────────────────────────────────────── */
.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ── Stats ───────────────────────────────────────────────────────────────── */
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--muted); margin-top: 4px; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .04em;
}

input, select, textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: .9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

input::placeholder { color: var(--muted); }

/* ── Hash Display ────────────────────────────────────────────────────────── */
.hash-card {
  background: linear-gradient(135deg, #0d1f0d, #0a1a0a);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: var(--radius);
  padding: 20px;
}

.hash-value {
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: .7rem;
  color: var(--green);
  word-break: break-all;
  line-height: 1.8;
}

.hash-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hash-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: .72rem;
  color: var(--muted);
}

.hash-tag span { color: var(--text); font-weight: 600; }

/* ── Transaction List ─────────────────────────────────────────────────────── */
.tx-list { display: flex; flex-direction: column; gap: 10px; }

.tx-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: border-color var(--transition);
}

.tx-item:hover { border-color: var(--gold-dim); cursor: pointer; }

.tx-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.tx-icon.receive { background: rgba(34,197,94,.15); }
.tx-icon.send    { background: rgba(239,68,68,.15);  }
.tx-icon.mint    { background: rgba(245,197,24,.15); }

.tx-info { flex: 1; min-width: 0; }

.tx-hash {
  font-family: monospace;
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-address { font-size: .82rem; color: var(--text); }

.tx-amount {
  font-weight: 700;
  font-size: .95rem;
  text-align: right;
}

.tx-amount.pos { color: var(--green); }
.tx-amount.neg { color: var(--red);   }

/* ── Blockchain Explorer ──────────────────────────────────────────────────── */
.block-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 60px 1fr 1fr auto;
  align-items: center;
  gap: 12px;
  transition: border-color var(--transition);
}

.block-item:hover { border-color: var(--gold-dim); }

.block-num {
  font-weight: 800;
  color: var(--gold);
  font-size: 1.1rem;
}

.block-hash-short {
  font-family: monospace;
  font-size: .72rem;
  color: var(--muted);
}

/* ── Welcome / Setup ──────────────────────────────────────────────────────── */
.welcome-container {
  max-width: 480px;
  margin: 60px auto;
  text-align: center;
}

.welcome-logo {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 48px rgba(245,197,24,.35), 0 0 0 2px rgba(245,197,24,.18);
}
.welcome-logo img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.welcome-title { font-size: 2rem; margin-bottom: 10px; }
.welcome-sub   { color: var(--muted); margin-bottom: 36px; }

/* ── Toast Notifications ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  min-width: 260px;
  max-width: 380px;
  box-shadow: var(--shadow);
  animation: slideUp .25s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red);   }
.toast.info    { border-left: 3px solid var(--gold);  }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Vinti4 Payment Box ───────────────────────────────────────────────────── */
.payment-box {
  background: linear-gradient(135deg, #0f1e2e, #0a1520);
  border: 1px solid rgba(59,130,246,.3);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

.payment-amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--gold);
  margin: 12px 0;
}

.payment-rate {
  font-size: .85rem;
  color: var(--muted);
  background: var(--surface2);
  border-radius: 99px;
  padding: 5px 14px;
  display: inline-block;
  margin-bottom: 20px;
}

/* ── Divider ──────────────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Section Header ──────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title { font-size: 1.1rem; font-weight: 700; }

/* ── Page Header ─────────────────────────────────────────────────────────── */
.page-title    { font-size: 1.5rem; margin-bottom: 4px; }
.page-subtitle { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }

/* ── Badge ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
}
.badge-green { background: rgba(34,197,94,.15);  color: var(--green); }
.badge-gold  { background: var(--gold-glow);     color: var(--gold);  }
.badge-muted { background: var(--surface2);      color: var(--muted); }
.badge-blue  { background: rgba(59,130,246,.15); color: #60a5fa; }
.badge-red   { background: rgba(239,68,68,.15);  color: #f87171; }

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Copy Button ─────────────────────────────────────────────────────────── */
.copy-btn {
  background: none; border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: .85rem;
  transition: color var(--transition);
  flex-shrink: 0;
}
.copy-btn:hover { color: var(--gold); }

/* ── PIN Screen ──────────────────────────────────────────────────────────── */
.pin-box {
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.pin-logo {
  width: 72px; height: 72px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 32px rgba(245,197,24,.3);
}
.pin-logo img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.pin-title {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.pin-sub {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 28px;
}

.pin-dots {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 16px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  transition: all .15s ease;
  display: inline-block;
}

.pin-dot.filled {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.1);
}

.pin-dot.error {
  background: var(--red);
  border-color: var(--red);
  animation: shake .3s ease;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

.pin-msg {
  min-height: 22px;
  font-size: .8rem;
  margin-bottom: 20px;
  color: var(--muted);
}

.pin-msg.error   { color: var(--red); }
.pin-msg.success { color: var(--green); }
.pin-msg.info    { color: var(--gold); }

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 12px;
  justify-content: center;
  margin: 0 auto;
}

.pin-key {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-key:hover  { background: var(--surface2); border-color: var(--gold-dim); }
.pin-key:active { transform: scale(.93); background: var(--gold-glow); }

.pin-key-ghost  { color: var(--muted); font-size: 1rem; }

/* ── Network tabs (Receber) ──────────────────────────────────────────────── */
.network-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.network-tab {
  padding: 9px 18px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.network-tab:hover { border-color: var(--net-color, var(--gold-dim)); color: var(--text); }

.network-tab.active {
  background: var(--net-color, var(--gold));
  border-color: var(--net-color, var(--gold));
  color: #0a0e1a;
}

.net-badge-display {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 99px;
  background: var(--surface2);
  border: 1px solid var(--net-color, var(--border));
  color: var(--net-color, var(--gold));
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: all .3s;
}

/* Linha de rede na lista de todos os endereços */
.net-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  border-radius: 4px;
}

.net-row:last-child { border-bottom: none; }
.net-row:hover { background: var(--surface2); padding-left: 6px; }

.net-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  font-weight: 700;
}

.net-info { flex: 1; min-width: 0; }
.net-name   { font-size: .82rem; font-weight: 600; }
.net-addr   { font-family: monospace; font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Address mode tabs (Enviar) ──────────────────────────────────────────── */
.addr-mode-tabs {
  display: flex;
  gap: 8px;
  margin: 8px 0 14px;
}

.addr-tab {
  flex: 1;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.addr-tab:hover  { border-color: var(--gold-dim); color: var(--text); }
.addr-tab.active { background: var(--gold-glow); border-color: var(--gold-dim); color: var(--gold); }

.addr-panel { margin-bottom: 4px; }

/* ── QR Scanner ──────────────────────────────────────────────────────────── */
#qr-reader {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  min-height: 220px;
}

/* Overrides para os controlos do html5-qrcode */
#qr-reader video      { border-radius: var(--radius-sm); }
#qr-reader img        { display: none; }
#qr-reader__scan_region { border-radius: var(--radius-sm); }

/* Esconde botões internos desnecessários do html5-qrcode */
#qr-reader__camera_selection { display: none !important; }
#qr-reader__header_message   {
  color: var(--muted) !important;
  background: var(--surface2) !important;
  font-size: .78rem !important;
  padding: 6px !important;
  border: none !important;
}
#qr-reader__status_span { display: none; }
#qr-reader__dashboard_section_swaplink { display: none !important; }
#qr-reader__filescan_input { display: none !important; }

.qr-status {
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
  padding: 6px 0;
  min-height: 22px;
}

.qr-status.scanning { color: var(--gold); }
.qr-status.success  { color: var(--green); }
.qr-status.error    { color: var(--red); }

.qr-scanned-result {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
}

.qr-check {
  color: var(--green);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.qr-scanned-result .mono {
  font-size: .72rem;
  color: var(--green);
  flex: 1;
  word-break: break-all;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    bottom: 0; top: auto; left: 0; right: 0;
    width: 100%; height: 64px;
    flex-direction: row;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--border);
    z-index: 200;
    overflow-x: auto;
  }
  .logo, .sidebar-footer { display: none; }
  .nav-item {
    flex-direction: column;
    padding: 8px 12px;
    font-size: .65rem;
    gap: 2px;
    border-left: none;
    border-bottom: 3px solid transparent;
    min-width: 64px;
    align-items: center;
    justify-content: center;
  }
  .nav-item.active { border-bottom-color: var(--gold); border-left: none; }
  .main { margin-left: 0; padding: 20px 16px 80px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .balance-amount { font-size: 2rem; }
  .block-item { grid-template-columns: 40px 1fr auto; }
}

/* ══════════════════════════════════════════════════════════════════════════
   AUTH SCREEN
══════════════════════════════════════════════════════════════════════════ */

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

/* ── Tabs login / signup ─────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: var(--surface2);
  border: none;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.auth-tab.active {
  background: var(--gold);
  color: #0a0e1a;
}

/* ── Progress bar ────────────────────────────────────────────────────────── */
.signup-progress-wrap {
  margin-bottom: 20px;
}

.signup-progress-track {
  height: 4px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}

.signup-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 99px;
  transition: width .4s ease;
}

/* ── Account type selector ───────────────────────────────────────────────── */
.acc-type-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 8px;
}

.acc-type-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface2);
  user-select: none;
}

.acc-type-card:hover {
  border-color: var(--gold-dim);
}

.acc-type-card.selected {
  border-color: var(--gold);
  background: var(--gold-glow);
}

.acc-type-icon { font-size: 2rem; margin-bottom: 8px; }
.acc-type-name { font-size: .9rem; font-weight: 700; color: var(--text); }
.acc-type-desc { font-size: .75rem; color: var(--muted); margin-top: 2px; }

/* ── OTP inputs ──────────────────────────────────────────────────────────── */
.otp-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.otp-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color var(--transition);
  outline: none;
  font-family: monospace;
}

.otp-digit:focus {
  border-color: var(--gold);
}

/* ── Document upload zone ────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--gold-dim);
  background: rgba(245,197,24,.03);
}

.upload-icon { font-size: 1.8rem; margin-bottom: 6px; }
.upload-label { font-size: .88rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.upload-hint  { font-size: .72rem; color: var(--muted); }

.upload-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.25);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  color: var(--text);
}

/* ── Auth error message ──────────────────────────────────────────────────── */
.auth-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .82rem;
  color: #ef4444;
  margin-bottom: 12px;
}

/* ── Responsive auth ─────────────────────────────────────────────────────── */
@media (max-width: 500px) {
  .auth-card { padding: 24px 18px; }
  .otp-digit { width: 40px; height: 50px; font-size: 1.2rem; }
  .acc-type-row { gap: 10px; }
}

/* ── Transfer code display ───────────────────────────────────────────────── */
.transfer-code-box {
  background: var(--surface2);
  border: 2px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition);
  user-select: none;
}

.transfer-code-box:hover { border-color: var(--gold); }

.transfer-code-chars {
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: .18em;
}

.transfer-countdown {
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
  margin-top: 10px;
  min-height: 20px;
  font-variant-numeric: tabular-nums;
}

/* ── Definições da Conta ─────────────────────────────────────────────────── */

.def-profile-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 16px;
}
.def-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b8860b, #f5c518);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #0a0e1a;
  flex-shrink: 0;
}
.def-action-list { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.def-action-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
}
.def-action-item:hover { background: var(--surface2); }
.def-action-icon {
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface2);
  border-radius: 8px;
}
.def-action-body { flex: 1; min-width: 0; }
.def-action-label { font-size: .9rem; font-weight: 600; margin-bottom: 2px; }
.def-action-desc  { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.def-action-arrow { font-size: 1.2rem; color: var(--muted); flex-shrink: 0; }

.card-danger {
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.04);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-danger:hover { opacity: .85; }

/* ── Modal de definições ─────────────────────────────────────────────────── */

.def-modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: slideUp .2s ease;
}
.def-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  font-size: 1rem;
  font-weight: 700;
}
.def-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
}
.def-modal-close:hover { background: var(--surface2); color: var(--text); }

.def-field { margin-bottom: 14px; }
.def-field label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; }
.def-field input { width: 100%; }
.def-msg { font-size: .82rem; min-height: 18px; margin-bottom: 10px; }
.def-msg.success { color: var(--green); }
.def-msg.error   { color: var(--danger); }
.def-confirm-word {
  font-weight: 700;
  color: var(--danger);
  font-family: monospace;
  background: rgba(239,68,68,.1);
  padding: 2px 6px;
  border-radius: 4px;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 500px) {
  .def-modal-card { margin: 0; border-radius: var(--radius) var(--radius) 0 0; }
  #def-modal-overlay { align-items: flex-end; padding: 0; }
}

/* ── Payment Status Badge ────────────────────────────────────────────────── */
.pay-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 99px;
  font-size: .82rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all .3s ease;
  margin: 4px 0;
}

.pay-badge-pending {
  background: rgba(245,197,24,.1);
  border-color: rgba(245,197,24,.3);
  color: var(--gold);
  animation: pay-pulse 2s infinite;
}

.pay-badge-paid {
  background: rgba(34,197,94,.1);
  border-color: rgba(34,197,94,.3);
  color: var(--green);
}

.pay-badge-expired {
  background: rgba(100,116,139,.1);
  border-color: rgba(100,116,139,.2);
  color: var(--muted);
}

@keyframes pay-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .65; }
}

/* ── Wallet selector strip ── */
.wsel-card {
  flex-shrink: 0;
  width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.wsel-card:hover { background: var(--surface2); }
.wsel-card.active {
  border-color: var(--gold);
  background: linear-gradient(135deg,#1c2436,#0f1829);
}
.wsel-card .wsel-label { font-size:.78rem;font-weight:600;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.wsel-card .wsel-addr  { font-size:.66rem;color:var(--muted);margin-bottom:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.wsel-card .wsel-bal   { font-size:1rem;font-weight:700;color:var(--gold); }
.wsel-card .wsel-lock  { font-size:.68rem;color:var(--muted);margin-top:4px; }

/* ── Switch wallet PIN modal ── */
.swm-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  transition: background .1s, border-color .1s;
}
.swm-dot.filled { background: var(--gold); border-color: var(--gold); }
.swm-key {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px;
  cursor: pointer;
  transition: background .1s;
}
.swm-key:hover { background: var(--surface); }
.swm-key:active { background: rgba(245,197,24,.15); }
