﻿/* ========================
           VARIABLES Y ESTILOS BASE
           ======================== */
:root {
    --color-primario: #2c3e50;
    --color-secundario: #3498db;
    --color-accent: #e74c3c;
    --color-texto: #333;
    --color-fondo: #f5f7fa;
    --color-borde: #e1e5eb;
    --color-exito: #2ecc71;
    --color-facebook: #3b5998;
    --color-google: #db4437;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* ========================
           CONTENEDOR PRINCIPAL
           ======================== */
.auth-container {
    width: 100%;
    max-width: 420px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* ========================
           ENCABEZADO DE AUTENTICACIÓN
           ======================== */
.auth-header {
    background-color: var(--color-primario);
    padding: 30px 20px;
    text-align: center;
    color: white;
}

.auth-logo {
    height: 70px;
    margin-bottom: 15px;
}

.auth-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.auth-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* ========================
           CUERPO DE AUTENTICACIÓN
           ======================== */
.auth-body {
    padding: 30px;
}

/* Formulario de inicio de sesión */
.auth-form {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: var(--color-primario);
    }

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-borde);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

    .form-control:focus {
        border-color: var(--color-secundario);
        outline: none;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

.input-with-icon {
    position: relative;
}

    .input-with-icon i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
        font-size: 16px;
    }

    .input-with-icon input {
        padding-left: 45px;
    }

.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

    .checkbox-container input[type="checkbox"] {
        margin-right: 10px;
        width: 16px;
        height: 16px;
    }

    .checkbox-container label {
        margin: 0;
        font-size: 14px;
        color: #666;
    }

/* Botones */
.btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-secundario);
    color: white;
}

    .btn-primary:hover {
        background-color: #2980b9;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
    }

.btn-google {
    background-color: white;
    color: var(--color-texto);
    border: 1px solid var(--color-borde);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

    .btn-google:hover {
        background-color: #f8f9fa;
        border-color: #ccc;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

.btn-facebook {
    background-color: var(--color-facebook);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

    .btn-facebook:hover {
        background-color: #344e86;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(59, 89, 152, 0.2);
    }

.btn-icon {
    margin-right: 10px;
    font-size: 18px;
}

/* Separador */
.separator {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #999;
    font-size: 14px;
}

    .separator::before,
    .separator::after {
        content: "";
        flex: 1;
        height: 1px;
        background-color: var(--color-borde);
    }

.separator-text {
    padding: 0 15px;
}

/* Enlaces adicionales */
.auth-links {
    text-align: center;
    margin-top: 20px;
}

    .auth-links a {
        color: var(--color-secundario);
        text-decoration: none;
        font-size: 14px;
        transition: color 0.2s;
    }

        .auth-links a:hover {
            color: #2980b9;
            text-decoration: underline;
        }

    .auth-links .separator-link {
        margin: 0 10px;
        color: #999;
    }

/* Mensajes de error/éxito */
.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--color-accent);
    color: #c0392b;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 4px solid var(--color-exito);
    color: #27ae60;
}

/* ========================
           PIE DE AUTENTICACIÓN
           ======================== */
.auth-footer {
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    border-top: 1px solid var(--color-borde);
    font-size: 13px;
    color: #777;
}

/* ========================
           RESPONSIVIDAD
           ======================== */
@media (max-width: 480px) {
    .auth-container {
        max-width: 100%;
    }

    .auth-body {
        padding: 20px;
    }

    .auth-header {
        padding: 25px 15px;
    }

    .auth-title {
        font-size: 20px;
    }
}

@media (max-height: 700px) {
    body {
        align-items: flex-start;
        padding-top: 40px;
        padding-bottom: 40px;
    }
}

/* ========================
           ANIMACIONES
           ======================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container {
    animation: fadeIn 0.5s ease-out;
}

/* ========================
           MODAL DE RECUPERACIÓN
           ======================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-out;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primario);
    margin: 0 0 10px 0;
}

.modal-body {
    margin-bottom: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

    .btn-secondary:hover {
        background-color: #7f8c8d;
    }

.btn-small {
    padding: 8px 15px;
    width: auto;
}

/* ========================
           LOADER
           ======================== */
.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-loading .loader {
    display: inline-block;
}

.btn-loading .btn-text {
    display: none;
}
