/* Estilos para Pago de Reto (reto/pago.html) */


  body {
    overflow-x: hidden;
  }

  /* Estilos para estados de validación */
  .form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  }

  .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
  }

  .form-check-input.is-invalid {
    border-color: #dc3545;
  }

  .form-check-input.is-invalid:checked {
    background-color: #dc3545;
  }

  .form-check-input.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
  }

  .invalid-feedback {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
    display: none;
  }

  .was-validated .form-control:invalid~.invalid-feedback,
  .was-validated .form-check-input:invalid~.invalid-feedback,
  .is-invalid~.invalid-feedback {
    display: block;
  }

  .terms-acceptance {
    width: 100%;
    max-width: clamp(320px, 65%, 420px);
    background: rgba(226, 232, 240, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin: 1.2rem auto 0.5rem;
  }

  .terms-acceptance .custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    cursor: pointer;
    width: 100%;
  }

  .terms-acceptance .custom-checkbox__input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
    overflow: hidden;
  }

  .terms-acceptance .custom-checkbox__box {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid #000000;
    border-radius: 6px;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.4);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  }

  .terms-acceptance .custom-checkbox__box::after {
    content: '';
    width: 8px;
    height: 14px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
    transition: transform 0.15s ease;
  }

  .terms-acceptance .custom-checkbox:hover .custom-checkbox__box {
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.2);
  }

  .terms-acceptance .custom-checkbox__input:focus-visible+.custom-checkbox__box {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.32);
  }

  .terms-acceptance .custom-checkbox__input:checked+.custom-checkbox__box {
    background: #2563eb;
    border-color: #1d4ed8;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.2), 0 0 0 3px rgba(37, 99, 235, 0.25);
  }

  .terms-acceptance .custom-checkbox__input:checked+.custom-checkbox__box::after {
    transform: rotate(45deg) scale(1);
  }

  .terms-acceptance .custom-checkbox__label {
    font-size: 0.98rem;
    color: #334155;
    line-height: 1.5;
  }

  .terms-acceptance .custom-checkbox__label a {
    color: #2563eb;
    font-weight: 600;
  }

  .terms-error {
    width: 100%;
    max-width: clamp(320px, 65%, 420px);
    margin: 0.5rem auto 0;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    background: linear-gradient(90deg, #fff0f0 80%, #ffeaea 100%);
    border: 1.5px solid #f5c6cb;
    color: #b91c1c;
    font-size: 0.95rem;
    display: none;
    text-align: left;
  }

  #paypal-button-container-sesion-wrapper,
  #paypal-button-container-wrapper {
    width: 100% !important;
    max-width: 440px !important;
    margin: 0 auto !important;
    position: relative;
    box-sizing: border-box;
  }

  #paypal-button-container-sesion,
  #paypal-button-container {
    width: 100% !important;
    max-width: 440px !important;
    margin: 0 auto !important;
    min-height: 48px;
    position: relative;
    box-sizing: border-box;
  }

  .paypal-disabled,
  .paypal-disabled iframe,
  .paypal-disabled div,
  .paypal-disabled * {
    filter: grayscale(70%);
    opacity: 0.55;
    pointer-events: none !important;
  }

  #paypal-button-container-sesion:not(.paypal-disabled),
  #paypal-button-container-sesion:not(.paypal-disabled) iframe,
  #paypal-button-container-sesion:not(.paypal-disabled) div,
  #paypal-button-container-sesion:not(.paypal-disabled) * {
    pointer-events: auto !important;
  }

  .terms-action-disabled {
    opacity: 0.65;
    filter: grayscale(40%);
    transition: opacity 0.2s ease, filter 0.2s ease;
  }

  #main.reto-pago-center {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: stretch;
    background: linear-gradient(135deg, #edf2fb 0%, #f8fbff 100%);
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem);
  }

  .pago-layout {
    width: min(1280px, 100%);
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: stretch;
  }

  .pago-hero {
    grid-column: span 5;
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(56, 189, 248, 0.2), rgba(59, 130, 246, 0.18)), linear-gradient(45deg, rgba(79, 70, 229, 0.18), rgba(14, 165, 233, 0.18));
    backdrop-filter: blur(16px);
    box-shadow: 0 28px 80px rgba(79, 70, 229, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.24);
    padding: clamp(2rem, 4vw, 3.2rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #0f172a;
  }

  .pago-hero h2 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 1rem;
  }

  .pago-hero p {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.6;
    color: rgba(15, 23, 42, 0.85);
  }

  .pago-hero ul {
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.9rem;
  }

  .pago-hero li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: clamp(0.95rem, 1.3vw, 1.05rem);
    color: rgba(15, 23, 42, 0.85);
  }

  .pago-hero li i {
    color: #2563eb;
    font-size: 1.1rem;
  }

  .card.pago-card,
  .pago-card {
    grid-column: span 7;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    border-radius: 24px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: clamp(2rem, 3vw, 2.8rem);
    transition: box-shadow 0.2s;
  }

  .pago-layout .card.pago-card,
  .pago-layout .pago-card {
    max-width: none;
    margin: 0;
  }

  .card.pago-card:hover {
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
  }

  .pago-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 2vw, 1.6rem);
    text-align: center;
    margin-bottom: clamp(1rem, 2vw, 1.75rem);
  }

  .pago-header__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  .pago-header__media {
    width: clamp(108px, 12vw, 136px);
    height: clamp(108px, 12vw, 136px);
    border-radius: 30px;
    padding: 6px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.18);
  }

  .pago-header__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
  }

  .pago-header__title {
    color: #0f172a;
    text-align: center !important;
    font-size: clamp(2rem, 3vw, 2.45rem);
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.02em;
  }

  .pago-header__subtitle {
    color: #334155;
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 600;
    margin: 0;
  }

  .pago-price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 1.2rem 1.9rem;
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12);
    width: 100%;
    max-width: clamp(320px, 65%, 420px);
    font-size: 1.05rem;
  }

  .pago-price-box__label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
  }

  .pago-price-box__value {
    font-size: clamp(1.7rem, 3vw, 2.1rem);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
  }

  .pago-price-box__note {
    font-size: 0.95rem;
    opacity: 0.85;
  }

  .pago-price-box--warning {
    background: linear-gradient(140deg, rgba(251, 191, 36, 0.22), rgba(253, 230, 138, 0.3));
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #92400e;
  }

  .pago-price-box--success {
    background: linear-gradient(140deg, rgba(45, 212, 191, 0.22), rgba(129, 230, 217, 0.3));
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #0f766e;
  }

  .pago-price-box--info {
    background: linear-gradient(140deg, rgba(191, 219, 254, 0.22), rgba(165, 180, 252, 0.26));
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #1e3a8a;
  }

  .pago-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
  }

  .pago-header__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  .pago-header__media {
    width: clamp(104px, 10vw, 132px);
    height: clamp(104px, 10vw, 132px);
    border-radius: 28px;
    padding: 6px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.18);
  }

  .pago-header__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
  }

  .pago-header__title {
    color: #0f172a;
    font-size: clamp(2rem, 3vw, 2.4rem);
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.02em;
  }

  .pago-header__subtitle {
    color: #334155;
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 600;
    margin: 0;
  }

  .pago-price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.1rem 1.8rem;
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12);
    width: 100%;
    max-width: clamp(320px, 65%, 420px);
    font-size: 1.05rem;
  }

  .pago-price-box__label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
  }

  .pago-price-box__value {
    font-size: clamp(1.7rem, 3vw, 2.1rem);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
  }

  .pago-price-box__note {
    font-size: 0.95rem;
    opacity: 0.85;
  }

  .pago-price-box--warning {
    background: linear-gradient(140deg, rgba(251, 191, 36, 0.22), rgba(253, 230, 138, 0.3));
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #92400e;
  }

  .pago-price-box--success {
    background: linear-gradient(140deg, rgba(45, 212, 191, 0.22), rgba(129, 230, 217, 0.3));
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #0f766e;
  }

  .pago-price-box--info {
    background: linear-gradient(140deg, rgba(191, 219, 254, 0.22), rgba(165, 180, 252, 0.26));
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #1e3a8a;
  }

  #form-registro .form-control,
  #form-login .form-control {
    border-radius: 10px;
    font-size: 1.15rem;
    padding: 0.75rem 2.5rem 0.75rem 1.3rem;
    border: 1.5px solid #a8d4a8;
    background: linear-gradient(90deg, #f8fcf8 80%, #e8f5e8 100%);
    margin-bottom: 0.9rem;
    width: 100%;
    max-width: clamp(420px, 55vw, 540px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: auto;
  }

  #form-registro .form-control:focus,
  #form-login .form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 2px #28a74544;
    background: #f0fff0;
  }

  #form-registro label,
  #form-login label {
    font-weight: 700;
    color: #1a331a;
    margin-bottom: 0.25rem;
    display: block;
    text-align: left;
    width: 100%;
    max-width: clamp(420px, 55vw, 540px);
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.01em;
  }

  .btn-success-custom {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    border: none;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.95rem 1.6rem;
    font-size: 1.08rem;
    transition: all 0.2s ease;
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
    width: 100%;
    max-width: clamp(360px, 60vw, 480px);
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .btn-success-custom span,
  .btn-success-custom i {
    color: inherit !important;
  }

  .btn-success-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(14, 165, 233, 0.35);
  }

  .btn-success-custom:disabled {
    opacity: 0.65;
    cursor: not-allowed;
  }

  .formbg {
    width: 100%;
    max-width: clamp(500px, 60vw, 640px);
    margin: 0 auto clamp(1rem, 2.5vw, 1.8rem);
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #c3e6c3;
    box-shadow: 0 10px 32px rgba(40, 60, 40, 0.12), 0 1px 8px rgba(40, 60, 40, 0.05);
    position: relative;
    overflow: hidden;
  }

  .formbg::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(40, 167, 69, 0.08);
    top: -70px;
    right: -70px;
    z-index: 0;
  }

  .formbg::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(40, 167, 69, 0.05);
    bottom: -50px;
    left: -50px;
    z-index: 0;
  }

  .formbg>* {
    position: relative;
    z-index: 1;
  }

  #form-verificar-email.formbg {
    background: linear-gradient(120deg, rgba(248, 255, 248, 0.95) 70%, rgba(236, 248, 236, 0.95) 100%);
  }

  #form-login.formbg {
    background: linear-gradient(120deg, rgba(240, 253, 244, 0.95) 70%, rgba(224, 242, 233, 0.95) 100%);
  }

  #form-registro.formbg {
    background: linear-gradient(120deg, rgba(247, 255, 247, 0.95) 70%, rgba(227, 240, 227, 0.95) 100%);
  }

  .formbg h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.7rem);
  }

  .formbg p {
    font-size: clamp(0.92rem, 2vw, 1rem);
    line-height: 1.45;
  }

  .auth-divider {
    position: relative;
    text-align: center;
    margin: 0.4rem auto 0.6rem;
    width: 100%;
    max-width: clamp(500px, 60vw, 640px);
  }

  .auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.0), rgba(76, 175, 80, 0.35), rgba(76, 175, 80, 0.0));
    transform: translateY(-50%);
  }

  .auth-divider span {
    background: #fff;
    padding: 0 12px;
    color: #4b5563;
    font-weight: 500;
    position: relative;
  }

  .btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 1rem;
    background: rgba(229, 231, 235, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 12px;
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(30, 41, 59, 0.08);
    width: 100%;
  }

  .btn-google:hover {
    background: rgba(229, 231, 235, 0.7);
    border-color: rgba(148, 163, 184, 0.5);
  }

  .btn-email-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    background: rgba(219, 234, 254, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.32);
    border-radius: 12px;
    color: #1d4ed8;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.12);
  }

  .btn-email-toggle i {
    color: #2563eb;
    font-size: 1.1rem;
  }

  .form-icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .step-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.35rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    background: rgba(40, 167, 69, 0.12);
    color: #276749;
    margin-bottom: 12px;
  }

  .form-actions {
    display: flex;
    gap: 12px;
  }

  .form-actions button {
    flex: 1 1 auto;
    border-radius: 12px;
    min-height: 50px;
  }

  .password-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    line-height: 1;
    border-radius: 8px;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
  }

  /* Mostrar solo cuando haya texto ingresado */
  input:not(:placeholder-shown) ~ .password-toggle-btn,
  input:not(:placeholder-shown) + .password-toggle-btn,
  .password-toggle-btn.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .password-toggle-btn:hover,
  .password-toggle-btn:focus {
    color: #1e293b;
    background: rgba(0, 0, 0, 0.06);
    outline: none;
  }

  .password-toggle-btn i {
    font-size: 1.05rem;
    line-height: 1;
  }

  .form-close-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    touch-action: manipulation;
    z-index: 2;
  }

  .form-close-button:hover {
    background: rgba(15, 23, 42, 0.12);
    color: #1e293b;
  }

  #mensaje-error {
    font-size: 1.13rem;
    border-radius: 10px;
    border: 1.5px solid #e57373;
    background: linear-gradient(90deg, #fff0f0 80%, #ffeaea 100%);
    color: #b71c1c;
    margin-top: 1.1rem;
    margin-bottom: 0.5rem;
    padding: 1.05rem 1.3rem;
    text-align: center;
    max-width: 370px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 1px 6px rgba(200, 40, 40, 0.07);
  }

  .spinner-border.spinner-border-sm {
    width: 1.3rem;
    height: 1.3rem;
    border-width: 0.18em;
    margin-right: 0.6rem;
    vertical-align: middle;
    filter: drop-shadow(0 0 2px #b6c6e3);
  }

  @media (max-width: 1200px) {
    .pago-layout {
      gap: clamp(1.2rem, 2.5vw, 2.4rem);
    }

    .pago-hero {
      padding: clamp(1.8rem, 3vw, 2.6rem);
    }

    .card.pago-card {
      padding: clamp(1.8rem, 3vw, 2.5rem);
    }
  }

  @media (max-width: 992px) {
    #main.reto-pago-center {
      padding: 2.4rem 1.2rem 3rem;
    }

    .pago-layout {
      grid-template-columns: repeat(6, 1fr);
    }

    .pago-hero {
      grid-column: span 6;
    }

    .card.pago-card {
      grid-column: span 6;
    }
  }

  @media (max-width: 768px) {
    .pago-layout {
      grid-template-columns: repeat(1, 1fr);
    }

    .pago-hero {
      order: 2;
      border-radius: 20px;
      padding: 1.8rem;
    }

    .card.pago-card {
      order: 1;
      border-radius: 20px;
      padding: 1.8rem 1.4rem;
      width: 100%;
    }

    #form-registro .form-control,
    #form-login .form-control,
    #form-registro label,
    #form-login label,
    #mensaje-error {
      max-width: 100%;
    }

    .formbg {
      padding: 1.6rem 1.4rem;
      max-width: 100%;
    }

    .formbg::before,
    .formbg::after {
      opacity: 0.4;
    }

    .form-actions {
      flex-direction: column;
    }

    .form-actions button {
      width: 100%;
    }
  }

  @media (max-width: 576px) {
    body {
      font-size: 15px;
    }

    .card.pago-card {
      border-radius: 16px;
      padding: 1.6rem 1.1rem;
    }

    .formbg {
      padding: 1.4rem 1.1rem;
      border-radius: 14px;
    }

    .formbg::before {
      width: 140px;
      height: 140px;
      top: -60px;
      right: -60px;
    }

    .formbg::after {
      width: 100px;
      height: 100px;
      bottom: -40px;
      left: -40px;
    }

    .btn-google,
    .btn-email-toggle {
      min-height: 50px;
      font-size: 1rem;
    }
  }

  @media (max-width: 430px) {
    #main.reto-pago-center {
      padding: 1.8rem 0.6rem 2.6rem;
    }

    .card.pago-card {
      padding: 1.4rem 0.9rem;
    }

    .formbg {
      padding: 1.25rem 1rem;
    }

    .step-pill {
      width: 100%;
      font-size: 0.95rem;
    }

    .form-actions {
      gap: 10px;
    }
  }

  html[data-theme="dark"] #main.reto-pago-center {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    color: rgba(255, 255, 255, 0.92);
  }

  html[data-theme="dark"] .pago-layout {
    color: rgba(255, 255, 255, 0.92);
  }

  html[data-theme="dark"] .pago-hero {
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  }

  html[data-theme="dark"] .pago-hero p,
  html[data-theme="dark"] .pago-hero li {
    color: rgba(255, 255, 255, 0.78);
  }

  html[data-theme="dark"] .card.pago-card {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.92);
  }

  html[data-theme="dark"] .card.pago-card:hover {
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.62);
  }

  html[data-theme="dark"] .pago-header__title,
  html[data-theme="dark"] .pago-header__subtitle {
    color: rgba(255, 255, 255, 0.92);
  }

  html[data-theme="dark"] .pago-header__badge {
    background: rgba(59, 130, 246, 0.18);
    color: rgba(191, 219, 254, 0.95);
  }

  html[data-theme="dark"] .pago-price-box {
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.45);
  }

  html[data-theme="dark"] .pago-price-box--warning {
    background: linear-gradient(140deg, rgba(234, 179, 8, 0.18), rgba(251, 191, 36, 0.14));
    border-color: rgba(234, 179, 8, 0.38);
    color: rgba(253, 230, 138, 0.92);
  }

  html[data-theme="dark"] .pago-price-box--success {
    background: linear-gradient(140deg, rgba(16, 185, 129, 0.18), rgba(45, 212, 191, 0.12));
    border-color: rgba(16, 185, 129, 0.34);
    color: rgba(167, 243, 208, 0.92);
  }

  html[data-theme="dark"] .pago-price-box--info {
    background: linear-gradient(140deg, rgba(59, 130, 246, 0.18), rgba(99, 102, 241, 0.14));
    border-color: rgba(99, 102, 241, 0.30);
    color: rgba(191, 219, 254, 0.92);
  }

  html[data-theme="dark"] .terms-acceptance {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(255, 255, 255, 0.12);
  }

  html[data-theme="dark"] .terms-acceptance .custom-checkbox__label {
    color: rgba(255, 255, 255, 0.86);
  }

  html[data-theme="dark"] .terms-acceptance .custom-checkbox__label a {
    color: rgba(125, 211, 252, 0.95);
  }

  html[data-theme="dark"] .terms-acceptance .custom-checkbox__box {
    border-color: rgba(255, 255, 255, 0.75);
    background: rgba(2, 6, 23, 0.75);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.55);
  }

  html[data-theme="dark"] .terms-acceptance .custom-checkbox:hover .custom-checkbox__box {
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
  }

  html[data-theme="dark"] .terms-error {
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.34) 80%, rgba(127, 29, 29, 0.26) 100%);
    border-color: rgba(248, 113, 113, 0.55);
    color: rgba(254, 202, 202, 0.95);
  }

  html[data-theme="dark"] .formbg {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.55), 0 1px 10px rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.92);
  }

  html[data-theme="dark"] #form-verificar-email.formbg,
  html[data-theme="dark"] #form-login.formbg,
  html[data-theme="dark"] #form-registro.formbg {
    background: rgba(15, 23, 42, 0.92);
  }

  html[data-theme="dark"] #form-registro label,
  html[data-theme="dark"] #form-login label {
    color: rgba(255, 255, 255, 0.88);
  }

  html[data-theme="dark"] #form-registro .form-control,
  html[data-theme="dark"] #form-login .form-control {
    background: rgba(2, 6, 23, 0.45);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
  }

  html[data-theme="dark"] #form-registro .form-control:focus,
  html[data-theme="dark"] #form-login .form-control:focus {
    border-color: rgba(34, 197, 94, 0.55);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.20);
    background: rgba(2, 6, 23, 0.55);
  }

  html[data-theme="dark"] .btn-google {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.90);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }

  html[data-theme="dark"] .btn-google:hover {
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(255, 255, 255, 0.22);
  }

  html[data-theme="dark"] .btn-email-toggle {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(99, 102, 241, 0.26);
    color: rgba(191, 219, 254, 0.92);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
  }

  html[data-theme="dark"] .btn-email-toggle i {
    color: rgba(125, 211, 252, 0.95);
  }

  html[data-theme="dark"] .auth-divider span {
    background: rgba(15, 23, 42, 0.92);
    color: rgba(255, 255, 255, 0.62);
  }

  html[data-theme="dark"] .password-toggle-btn {
    color: rgba(255, 255, 255, 0.62);
  }

  html[data-theme="dark"] .password-toggle-btn:hover,
  html[data-theme="dark"] .password-toggle-btn:focus {
    background: rgba(148, 163, 184, 0.16);
    color: rgba(255, 255, 255, 0.86);
  }

  html[data-theme="dark"] .form-close-button {
    background: rgba(148, 163, 184, 0.12);
    color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  }

  html[data-theme="dark"] .form-close-button:hover {
    background: rgba(148, 163, 184, 0.18);
    color: rgba(255, 255, 255, 0.92);
  }

  html[data-theme="dark"] a[style*="color: #2878a7"],
  html[data-theme="dark"] a[style*="color:#2878a7"] {
    color: rgba(125, 211, 252, 0.95) !important;
  }

  html[data-theme="dark"] #mensaje-error,
  html[data-theme="dark"] #mensaje-error-login,
  html[data-theme="dark"] #mensaje-error-registro,
  html[data-theme="dark"] .form-check .invalid-feedback.alert.alert-danger {
    color: rgba(255, 255, 255, 0.92) !important;
    background-color: rgba(127, 29, 29, 0.28) !important;
    border-color: rgba(248, 113, 113, 0.55) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55) !important;
  }

  html[data-theme="dark"] .alert.alert-info[style*="color: #2563eb"],
  html[data-theme="dark"] .alert.alert-info[style*="color:#2563eb"] {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.24) !important;
    color: rgba(191, 219, 254, 0.92) !important;
  }

  html[data-theme="dark"] div[style*="color:#888"],
  html[data-theme="dark"] div[style*="color: #888"],
  html[data-theme="dark"] span[style*="color:#888"],
  html[data-theme="dark"] span[style*="color: #888"] {
    color: rgba(255, 255, 255, 0.62) !important;
  }

  html[data-theme="dark"] div[style*="color:#444"],
  html[data-theme="dark"] div[style*="color: #444"] {
    color: rgba(255, 255, 255, 0.78) !important;
  }

  :root {
    --sesion-alert-bg: #ffffff;
    --sesion-alert-border: #004ffa;
    --sesion-alert-color: #000000;
  }

  html[data-theme="dark"] {
    --sesion-alert-bg: #172554;
    --sesion-alert-border: #1e3a8a;
    --sesion-alert-color: #93c5fd;
  }

  .sesion-alert {
    background-color: var(--sesion-alert-bg) !important;
    border: 1px solid var(--sesion-alert-border) !important;
    color: var(--sesion-alert-color) !important;
  }

  html[data-theme="dark"] .sesion-alert {
    background-color: var(--sesion-alert-bg) !important;
    border: 1px solid var(--sesion-alert-border) !important;
    color: var(--sesion-alert-color) !important;
  }


/* Pestañas de Autenticación en Pago (Ultra-Responsive Segmented Control) */
.auth-tabs-container {
  display: flex;
  position: relative;
  background: rgba(241, 245, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 5px;
  border-radius: 16px;
  gap: 6px;
  border: 1px solid rgba(203, 213, 225, 0.6);
  margin-bottom: 1.25rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.01em;
  position: relative;
  user-select: none;
  min-width: 0; /* Prevents overflow in flexbox children */
}

.auth-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
  transition: all 0.25s ease;
  flex-shrink: 0;
  font-size: 0.88rem;
}

.auth-tab-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-tab-btn:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.6);
}

.auth-tab-btn:hover .auth-tab-icon {
  background: rgba(47, 102, 133, 0.15);
  color: #2f6685;
  transform: scale(1.05);
}

.auth-tab-btn:active {
  transform: scale(0.98);
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #2f6685;
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 14px rgba(47, 102, 133, 0.14), 0 2px 4px rgba(0, 0, 0, 0.04);
  font-weight: 700;
}

.auth-tab-btn.active .auth-tab-icon {
  background: #2f6685;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(47, 102, 133, 0.3);
}

.auth-tab-btn:disabled,
.auth-tab-btn.terms-action-disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: none;
  filter: grayscale(40%);
}

.auth-tabs-container.terms-action-disabled {
  opacity: 0.65;
}

/* Modo Oscuro */
html[data-theme="dark"] .auth-tabs-container {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(51, 65, 85, 0.6);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .auth-tab-btn {
  color: rgba(148, 163, 184, 0.85);
}

html[data-theme="dark"] .auth-tab-icon {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(148, 163, 184, 0.85);
}

html[data-theme="dark"] .auth-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .auth-tab-btn:hover .auth-tab-icon {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

html[data-theme="dark"] .auth-tab-btn.active {
  background: rgba(30, 41, 59, 0.95);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(56, 189, 248, 0.15);
}

html[data-theme="dark"] .auth-tab-btn.active .auth-tab-icon {
  background: #38bdf8;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}

/* Responsividad para pantallas pequeñas */
@media (max-width: 480px) {
  .auth-tabs-container {
    padding: 4px;
    gap: 4px;
    border-radius: 14px;
  }

  .auth-tab-btn {
    padding: 8px 8px;
    font-size: 0.84rem;
    gap: 6px;
    border-radius: 10px;
  }

  .auth-tab-icon {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    border-radius: 6px;
  }
}

@media (max-width: 360px) {
  .auth-tab-btn {
    padding: 7px 4px;
    font-size: 0.78rem;
    gap: 4px;
  }

  .auth-tab-icon {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
  }
}

/* Accesibilidad: Reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    body.user-reduced-motion *, body.user-reduced-motion ::before, body.user-reduced-motion ::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Estilo estandarizado del cuadro de procesamiento de pago */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.processing-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
  margin: 0.75rem 0;
}

.processing-message .processing-spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 0.2em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

html[data-theme="dark"] .processing-message {
  background: rgba(37, 99, 235, 0.22) !important;
  color: rgba(191, 219, 254, 0.95) !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

