/* ─────────── VARS & RESET ─────────── */
:root {
  /* Premium Dark Theme Palette - Optimized Contrast */
  --bg: #020205;
  /* Deeper black for better contrast */
  --card: rgba(30, 30, 42, 0.75);
  /* Lighter card to pop against bg */
  --card-hover: rgba(40, 40, 55, 0.85);

  /* Vibrant Gradients */
  --grad: linear-gradient(135deg, #7C3AED 0%, #4F46E5 50%, #0EA5E9 100%);
  --grad-glow: linear-gradient(135deg, rgba(124, 58, 237, 0.5) 0%, rgba(79, 70, 229, 0.5) 100%);

  --focus: #8B5CF6;
  --txt: #F3F4F6;
  --muted: #9CA3AF;

  /* Glass Borders */
  --brd: rgba(255, 255, 255, 0.08);
  --brd-light: rgba(255, 255, 255, 0.15);

  /* Semantic */
  --ok: #10B981;
  --ok-glow: rgba(16, 185, 129, 0.4);
  --err: #EF4444;
  --err-glow: rgba(239, 68, 68, 0.4);
  --info: #3B82F6;
  --info-glow: rgba(59, 130, 246, 0.4);

  /* Animation */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* Legacy Animation Support */
  --t-fast: 0.25s;
  --t-med: 0.4s;
  --t-slow: 0.9s;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);
}

/* Dynamic Background Animation */
@keyframes bg-pulse {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

body {
  min-height: 100vh;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* Changed from center to accommodate scrolling if needed */
  font-family: 'Inter', system-ui, -apple-system, sans-serif;

  /* Deep Space Background */
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.12), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(5, 5, 8, 0) 0%, rgba(5, 5, 8, 1) 100%);
  background-attachment: fixed;

  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─────────── CONTAINER ─────────── */
.container {
  position: relative;
  max-width: 640px;
  width: 100%;
  padding: 3.5rem;
  border-radius: 32px;
  border: 1px solid var(--brd);
  background: var(--card);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transform: translate3d(0, 60px, -20px) scaleY(0.98);
  opacity: 0;
  animation: enter-card var(--t-slow) var(--ease-out) forwards;
}

@keyframes enter-card {
  to {
    transform: none;
    opacity: 1;
  }
}

.container::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: var(--grad);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  opacity: 0.25;
  transition: opacity var(--t-fast) ease-in-out;
  pointer-events: none;
}

.container:hover::before {
  opacity: 1;
}

/* ─────────── TIPOGRAFÍA MEJORADA ─────────── */
h1 {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(248, 248, 255, 0.15);
  letter-spacing: -0.04em;
}

.subtitle {
  font-size: 1.1rem;
  margin-bottom: 3.8rem;
  color: var(--muted);
  max-width: 90%;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 4rem 0 2.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--brd);
  letter-spacing: -0.02em;
}

h2:first-of-type {
  margin-top: 0;
}

/* ─────────── TRANSICIÓN DE VISTAS ─────────── */
@keyframes section-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes section-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
}

section {
  animation: section-in var(--t-med) var(--ease-out) forwards;
}

section.is-hiding {
  animation: section-out var(--t-med) var(--ease-in) forwards !important;
}

section.hidden {
  display: none;
}

section:not(.hidden)>* {
  --base-delay: 150ms;
  opacity: 0;
  animation: item-in 0.5s var(--ease-out) forwards;
  animation-delay: var(--base-delay);
}

@keyframes item-in {
  to {
    opacity: 1;
    transform: none;
  }
}

section:not(.hidden)> :nth-child(1) {
  animation-delay: calc(var(--base-delay) * 1);
}

section:not(.hidden)> :nth-child(2) {
  animation-delay: calc(var(--base-delay) * 1.5);
}

section:not(.hidden)> :nth-child(3) {
  animation-delay: calc(var(--base-delay) * 2);
}

section:not(.hidden)> :nth-child(4) {
  animation-delay: calc(var(--base-delay) * 2.5);
}

/* ─────────── FORMULARIOS PULIDOS ─────────── */
.form-group {
  margin-bottom: 2rem;
}

label {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input,
select,
textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--brd);
  background: rgba(0, 0, 0, 0.32);
  color: var(--txt);
  font-size: 1rem;
  caret-color: var(--focus);
  transition: all var(--t-fast) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}

select option {
  background: #1e1e2a;
  /* Fallback dark color */
  color: var(--txt);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--focus);
  background: rgba(0, 0, 0, 0.24);
  box-shadow: 0 0 16px rgba(79, 70, 229, 0.5);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23A0A0B0' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0  0 1 .708 .708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
}

/* ─────────── BOTONES ─────────── */
.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.form-group+button,
#balance>button,
#tx>button,
#settings>button {
  margin-top: 1.4rem;
  width: 100%;
}

button {
  flex: 1 1 auto;
  padding: 0.8rem 1.2rem;
  border-radius: 16px;
  /* Softer, more modern radius */
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 30, 42, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform, box-shadow, background;
}

button:not(.copy-btn):hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(40, 40, 55, 0.8);
  border-color: var(--brd-hover);
  color: var(--txt);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

button:not(.copy-btn):active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Botones con gradiente (Primary) */
#btn-register,
#btn-tx,
#btn-save-settings {
  border: none;
  color: #fff;
  background: var(--grad);
  background-size: 200% auto;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 700;
  letter-spacing: 0.03em;
}

#btn-register:hover:not(:disabled),
#btn-tx:hover:not(:disabled),
#btn-save-settings:hover:not(:disabled) {
  background-position: right center;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

/* Colores semánticos */
#btn-login,
#modal-confirm {
  background: rgba(20, 20, 30, 0.8);
  border: 1px solid var(--brd);
  color: var(--ok);
}

#btn-login:hover:not(:disabled),
#modal-confirm:hover:not(:disabled) {
  background: rgba(20, 20, 30, 1);
  border-color: var(--ok);
  box-shadow: 0 0 20px var(--ok-glow);
  color: var(--ok);
  text-shadow: 0 0 10px var(--ok-glow);
}

#btn-logout,
#modal-cancel,
#btn-delete-account {
  color: var(--err);
  background: rgba(30, 10, 10, 0.3);
}

#btn-logout:hover:not(:disabled),
#modal-cancel:hover:not(:disabled),
#btn-delete-account:hover:not(:disabled) {
  border-color: var(--err);
  background: rgba(40, 10, 10, 0.5);
  box-shadow: 0 0 20px var(--err-glow);
  color: var(--err);
}

#btn-balance,
#btn-add-device,
#btn-buy,
#qr-close,
#btn-settings,
#btn-back-from-settings {
  color: var(--info);
}

#btn-balance:hover:not(:disabled),
#btn-add-device:hover:not(:disabled),
#btn-buy:hover:not(:disabled),
#qr-close:hover:not(:disabled),
#btn-settings:hover:not(:disabled),
#btn-back-from-settings:hover:not(:disabled) {
  border-color: var(--info);
  box-shadow: 0 0 20px var(--info-glow);
  color: var(--info);
}

/* ─────────── ALERTAS ─────────── */
.alert {
  display: none;
  margin-top: 1.8rem;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  word-break: break-word;
  background: var(--card);
  border: 1px solid;
  animation: slideInFadeUp 0.55s var(--ease-out) both;
}

@keyframes slideInFadeUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert.ok {
  border-color: var(--ok);
  box-shadow: inset 0 0 20px -6px var(--ok-glow);
  color: var(--ok);
}

.alert.err {
  border-color: var(--err);
  box-shadow: inset 0 0 20px -6px var(--err-glow);
  color: var(--err);
}

.alert.info {
  border-color: var(--info);
  box-shadow: inset 0 0 20px -6px var(--info-glow);
  color: var(--info);
}

/* ─────────── INFO BOX & COPY BUTTON ─────────── */
.info-box {
  position: relative;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--brd);
  border-radius: 16px;
  padding: 1.45rem;
  margin-bottom: 1rem;
  transition: all var(--t-fast) var(--ease-out);
}

.info-box.has-copy {
  padding-right: 4rem;
}

.chart-container {
  position: relative;
  height: 250px;
  width: 100%;
  margin-bottom: 1rem;
}

.info-box:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--brd-hover);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.info-box-content {
  min-width: 0;
}

.info-box strong {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-box span {
  font-family: 'SF Mono', 'Courier New', Courier, monospace;
  word-break: break-all;
}

.copy-btn {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%) !important;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast) ease, color var(--t-fast) ease, opacity var(--t-fast) ease, box-shadow var(--t-fast) ease;
  opacity: 0.5;
  box-shadow: none;
  flex: none;
  will-change: auto;
}

.info-box:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover,
.copy-btn:active {
  transform: translateY(-50%) !important;
  background: rgba(255, 255, 255, 0.1);
  color: var(--txt);
  opacity: 1;
  box-shadow: none;
}

.copy-btn .icon-check {
  color: var(--ok);
}

/* ─────────── SECCIÓN DE CONFIGURACIÓN ─────────── */
.settings-grid {
  display: grid;
  gap: 1.5rem;
}

.settings-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--brd);
  border-radius: 20px;
  padding: 1.5rem;
  transition: border-color 0.2s ease;
}

.settings-card:hover {
  border-color: var(--brd-hover);
}

.settings-card h3 {
  font-size: 1rem;
  color: var(--txt);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--brd);
}

.settings-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-row:first-of-type {
  padding-top: 0;
}

.settings-info {
  flex: 1;
  padding-right: 1rem;
}

.settings-label {
  display: block;
  font-weight: 500;
  color: var(--txt);
  margin-bottom: 0.2rem;
}

.settings-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.settings-control {
  flex-shrink: 0;
}

.settings-select {
  padding: 0.6rem 2rem 0.6rem 1rem;
  font-size: 0.9rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  min-width: 120px;
}

.btn-sm {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  border-radius: 10px;
}

.danger-zone {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 20px;
  background: rgba(248, 113, 113, 0.03);
}

.danger-zone h3 {
  color: var(--err);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.danger-zone p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

.danger-zone button {
  width: 100%;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.2);
  color: var(--err);
}

.danger-zone button:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: var(--err);
}

/* ─────────── TABLA DE HISTORIAL ─────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

th,
td {
  padding: 1.2rem 1rem;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--brd);
}

th {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
}

tbody tr {
  transition: background-color var(--t-fast) linear, transform var(--t-fast) var(--ease-out);
}

tbody tr:hover {
  background-color: rgba(30, 30, 45, 0.7);
  transform: scale(1.02);
}

/* ─────────── MODALES ─────────── */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 16, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity var(--t-med) ease-in-out;
  z-index: 1000;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 26px;
  padding: 3rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
  transform: scale(0.94) translateY(22px);
  opacity: 0;
  transition: all var(--t-med) var(--ease-out);
}

.modal:not(.hidden) .modal-content {
  transform: none;
  opacity: 1;
}

.modal h3 {
  font-size: 1.9rem;
  margin-bottom: 1.4rem;
}

.modal .modal-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2.8rem;
}

#qrcode {
  margin: 2.2rem auto;
  background: #fff;
  padding: 1rem;
  border-radius: 18px;
  display: inline-block;
}

#qrcode img {
  display: block;
  border-radius: 8px;
  width: 256px;
  height: 256px;
}

/* ─────────── SPINNER ─────────── */
@keyframes crypto-morph {
  0% {
    border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%;
    transform: rotate(0deg);
  }

  100% {
    border-radius: 60% 40% 40% 60% / 30% 70% 30% 70%;
    transform: rotate(360deg);
  }
}

.crypto-loader-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 16, 0.5);
  backdrop-filter: blur(5px);
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) linear;
}

.crypto-loader-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}

.crypto-loader {
  width: 48px;
  height: 48px;
  background: var(--grad);
  animation: crypto-morph 2s var(--ease-in-out) infinite;
}

.crypto-loader-inline {
  display: inline-block;
  vertical-align: -0.3em;
  margin-left: 0.7em;
  width: 1.2em;
  height: 1.2em;
  background: var(--grad);
  animation: crypto-morph 2s var(--ease-in-out) infinite;
}

/* La clase .hidden sigue para compatibilidad JS */
.hidden {
  display: none !important;
}

/* ─────────── ENVIAR/RECIBIR UX EXTRA ─────────── */
.card {
  background: #0f1115;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .2);
}

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

/* ─────────── AUTH / LOGIN ─────────── */
.auth-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 2.5rem;
  background: rgba(20, 20, 30, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  text-align: center;
  animation: fadeIn 0.8s ease-out;
}

.auth-container h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-container p.subtitle {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.auth-container label {
  display: block;
  text-align: left;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--txt-sec);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-container input {
  width: 100%;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--brd);
  border-radius: 12px;
  color: var(--txt);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.auth-container input:focus {
  outline: none;
  border-color: var(--focus);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.auth-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.auth-buttons button {
  flex: 1;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

#btn-register {
  background: var(--grad);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

#btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

#btn-login {
  background: transparent;
  border: 1px solid var(--brd);
  color: var(--txt);
}

#btn-login:hover {
  border-color: var(--focus);
  color: var(--focus);
  background: rgba(99, 102, 241, 0.05);
}

#btn-recover {
  margin-top: 1.5rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.7;
  transition: opacity 0.2s;
}

#btn-recover:hover {
  opacity: 1;
  color: var(--focus);
}

/* ─────────── BALANCE DISPLAY ─────────── */
.balance-display {
  text-align: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-balance {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.sub-balance {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 780px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.input-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-inline input {
  flex: 1;
}

.helper {
  font-size: 12px;
  color: #9aa3b2;
  margin-top: 6px;
}

.quick-amounts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.quick-amounts button {
  background: #171a21;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  padding: 6px 10px;
  font: 600 12px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

.quick-amounts button:hover {
  border-color: rgba(255, 255, 255, .18);
}

.field-ok {
  outline: 2px solid rgba(80, 200, 120, .4);
  border-radius: 8px;
}

.field-err {
  outline: 2px solid rgba(220, 80, 80, .45);
  border-radius: 8px;
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 768px) {
  body {
    padding: 2rem 1rem;
    align-items: flex-start;
  }

  .container {
    padding: 2.2rem;
    border-radius: 26px;
    width: 100%;
  }

  h1 {
    font-size: 2.45rem;
  }

  .subtitle {
    margin-bottom: 3rem;
    max-width: 100%;
  }

  h2 {
    font-size: 1.18rem;
    margin: 3rem 0 1.5rem;
  }

  .button-group {
    flex-direction: column;
  }

  .modal-content {
    padding: 2rem;
    width: 95%;
  }

  th,
  td {
    padding: 1rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* ─────────── SKELETON LOADING ─────────── */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, rgba(255, 255, 255, 0.05) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-pulse {

  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ─────────── QR MODAL STYLES ─────────── */
.qr-modal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qr-wrapper {
  position: relative;
  padding: 16px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 0 40px rgba(79, 70, 229, 0.2);
  margin: 2rem 0;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qr-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

/* Scan line animation */
.qr-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--focus), transparent);
  box-shadow: 0 0 15px var(--focus);
  animation: scan 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  opacity: 0.8;
  pointer-events: none;
}

@keyframes scan {
  0% {
    top: 10%;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    top: 90%;
    opacity: 0;
  }
}

/* Corner accents */
.qr-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--focus);
  opacity: 0.6;
}

.qr-corner.tl {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
  border-radius: 8px 0 0 0;
}

.qr-corner.tr {
  top: 10px;
  right: 10px;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 8px 0 0;
}

.qr-corner.bl {
  bottom: 10px;
  left: 10px;
  border-right: 0;
  border-top: 0;
  border-radius: 0 0 0 8px;
}

.qr-corner.br {
  bottom: 10px;
  right: 10px;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 8px 0;
}


.skeleton-card {
  min-height: 120px;
  margin-bottom: 1rem;
}

.skeleton-row {
  height: 3rem;
  margin-bottom: 0.5rem;
}

/* Lock Screen */
.lock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.lock-content {
  text-align: center;
  color: white;
  background: var(--card);
  padding: 2rem;
  border-radius: 24px;
  border: 1px solid var(--brd);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  max-width: 90%;
  width: 320px;
}

.lock-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Contacts Grid */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-card {
  background: var(--card);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--brd);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.contact-info {
  overflow: hidden;
}

.contact-name {
  font-weight: 600;
  color: var(--txt);
  margin-bottom: 0.2rem;
}

.contact-addr {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: monospace;
}

/* NFT Grid */
.nfts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.nft-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--brd);
  transition: transform 0.2s;
}

.nft-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.nft-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.nft-info {
  padding: 0.8rem;
}

.nft-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nft-coll {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ─────────── INPUT GROUPS ─────────── */
.input-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--brd);
  border-radius: 14px;
  padding: 0.2rem;
  transition: border-color var(--t-fast);
}

.input-group:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 16px rgba(79, 70, 229, 0.15);
}

.input-group input {
  flex: 1;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0.8rem 1rem;
}

.input-group input:focus {
  box-shadow: none;
  background: transparent;
}

.btn-icon {
  padding: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0 !important;
  background: transparent;
  border: none;
  color: var(--muted);
  border-radius: 10px;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--txt);
  transform: none;
  box-shadow: none;
}

/* ─────────── AI GUARDIAN ORB ─────────── */
/* ─────────── AI GUARDIAN ORB ─────────── */
.ai-orb {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 20, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s var(--ease-out), background 0.3s ease;
}

.ai-orb:hover {
  transform: scale(1.1);
  background: rgba(15, 15, 20, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

.orb-float-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: orb-float 4s ease-in-out infinite;
}

@keyframes orb-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

/* ─────────── AI BACKGROUND SWORD ─────────── */
/* ─────────── AI BACKGROUND SWORD ─────────── */
.ai-bg-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  /* Fully visible container */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Double drop-shadow for intense glow */
  filter: drop-shadow(0 0 20px var(--focus)) drop-shadow(0 0 60px var(--focus));
}

.ai-bg-icon svg {
  width: 120%;
  height: 120%;
  opacity: 0.8;
  /* Higher base opacity */
  animation: bg-sword-pulse 6s ease-in-out infinite;
}

@keyframes bg-sword-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
    filter: brightness(1);
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
    filter: brightness(1.3);
  }
}

/* Spark Animation inside SVG */
.orb-pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--info);
  opacity: 0;
  animation: orb-ring-pulse 3s infinite;
  pointer-events: none;
}

@keyframes orb-ring-pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Spark Animation inside SVG */
.orb-spark {
  animation: spark-blink 3s infinite;
}

@keyframes spark-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes orb-pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.4);
    opacity: 0.2;
  }

  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

/* ─────────── AI INTERFACE ─────────── */
.ai-interface {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 320px;
  height: 450px;
  background: rgba(15, 15, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 101;
  transform-origin: bottom right;
  animation: ai-open 0.3s var(--ease-out) forwards;
}

.ai-interface.hidden {
  display: none;
}

@keyframes ai-open {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ai-header {
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-title {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.ai-status-dot {
  width: 8px;
  height: 8px;
  background: #00ffcc;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ffcc;
}

.ai-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.ai-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-msg {
  max-width: 85%;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ai-msg-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: #eee;
  border-bottom-left-radius: 2px;
}

.ai-msg-user {
  align-self: flex-end;
  background: var(--grad);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.ai-input-area {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 0.5rem;
}

.ai-input-area input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  padding: 0.8rem;
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
}

.ai-input-area input:focus {
  box-shadow: 0 0 0 2px rgba(0, 255, 204, 0.3);
}

.ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.ai-send-btn:hover {
  background: rgba(0, 255, 204, 0.2);
  color: #00ffcc;
}

/* ─────────── LOGIN REDESIGN (Ultra-Wide Premium Two-Column) ─────────── */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  perspective: 1000px;

  /* RESET LEGACY STYLES */
  max-width: none !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.container {
  width: 100%;
  max-width: 640px;
  padding: 4rem 2rem;
  /* Padding solo para el contenido dentro del container */
}

/* ─────────── PREMIUM LOGO & BRANDING ─────────── */
.login-card {
  width: 100%;
  max-width: 1000px;
  min-height: 600px;

  /* Advanced Glassmorphism */
  background: rgba(20, 20, 25, 0.6);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);

  /* Border & Glow */
  border: 1px solid var(--brd);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 32px;
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;

  position: relative;
  overflow: hidden;
  animation: enter-card-float .8s var(--ease-spring) forwards;
}

/* Background blob effect */
.login-card::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 60%);
  top: -200px;
  left: -200px;
  z-index: 0;
  pointer-events: none;
}

@keyframes enter-card-float {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Layout & Columns */
.login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

/* Left: Brand Side */
.login-brand-side {
  position: relative;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(circle at top right, rgba(124, 58, 237, 0.1), transparent 60%),
    rgba(0, 0, 0, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-content {
  position: relative;
  z-index: 1;
}

.logo-large {
  width: 90px;
  height: 90px;
  margin-bottom: 2rem;
  border-radius: 20px;
  background: #000;
  box-shadow: 0 20px 40px -10px rgba(124, 58, 237, 0.5);
  overflow: hidden;
}

.brand-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, #9CA3AF);
  -webkit-background-clip: text;
  background-clip: text;
  /* Fix lint warning */
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.brand-tagline {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 3rem;
  font-weight: 400;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--txt);
  font-weight: 500;
  font-size: 0.95rem;
}

.feature-icon {
  color: var(--focus);
}

/* Right: Form Side */
.login-form-side {
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.01);
}

.form-content {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.form-header {
  margin-bottom: 2.5rem;
}

.form-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
  letter-spacing: -0.02em;
}

.form-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Cinematic Inputs */
.login-card input {
  width: 100%;
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.25s ease;
}

.login-card input:focus {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
  outline: none;
}

.form-group {
  margin-bottom: 2rem;
}

.input-label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  transition: color 0.3s;
}

.login-card input:focus+.input-icon {
  color: var(--focus);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

/* Liquid Gradient Buttons */
.btn-primary-lg {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 14px;
  border: none;
  color: white;
  background: var(--grad);
  background-size: 200% auto;
  box-shadow: 0 10px 20px -5px rgba(124, 58, 237, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary-lg:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(124, 58, 237, 0.6);
}

.btn-secondary-lg {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary-lg:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-2px);
}

.auth-footer {
  margin-top: 2rem;
  text-align: center;
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.link-btn:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .login-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-brand-side {
    padding: 3rem 2rem;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .login-form-side {
    padding: 3rem 2rem;
  }
}

/* ─────────── TOKYO THEME ─────────── */
[data-theme="tokyo"] {
  /* Tokyo Night Corrected for High Contrast */
  --bg: #16161e;
  /* Darker Tokyo background */
  --card: rgba(36, 40, 59, 0.85);
  /* Lighter, more visible card */
  --card-hover: rgba(41, 46, 66, 0.95);
  --grad: linear-gradient(135deg, #7aa2f7 0%, #bb9af7 50%, #f7768e 100%);
  --grad-glow: linear-gradient(135deg, rgba(122, 162, 247, 0.45) 0%, rgba(187, 154, 247, 0.45) 100%);

  --focus: #7aa2f7;
  --txt: #c0caf5;
  --muted: #565f89;

  --brd: rgba(192, 202, 245, 0.15);
  --brd-light: rgba(192, 202, 245, 0.25);

  --ok: #9ece6a;
  --ok-glow: rgba(158, 206, 106, 0.4);
  --err: #f7768e;
  --err-glow: rgba(247, 118, 142, 0.4);
  --info: #7dcfff;
  --info-glow: rgba(125, 207, 255, 0.4);
}

/* ─────────── PREMIUM TOAST NOTIFICATIONS ─────────── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 16px 24px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--brd-light);
  color: var(--txt);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--brd) inset;

  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 300px;
  max-width: 400px;

  transform: translateX(120%);
  animation: toast-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  font-weight: 500;
  font-size: 0.95rem;
}

.toast.hiding {
  animation: toast-slide-out 0.3s ease-in forwards;
}

@keyframes toast-slide-in {
  to {
    transform: translateX(0);
  }
}

@keyframes toast-slide-out {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

.toast::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast.ok::before,
.toast.success::before {
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}

.toast.warn::before {
  background: #E0AF68;
  box-shadow: 0 0 10px #E0AF68;
}

.toast.error::before,
.toast.err::before {
  background: var(--err);
  box-shadow: 0 0 10px var(--err);
}

.toast.info::before {
  background: var(--info);
  box-shadow: 0 0 10px var(--info);
}

/* ─────────── TOKYO THEME (VIBRANT OVERRIDE) ─────────── */
[data-theme="tokyo"] {
  --bg: #16161e;
  --card: rgba(26, 27, 38, 0.9);
  --card-hover: rgba(36, 40, 59, 1);
  /* Neon Gradients */
  --grad: linear-gradient(135deg, #7aa2f7 0%, #bb9af7 50%, #f7768e 100%);
  --grad-glow: linear-gradient(135deg, rgba(122, 162, 247, 0.6) 0%, rgba(247, 118, 142, 0.5) 100%);

  --focus: #7aa2f7;
  --txt: #c0caf5;
  --muted: #787c99;

  --brd: rgba(192, 202, 245, 0.2);
  --brd-light: rgba(192, 202, 245, 0.3);

  --ok: #9ece6a;
  --ok-glow: rgba(158, 206, 106, 0.5);
  --err: #f7768e;
  --err-glow: rgba(247, 118, 142, 0.5);
  --info: #7dcfff;
  --info-glow: rgba(125, 207, 255, 0.5);
}

/* ─────────── LIGHT THEME ─────────── */
[data-theme="light"] {
  --bg: #f8fafc;
  --card: rgba(255, 255, 255, 0.85);
  --card-hover: rgba(255, 255, 255, 0.95);

  --grad: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
  --grad-glow: linear-gradient(135deg, rgba(79, 70, 229, 0.3) 0%, rgba(14, 165, 233, 0.3) 100%);

  --focus: #4f46e5;
  --txt: #0f172a;
  --muted: #64748b;

  --brd: rgba(0, 0, 0, 0.08);
  --brd-light: rgba(0, 0, 0, 0.12);

  --ok: #10b981;
  --ok-glow: rgba(16, 185, 129, 0.2);
  --err: #ef4444;
  --err-glow: rgba(239, 68, 68, 0.2);
  --info: #3b82f6;
  --info-glow: rgba(59, 130, 246, 0.2);
}

/* ─────────── UI REFINEMENTS ─────────── */
.nav-btn {
  transition: all 0.3s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.nav-btn.active {
  background: var(--grad-glow);
  /* Subtle highlight */
  color: var(--focus);
  border-color: var(--focus);
  box-shadow: 0 0 15px var(--grad-glow);
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--grad);
}

/* ─────────── PREMIUM SECURITY NOTIFICATIONS ─────────── */
.security-notification-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease-smooth);
}

.security-notification-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.security-notification {
  background: var(--card);
  border: 1px solid var(--brd-light);
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--brd) inset;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s var(--ease-spring);
}

.security-notification-overlay.visible .security-notification {
  transform: scale(1) translateY(0);
}

.security-notification-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.security-notification-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 0.75rem;
}

.security-notification-message {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.security-notification-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.security-notification-actions .btn {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s var(--ease-spring);
}

.security-notification-actions .btn-primary {
  background: var(--grad);
  border: none;
  color: white;
}

.security-notification-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--grad-glow);
}

.security-notification-actions .btn-secondary {
  background: transparent;
  border: 1px solid var(--brd-light);
  color: var(--txt);
}

.security-notification-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--focus);
}

/* ─────────── TRUSTED DEVICES LIST ─────────── */
.devices-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.device-card {
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s var(--ease-smooth);
}

.device-card:hover {
  border-color: var(--focus);
  transform: translateX(4px);
}

.device-card.current {
  border-color: var(--ok);
  background: rgba(16, 185, 129, 0.1);
}

.device-icon {
  font-size: 2rem;
  opacity: 0.8;
}

.device-info {
  flex: 1;
}

.device-name {
  font-weight: 600;
  color: var(--txt);
  margin-bottom: 0.25rem;
}

.device-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.device-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--ok);
  color: white;
  font-weight: 600;
}

.device-remove {
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--err);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.device-remove:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* ─────────── PENDING TRANSACTIONS ─────────── */
.pending-tx-banner {
  background: linear-gradient(135deg, rgba(224, 175, 104, 0.15), rgba(247, 118, 142, 0.15));
  border: 1px solid rgba(224, 175, 104, 0.3);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
}

.pending-tx-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(224, 175, 104, 0.2);
}

.pending-tx-icon {
  font-size: 1.5rem;
  animation: pulse-glow 1.5s infinite;
}

.pending-tx-text {
  flex: 1;
}

.pending-tx-title {
  font-weight: 600;
  color: #E0AF68;
}

.pending-tx-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

.pending-tx-arrow {
  color: var(--muted);
  font-size: 1.25rem;
}

/* ─────────── BACKUP KEY MODAL ─────────── */
.backup-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  /* Slightly darker */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  /* Allows scrolling if content is tall */
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  /* Enable scrolling */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease-smooth);
}

.backup-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.backup-modal {
  background: linear-gradient(145deg, var(--card) 0%, rgba(20, 20, 30, 0.95) 100%);
  border: 1px solid var(--brd-light);
  border-radius: 28px;
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px inset rgba(255, 255, 255, 0.05);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.4s var(--ease-spring);
  position: relative;
  margin: auto;
  /* Vertically center if space permits */
}

/* Premium SVGs */
.icon-premium {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.backup-modal-icon-wrapper {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(11aa733, 0.2) 0%, rgba(122, 162, 247, 0.1) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #7aa2f7;
  position: relative;
}

.backup-modal-icon-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(rgba(122, 162, 247, 0.5), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.backup-modal-icon-wrapper svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px rgba(122, 162, 247, 0.4));
}

/* Premium Checkbox */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--brd);
  border-radius: 16px;
  transition: all 0.2s ease;
  user-select: none;
}

.checkbox-wrapper:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--brd-light);
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
  /* Hide native */
}

.custom-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  background: transparent;
}

.checkbox-wrapper input:checked+.custom-checkbox {
  background: var(--ok);
  border-color: var(--ok);
  box-shadow: 0 0 10px rgba(158, 206, 106, 0.4);
}

.custom-checkbox svg {
  width: 16px;
  height: 16px;
  color: #000;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-wrapper input:checked+.custom-checkbox svg {
  opacity: 1;
  transform: scale(1);
}

.checkbox-text {
  font-size: 0.95rem;
  color: var(--txt);
  line-height: 1.4;
  font-weight: 500;
}

/* Refined Close Button (Tache) */
.backup-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  /* Squircle style */
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.backup-modal-close:hover {
  background: rgba(247, 118, 142, 0.15);
  color: var(--err);
  transform: rotate(90deg);
  /* Playful interaction */
}

.backup-modal-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.backup-modal-overlay.visible .backup-modal {
  transform: scale(1) translateY(0);
}

.backup-modal-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: pulse-glow 2s infinite;
}

.backup-modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 1rem;
}

.backup-modal-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.backup-modal-desc strong {
  color: var(--focus);
}

.backup-key-display {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
}

.backup-key-display code {
  font-size: 0.9rem;
  color: var(--focus);
  word-break: break-all;
}

.backup-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.backup-modal-actions .btn {
  flex: 1;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s var(--ease-spring);
}

.backup-modal-actions .btn-primary {
  background: var(--grad);
  color: #fff;
  border: none;
}

.backup-modal-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--grad-glow);
}

.backup-modal-actions .btn-secondary {
  background: transparent;
  border: 1px solid var(--brd);
  color: var(--muted);
}

.backup-modal-actions .btn-secondary:hover {
  border-color: var(--txt);
  color: var(--txt);
}

.backup-modal-warning {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(247, 118, 142, 0.1);
  border: 1px solid rgba(247, 118, 142, 0.3);
  border-radius: 12px;
  color: var(--err);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ─────────── RESPONSIVE & MOBILE UI ─────────── */
@media (max-width: 768px) {
  body {
    align-items: flex-start;
    padding: 0;
    /* Prevent overscroll bounce showing background */
    background-attachment: scroll;
    overflow-y: auto;
  }

  .container {
    max-width: 100%;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--brd);
    /* Minimal separation */
    padding: 1rem 1rem 7rem 1rem;
    /* Bottom padding for nav bar + extra space */
    box-shadow: none;
    transform: none;
    animation: none;
    opacity: 1;
    min-height: 100vh;
    margin: 0;
    background: rgba(10, 10, 14, 0.95);
    /* More opaque on mobile */
  }

  /* Adjust typography for mobile */
  h1 {
    font-size: 2.2rem;
    line-height: 1.1;
    text-align: center;
  }

  .subtitle {
    margin-bottom: 2rem;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  /* Full width inputs */
  input,
  select,
  textarea,
  button {
    font-size: 16px !important;
    /* Prevent zoom on iOS */
    min-height: 48px;
  }

  /* Hide desktop subnav */
  .subnav {
    display: none !important;
  }

  .chart-container {
    height: 200px;
  }

  .modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: none !important;
    background: var(--bg);
  }

  .modal h3 {
    margin-top: auto;
  }

  .modal .modal-buttons {
    margin-bottom: auto;
    flex-direction: column;
  }
}

/* ─────────── BOTTOM NAVIGATION BAR ─────────── */
.bottom-nav {
  display: none;
  /* Hidden on desktop */
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(25, 27, 45, 0.95);
    /* Brighter, more visible nav background */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  }

  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--muted);
    /* Keep muted for inactive, but... */
    background: transparent;
    border: none;
    padding: 0;
    gap: 5px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: visible;
  }

  .nav-item:hover {
    background: transparent;
    transform: translateY(-2px);
    box-shadow: none;
    color: var(--txt);
  }

  .nav-item:active {
    transform: scale(0.95);
  }

  .nav-item.active {
    color: #fff;
  }

  .nav-item.active .nav-icon {
    color: #c4b5fd;
    /* Brighter purple/white mix for active state */
    filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.6));
    /* Stronger glow */
    transform: translateY(-2px);
  }

  .nav-item.active .nav-label {
    opacity: 1;
    color: white;
    font-weight: 600;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
    transition: all 0.3s ease;
    fill: none;
    stroke: currentColor;
  }

  .nav-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.03em;
    opacity: 0.7;
    transition: all 0.2s ease;
  }
}

/* ─────────── MOBILE POLISH (AUTH & CARDS) ─────────── */
@media (max-width: 768px) {

  /* Auth Page Polish */
  .auth-container {
    max-width: 100%;
    margin: 1rem;
    padding: 2rem 1.5rem;
    background: rgba(20, 20, 30, 0.4);
    /* clearer glass */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    /* simpler shadow for performance */
  }

  .auth-container h1 {
    font-size: 2.5rem;
    /* Larger title */
  }

  .login-brand-side {
    display: none;
    /* Hide brand side on mobile if it exists in grid */
  }

  /* Card Aesthetics */
  .info-box,
  .card,
  .settings-card {
    background: rgba(25, 25, 35, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    /* softer radius */
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }

  .info-box strong {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    opacity: 0.6;
  }

  .hero-balance {
    font-size: 3rem;
    /* Bigger balance */
    margin-bottom: 0.2rem;
  }

  /* Better Grid for Swap/Forms */
  .swap-row {
    gap: 8px;
  }

  .swap-mid {
    height: 32px;
  }

  /* Quick amounts buttons bigger */
  .quick-amounts button {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Subnav hiding (Double check) */
  #app-nav {
    display: none !important;
  }
}

/* ─────────── INPUT & LOGIN CARD POLISH ─────────── */
@media (max-width: 768px) {

  /* Login Card - Better centering and proportions */
  .login-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .login-form-side {
    width: 100%;
    padding: 1.5rem;
  }

  .form-content {
    max-width: 340px;
    margin: 0 auto;
    text-align: center;
  }

  .form-header {
    margin-bottom: 2rem;
  }

  .form-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
  }

  .form-subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    opacity: 0.8;
  }

  /* Input Group Overhaul */
  .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
  }

  .input-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
    display: block;
  }

  /* Input Wrapper with Icon */
  .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
  }

  .input-icon {
    position: absolute;
    left: 1rem;
    color: var(--muted);
    opacity: 0.6;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 1;
  }

  .input-icon-group input {
    padding-left: 3rem !important;
    /* Make room for icon */
  }

  /* Input Styling - Premium Look */
  .login-card input,
  .auth-container input,
  .form-group input {
    width: 100%;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    background: rgba(20, 20, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--txt);
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
  }

  .login-card input:focus,
  .auth-container input:focus,
  .form-group input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(30, 30, 50, 0.8);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
  }

  .login-card input::placeholder {
    color: rgba(255, 255, 255, 0.3);
  }

  /* Auth Actions (Buttons) */
  .auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.5rem;
  }

  .auth-actions button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.3s ease;
  }

  .btn-primary-lg {
    background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 50%, #0EA5E9 100%);
    background-size: 200% auto;
    border: none;
    color: white;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
  }

  .btn-primary-lg:hover {
    background-position: right center;
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.5);
    transform: translateY(-2px);
  }

  #btn-login {
    background: rgba(25, 25, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--txt);
  }

  #btn-login:hover {
    background: rgba(35, 35, 55, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
  }

  /* Recover Link */
  .recover-link,
  #btn-recover {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
  }

  .recover-link:hover,
  #btn-recover:hover {
    opacity: 1;
    color: var(--focus);
  }

  /* Hide login grid on mobile - single column */
  .login-grid {
    display: block;
  }
}

/* ─────────── MOBILE POLISH (AUTH & CARDS) ─────────── */
@media (max-width: 768px) {

  /* Auth Page Polish - Full Height Center */
  .auth-container {
    max-width: 100%;
    margin: 0;
    width: 100%;
    height: 100vh;
    /* Full viewport height */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertically center content */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    animation: fadeIn 0.6s ease-out;
  }

  /* Inner visual card */
  .auth-container .login-card {
    background: rgba(22, 22, 30, 0.75);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    padding: 3rem 1.8rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    /* Center horizontally if screen is wider */
  }

  .login-brand-side {
    display: none;
  }

  /* Typography */
  .auth-container h1 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.1;
  }

  .auth-container .subtitle {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 2.5rem;
    line-height: 1.5;
  }

  /* Label Polish */
  .auth-container label {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
    opacity: 0.8;
  }

  /* Improved Input Fields */
  .auth-container .input-wrapper {
    background: rgba(10, 10, 16, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 0;
    display: flex;
    align-items: center;
    height: 60px;
    /* Taller touch target */
    overflow: hidden;
    transition: all 0.3s ease;
  }

  .auth-container .input-wrapper:focus-within {
    border-color: var(--focus);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
    background: rgba(10, 10, 16, 0.6);
  }

  .auth-container input {
    background: transparent !important;
    border: none !important;
    height: 100% !important;
    padding: 0 1rem !important;
    font-size: 1.1rem !important;
    /* Larger text */
    box-shadow: none !important;
    margin: 0 !important;
    color: white !important;
  }

  .auth-container .input-icon {
    margin-left: 1.2rem;
    margin-right: 0.2rem;
    opacity: 0.6;
    color: var(--muted);
    width: 22px;
    height: 22px;
  }

  /* Button Polish */
  .auth-buttons button {
    height: 56px;
    border-radius: 18px;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
  }

  #btn-register {
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.35);
  }

  #btn-login {
    border-color: rgba(255, 255, 255, 0.15);
  }

  /* General Mobile Card Polish */
  .info-box,
  .card,
  .settings-card {
    background: rgba(25, 25, 35, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }

  #app-nav {
    display: none !important;
  }
}

/* ─────────── MOBILE POLISH (AUTH & CARDS) ─────────── */
@media (max-width: 768px) {

  /* Auth Page Polish - Perfect Center with dvh */
  .auth-container {
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    /* Adapt dynamically to browser UI bars */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Horizontally center the card */
    justify-content: center;
    /* Vertically center the card */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    animation: fadeIn 0.6s ease-out;
  }

  /* Inner visual card */
  .auth-container .login-card {
    background: rgba(22, 22, 30, 0.8);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 36px;
    padding: 3rem 2rem;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 380px;
    /* Slightly narrower for elegance */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .login-brand-side {
    display: none;
  }

  /* Typography Scale */
  .auth-container h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-align: center;
  }

  .auth-container .subtitle {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 2.2rem;
    line-height: 1.5;
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Label Polish */
  .auth-container label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
    opacity: 0.7;
    margin-left: 4px;
    /* Align with input curve */
  }

  /* Improved Input Fields */
  .auth-container .input-wrapper {
    background: rgba(10, 10, 16, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    /* Perfectly center icon and text vertically */
    height: 64px;
    /* Even taller for ease of use */
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
  }

  .auth-container .input-wrapper:focus-within {
    border-color: var(--focus);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
    background: rgba(15, 15, 25, 0.8);
    transform: translateY(-1px);
  }

  .auth-container input {
    background: transparent !important;
    border: none !important;
    height: 100% !important;
    flex: 1;
    padding: 0 0 0 0.8rem !important;
    /* spacing from icon */
    font-size: 1.1rem !important;
    box-shadow: none !important;
    margin: 0 !important;
    color: white !important;
    margin-bottom: 0 !important;
    /* override default */
  }

  .auth-container .input-icon {
    flex-shrink: 0;
    margin: 0;
    opacity: 0.7;
    color: var(--muted);
    width: 24px;
    height: 24px;
  }

  /* Button Polish */
  .auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .auth-buttons button {
    width: 100%;
    height: 60px;
    border-radius: 20px;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }

  #btn-register {
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
    order: 2;
    /* Put register second if desired, or keep as is. keeping as is */
  }

  /* Make "Olvidaste tu acceso" fit nicely */
  #btn-recover {
    margin-top: 2rem;
    padding: 1rem;
    font-size: 0.9rem;
  }

  /* ─────────── CARD POLISHER (Dashboard) ─────────── */
  .info-box,
  .card,
  .settings-card {
    background: rgba(25, 25, 35, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  }

  /* Hide desktop nav on mobile */
  #app-nav {
    display: none !important;
  }
}

/* Small screen tweaks (iPhone SE, etc) */
@media (max-width: 380px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-container .login-card {
    padding: 2rem 1.5rem;
  }

  .auth-container h1 {
    font-size: 1.8rem;
  }

  .auth-container .input-wrapper {
    height: 56px;
  }

  .auth-buttons button {
    height: 52px;
  }
}

/* ─────────── MOBILE POLISH (AUTH & CARDS) ─────────── */
@media (max-width: 768px) {

  /* Auth Page Polish - Perfect Center with dvh */
  .auth-container {
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    /* Adapt dynamically to browser UI bars */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Horizontally center the card */
    justify-content: center;
    /* Vertically center the card */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    animation: fadeIn 0.6s ease-out;
  }

  /* Inner visual card */
  .auth-container .login-card {
    background: rgba(22, 22, 30, 0.8);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 36px;
    padding: 3rem 2rem;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 380px;
    /* Slightly narrower for elegance */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .login-brand-side {
    display: none;
  }

  /* Typography Scale */
  .auth-container h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-align: center;
  }

  .auth-container .subtitle {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 2.2rem;
    line-height: 1.5;
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Label Polish */
  .auth-container label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
    opacity: 0.7;
    margin-left: 4px;
    /* Align with input curve */
  }

  /* Improved Input Fields */
  .auth-container .input-wrapper {
    background: rgba(10, 10, 16, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    /* Perfectly center icon and text vertically */
    height: 64px;
    /* Even taller for ease of use */
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
  }

  .auth-container .input-wrapper:focus-within {
    border-color: var(--focus);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
    background: rgba(15, 15, 25, 0.8);
    transform: translateY(-1px);
  }

  .auth-container input {
    background: transparent !important;
    border: none !important;
    height: 100% !important;
    flex: 1;
    padding: 0 0 0 0.8rem !important;
    /* spacing from icon */
    font-size: 1.1rem !important;
    box-shadow: none !important;
    margin: 0 !important;
    color: white !important;
    margin-bottom: 0 !important;
    /* override default */
  }

  .auth-container .input-icon {
    flex-shrink: 0;
    margin: 0;
    opacity: 0.7;
    color: var(--muted);
    width: 24px;
    height: 24px;
  }

  /* Button Polish */
  .auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .auth-buttons button {
    width: 100%;
    height: 60px;
    border-radius: 20px;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }

  #btn-register {
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
    order: 2;
    /* Put register second if desired */
  }

  /* Make "Olvidaste tu acceso" fit nicely */
  #btn-recover {
    margin-top: 2rem;
    padding: 1rem;
    font-size: 0.9rem;
  }

  /* ─────────── CARD POLISHER (Dashboard) ─────────── */
  .info-box,
  .card,
  .settings-card {
    background: rgba(25, 25, 35, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  }

  /* Hide desktop nav on mobile */
  #app-nav {
    display: none !important;
  }

  /* ─────────── AI GUARDIAN & NAV FIX ─────────── */
  .ai-orb {
    bottom: 95px !important;
    /* Move ABOVE the bottom nav (70px + 25px gap) */
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(10, 10, 16, 0.8) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  }

  /* ─────────── PREMIUM BOTTOM NAV ─────────── */
  .bottom-nav {
    height: 76px;
    /* Slightly taller for elegance */
    background: rgba(8, 8, 12, 0.85);
    /* Darker, richer background */
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-item .nav-icon {
    width: 26px;
    height: 26px;
    stroke-width: 1.8px;
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .nav-item.active .nav-icon {
    opacity: 1;
    color: #c4b5fd;
    /* Soft violet */
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6));
    transform: translateY(-4px);
  }

  /* Active Indicator Dot */
  .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    /* Near bottom edge */
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px #fff;
    animation: fadeIn 0.3s ease-out;
  }

  .nav-label {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    opacity: 0.6;
  }

  .nav-item.active .nav-label {
    color: #fff;
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* Small screen tweaks (iPhone SE, etc) */
@media (max-width: 380px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-container .login-card {
    padding: 2rem 1.5rem;
  }

  .auth-container h1 {
    font-size: 1.8rem;
  }

  .auth-container .input-wrapper {
    height: 56px;
  }

  .auth-buttons button {
    height: 52px;
  }
}

/* ─────────── MOBILE POLISH (AUTH & CARDS) ─────────── */
@media (max-width: 768px) {

  /* Auth Page Polish - Perfect Center with dvh */
  .auth-container {
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    /* Adapt dynamically to browser UI bars */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Horizontally center the card */
    justify-content: center;
    /* Vertically center the card */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    animation: fadeIn 0.6s ease-out;
  }

  /* Inner visual card */
  .auth-container .login-card {
    background: rgba(22, 22, 30, 0.8);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 36px;
    padding: 3rem 2rem;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 380px;
    /* Slightly narrower for elegance */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .login-brand-side {
    display: none;
  }

  /* Typography Scale */
  .auth-container h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-align: center;
  }

  .auth-container .subtitle {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 2.2rem;
    line-height: 1.5;
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Label Polish */
  .auth-container label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
    opacity: 0.7;
    margin-left: 4px;
    /* Align with input curve */
  }

  /* Improved Input Fields */
  .auth-container .input-wrapper {
    background: rgba(10, 10, 16, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    /* Perfectly center icon and text vertically */
    height: 64px;
    /* Even taller for ease of use */
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
  }

  .auth-container .input-wrapper:focus-within {
    border-color: var(--focus);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
    background: rgba(15, 15, 25, 0.8);
    transform: translateY(-1px);
  }

  .auth-container input {
    background: transparent !important;
    border: none !important;
    height: 100% !important;
    flex: 1;
    padding: 0 0 0 0.8rem !important;
    /* spacing from icon */
    font-size: 1.1rem !important;
    box-shadow: none !important;
    margin: 0 !important;
    color: white !important;
    margin-bottom: 0 !important;
    /* override default */
  }

  .auth-container .input-icon {
    flex-shrink: 0;
    margin: 0;
    opacity: 0.7;
    color: var(--muted);
    width: 24px;
    height: 24px;
  }

  /* Button Polish */
  .auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .auth-buttons button {
    width: 100%;
    height: 60px;
    border-radius: 20px;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }

  #btn-register {
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
    order: 2;
    /* Put register second if desired */
  }

  /* Make "Olvidaste tu acceso" fit nicely */
  #btn-recover {
    margin-top: 2rem;
    padding: 1rem;
    font-size: 0.9rem;
  }

  /* ─────────── CARD POLISHER (Dashboard) ─────────── */
  .info-box,
  .card,
  .settings-card {
    background: rgba(25, 25, 35, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  }

  /* Hide desktop nav on mobile */
  #app-nav {
    display: none !important;
  }

  /* ─────────── AI GUARDIAN & NAV FIX ─────────── */
  .ai-orb {
    bottom: 95px !important;
    /* Move ABOVE the bottom nav (70px + 25px gap) */
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(10, 10, 16, 0.8) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  }

  /* ─────────── PREMIUM BOTTOM NAV ─────────── */
  .bottom-nav {
    height: 76px;
    /* Slightly taller for elegance */
    background: rgba(8, 8, 12, 0.85);
    /* Darker, richer background */
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-item .nav-icon {
    width: 26px;
    height: 26px;
    stroke-width: 1.8px;
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .nav-item.active .nav-icon {
    opacity: 1;
    color: #c4b5fd;
    /* Soft violet */
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6));
    transform: translateY(-4px);
  }

  /* Active Indicator Dot */
  .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    /* Near bottom edge */
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px #fff;
    animation: fadeIn 0.3s ease-out;
  }

  .nav-label {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    opacity: 0.6;
  }

  .nav-item.active .nav-label {
    color: #fff;
    opacity: 1;
    transform: translateY(-2px);
  }

  /* ─────────── QR CODE POLISH ─────────── */
  /* Target the container of the QR code */
  .qr-box,
  #qrcode {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 2rem auto !important;
    background: white !important;
    padding: 1rem !important;
    border-radius: 24px !important;
    /* Smooth corners */
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.15) !important;
    /* Glow effect */
    max-width: 220px !important;
    /* Force a reasonable size */
    aspect-ratio: 1/1;
    height: auto !important;
  }

  /* Target the img inside if any */
  #qrcode img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px !important;
  }
}

/* Small screen tweaks (iPhone SE, etc) */
@media (max-width: 380px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-container .login-card {
    padding: 2rem 1.5rem;
  }

  .auth-container h1 {
    font-size: 1.8rem;
  }

  .auth-container .input-wrapper {
    height: 56px;
  }

  .auth-buttons button {
    height: 52px;
  }
}

/* ─────────── MOBILE POLISH (AUTH & CARDS) ─────────── */
@media (max-width: 768px) {

  /* Auth Page Polish - Perfect Center with dvh */
  .auth-container {
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    /* Adapt dynamically to browser UI bars */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Horizontally center the card */
    justify-content: center;
    /* Vertically center the card */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    animation: fadeIn 0.6s ease-out;
  }

  /* Inner visual card */
  .auth-container .login-card {
    background: rgba(22, 22, 30, 0.85);
    /* Slightly more opaque */
    backdrop-filter: blur(45px);
    -webkit-backdrop-filter: blur(45px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    padding: 2.5rem 2rem;
    /* Reduced top padding for balance */
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 360px;
    /* Tighter width */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .login-brand-side {
    display: none;
  }

  /* Typography Scale */
  .auth-container h1 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 0.8rem;
    line-height: 1.2;
    text-align: center;
    letter-spacing: -0.01em;
  }

  .auth-container .subtitle {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 2rem;
    line-height: 1.5;
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Label Polish */
  .auth-container label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    /* Slightly tighter spacing */
    margin-bottom: 0.8rem;
    opacity: 0.6;
    margin-left: 2px;
    /* Subtle alignment */
    text-transform: uppercase;
    font-weight: 600;
  }

  /* Improved Input Fields */
  .auth-container .input-wrapper {
    background: rgba(10, 10, 16, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0 1.2rem;
    /* Increase side padding */
    display: flex;
    align-items: center;
    /* Perfectly center icon and text vertically */
    height: 64px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
  }

  .auth-container .input-wrapper:focus-within {
    border-color: var(--focus);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
    background: rgba(15, 15, 25, 0.9);
    transform: none;
    /* Remove shift to keep content stable */
  }

  .auth-container input {
    background: transparent !important;
    border: none !important;
    height: 100% !important;
    flex: 1;
    padding: 0 0 0 1rem !important;
    /* Proper spacing from icon */
    font-size: 1.1rem !important;
    box-shadow: none !important;
    margin: 0 !important;
    color: white !important;
    margin-bottom: 0 !important;
  }

  .auth-container .input-icon {
    flex-shrink: 0;
    margin: 0;
    opacity: 0.6;
    color: var(--muted);
    width: 24px;
    height: 24px;
  }

  /* Button Polish */
  .auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 0.5rem;
    /* Add separation from form */
  }

  .auth-buttons button {
    width: 100%;
    height: 60px;
    border-radius: 20px;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-weight: 600;
  }

  #btn-register {
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
    order: 2;
  }

  /* Make "Olvidaste tu acceso" fit nicely */
  #btn-recover {
    margin-top: 1.5rem;
    padding: 0.8rem;
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.3s;
  }

  #btn-recover:hover {
    opacity: 1;
  }

  /* ─────────── CARD POLISHER (Dashboard) ─────────── */
  .info-box,
  .card,
  .settings-card {
    background: rgba(25, 25, 35, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  }

  /* Hide desktop nav on mobile */
  #app-nav {
    display: none !important;
  }

  /* ─────────── AI GUARDIAN & NAV FIX ─────────── */
  .ai-orb {
    bottom: 95px !important;
    /* Move ABOVE the bottom nav (70px + 25px gap) */
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(10, 10, 16, 0.8) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  }

  /* ─────────── PREMIUM BOTTOM NAV ─────────── */
  .bottom-nav {
    height: 76px;
    /* Slightly taller for elegance */
    background: rgba(8, 8, 12, 0.85);
    /* Darker, richer background */
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-item .nav-icon {
    width: 26px;
    height: 26px;
    stroke-width: 1.8px;
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .nav-item.active .nav-icon {
    opacity: 1;
    color: #c4b5fd;
    /* Soft violet */
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6));
    transform: translateY(-4px);
  }

  /* Active Indicator Dot */
  .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    /* Near bottom edge */
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px #fff;
    animation: fadeIn 0.3s ease-out;
  }

  .nav-label {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    opacity: 0.6;
  }

  .nav-item.active .nav-label {
    color: #fff;
    opacity: 1;
    transform: translateY(-2px);
  }

  /* ─────────── QR CODE POLISH ─────────── */
  /* Target the container of the QR code */
  .qr-box,
  #qrcode {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 2rem auto !important;
    background: white !important;
    padding: 1rem !important;
    border-radius: 24px !important;
    /* Smooth corners */
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.15) !important;
    /* Glow effect */
    max-width: 220px !important;
    /* Force a reasonable size */
    aspect-ratio: 1/1;
    height: auto !important;
  }

  /* Target the img inside if any */
  #qrcode img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px !important;
  }
}

/* Small screen tweaks (iPhone SE, etc) */
@media (max-width: 380px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-container .login-card {
    padding: 2rem 1.5rem;
  }

  .auth-container h1 {
    font-size: 1.8rem;
  }

  .auth-container .input-wrapper {
    height: 56px;
  }

  .auth-buttons button {
    height: 52px;
  }
}

/* ─────────── MOBILE POLISH (AUTH & CARDS) ─────────── */
@media (max-width: 768px) {

  /* Auth Page Polish - Safe Center */
  .auth-container {
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1rem;
    /* Slightly reduced padding to allow card to expand */
    display: flex;
    flex-direction: column;
    /* justify-content: center; REMOVED to avoid clipping on small screens/keyboard */
    align-items: center;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    animation: fadeIn 0.6s ease-out;
    box-sizing: border-box;
    overflow-y: auto;
    /* Allow scrolling if persistent */
  }

  /* Inner visual card */
  .auth-container .login-card {
    background: rgba(22, 22, 30, 0.85);
    backdrop-filter: blur(45px);
    -webkit-backdrop-filter: blur(45px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    padding: 2.5rem 1.8rem;
    /* Slightly reduced horizontal padding */
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 360px;
    margin: auto;
    /* SAFE CENTERING: Will center if space, scroll if not */
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    /* Prevent squashing */
  }

  .login-brand-side {
    display: none;
  }

  /* Typography Scale */
  .auth-container h1 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 0.8rem;
    line-height: 1.2;
    text-align: center;
    letter-spacing: -0.01em;
  }

  .auth-container .subtitle {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 2rem;
    line-height: 1.5;
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Label Polish */
  .auth-container label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
    opacity: 0.6;
    margin-left: 2px;
    text-transform: uppercase;
    font-weight: 600;
  }

  /* Improved Input Fields */
  .auth-container .input-wrapper {
    background: rgba(10, 10, 16, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0 1.2rem;
    display: flex;
    align-items: center;
    height: 64px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
  }

  .auth-container .input-wrapper:focus-within {
    border-color: var(--focus);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
    background: rgba(15, 15, 25, 0.9);
    transform: none;
  }

  .auth-container input {
    background: transparent !important;
    border: none !important;
    height: 100% !important;
    flex: 1;
    padding: 0 0 0 1rem !important;
    font-size: 1.1rem !important;
    box-shadow: none !important;
    margin: 0 !important;
    color: white !important;
    margin-bottom: 0 !important;
  }

  .auth-container .input-icon {
    flex-shrink: 0;
    margin: 0;
    opacity: 0.6;
    color: var(--muted);
    width: 24px;
    height: 24px;
  }

  /* Button Polish */
  .auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 0.5rem;
  }

  .auth-buttons button {
    width: 100%;
    height: 60px;
    border-radius: 20px;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-weight: 600;
  }

  #btn-register {
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
    order: 2;
  }

  /* Make "Olvidaste tu acceso" fit nicely */
  #btn-recover {
    margin-top: 1.5rem;
    padding: 0.8rem;
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.3s;
  }

  #btn-recover:hover {
    opacity: 1;
  }

  /* ─────────── CARD POLISHER (Dashboard) ─────────── */
  .info-box,
  .card,
  .settings-card {
    background: rgba(25, 25, 35, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  }

  /* Hide desktop nav on mobile */
  #app-nav {
    display: none !important;
  }

  /* ─────────── AI GUARDIAN & NAV FIX ─────────── */
  .ai-orb {
    bottom: 95px !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(10, 10, 16, 0.8) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  }

  /* ─────────── PREMIUM BOTTOM NAV ─────────── */
  .bottom-nav {
    height: 76px;
    background: rgba(8, 8, 12, 0.85);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-item .nav-icon {
    width: 26px;
    height: 26px;
    stroke-width: 1.8px;
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .nav-item.active .nav-icon {
    opacity: 1;
    color: #c4b5fd;
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6));
    transform: translateY(-4px);
  }

  /* Active Indicator Dot */
  .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px #fff;
    animation: fadeIn 0.3s ease-out;
  }

  .nav-label {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    opacity: 0.6;
  }

  .nav-item.active .nav-label {
    color: #fff;
    opacity: 1;
    transform: translateY(-2px);
  }

  /* ─────────── QR CODE POLISH ─────────── */
  .qr-box,
  #qrcode {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 2rem auto !important;
    background: white !important;
    padding: 1rem !important;
    border-radius: 24px !important;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.15) !important;
    max-width: 220px !important;
    aspect-ratio: 1/1;
    height: auto !important;
  }

  #qrcode img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px !important;
  }
}

/* Small screen tweaks (iPhone SE, etc) */
@media (max-width: 380px) {
  .auth-container {
    padding: 1rem;
    min-height: auto;
    /* Let it flow on small screens if keyboard active */
    justify-content: flex-start;
    /* Start from top */
    padding-top: 2rem;
  }

  .auth-container .login-card {
    padding: 2rem 1.5rem;
    margin-top: 1rem;
  }

  .auth-container h1 {
    font-size: 1.8rem;
  }

  .auth-container .input-wrapper {
    height: 56px;
  }

  .auth-buttons button {
    height: 52px;
  }
}

/* ─────────── MOBILE POLISH (AUTH & CARDS) v2 ─────────── */
@media (max-width: 768px) {

  /* Auth Page - TRUE Vertical Center */
  .auth-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bg) !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Inner visual card */
  .auth-container .login-card {
    background: rgba(22, 22, 30, 0.9) !important;
    backdrop-filter: blur(40px) !important;
    -webkit-backdrop-filter: blur(40px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 28px !important;
    padding: 2rem 1.5rem !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5) !important;
    width: calc(100% - 2rem) !important;
    max-width: 340px !important;
    margin: auto !important;
    flex-shrink: 0 !important;
  }

  .login-brand-side {
    display: none !important;
  }

  /* Typography */
  .auth-container h1 {
    font-size: 1.8rem !important;
    margin: 0 0 0.5rem 0 !important;
    text-align: center !important;
  }

  .auth-container .subtitle {
    font-size: 0.9rem !important;
    opacity: 0.7 !important;
    margin: 0 0 1.5rem 0 !important;
    text-align: center !important;
  }

  /* Labels */
  .auth-container label {
    font-size: 0.7rem !important;
    letter-spacing: 0.1em !important;
    margin: 0 0 0.5rem 0 !important;
    opacity: 0.6 !important;
  }

  /* Input Fields */
  .auth-container .input-wrapper {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 0 1rem !important;
    display: flex !important;
    align-items: center !important;
    height: 56px !important;
    margin: 0 0 1rem 0 !important;
  }

  .auth-container input {
    background: transparent !important;
    border: none !important;
    height: 100% !important;
    flex: 1 !important;
    padding: 0 0 0 0.8rem !important;
    font-size: 1rem !important;
    box-shadow: none !important;
    margin: 0 !important;
    color: white !important;
  }

  .auth-container .input-icon {
    opacity: 0.5 !important;
    width: 22px !important;
    height: 22px !important;
  }

  /* Buttons */
  .auth-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 0.5rem !important;
  }

  .auth-buttons button {
    width: 100% !important;
    height: 52px !important;
    border-radius: 16px !important;
    font-size: 1rem !important;
    margin: 0 !important;
  }

  #btn-recover {
    margin-top: 1rem !important;
    font-size: 0.85rem !important;
    opacity: 0.5 !important;
  }

  /* Dashboard Cards */
  .info-box,
  .card,
  .settings-card {
    background: rgba(25, 25, 35, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 24px !important;
    padding: 1.2rem !important;
    margin-bottom: 1rem !important;
  }

  /* Hide desktop nav */
  #app-nav {
    display: none !important;
  }

  /* Guardian Orb */
  .ai-orb {
    bottom: 90px !important;
    right: 16px !important;
    width: 48px !important;
    height: 48px !important;
  }

  /* Bottom Nav */
  .bottom-nav {
    height: 70px !important;
    background: rgba(10, 10, 15, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-bottom: env(safe-area-inset-bottom, 16px) !important;
  }

  .nav-item .nav-icon {
    width: 24px !important;
    height: 24px !important;
    opacity: 0.5 !important;
  }

  .nav-item.active .nav-icon {
    opacity: 1 !important;
    color: #a78bfa !important;
  }

  .nav-label {
    font-size: 9px !important;
    opacity: 0.5 !important;
  }

  .nav-item.active .nav-label {
    opacity: 1 !important;
  }

  /* QR Code */
  .qr-box,
  #qrcode {
    display: flex !important;
    justify-content: center !important;
    margin: 1.5rem auto !important;
    background: white !important;
    padding: 0.8rem !important;
    border-radius: 20px !important;
    max-width: 200px !important;
  }

  #qrcode img {
    width: 100% !important;
    height: auto !important;
  }
}

/* iPhone SE / Small screens */
@media (max-width: 380px) {
  .auth-container .login-card {
    padding: 1.5rem 1.2rem !important;
  }

  .auth-container h1 {
    font-size: 1.6rem !important;
  }

  .auth-container .input-wrapper {
    height: 50px !important;
  }

  .auth-buttons button {
    height: 48px !important;
  }
}

/* Hide Action Bar on Desktop (shown in mobile-overrides.css) */
.action-bar-container {
  display: none;
}

/* ─────────── Beautiful Receive Network Picker ─────────── */

.recv-network-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--brd);
  background: rgba(15, 15, 22, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--txt);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.recv-network-btn:hover {
  border-color: rgba(155, 92, 255, 0.4);
  background: rgba(20, 20, 30, 0.9);
  box-shadow: 0 4px 20px rgba(155, 92, 255, 0.15);
}

.recv-network-btn.open {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.recv-network-btn.open .recv-net-arrow {
  transform: rotate(180deg);
}

.recv-network-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.recv-net-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
}

.recv-net-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.recv-net-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--txt);
}

.recv-net-desc {
  font-size: 0.75rem;
  color: var(--muted);
}

.recv-net-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.recv-net-arrow {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

/* Dropdown Panel */
.recv-network-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: rgba(15, 15, 22, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--brd);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  z-index: 100;
  max-height: 400px;
  overflow: hidden;
  animation: dropdownSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.recv-network-dropdown.hidden {
  display: none;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Search Box */
.recv-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--brd);
}

.recv-search-box svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.recv-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--txt);
  font-size: 0.95rem;
  padding: 0;
}

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

/* Network List */
.recv-network-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.recv-network-list::-webkit-scrollbar {
  width: 6px;
}

.recv-network-list::-webkit-scrollbar-track {
  background: transparent;
}

.recv-network-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Network Item */
.recv-network-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.recv-network-item:hover {
  background: rgba(155, 92, 255, 0.1);
}

.recv-network-item.selected {
  background: rgba(155, 92, 255, 0.15);
  border: 1px solid rgba(155, 92, 255, 0.3);
}

.recv-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recv-item-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.recv-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.recv-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recv-item-desc {
  font-size: 0.75rem;
  color: var(--muted);
}

.recv-item-badge {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.recv-item-check {
  width: 20px;
  height: 20px;
  color: var(--ok);
  position: absolute;
  right: 14px;
}

/* Form group relative for dropdown positioning */
#receive .form-group {
  position: relative;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .recv-network-btn {
    padding: 12px 14px;
  }

  .recv-net-icon {
    width: 28px;
    height: 28px;
  }

  .recv-net-name {
    font-size: 0.9rem;
  }

  .recv-net-desc {
    display: none;
  }

  .recv-network-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 24px 24px 0 0;
    max-height: 70vh;
    animation: mobileSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  @keyframes mobileSlideUp {
    from {
      opacity: 0;
      transform: translateY(100%);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .recv-network-item {
    padding: 14px;
  }

  .recv-item-icon {
    width: 44px;
    height: 44px;
  }

  .recv-item-icon img {
    width: 28px;
    height: 28px;
  }
}

/* CRITICAL FIX: Ensure auth hides on login - Added 2026-01-09 */
section#auth.hidden,
#auth.hidden,
#auth.login.hidden,
section#auth.login.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
  z-index: -9999 !important;
}

/* ─────────── MULTI-CHAIN UX ENHANCEMENTS ─────────── */
/* Network Warning Banner - Receive Section */
.network-warning-banner {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(234, 179, 8, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #FEF3C7;
  text-align: center;
}

.network-warning-banner strong {
  color: #FCD34D;
}

#recv-network-warning {
  display: none;
  /* Hidden by default, shown by JS */
}

/* Gasless Badge - Send Section (Base) */
#send-gasless-badge {
  display: none;
  /* Hidden by default */
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 0.85rem;
  color: #C4B5FD;
  text-align: center;
}

#send-gasless-badge strong {
  color: #A78BFA;
}

/* Gas Warning - Send Section (Non-Base chains) */
#send-gas-warning {
  display: none;
  /* Hidden by default */
  background: rgba(30, 30, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

#send-gas-warning strong {
  color: var(--txt);
}

/* Copy Network + Address Button */
#btn-copy-recv-network {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(30, 30, 45, 0.6);
  border: 1px solid var(--brd);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 8px 12px;
  margin-top: 10px;
}

#btn-copy-recv-network:hover {
  border-color: var(--focus);
  color: var(--txt);
  background: rgba(40, 40, 55, 0.8);
}

/* Network Badge Enhancement */
.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 30, 45, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 8px 16px;
}

.network-badge .crypto-symbol {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--txt);
}

.network-badge .network-name {
  font-size: 0.9rem;
  color: var(--muted);
}

/* QR Scanner Modal */
.scanner-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.scanner-content {
  background: #1a1b23;
  padding: 24px;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#reader video {
  border-radius: 12px;
  object-fit: cover;
}