/* ===============================
   ESTILOS DE AUTENTICACIÓN (Login/Register)
   Alineado con Brandbook
   =============================== */

/* ===== CONTENEDOR PRINCIPAL ===== */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    min-height: calc(100vh - 60px);
    background: var(--bg-secondary);
    gap: 0;
}

/* ===== SECCIÓN DE BIENVENIDA (Izquierda) ===== */
.auth-welcome {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-welcome::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(0, 165, 225, 0.03);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.auth-welcome::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(0, 165, 225, 0.02);
    border-radius: 50%;
    bottom: -80px;
    left: -50px;
}

.welcome-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    padding: 0 1rem;
}

.welcome-logo-img {
    width: auto;
    height: 100px;
    margin-bottom: 2rem;
    object-fit: contain;
}

.welcome-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.auth-welcome h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-primary);
    color: var(--text-primary);
}

.auth-welcome p {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.feature-item i {
    font-size: 1.3rem;
    margin-top: 0.3rem;
    flex-shrink: 0;
    color: var(--primary-color);
}

/* ===== TARJETA DE AUTENTICACIÓN (Centro) ===== */
.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-primary);
    padding: 2.5rem 2rem;
    width: 100%;
}

.auth-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-primary);
}

.auth-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== ALERTAS ===== */
.alert {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    border: 1px solid;
}

.alert i {
    font-size: 1.1rem;
}

.alert.error {
    background-color: var(--error-light);
    color: var(--error-dark);
    border-color: var(--error-color);
}

.alert.success {
    background-color: var(--success-light);
    color: var(--success-dark);
    border-color: var(--success-color);
}

.alert.warning {
    background-color: var(--warning-light);
    color: var(--warning-dark);
    border-color: var(--warning-color);
}

.alert.info {
    background-color: var(--info-light);
    color: var(--info-dark);
    border-color: var(--info-color);
}

/* ===== FORMULARIO ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.remember-forgot {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-primary);
}

.form-control {
    padding: 0.9rem 1rem;
    border: 1.5px solid var(--secondary-light);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-light);
    background-color: var(--bg-primary);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

/* ===== CHECKBOX Y CONTROLES ===== */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== BOTONES ===== */
.btn {
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0, 165, 225, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-block {
    width: 100%;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color-light);
    border-color: var(--primary-color);
}

/* ===== PIE DE PÁGINA DE AUTH ===== */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--secondary-light);
}

.auth-footer p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== SIDEBAR DE PUBLICIDAD (Derecha) ===== */
.auth-sidebar {
    background: var(--bg-primary);
    padding: 2.5rem 2rem;
    border-left: 1px solid var(--secondary-light);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.ad-container {
    position: sticky;
    top: 2rem;
}

.ad-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-light);
}

.ad-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-tertiary);
    letter-spacing: 0.5px;
}

.ad-space {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ad-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 1rem;
    color: var(--text-tertiary);
}

.ad-loading i {
    font-size: 2rem;
    color: var(--primary-color);
}

.ad-loading p {
    font-size: 0.9rem;
}

.ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.ad-link:hover {
    transform: translateY(-2px);
}

.ad-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: block;
}

.ad-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.ad-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ad-video-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ad-video {
    width: 100%;
    border-radius: var(--radius-md);
}

.ad-cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--text-white);
    text-decoration: none;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ad-cta:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 165, 225, 0.3);
}

.ad-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 1rem;
    color: var(--text-tertiary);
    text-align: center;
}

.ad-empty i {
    font-size: 2.5rem;
    color: var(--text-light);
}

.ad-empty p {
    font-size: 0.9rem;
}

/* ===== MODAL ===== */
.modal-content {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content .form-group {
    margin-bottom: 1rem;
}

.modal-content .btn {
    margin-top: 0.5rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr 1fr;
    }

    .auth-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-welcome {
        padding: 2rem 1.5rem;
        min-height: 300px;
    }

    .auth-welcome h1 {
        font-size: 1.8rem;
    }

    .auth-welcome p {
        font-size: 0.95rem;
    }

    .feature-list {
        display: none;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .form-group.remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .welcome-logo-img {
        height: 60px;
        margin-bottom: 1rem;
    }

    .welcome-image {
        max-width: 200px;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
    }

    .auth-header h1 {
        font-size: 1.3rem;
    }

    .auth-header p {
        font-size: 0.85rem;
    }

    .form-label {
        font-size: 0.85rem;
    }

    .form-control {
        padding: 0.75rem 0.9rem;
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* ===================================================
   OAuth Social Login Buttons
   =================================================== */
.oauth-divider {
    margin: 25px 0 20px;
    text-align: center;
    position: relative;
}

.oauth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
    z-index: 0;
}

.oauth-divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.oauth-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.oauth-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.oauth-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.oauth-google {
    color: #333;
}

.oauth-google:hover {
    border-color: #4285F4;
}

.oauth-linkedin {
    color: #0077B5;
}

.oauth-linkedin:hover {
    border-color: #0077B5;
    background: #f0f8ff;
}

.oauth-btn svg {
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .oauth-buttons {
        flex-direction: column;
    }
    
    .oauth-btn {
        width: 100%;
    }
}
