    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    :root {
      --blue-deep: #1a3a8f;
      --blue-mid: #1e50c8;
      --blue-vivid: #2563eb;
      --blue-light: #3b82f6;
      --blue-pale: #dbeafe;
      --white: #ffffff;
      --gray-100: #f1f5f9;
      --gray-300: #cbd5e1;
      --gray-500: #64748b;
      --gray-700: #334155;
      --gray-900: #0f172a;
      --radius: 20px;
      --shadow: 0 25px 60px rgba(30, 80, 200, 0.25);
    }

    body {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #0d1f5c 0%, #1a3a8f 40%, #1e50c8 100%);
      font-family: 'DM Sans', sans-serif;
      padding: 20px;
      position: relative;
      /* CAMBIO 1: Eliminado overflow: hidden y añadido overflow-y: auto */
      overflow-y: auto;
    }

    #tech-bg {
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
    }

    .card {
      position: relative;
      z-index: 1;
    }

    /* Card */
    .card {
      display: flex;
      width: 100%;
      max-width: 860px;
      min-height: 520px;
      /* CAMBIO 2: Añadido max-height para controlar el desbordamiento */
      max-height: 90vh;
      background: var(--white);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: var(--shadow);
      position: relative;
      animation: fadeUp .5s cubic-bezier(.22, 1, .36, 1) both;
    }

    /* LEFT PANEL */
    .left {
      flex: 0 0 42%;
      background: linear-gradient(145deg, #1e50c8 0%, #1a3a8f 100%);
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 48px 40px;
    }

    .blob {
      position: absolute;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.12);
    }

    .blob-1 {
      width: 260px;
      height: 260px;
      bottom: -80px;
      left: -60px;
    }

    .blob-2 {
      width: 150px;
      height: 150px;
      bottom: 60px;
      left: 100px;
      background: rgba(255, 255, 255, 0.08);
    }

    .blob-3 {
      width: 120px;
      height: 120px;
      top: -40px;
      right: -30px;
    }

    .blob-4 {
      width: 70px;
      height: 70px;
      top: 80px;
      right: 20px;
      background: rgba(255, 255, 255, 0.18);
    }

    .left h1 {
      font-family: 'Nunito', sans-serif;
      font-weight: 900;
      font-size: 2.4rem;
      color: var(--white);
      letter-spacing: 2px;
      text-transform: uppercase;
      line-height: 1.1;
      position: relative;
      z-index: 1;
    }

    .left h2 {
      font-family: 'Nunito', sans-serif;
      font-weight: 700;
      font-size: 0.95rem;
      color: rgba(255, 255, 255, 0.7);
      letter-spacing: 3px;
      text-transform: uppercase;
      margin-top: 8px;
      position: relative;
      z-index: 1;
    }

    .left p {
      color: rgba(255, 255, 255, 0.65);
      font-size: 0.85rem;
      line-height: 1.7;
      margin-top: 20px;
      position: relative;
      z-index: 1;
    }

    /* RIGHT PANEL */
    .right {
      flex: 1;
      padding: 48px 44px;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    /* Tab switcher */
    .tabs {
      display: flex;
      gap: 0;
      border-bottom: 2px solid var(--gray-100);
      margin-bottom: 28px;
    }

    .tab-btn {
      flex: 1;
      background: none;
      border: none;
      font-family: 'Nunito', sans-serif;
      font-weight: 800;
      font-size: 1.3rem;
      color: var(--gray-300);
      padding: 0 0 14px;
      cursor: pointer;
      position: relative;
      transition: color .25s;
    }

    .tab-btn::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 0;
      right: 0;
      height: 3px;
      background: var(--blue-vivid);
      border-radius: 2px;
      transform: scaleX(0);
      transition: transform .25s;
    }

    .tab-btn.active {
      color: var(--gray-900);
    }

    .tab-btn.active::after {
      transform: scaleX(1);
    }

    /* Form panels */
    .form-panel {
      display: none;
    }

    .form-panel.active {
      display: block;
    }

    .subtitle {
      font-size: 0.82rem;
      color: var(--gray-500);
      margin-bottom: 24px;
    }

    /* Inputs */
    .input-group {
      position: relative;
      margin-bottom: 16px;
    }

    .input-group .icon {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--gray-500);
      font-size: 1.05rem;
      pointer-events: none;
    }

    .input-group input {
      width: 100%;
      padding: 13px 44px 13px 42px;
      border: 1.5px solid var(--gray-100);
      border-radius: 10px;
      background: var(--gray-100);
      font-family: 'DM Sans', sans-serif;
      font-size: 0.9rem;
      color: var(--gray-700);
      outline: none;
      transition: border-color .2s, background .2s;
    }

    .input-group input::placeholder {
      color: var(--gray-500);
    }

    .input-group input:focus {
      border-color: var(--blue-light);
      background: #f0f6ff;
    }

    .show-toggle {
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      font-size: 0.75rem;
      font-weight: 700;
      color: var(--blue-vivid);
      cursor: pointer;
      letter-spacing: 0.5px;
    }

    /* Remember / Forgot */
    .row-check {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin: 6px 0 22px;
    }

    .remember {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.82rem;
      color: var(--gray-500);
      cursor: pointer;
    }

    .remember input[type="checkbox"] {
      width: 16px;
      height: 16px;
      accent-color: var(--blue-vivid);
      cursor: pointer;
    }

    .forgot {
      font-size: 0.82rem;
      color: var(--blue-vivid);
      text-decoration: none;
      font-weight: 600;
      transition: color .2s;
    }

    .forgot:hover {
      color: var(--blue-deep);
    }

    /* Buttons */
    .btn-primary {
      width: 100%;
      padding: 14px;
      background: linear-gradient(90deg, var(--blue-deep) 0%, var(--blue-vivid) 100%);
      color: var(--white);
      border: none;
      border-radius: 10px;
      font-family: 'Nunito', sans-serif;
      font-weight: 800;
      font-size: 1rem;
      letter-spacing: 0.5px;
      cursor: pointer;
      transition: opacity .2s, transform .15s;
    }

    .btn-primary:hover {
      opacity: .9;
      transform: translateY(-1px);
    }

    .btn-primary:active {
      transform: translateY(0);
    }

    .divider {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 16px 0;
      font-size: 0.78rem;
      color: var(--gray-300);
    }

    .divider::before,
    .divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--gray-100);
    }

    .btn-outline {
      width: 100%;
      padding: 13px;
      background: transparent;
      color: var(--gray-700);
      border: 1.5px solid var(--gray-300);
      border-radius: 10px;
      font-family: 'Nunito', sans-serif;
      font-weight: 700;
      font-size: 0.95rem;
      cursor: pointer;
      transition: border-color .2s, color .2s, transform .15s;
    }

    .btn-outline:hover {
      border-color: var(--blue-vivid);
      color: var(--blue-vivid);
      transform: translateY(-1px);
    }

    .switch-text {
      text-align: center;
      font-size: 0.82rem;
      color: var(--gray-500);
      margin-top: 18px;
    }

    .switch-text a {
      color: var(--blue-vivid);
      font-weight: 700;
      text-decoration: none;
      cursor: pointer;
    }

    .switch-text a:hover {
      text-decoration: underline;
    }

    /* Toast */
    .toast {
      position: fixed;
      bottom: 30px;
      left: 50%;
      transform: translateX(-50%) translateY(80px);
      background: #22c55e;
      color: #fff;
      padding: 12px 28px;
      border-radius: 40px;
      font-weight: 700;
      font-size: 0.9rem;
      box-shadow: 0 8px 24px rgba(34, 197, 94, .35);
      transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
      z-index: 999;
      pointer-events: none;
    }

    .toast.show {
      transform: translateX(-50%) translateY(0);
    }

    /* Animate card in */
    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* ── RESPONSIVE CON SCROLL FIX ── */
    @media (max-width: 680px) {
      /* CAMBIO 3: Ajustes para móviles */
      body {
        align-items: flex-start;
        padding: 20px 20px 40px;
      }
      
      .card {
        flex-direction: column;
        max-width: 440px;
        max-height: none;
        /* CAMBIO: Permitir scroll en la tarjeta en móviles */
        overflow-y: auto;
        margin: 20px 0;
      }

      .left {
        flex: none;
        min-height: 180px;
        padding: 36px 32px 48px;
        border-radius: 0;
        overflow: visible;
      }

      .left h1 {
        font-size: 2rem;
      }

      .blob-1 {
        width: 180px;
        height: 180px;
        bottom: -50px;
        left: -40px;
      }

      .blob-2 {
        width: 100px;
        height: 100px;
        bottom: 30px;
        left: 80px;
      }

      .blob-3 {
        width: 90px;
        height: 90px;
      }

      .right {
        padding: 36px 28px;
        /* CAMBIO: Scroll solo en la parte derecha si es necesario */
        overflow-y: auto;
      }
    }

    @media (max-width: 360px) {
      .right {
        padding: 28px 18px;
      }

      .tab-btn {
        font-size: 1.1rem;
      }
    }
