  /* ── Toast ───────────────────────────────────── */
  .l-toast {
    background: rgba(10,10,10,0.92);
    color: var(--text);
    border: 1.5px solid var(--gold);
    position: fixed;
    left: 50%;
    top: 32px;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 14px 28px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 32px 0 rgba(0,0,0,0.18);
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(.4,1,.3,1);
    pointer-events: none;
  }
  .l-toast__icon {
    font-size: 20px;
    display: flex;
    align-items: center;
  }
  .l-toast__msg {
    flex: 1;
    color: inherit;
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --gold:      #d4af37;
    --gold-dark: #b8962e;
    --text:      #f0ece4;
    --text-dim:  rgba(240,236,228,0.45);
    --bg:        #06080b;
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  }

  html, body {
    height: 100%; background: var(--bg); color: var(--text);
    overflow: hidden; -webkit-font-smoothing: antialiased;
  }

  /* ── Background ─────────────────────────────── */
  .l-bg {
    position: fixed; inset: 0; z-index: 0; overflow: hidden;
    background: radial-gradient(ellipse at 20% 10%, rgba(212,175,55,0.1) 0%, transparent 55%),
                radial-gradient(ellipse at 85% 85%, rgba(90,70,200,0.07) 0%, transparent 50%),
                #06080b;
  }
  .l-bg__orb {
    position: absolute; border-radius: 50%;
    filter: blur(90px); pointer-events: none; will-change: transform;
  }
  .l-bg__orb--a {
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(212,175,55,0.22) 0%, transparent 70%);
    top: -200px; left: -160px;
    animation: orbA 10s ease-in-out infinite;
  }
  .l-bg__orb--b {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(100,80,220,0.1) 0%, transparent 70%);
    bottom: -120px; right: -100px;
    animation: orbB 14s ease-in-out infinite;
  }
  @keyframes orbA {
    0%,100% { transform: translate(0,0) scale(1); }
    40%     { transform: translate(40px,-28px) scale(1.07); }
  }
  @keyframes orbB {
    0%,100% { transform: translate(0,0) scale(1); }
    50%     { transform: translate(-30px,18px) scale(1.1); }
  }

  /* ── Wrapper ─────────────────────────────────── */
  .l-wrap {
    position: relative; z-index: 1;
    height: 100%; max-width: 430px; margin: 0 auto;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: max(env(safe-area-inset-top,24px),24px) 28px
             max(env(safe-area-inset-bottom,24px),24px);
    overflow-y: auto;
  }

  /* ── Logo ────────────────────────────────────── */
  .l-logo {
    margin-bottom: 40px; flex-shrink: 0;
    animation: logoReveal 0.9s cubic-bezier(0.16,1,0.3,1) 0.2s both,
               logoBreath 4s ease-in-out 1.2s infinite;
  }
  .l-logo img { width: 148px; height: auto; display: block; }

  @keyframes logoReveal {
    from { opacity: 0; transform: scale(0.82) translateY(-12px); filter: blur(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
  }
  @keyframes logoBreath {
    0%,100% { filter: drop-shadow(0 0 12px rgba(212,175,55,0.18)); }
    50%     { filter: drop-shadow(0 0 36px rgba(212,175,55,0.55)); }
  }

  /* ── Card ────────────────────────────────────── */
  .l-card {
    width: 100%;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 24px; padding: 30px 24px 26px;
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    flex-shrink: 0;
  }
  #viewLogin  { animation: cardReveal 0.8s cubic-bezier(0.16,1,0.3,1) 0.5s both; }
  #viewRegister { animation: cardReveal 0.35s cubic-bezier(0.16,1,0.3,1) both; }
  @keyframes cardReveal {
    from { opacity: 0; transform: translateY(28px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* Views hidden/shown */
  .l-view { display: none; }
  .l-view.is-active { display: block; }

  /* ── Card header ─────────────────────────────── */
  .l-card__title {
    font-size: 22px; font-weight: 800; color: var(--text);
    margin-bottom: 4px; line-height: 1.1; text-align: center;
  }
  .l-card__sub {
    font-size: 13px; color: var(--text-dim);
    margin-bottom: 26px; text-align: center;
  }

  /* Back link (register → login) */
  .l-back-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; color: var(--text-dim);
    background: none; border: none; cursor: pointer;
    padding: 0; margin-bottom: 18px;
    font-family: inherit; transition: color 200ms;
    -webkit-tap-highlight-color: transparent;
  }
  .l-back-link:hover { color: var(--gold); }

  /* ── Fields ──────────────────────────────────── */
  .l-field { position: relative; margin-bottom: 16px; }

  .l-field__label {
    display: block; font-size: 10px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-dim); margin-bottom: 7px;
    transition: color 280ms;
  }
  .l-field.is-active .l-field__label { color: var(--gold); }

  .l-field__inner {
    display: flex; align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 14px; padding: 0 14px; height: 52px;
    transition: border-color 280ms, background 280ms, box-shadow 280ms;
    position: relative; overflow: hidden;
  }
  /* Gold underline on focus */
  .l-field__inner::after {
    content: ''; position: absolute; bottom: 0; left: 50%; right: 50%;
    height: 2px; background: var(--gold); border-radius: 0 0 2px 2px;
    transition: left 280ms cubic-bezier(0.16,1,0.3,1),
                right 280ms cubic-bezier(0.16,1,0.3,1);
  }
  .l-field.is-active .l-field__inner::after { left: 0; right: 0; }
  .l-field.is-active .l-field__inner {
    border-color: rgba(212,175,55,0.5);
    background: rgba(212,175,55,0.05);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
  }
  .l-field.is-filled .l-field__inner { border-color: rgba(212,175,55,0.25); }

  .l-field__icon {
    font-size: 15px; color: var(--text-dim);
    margin-right: 10px; transition: color 280ms; flex-shrink: 0;
  }
  .l-field.is-active .l-field__icon { color: var(--gold); }

  .l-field__input {
    flex: 1; background: none; border: none; outline: none;
    font-family: inherit; font-size: 15px; font-weight: 500;
    color: var(--text); caret-color: var(--gold);
  }
  .l-field__input::placeholder { color: rgba(240,236,228,0.2); }

  .l-eye {
    background: none; border: none; outline: none; cursor: pointer;
    font-size: 16px; color: var(--text-dim); padding: 6px;
    transition: color 200ms; flex-shrink: 0;
  }
  .l-eye:hover { color: var(--gold); }

  /* Typewriter shimmer */
  .l-field__inner.is-typing::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.08), transparent);
    animation: fieldSweep 0.75s ease forwards;
  }
  @keyframes fieldSweep {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
  }

  /* ── Forgot ──────────────────────────────────── */
  .l-forgot {
    display: block; text-align: right; margin-bottom: 0px;
    font-size: 12px; color: var(--text-dim);
    text-decoration: none; transition: color 200ms;
  }
  .l-forgot:hover { color: var(--gold); }

  /* ── Primary button ──────────────────────────── */
  .l-btn {
    width: 100%; height: 54px; border-radius: 16px;
    background: linear-gradient(135deg, #d4af37 0%, #b8962e 100%);
    border: none; outline: none; cursor: pointer;
    font-family: inherit; font-size: 15px; font-weight: 700;
    color: #0a0c0f; position: relative; overflow: hidden;
    transition: transform 150ms, box-shadow 280ms, opacity 280ms;
    opacity: 0.35; pointer-events: none;
  }
  .l-btn.is-ready {
    opacity: 1; pointer-events: all;
    box-shadow: 0 4px 22px rgba(212,175,55,0.38);
    animation: btnGlow 2.5s ease-in-out infinite;
  }
  @keyframes btnGlow {
    0%,100% { box-shadow: 0 4px 22px rgba(212,175,55,0.38); }
    50%     { box-shadow: 0 4px 36px rgba(212,175,55,0.62); }
  }
  .l-btn.is-ready:active { transform: scale(0.96); animation: none; box-shadow: 0 2px 8px rgba(212,175,55,0.2); }
  .l-btn.is-loading      { pointer-events: none; animation: none; }
  .l-btn::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(255,255,255,0.18); opacity: 0; transition: opacity 300ms;
  }
  .l-btn:active::before { opacity: 1; }

  .l-btn__text { transition: opacity 200ms; display: block; }
  .l-btn.is-loading .l-btn__text { opacity: 0; }

  .l-btn__dots {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    opacity: 0; transition: opacity 200ms 100ms;
  }
  .l-btn.is-loading .l-btn__dots { opacity: 1; }
  .l-btn__dots span {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(10,12,15,0.7);
    animation: dotWave 0.9s ease-in-out infinite;
  }
  .l-btn__dots span:nth-child(2) { animation-delay: 0.15s; }
  .l-btn__dots span:nth-child(3) { animation-delay: 0.30s; }
  @keyframes dotWave {
    0%,80%,100% { transform: translateY(0) scale(0.7); opacity: 0.5; }
    40%         { transform: translateY(-5px) scale(1); opacity: 1; }
  }

  /* ── Divider "o" ─────────────────────────────── */
  .l-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0 16px;
  }
  .l-divider::before, .l-divider::after {
    content: ''; flex: 1; height: 1px;
    background: rgba(255,255,255,0.07);
  }
  .l-divider span {
    font-size: 11px; color: var(--text-dim);
    white-space: nowrap;
  }

  /* ── Ghost button (Registrarse) ──────────────── */
  .l-btn-ghost {
    width: 100%; height: 50px; border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.1);
    outline: none; cursor: pointer;
    font-family: inherit; font-size: 14px; font-weight: 600;
    color: rgba(240,236,228,0.7);
    transition: background 200ms, border-color 200ms, color 200ms, transform 120ms;
    -webkit-tap-highlight-color: transparent;
  }
  .l-btn-ghost:hover  { border-color: rgba(212,175,55,0.4); color: var(--gold); background: rgba(212,175,55,0.05); }
  .l-btn-ghost:active { transform: scale(0.97); }

  /* ── Success state (after register) ─────────────── */
  .l-success {
    display: none; flex-direction: column; align-items: center;
    text-align: center; padding: 12px 0 4px;
  }
  .l-success.is-active { display: flex; animation: cardReveal 0.4s ease both; }
  .l-success__check {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(212,175,55,0.12);
    border: 2px solid rgba(212,175,55,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: var(--gold);
    margin-bottom: 16px;
    animation: checkPop 0.5s cubic-bezier(0.16,1,0.3,1) both;
  }
  @keyframes checkPop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
  }
  .l-success__title {
    font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 6px;
  }
  .l-success__text {
    font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-bottom: 24px;
  }

  /* ── Page exit ───────────────────────────────── */
  .l-transition {
    position: fixed; inset: 0; z-index: 100;
    background: #06080b; opacity: 0; pointer-events: none;
    transition: opacity 0.45s ease;
  }
  .l-transition.is-visible { opacity: 1; pointer-events: all; }
  body.is-exiting .l-wrap {
    animation: pageOut 0.45s ease forwards;
  }
  @keyframes pageOut {
    to { opacity: 0; transform: scale(1.04) translateY(-10px); filter: blur(5px); }
  }