/* ==========================================
   ESTILOS GENERALES DE AUTENTICACIÓN (LOGIN & REGISTRO)
   ========================================== */

:root {
    --primary-color: #0b1329;       /* Azul marino más profundo y oscuro */
    --accent-color: #0284c7;        /* Azul brillante corporativo */
    --brand-green: #10b981;         /* Verde institucional */
    --brand-green-hover: #059669;   /* Verde oscuro para hover */
    --bg-light: #f1f5f9;
    --border-color: #94a3b8;        /* Bordes más visibles */
    --text-main: #1e293b;           /* Letras principales mucho más oscuras */
    --text-muted: #475569;          /* Letras secundarias oscurecidas */
}

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    background-color: var(--bg-light);
    padding: 2rem 1rem;
}

/* Tarjeta Principal Dividida en 2 Columnas */
.auth-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    width: 100%;
    max-width: 950px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.15), 0 10px 15px -5px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.auth-card.auth-card-wide {
    max-width: 1020px;
}

/* Panel Lateral con Imagen Más Visible */
.auth-sidebar {
    background-image: linear-gradient(to bottom, rgba(11, 19, 41, 0.85), rgba(11, 19, 41, 0.75)), var(--sidebar-bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.auth-sidebar-badge {
    background: var(--brand-green);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.sidebar-text-content h4 {
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
    color: #34d399;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.sidebar-text-content p {
    font-size: 0.84rem;
    line-height: 1.6;
    color: #f1f5f9;
    margin-bottom: 1.2rem;
    font-weight: 400;
}

.auth-sidebar-footer {
    font-size: 0.75rem;
    color: #cbd5e1;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
}

/* Contenedor del Formulario */
.auth-form-container {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.auth-header h2 {
    font-size: 1.7rem;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.auth-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    font-weight: 500;
}

/* Filas divididas (para registro en 2 columnas) */
.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Opciones extras */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.4rem;
    font-size: 0.85rem;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.forgot-pass-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
}

.forgot-pass-link:hover {
    text-decoration: underline;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 500;
    user-select: none;
}

.checkbox-container input {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--brand-green);
}

/* Botón de acción principal */
.btn-auth-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    color: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.btn-auth-submit:hover {
    background: linear-gradient(135deg, #1e293b 0%, #0b1329 100%);
    border-color: var(--brand-green);
    transform: translateY(-1px);
}

.mt-10 {
    margin-top: 12px;
}

/* Divisor "o continúa con" */
.auth-divider {
    text-align: center;
    margin: 1.4rem 0;
    position: relative;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    z-index: 1;
}

.auth-divider span {
    background: #ffffff;
    padding: 0 12px;
    position: relative;
    z-index: 2;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-google-login {
    width: 100%;
    padding: 11px;
    border: 1.5px solid var(--border-color);
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-google-login:hover {
    background-color: #f8fafc;
    border-color: var(--accent-color);
}

.btn-google-login img {
    width: 18px;
    height: 18px;
}

/* Pie de tarjeta */
.auth-footer {
    margin-top: 1.8rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.auth-footer a {
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alertas de error */
.alert-danger {
    background-color: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================
   CORRECCIÓN DE RECUADROS E INPUTS Y 
   POSICIONAMIENTO LIMPIO DE ICONOS INTERNOS
   ========================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

/* Contenedor individual del input */
.field-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Estilo y espaciado interno del Input */
.field-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 42px; /* 42px izq (para sobre/candado) y 40px der (para el ojo) */
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    background-color: #fff;
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.2s ease;
}

.field-wrapper input::placeholder {
    color: #94a3b8;
}

.field-wrapper:focus-within input {
    border-color: var(--brand-green);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

/* Ícono izquierdo dentro del recuadro (Sobre y Candado) */
.field-wrapper .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

/* Ícono derecho dentro del recuadro (Ojo para contraseña) */
.field-wrapper .btn-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    z-index: 2;
}

.field-wrapper .btn-toggle-password:hover {
    color: var(--text-main);
}

/* Responsive para dispositivos móviles */
@media (max-width: 768px) {
    .auth-card, .auth-card.auth-card-wide {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    .auth-sidebar {
        display: none; 
    }
    .form-row-2col {
        grid-template-columns: 1fr;
    }
}