/* auth.css - Estilo Elegante y Profesional */

:root {
    --primary-color: #0052cc;     /* Azul Intenso (Atlassian Blue) */
    --primary-dark: #003e99;      /* Azul Más Oscuro */
    --secondary-color: #4c51bf;   /* Índigo */
    --text-color: #172b4d;       /* Azul/Gris Oscuro (Texto Principal) */
    --text-light: #6b778c;       /* Gris Medio (Texto Secundario) */
    --background-color: #f8f9fa; /* Gris Muy Claro (Fondo) */
    --card-background: #ffffff;  /* Blanco (Tarjetas) */
    --border-color: #dfe1e6;     /* Gris Claro (Bordes) */
    --input-background: #f4f5f7; /* Fondo de Inputs */
    --error-color: #de350b;      /* Rojo (Errores) */
    --success-color: #00875a;    /* Verde (Éxito) */
    --link-color: #0052cc;       /* Color de Enlaces */
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 16px; /* Base font size */
}

/* --- Contenedor Principal y Paneles --- */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.auth-welcome-panel {
    flex: 0 0 45%; /* Ancho fijo para el panel de bienvenida */
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Efectos sutiles en el fondo */
.auth-welcome-panel::before,
.auth-welcome-panel::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    opacity: 0.8;
    z-index: 1;
}
.auth-welcome-panel::before { top: -80px; left: -80px; width: 250px; height: 250px; }
.auth-welcome-panel::after { bottom: -100px; right: -100px; width: 350px; height: 350px; }

.welcome-content {
    position: relative;
    z-index: 2;
    max-width: 450px;
}

.welcome-content img {
    width: 110px;
    height: auto;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.welcome-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.welcome-content p {
    font-size: 1.15rem;
    font-weight: 300;
    opacity: 0.9;
}

.auth-form-panel {
    flex: 1; /* El panel de formulario toma el resto */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background-color: var(--background-color);
    overflow-y: auto; /* Permite scroll si el formulario es largo */
}

/* --- Tarjeta de Autenticación --- */
.auth-card {
    background: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(23, 43, 77, 0.1);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}
.auth-card:hover {
     box-shadow: 0 10px 30px rgba(23, 43, 77, 0.15);
}

.auth-header {
    text-align: center;
    padding: 35px 30px 25px;
    border-bottom: 1px solid var(--border-color);
}

.auth-header h2 {
    font-size: 1.9rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
}

.auth-header p {
    font-size: 1rem;
    color: var(--text-light);
}

/* --- Alertas --- */
.alert {
    padding: 15px 20px;
    margin: 20px 30px 0;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: left;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
}
.alert i {
    margin-right: 12px;
    font-size: 1.3em;
    flex-shrink: 0;
}
.alert-error { background-color: #ffebe6; color: #bf2600; border-color: #ffbdad; }
.alert-error i { color: #bf2600; }
.alert-success { background-color: #e3fcef; color: #006644; border-color: #abf5d1; }
.alert-success i { color: #006644; }

/* --- Formularios --- */
.auth-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-color);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 13px 18px 13px 48px; /* Espacio para icono */
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: var(--input-background);
    color: var(--text-color);
}
.form-group input::placeholder {
    color: var(--text-light);
    opacity: 0.8;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.2);
}
.form-group input:focus + i {
    color: var(--primary-color);
}
.form-group input.no-icon {
    padding-left: 18px;
}

/* --- Botones --- */
.btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-decoration: none;
    box-shadow: 0 3px 6px rgba(0, 82, 204, 0.25);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 82, 204, 0.3);
}
.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 82, 204, 0.2);
}

/* --- Acciones y Pie de Página --- */
.form-actions {
    margin-top: 30px;
}

.forgot-password {
    display: block;
    text-align: right;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    padding: 25px;
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
}
.auth-footer a:hover {
    text-decoration: underline;
}

/* --- Específico para Registro --- */
.auth-section {
    background: #fdfdff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.auth-section h4 {
    color: var(--text-color);
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}
.auth-section h4 i {
    color: var(--primary-color);
    font-size: 1.2em;
}

.row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}
.row .form-group {
    margin-bottom: 22px; /* Mantener margen */
}
.col {
    flex: 1;
    min-width: 0;
}

/* --- Diseño Adaptable (Responsive) --- */
@media (max-width: 992px) {
    .auth-welcome-panel {
        display: none; /* Ocultar panel de bienvenida */
    }
    .auth-form-panel {
        flex: 1 1 100%; /* Tomar todo el ancho */
        padding: 30px 20px;
    }
    .auth-card {
        margin: auto 0; /* Centrar verticalmente */
    }
}

@media (max-width: 576px) {
    body {
        font-size: 15px;
    }
    .auth-form-panel {
        padding: 15px;
        align-items: flex-start; /* Alinear arriba */
    }
    .auth-card {
        box-shadow: none;
        border: none;
        border-radius: 0;
        background-color: var(--background-color);
        max-width: 100%;
        margin: 0;
    }
    .auth-header, .auth-form, .auth-footer, .alert {
        padding-left: 15px;
        padding-right: 15px;
        margin-left: 0;
        margin-right: 0;
    }
    .auth-header {
        border-bottom: none;
        padding-top: 25px;
        padding-bottom: 15px;
    }
    .auth-header h2 { font-size: 1.6rem; }
    .row {
        flex-direction: column;
        gap: 0;
    }
    .auth-section {
        padding: 20px 15px;
    }
}