.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 26px;
}

/* Botón primario: Iniciar sesión */
.btn-primary {
    width: 100%;
    padding: 14px 18px;
    background: var(--accent);
    color: #020617;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 12px 28px rgba(0, 209, 255, 0.35);
}

.btn-primary:hover {
    background: #33dcff;
    transform: translateY(-2px);
    opacity: 0.97;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(0, 209, 255, 0.32);
}

/* Botón secundario: Crear cuenta */
.btn-secondary {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-weight: 500;
    font-size: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}



/* ===== Modal Crear Cuenta ===== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    display: none;
    /* se muestra con .is-open */
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 50;
}

.modal-backdrop.is-open {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 480px;
    background: radial-gradient(circle at top left, #15192a 0, #050814 55%, #020308 100%);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.26);
    padding: 18px 18px 16px;
    color: var(--text);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
    background: rgba(148, 163, 184, 0.16);
    color: #e5e7eb;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}


/* Footer de Auth en columna */
.modal-footer-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.full-width {
    width: 100%;
}

/* Enlaces de cambio de modo */
.auth-switch-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.text-muted {
    color: #9ca3af;
}

.btn-link-accent {
    background: none;
    border: none;
    color: var(--accent);
    /* Cyan */
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    font-size: 13px;
}

.btn-link-accent:hover {
    text-decoration: underline;
    color: #fff;
}

/* Header del campo (Label + Link Olvido) */
.field-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.btn-link-small {
    background: none;
    border: none;
    color: #64748b;
    /* Gris más oscuro */
    font-size: 11px;
    cursor: pointer;
}

.btn-link-small:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Campos de formulario */

.field {
    text-align: left;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.field-input {
    width: 100%;
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.85);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field-input::placeholder {
    color: rgba(148, 163, 184, 0.7);
}

.field-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(0, 209, 255, 0.45);
    background: rgba(15, 23, 42, 0.96);
}



/* Select estilizado para País */

.field-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 30px;
    background-image: linear-gradient(45deg, transparent 50%, rgba(148, 163, 184, 0.9) 50%),
        linear-gradient(135deg, rgba(148, 163, 184, 0.9) 50%, transparent 50%);
    background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.field-select:invalid {
    color: rgba(148, 163, 184, 0.8);
}




.field-helper {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

.password-meta {
    margin-top: 4px;
}

/* Fuerza de contraseña */

.password-strength {
    margin-top: 6px;
}

.password-strength-label {
    font-size: 11px;
    color: var(--muted);
    display: block;
    margin-bottom: 4px;
}

.password-strength-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.9);
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: #ef4444;
    /* rojo débil por defecto */
    transition: width 0.2s ease, background 0.2s ease;
}

/* Estados de fuerza */
.password-strength-low .password-strength-fill {
    width: 33%;
    background: #ef4444;
}

.password-strength-medium .password-strength-fill {
    width: 66%;
    background: #f59e0b;
}

.password-strength-high .password-strength-fill {
    width: 100%;
    background: #22c55e;
}

/* Footer modal */

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* Wrapper para inputs con botón de acción (ver contraseña) */
.field-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.field-input-wrapper .field-input {
    padding-right: 80px;
    /* espacio para el botón "Ver" */
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.password-toggle:hover {
    background: rgba(148, 163, 184, 0.16);
    color: #e5e7eb;
}

.username-status {
    margin-top: 4px;
    font-size: 11px;
}

.username-status--checking {
    color: #9ca3af;
    /* gris */
}

.username-status--ok {
    color: #22c55e;
    /* verde */
}

.username-status--error {
    color: #f97316;
    /* naranja/rojo suave */
}

/* Contenedor input + botón "Ver" */
.field-input-with-toggle {
    position: relative;
    display: flex;
    align-items: center;
}

.field-input-with-toggle .field-input {
    padding-right: 70px;
    /* espacio para el botón Ver */
}

/* =========================================
   BOTÓN FLOTANTE DE WHATSAPP (SOPORTE)
   ========================================= */
.wa-float-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    /* Por encima de todo */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: wa-pulse 3s infinite;
}

.wa-float-btn:hover {
    transform: scale(1.1);
    background-color: #20bd5a;
}

.wa-float-btn svg {
    width: 35px;
    height: 35px;
    fill: white;
}

/* Tooltip (Texto al pasar el mouse) */
.wa-float-btn::before {
    content: "Línea de Soporte";
    position: absolute;
    right: 70px;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wa-float-btn:hover::before {
    opacity: 1;
}

@keyframes wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Ajuste para que no tape contenido en móvil */
@media (max-width: 640px) {
    .wa-float-btn {
        width: 50px;
        height: 50px;
        bottom: 10px;
        right: 5px;
    }

    .wa-float-btn svg {
        width: 28px;
        height: 28px;
    }
}


/* Botón Descargar App (Estilo Premium) */
.btn-install-pwa {
    display: none;
    /* Oculto por defecto, JS lo activa */
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: transform 0.2s;
    margin-top: 10px;
    /* Separación si está en auth */
    width: 100%;
    justify-content: center;
}

.btn-install-pwa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* Modal Instrucciones iOS (Toast inferior) */
.ios-prompt {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 360px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    z-index: 10000;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: slideUp 0.3s ease-out;
}

.ios-prompt p {
    font-size: 13px;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.ios-icon {
    display: inline-block;
    vertical-align: middle;
    margin: 0 4px;
    width: 20px;
    height: 20px;
    background: #333;
    border-radius: 4px;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}