/* Recarga+ MVP — design tokens extraídos del Figma Phoenix_UX (Copy) */

:root {
  /* Marca Movil */
  --orange: #FF4713;
  --orange-soft: #FFEADE;

  /* Slate (tipografía y neutros fríos) */
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CAD5E2;
  --slate-400: #90A1B9;
  --slate-500: #62748E;
  --slate-600: #45556C;
  --slate-700: #314158;
  --slate-950: #020618;
  --slate-light-300: #EEF2F6;

  /* Superficies */
  --bg-300: #F2F2FD;
  --bg-400: #EDEEFD;
  --surface-400: #F5F5F9;
  --surface-white: #FFFFFF;

  /* Acentos */
  --blue-500: #2B7FFF;
  --blue-brand: #0071CE;
  --blue-600: #0068A0;
  --blue-50: #E8F2FF;
  --green-100: #DCFCE7;
  --green-200: #B9F8CF;
  --green-600: #168A4A;

  /* Neutros funcionales */
  --n-100: #E9E9EA;
  --n-200: #C9CACD;
  --n-300: #A9ABB0;
  --n-400: #93959A;
  --n-700: #494C54;
  --n-800: #262626;
  --n-900: #1C1D1F;

  /* Gradientes del diseño */
  --grad-hero: linear-gradient(135deg, rgba(255, 234, 222, 1) 0%, rgba(248, 253, 255, 1) 47%, rgba(231, 248, 255, 1) 100%);
  --grad-blue: linear-gradient(44deg, rgba(0, 113, 206, 1) 6%, rgba(0, 141, 206, 1) 85%);
  --grad-warm: linear-gradient(180deg, rgba(255, 214, 8, 1) 0%, rgba(255, 102, 0, 1) 100%);
  --grad-indigo: linear-gradient(180deg, rgba(224, 226, 255, 1) 0%, rgba(209, 210, 227, 1) 100%);
  --grad-shimmer: linear-gradient(180deg, rgba(242, 242, 243, 1) 0%, rgba(250, 250, 250, 1) 60%, rgba(242, 242, 243, 1) 100%);

  /* Efectos */
  --elev-card: 0px 0px 8px 0px rgba(0, 0, 0, 0.06);
  --blur-card: blur(25px);
  --elev-float: 0px 0px 9.2px 0px rgba(0, 0, 0, 0.06);
  --blur-float: blur(28.8px);

  /* Radio */
  --r-input: 12px;
  --r-card: 16px;
  --r-sheet: 24px;
  --r-pill: 100px;
  --r-chip: 12px;

  /* Tipografía */
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --fs-10: 10px;
  --fs-12: 12px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-20: 20px;
  --fs-24: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg-300);
  color: var(--slate-950);
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
}

/* Marco tipo teléfono eliminado: la app corre nativa a pantalla completa
   en el teléfono (iOS/Android) y como columna plana centrada en desktop. */
#app {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-300);
  position: relative;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 900px) {
  body { background: #D7DBE4; }
  #app {
    max-width: 430px;
    margin: 0 auto;
    border-left: 1px solid var(--slate-200);
    border-right: 1px solid var(--slate-200);
  }
}

/* Móvil: comportamiento táctil nativo */
@media (max-width: 600px) {
  html, body { height: 100%; overscroll-behavior-y: none; }
  input, select, textarea { font-size: 16px; } /* evita el auto-zoom de iOS */
  button, a, .chip, .method-cell, .lang-pill, .switch .slider {
    touch-action: manipulation;
    -webkit-appearance: none; appearance: none;
  }
}

.screen { min-height: 100dvh; display: flex; flex-direction: column; position: relative; animation: fadein 0.28s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Botones ─────────────────────────────────────────────────────── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 48px; padding: 17px 16px;
  border: none; border-radius: var(--r-input);
  font: 600 16px/24px var(--font); letter-spacing: -0.011em;
  color: #fff; background: var(--orange);
  cursor: pointer; transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.985); filter: brightness(0.96); }
/* Estado deshabilitado según Figma: bg slate/200, texto slate/400 */
.btn:disabled { background: var(--slate-200); color: var(--slate-400); cursor: default; }
.btn-blue { background: var(--grad-blue); }
.btn-outline {
  background: transparent; color: var(--orange);
  border: 1px solid var(--orange);
}
.btn-ghost { background: transparent; color: var(--blue-brand); }
.btn-sm { height: 40px; padding: 10px; font-size: 14px; }

/* ── Inputs ──────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.field-label { font: 500 14px/18px var(--font); color: var(--slate-950); }
.input-wrap {
  display: flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 16px;
  background: #fff; border: 1px solid var(--slate-300); border-radius: var(--r-input);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-wrap:focus-within { border-color: var(--blue-brand); box-shadow: 0 0 0 3px rgba(0, 113, 206, 0.12); }
.input-wrap input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font: 400 14px/18px var(--font); color: var(--slate-950);
}
.input-wrap input::placeholder { color: var(--slate-400); }
/* Iconos dentro del input (lock, phone, card, calendar, question, eye):
   sin esta regla un <svg> crudo toma el tamaño por defecto 300×150px */
.input-wrap > svg {
  width: 20px; height: 20px; flex: none;
  color: var(--slate-400);
}
.input-prefix {
  display: flex; align-items: center; gap: 8px; padding-right: 8px;
  border-right: 1px solid var(--slate-300);
  font: 400 14px/18px var(--font); color: var(--slate-700); white-space: nowrap;
}
.field-help { font: 400 12px/18px var(--font); color: var(--slate-500); }

/* ── Cards / superficies ─────────────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #fff;
  border-radius: var(--r-card);
  box-shadow: var(--elev-card);
  backdrop-filter: var(--blur-card);
  -webkit-backdrop-filter: var(--blur-card);
}

/* ── Header de pantalla (back + título) ──────────────────────────── */
.screen-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
}
.screen-head h1 { font: 700 20px/1.2 var(--font); color: var(--slate-950); flex: 1; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: none; background: transparent;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--slate-950);
  transition: background 0.15s ease;
}
.icon-btn:active { background: var(--slate-100); }
.icon-btn svg { width: 24px; height: 24px; }

/* ── Chips de montos ─────────────────────────────────────────────── */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 10px 16px; border-radius: var(--r-chip);
  border: 1px solid transparent; background: var(--bg-300);
  font: 600 14px/18px var(--font); color: var(--slate-950);
  cursor: pointer; transition: all 0.15s ease;
}
.chip.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.chip:active { transform: scale(0.97); }

/* ── Utilidades ──────────────────────────────────────────────────── */
.row { display: flex; align-items: center; }
.spread { display: flex; align-items: center; justify-content: space-between; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.muted { color: var(--slate-500); }
.center { text-align: center; }
.stack16 { display: flex; flex-direction: column; gap: 16px; }
.ic { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ic svg { width: 24px; height: 24px; }

/* ── Barra de estado simulada eliminada (la app corre nativa en el teléfono) ── */

/* Pantallas internas (con header) */
.screen.inner { background: var(--bg-300); }
.inner-body { flex: 1; display: flex; flex-direction: column; gap: 24px; padding: 8px 16px 32px; }
.inner-body .lead { font: 600 16px/1.5 var(--font); letter-spacing: -0.011em; color: var(--slate-950); }
.link-btn {
  background: none; border: none; padding: 4px 0; cursor: pointer;
  font: 500 14px/18px var(--font); color: var(--blue-brand);
  text-align: center; text-decoration: none; display: block; margin: 0 auto;
}

/* ══ ONBOARDING / LOGIN ═══════════════════════════════════════════ */
.login-screen { background: var(--bg-300); }
.login-hero {
  position: absolute; top: 0; left: 0; width: 100%; height: 62%;
  object-fit: cover; object-position: center 20%;
}
.login-hero::after { content: ''; }
.login-logo {
  position: absolute; top: 24px; left: 16px; width: 40px; height: 19px; z-index: 20;
}
.login-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--surface-white);
  border: 1px solid #fff;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--elev-card);
  backdrop-filter: var(--blur-card); -webkit-backdrop-filter: var(--blur-card);
  padding: 32px 16px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
  animation: sheetup 0.45s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}
@keyframes sheetup { from { transform: translateY(60%); opacity: 0.4; } to { transform: none; opacity: 1; } }
.login-top { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 328px; }
.login-brand { display: inline-flex; align-items: center; gap: 6px; font: 900 20px/1 var(--font); color: var(--orange); }
.login-brand svg { width: 14px; height: 14px; }
.login-enter {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font: 500 14px/18px var(--font); color: var(--slate-700);
}
.login-enter .ic svg, .login-enter svg { width: 24px; height: 24px; }
.login-body { width: 100%; max-width: 328px; display: flex; flex-direction: column; gap: 24px; }
.login-copy { font: 400 14px/1.5 var(--font); color: var(--slate-700); }
.terms { font: 400 10px/1.5 var(--font); color: var(--slate-700); }
.terms-link { color: var(--slate-700); text-decoration: underline; }

/* OTP — 6 celdas, borde inferior (spec Figma) */
.otp-row { display: flex; justify-content: center; gap: 8px; }
.otp-box {
  width: 36px; height: 24px; padding: 0 0 4px; text-align: center;
  font: 600 24px/25px var(--font); color: var(--slate-950);
  background: transparent; border: none;
  border-bottom: 2px solid var(--slate-300);
  outline: none; transition: border-color 0.15s ease;
}
.otp-box:focus { border-bottom-color: var(--blue-brand); }

/* Reglas de contraseña */
.pass-rules { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pass-rules li {
  display: flex; align-items: center; gap: 8px;
  font: 400 12px/1.5 var(--font); color: var(--slate-500);
}
.pass-rules li svg { width: 16px; height: 16px; opacity: 0.25; }
.pass-rules li.ok { color: var(--slate-700); }
.pass-rules li.ok svg { opacity: 1; color: var(--green-600); }

/* Botón biométrico */
.biometric {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer;
  font: 500 14px/18px var(--font); color: var(--slate-700);
}
.biometric svg { width: 36px; height: 36px; color: var(--blue-brand); }

/* Eye toggle dentro de input */
.eye-btn { background: none; border: none; cursor: pointer; color: var(--slate-400); display: flex; padding: 4px; }
.eye-btn svg { width: 20px; height: 20px; }

/* ── Spinner de botones busy ────────────────────────────────────── */
.spin {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Geolocalización (paso Tienda) ──────────────────────────────── */
.loc-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.loc-btn svg { width: 20px; height: 20px; }
.loc-status { font: 400 12px/1.5 var(--font); color: var(--slate-500); text-align: center; }
.loc-status.ok { color: var(--green-600); font-weight: 600; }
.loc-status.err { color: #D71920; }

/* ── Skeleton (diseño Figma: huesos #F2F2F3) ────────────────────── */
.skeleton-screen { display: flex; flex-direction: column; gap: 16px; padding: 16px 16px 32px; }
.sk {
  background: var(--grad-shimmer);
  background-size: 200% 100%;
  border-radius: 100px;
  animation: shimmer 1.4s ease infinite;
  height: 14px;
}
@keyframes shimmer { 0% { background-position: 120% 0; } 100% { background-position: -80% 0; } }
.sk-nav { height: 24px; width: 60px; }
.sk-line.r { margin-left: auto; margin-top: -24px; }
.sk-card { border-radius: 16px; width: 100%; }
.sk-row { display: flex; gap: 16px; }
.sk-action { flex: 1; height: 85px; border-radius: 12px; }
.sk-block { border-radius: 12px; width: 100%; }

/* OTP relleno por autocompletado */
.otp-box.filled { animation: otpPop 0.25s ease; }
@keyframes otpPop { 0% { transform: scale(1.4); color: var(--blue-brand); } 100% { transform: none; } }
.profile-sub { display: block; font: 400 12px/1.4 var(--font); color: var(--slate-500); }

/* ══ Register / Recover: nav con barra de progreso ════════════════ */
.screen.inner.white { background: #FFFFFF; }
.register-nav {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 16px;
}
.register-nav .icon-btn { align-self: flex-start; margin-left: 8px; margin-top: 8px; }
.progress-track {
  position: relative; width: 120px; height: 4px; border-radius: 2px;
  background: var(--slate-200); overflow: hidden;
}
.progress-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--orange); border-radius: 2px; transition: width 0.3s ease; }
.page-title { font: 700 20px/1.3 var(--font); color: var(--slate-950); }
.inner-body .desc { font: 400 14px/1.5 var(--font); color: var(--slate-700); margin-top: -12px; }

/* ══ Language switch ══════════════════════════════════════════════ */
.lang-pill {
  display: inline-flex; align-items: center; gap: 2px; padding: 8px;
  background: var(--surface-400); border: none; border-radius: var(--r-pill);
  font: 600 12px/18px var(--font); color: var(--orange); cursor: pointer;
}
.lang-pill svg { width: 16px; height: 16px; }
.login-lang { position: absolute; top: 20px; right: 16px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; }
.lang-anchor { position: relative; }
.lang-menu {
  display: none; flex-direction: column; align-items: flex-end; gap: 16px;
  padding: 16px 8px; margin-top: 8px;
  background: var(--surface-400); border-radius: 12px;
  box-shadow: var(--elev-card); min-width: 99px;
}
.lang-menu.open { display: flex; }
.lang-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; cursor: pointer;
  font: 500 16px/18px var(--font); color: var(--n-800); justify-content: space-between;
}
.lang-menu button svg { width: 16px; height: 16px; color: var(--orange); }

/* ══ Home / Dashboard ═════════════════════════════════════════════ */
.home-screen { background: #F8F8FF; }
.app-header {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 12px 12px 0; position: relative; z-index: 20;
  background: #F8F8FF;
}
.app-header-row {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.header-actions { display: flex; align-items: center; gap: 6px; position: relative; }
.header-actions .icon-btn { width: 38px; height: 38px; }
.nbadge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--red); color: #fff;
  font: 700 9.5px/16px var(--font); text-align: center;
}
.home-tools { display: flex; align-items: center; padding: 2px 4px 0; }
.qr-button {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: #fff; border: none; border-radius: 10px; cursor: pointer;
  color: var(--slate-950); font: 600 12px/1 var(--font);
  box-shadow: var(--elev-card);
}
.qr-button svg { width: 22px; height: 22px; }

/* Panel de notificaciones (cae desde arriba) */
.notif-panel {
  position: absolute; top: 0; left: 0; right: 0; z-index: 60;
  background: #fff; border-radius: 0 0 20px 20px;
  box-shadow: 0 18px 50px rgba(2, 6, 24, 0.25);
  padding: 16px; max-height: 72dvh;
  overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  animation: sheetDown 0.25s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes sheetDown { from { transform: translateY(-40%); opacity: 0; } to { transform: none; opacity: 1; } }
.notif-head { display: flex; align-items: center; justify-content: space-between; }
.notif-head h3 { font: 700 18px/1.2 var(--font); }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  padding: 12px 14px; border: 1px solid var(--slate-light-300); border-radius: 12px;
  display: flex; flex-direction: column; gap: 4px; background: #fff;
}
.notif-item b { font: 600 13.5px/1.4 var(--font); }
.notif-item p { font: 400 12.5px/1.5 var(--font); color: var(--slate-600); }
.notif-item span { font: 400 11px/1.4 var(--font); color: var(--slate-400); }
.notif-item.unread { background: var(--bg-300); border-color: var(--orange); }

/* Menú hamburguesa */
.menu-sheet {
  position: absolute; top: 0; right: 0; z-index: 60;
  background: #fff; border-radius: 0 0 0 20px;
  box-shadow: 0 18px 50px rgba(2, 6, 24, 0.28);
  padding: 16px 12px 12px; width: min(300px, 84%);
  display: flex; flex-direction: column; gap: 4px;
  animation: menuIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes menuIn { from { transform: translateX(60%); opacity: 0; } to { transform: none; opacity: 1; } }
.menu-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.menu-head h3 { font: 900 16px/1 var(--font); color: var(--orange); }
.menu-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 10px;
  border-radius: 12px; color: var(--slate-950);
  font: 500 14px/1 var(--font); text-decoration: none; background: none; border: none; text-align: left; cursor: pointer;
  width: 100%;
}
.menu-item:hover { background: var(--bg-300); }
.menu-item svg { width: 22px; height: 22px; color: var(--slate-600); }
.menu-item span { flex: 1; }
.menu-item > svg:last-child { width: 18px; height: 18px; color: var(--slate-400); }
.menu-item.menu-exit { color: var(--red); }
.menu-item.menu-exit svg { color: var(--red); }

/* Botón de eliminar cuenta (botón, no swipe) */
.btn.danger-outline {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; border-radius: var(--r-input);
  background: transparent; border: 1px solid var(--red); color: var(--red);
  font: 600 14px/1 var(--font); cursor: pointer;
}
.btn.danger-outline svg { width: 18px; height: 18px; }

/* Aliado+: niveles con descuento */
.tiers { display: flex; justify-content: center; align-items: stretch; gap: 10px; padding: 8px 0; }
.tier {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; border-radius: 12px;
  border: 1px solid var(--slate-light-300); background: #fff;
  font: 600 12.5px/1.2 var(--font); color: var(--slate-950);
}
.tier hint { font: 500 11px/1 var(--font); color: var(--slate-500); }
.tier.active { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.tier.active hint { color: var(--orange); }
.brand {
  display: inline-flex; align-items: center; gap: 6px;
  font: 900 20px/1 var(--font); color: var(--orange); text-decoration: none;
}
.brand svg { width: 14px; height: 14px; }
.icon-btn.bell { color: var(--slate-950); }
.home-scroll { flex: 1; display: flex; flex-direction: column; gap: 24px; padding: 8px 16px 32px; }
/* Home: saludo con QR a la derecha (render Figma) */
.home-greet { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-hi { font: 700 20px/1.3 var(--font); color: var(--slate-950); }
.qr-button {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: #fff; border: 1px solid var(--slate-200); border-radius: 12px;
  cursor: pointer; color: var(--slate-950);
  box-shadow: var(--elev-card);
}
.qr-button svg { width: 24px; height: 24px; }

/* Card de saldo (icono + monto + chevron) */
.saldo-card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px 44px 24px 16px; text-decoration: none;
  background: #fff; border: 1px solid #F6F6F6; border-radius: var(--r-input);
  box-shadow: var(--elev-card);
}
.saldo-label { display: inline-flex; align-items: center; gap: 8px; font: 400 14px/1.5 var(--font); color: var(--slate-700); }
.saldo-ico svg { width: 18px; height: 18px; color: var(--slate-500); }
.saldo-amount { font: 500 24px/1 var(--font); color: var(--slate-950); }
.saldo-chev { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
.saldo-chev svg { width: 22px; height: 22px; color: var(--slate-400); }
.actions { display: flex; gap: 16px; }
.action-card {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 12px 16px; text-decoration: none;
  background: #FFFFFF; border: 1px solid #FFFFFF; border-radius: 12px;
  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.06);
  backdrop-filter: var(--blur-card); -webkit-backdrop-filter: var(--blur-card);
  transition: transform 0.15s ease;
}
.action-card:active { transform: scale(0.97); }
.action-card svg { width: 30px; height: 30px; }
.action-card span { font: 400 16px/24px var(--font); text-align: center; white-space: pre-line; color: var(--slate-700); }

/* Card "¡Comienza hoy!" — foto arriba + texto abajo (render Figma) */
.comienza-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: #FFFFFF; border-radius: 18.4px;
  box-shadow: var(--elev-float);
}
.comienza-bg { width: 100%; height: 152px; object-fit: cover; display: block; }
.comienza-text { display: flex; flex-direction: column; gap: 8px; padding: 14px 18px 18px; background: #fff; }
.comienza-title { font: 700 16.1px/20.7px var(--font); color: var(--slate-950); }
.comienza-sub { font: 500 13.8px/17.3px var(--font); color: var(--slate-700); }
.comienza-link {
  display: inline-flex; align-items: center; gap: 4px;
  font: 500 13.8px/17.3px var(--font); color: var(--orange); text-decoration: none;
}
.comienza-link svg { width: 18px; height: 18px; }

/* Transacciones */
.tx-section { display: flex; flex-direction: column; gap: 8px; }
.tx-header { display: flex; align-items: center; justify-content: space-between; }
.tx-header .tx-title { font: 600 14px/1.5 var(--font); color: var(--slate-950); }
.tx-see-all {
  display: inline-flex; align-items: center; gap: 4px;
  font: 400 12px/1.5 var(--font); color: var(--slate-500); text-decoration: none;
}
.tx-see-all svg { width: 16px; height: 16px; }
.tx-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; background: #fff; border: 1px solid #F6F6F6; border-radius: var(--r-input);
}
.tx-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tx-left > svg { width: 18px; height: 18px; color: var(--slate-500); flex: none; }
.tx-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tx-title { font: 400 14px/1.4 var(--font); color: var(--slate-950); }
.tx-meta { font: 400 12px/1.4 var(--font); color: var(--slate-500); }
.tx-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.tx-amount { font: 600 14px/1.4 var(--font); color: var(--slate-950); }
.tx-tax { font: 400 12px/1.4 var(--font); color: var(--slate-500); }
.empty { font: 400 14px/1.5 var(--font); color: var(--slate-400); padding: 12px 0; text-align: center; }

/* Banner Aliado+ */
.aliado-banner {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 126px; padding: 16px;
  background: #fff; border: 1px solid #fff; border-radius: var(--r-card);
  box-shadow: var(--elev-card);
}
.aliado-left { display: flex; flex-direction: column; gap: 8px; width: 158px; position: relative; z-index: 2; }
.aliado-title { font: 600 14px/1.5 var(--font); color: var(--slate-950); }
.aliado-body { font: 400 12px/1.5 var(--font); color: var(--slate-700); }
.aliado-link {
  display: inline-flex; align-items: center; gap: 4px;
  font: 500 12px/1.5 var(--font); color: var(--orange); text-decoration: none;
}
.aliado-link svg { width: 16px; height: 16px; }
.aliado-art { position: absolute; right: 0; top: 0; width: 146px; height: 126px; display: flex; align-items: center; justify-content: center; }
.aliado-art svg { width: 146px; height: 126px; }

/* ══ Perfil / Ajustes ═════════════════════════════════════════════ */
.profile-row { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 600 13.3px/1 var(--font);
}
.profile-name { font: 500 16px/1.5 var(--font); color: var(--slate-950); }
.profile-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--slate-light-300); border-radius: var(--r-card);
  background: #fff;
}
.list-item { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; gap: 8px;
  text-decoration: none; color: inherit; background: none; border: none; cursor: pointer;
  font: 400 14px/1.5 var(--font); color: var(--slate-950);
  width: 100%; text-align: left;
}
.list-row .icon-label { display: flex; align-items: center; gap: 8px; }
.icon-label svg { width: 20px; height: 20px; color: var(--slate-600); }
.list-row > svg { width: 24px; height: 24px; color: var(--slate-400); flex: none; }
.list-row > .switch { flex: none; }
.separator { align-self: stretch; height: 0; border-top: 1px solid var(--slate-light-300); margin: 0 16px; }
.logout {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  font: 500 14px/14px var(--font); color: #090909; padding: 16px; margin-top: auto;
}
.logout svg { width: 20px; height: 20px; }

/* Switch (toggle) */
.switch { position: relative; display: inline-block; width: 36px; height: 21px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 11px;
  background: var(--slate-300); transition: background 0.2s ease; cursor: pointer;
}
.switch .slider::before {
  content: ''; position: absolute; width: 17px; height: 17px; border-radius: 50%;
  left: 2px; top: 2px; background: #fff; transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.switch input:checked + .slider { background: var(--orange); }
.switch input:checked + .slider::before { transform: translateX(15px); }

/* Tarjetas mini */
.card-mini { display: flex; align-items: center; }
.brand-logo { width: 36px; height: 24px; border-radius: 9px; flex: none; display: block; box-shadow: 0 1px 3px rgba(2, 6, 24, 0.15); }
.method-logos { display: flex; gap: 4px; align-items: center; }
.method-logos .brand-logo { width: 30px; height: 20px; border-radius: 7px; }

/* QR modal */
.qr-modal { text-align: center; align-items: center; gap: 14px; max-width: 320px; }
.qr-img {
  width: 208px; height: 208px; margin: 0 auto;
  background: #fff; border-radius: 14px; padding: 8px;
  box-shadow: 0 6px 24px rgba(2, 6, 24, 0.15);
}
.qr-details { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.qr-details b { font-size: 14px; }
.qr-details span { color: var(--slate-500); font-size: 12.5px; }

/* ══ Compra / Venta ═══════════════════════════════════════════════ */
.buy-step { display: flex; flex-direction: column; gap: 8px; }
.step-label { font: 600 14px/15px var(--font); color: var(--slate-950); }
.method-row { display: flex; gap: 8px; }
.method-cell {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; min-height: 65px; padding: 8px 4px;
  background: #fff; border: 1px solid var(--slate-300); border-radius: var(--r-input);
  font: 400 14px/15px var(--font); color: var(--slate-700); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.method-cell.active { border-color: var(--blue-500); border-width: 1.5px; background: var(--grad-hero); }
.method-logos { display: flex; gap: 4px; align-items: center; }
.balance-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px; background: #F6F6F6; border-radius: var(--r-input);
  font: 500 12px/1.4 var(--font); color: var(--slate-950);
}
.balance-chip svg { width: 16px; height: 16px; color: var(--slate-500); }
.saved-row { display: flex; gap: 8px; overflow-x: auto; }
.saved-card {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  gap: 4px; min-width: 88px; height: 65px; padding: 8px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid; border-image: var(--grad-indigo) 1; border-radius: var(--r-input);
  font: 600 14px/15px var(--font); color: var(--slate-950);
}
.input-wrap.narrow { max-width: 104px; }
.input-wrap > .ic svg { width: 20px; height: 20px; color: var(--slate-400); }
.consent { display: flex; align-items: center; gap: 8px; cursor: pointer; font: 400 12px/1.5 var(--font); color: var(--slate-700); }
.consent input { display: none; }
.consent-box {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--slate-300);
  display: flex; align-items: center; justify-content: center; flex: none;
  background: #fff; color: transparent; transition: all 0.15s ease;
}
.consent-box svg { width: 13px; height: 13px; }
.consent input:checked + .consent-box { background: var(--orange); border-color: var(--orange); color: #fff; }
.tax-note { font: 400 10px/1.4 var(--font); color: var(--slate-400); }

/* ══ Modal de revisión ════════════════════════════════════════════ */
.modal-base { flex: 1; }
.page-title.pad { padding: 8px 16px; }
.scrim {
  position: absolute; inset: 0; z-index: 40;
  background: var(--slate-950); opacity: 0.8;
  animation: fadein 0.2s ease both;
}
.modal {
  position: absolute; left: 16px; right: 16px; top: 148px; z-index: 50;
  display: flex; flex-direction: column; align-items: stretch; gap: 16px;
  padding: 32px 16px 16px;
  background: #fff; border-radius: var(--r-card);
  animation: pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes pop { from { transform: translateY(24px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; }
.modal-close svg { width: 20px; height: 20px; }
.modal-icon {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin: 0 auto;
  border-radius: 50%; background: var(--grad-hero); color: var(--orange);
}
.modal-icon svg { width: 26px; height: 26px; }
.modal-title { font: 600 16px/21px var(--font); color: #09090B; text-align: center; }
.modal-copy { font: 400 14px/21px var(--font); color: var(--slate-700); text-align: center; }
.modal-table {
  display: flex; flex-direction: column; gap: 12px;
  padding: 8px 12px; border: 1px solid #E5EAF1; border-radius: var(--r-input);
}
.mt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mt-row span { font: 400 12px/1.4 var(--font); color: var(--slate-700); }
.mt-row b { font: 500 12px/1.4 var(--font); color: var(--slate-950); text-align: right; }
.mt-row.total span { font: 500 14px/1.5 var(--font); color: var(--slate-950); }
.mt-row.total b { font: 700 14px/1.5 var(--font); }

/* ══ Éxito ════════════════════════════════════════════════════════ */
.success-screen { background: #F8F8FF; padding: 0 16px 32px; }
.success-card {
  display: flex; flex-direction: column; gap: 24px;
  margin-top: 24px; padding: 24px 24px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #fff; border-radius: 16px 16px 0 0;
  box-shadow: 0px 4px 25px 0px rgba(210, 212, 249, 0.5);
  backdrop-filter: var(--blur-card); -webkit-backdrop-filter: var(--blur-card);
}
.success-top { display: flex; align-items: center; gap: 8px; justify-content: center; }
.success-check svg { width: 30px; height: 30px; }
.success-title { font: 600 16px/15px var(--font); color: var(--slate-950); }
.success-table { display: flex; flex-direction: column; gap: 12px; }
.success-actions {
  display: flex; flex-direction: column; gap: 16px;
  padding: 8px 24px 24px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #fff; border-top: none; border-radius: 0 0 16px 16px;
  backdrop-filter: var(--blur-card); -webkit-backdrop-filter: var(--blur-card);
}
.success-minis { display: flex; gap: 16px; justify-content: center; }
.mini-action {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font: 400 10px/1.4 var(--font); color: var(--slate-700);
}
.mini-action svg { width: 24px; height: 24px; color: var(--slate-700); }

/* ══ Aliado+ ═════════════════════════════════════════════════════ */
.ally-card {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  height: 80px; padding: 0 16px;
  background: var(--bg-400); border-radius: var(--r-card);
}
.ally-card-title { font: 700 20px/1.2 var(--font); color: var(--slate-950); }
.ally-card-code { font: 600 14px/1 var(--font); color: var(--slate-500); letter-spacing: 2px; }
.tiers { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 8px 0; }
.tier {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 10px/1.4 var(--font); color: var(--slate-950);
}
.tier::before { content: ''; width: 12px; height: 12px; border-radius: 50%; }
.tier.blue::before { background: var(--blue-500); }
.tier.red::before { background: #D71920; }
.tier.gold::before { background: #F5B301; }
.ally-terms-title { font: 600 14px/1.5 var(--font); color: var(--slate-950); }
.ally-terms { font: 400 12px/1.6 var(--font); color: var(--slate-500); }
.terms-text { font: 400 14px/1.6 var(--font); color: var(--slate-700); }
