/**
 * @author    PDS Mundial
 * @email     ing@pdsmundial.com
 * @web       www.pdsmundial.com
 * @copyright 2026 PDS Mundial
 * @license   Confidencial
 */
/* ==========================================================================
   Auth Modal (Login / Registro Flotante)
   ========================================================================== */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6); /* Slate oscurecido */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    background-color: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    padding: var(--space-8);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    opacity: 0;
}

.auth-modal.active .auth-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Header del modal (título y botón cerrar) */
.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.auth-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clr-text-main);
}

.auth-modal-close {
    background: none;
    border: none;
    color: var(--clr-text-muted);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.auth-modal-close:hover {
    background-color: var(--clr-bg-alt);
    color: var(--clr-text-main);
}

.auth-modal-subtitle {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-6);
}

/* Spinner Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

.btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
}



/* Componentes de Formulario */
.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--clr-text-main);
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 0.95rem;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md); /* Más redondeado */
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02); /* Profundidad interna */
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: #A1A1AA;
}

.form-input:focus {
    border-color: var(--clr-primary);
    outline: none;
}

/* Checkbox custom */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.form-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--clr-primary);
    cursor: pointer;
}

.form-check-label {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    line-height: 1.4;
}

.form-check-label a {
    color: var(--clr-primary);
    text-decoration: underline;
}

/* Mensaje de error */
.form-error {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: var(--space-4);
}

/* Botón block */
.btn-block {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Footer del auth */
.auth-footer {
    margin-top: var(--space-8);
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid var(--clr-border);
}

.auth-footer p {
    font-size: 0.875rem;
    color: var(--clr-text-muted);
}

.auth-footer a {
    color: var(--clr-primary);
    font-weight: 500;
}

@media (max-width: 576px) {
    .auth-modal-content {
        margin: var(--space-4);
        padding: var(--space-6);
    }
}

