:root {
    --Color-Principal: #ffffff;
    --Color-Secundario: #1741a6;
    --Color-Texto: #333333;
    --Color-Gris-Link: #666666;
    --Color-Fondo-Inputs: #f8f9fa;
    --Shadow: 0 15px 35px rgba(0,0,0,0.2);
    --Radius: 12px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

body {
    background-color: var(--Color-Secundario);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.MainFrame {
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: white;
    border-radius: var(--Radius);
    box-shadow: var(--Shadow);
    overflow: hidden;
    margin: 20px;
    animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.8, 1);
}

.Login-Split {
    display: flex;
    width: 100%;
    min-height: 600px;
}

.Login-ImageSide {
    flex: 1.2;
    background-image: url('https://s3.amazonaws.com/ultimas.elsur/impreso/wp-content/uploads/2026/01/30223347/ccmesasdetrabajotallercambioclimatico-compressed.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
}

.Image-Overlay {
    background: rgba(0,0,0,0.3);
    width: 100%;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    backdrop-filter: blur(2px);
}

.Side-Logo {
    max-width: 350px;
    margin-bottom: 40px;
    filter: brightness(0) invert(1);
    animation: fadeIn 1s ease-out 0.3s both;
}

.Welcome-Text h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.Welcome-Text p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 400px;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.CardLogin {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.Form-Header h1 {
    font-size: 2rem;
    color: var(--Color-Secundario);
    margin-bottom: 5px;
    font-weight: 700;
}

.Step-Instruction {
    color: #888;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Ocultar errorlist de Django */
.django-form-container ul.errorlist { display: none !important; }
.django-form-container ul.errorlist li { margin-bottom: 0; }

/* ════════════════════════════════════════════════
   INPUTS — underline minimalista
   Label en flujo normal (no absolute) para evitar
   que escape al viewport
════════════════════════════════════════════════ */

.django-form-container p {
    margin-bottom: 28px;
}

/* Label pequeño sobre el campo, flujo normal */
.django-form-container label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #aab0bc;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    transition: color 0.2s ease;
    pointer-events: none;
}

.django-form-container p:focus-within label {
    color: var(--Color-Secundario);
}

/* Input solo con línea inferior */
.django-form-container input:not([type="submit"]):not([type="checkbox"]) {
    width: 100%;
    padding: 8px 0 8px 0;
    border: none;
    border-bottom: 1.5px solid #c6cbd1;
    border-radius: 0;
    background: transparent;
    font-size: 0.97rem;
    color: #1a202c;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.25s ease;
    display: block;
}

.django-form-container input:not([type="submit"]):not([type="checkbox"]):hover {
    border-bottom-color: #aab0bc;
}

.django-form-container input:not([type="submit"]):not([type="checkbox"]):focus {
    border-bottom-color: var(--Color-Secundario);
    box-shadow: 0 1px 0 0 var(--Color-Secundario); /* doble línea sutil en foco */
}

.django-form-container input::placeholder {
    color: #c4cad4;
    font-size: 0.93rem;
}

/* ════════════════════════════════════════════════
   CHECKBOX — custom, aislado del selector de inputs
════════════════════════════════════════════════ */

.django-form-container p:has(input[type="checkbox"]) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

/* Cancela el pointer-events:none del label general */
.django-form-container p:has(input[type="checkbox"]) label {
    pointer-events: auto;
    cursor: pointer;
    color: #4a5568;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.django-form-container input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 1.5px solid #cbd5e0;
    border-radius: 6px;
    background: #f8fafc;
    cursor: pointer;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    /* Transiciones solo de color, nunca transform ni box-shadow */
    transition: border-color 0.2s ease, background-color 0.2s ease;
    transform: none !important;
    box-shadow: none !important;
}

.django-form-container input[type="checkbox"]:hover {
    border-color: var(--Color-Secundario);
    background-color: #eef2ff;
    transform: none !important;
    box-shadow: none !important;
}

.django-form-container input[type="checkbox"]:checked {
    background-color: var(--Color-Secundario);
    border-color: var(--Color-Secundario);
}

.django-form-container input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8l3.5 3.5L13 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
}

/* ── Botón principal ── */
.Btn-Main {
    width: 100%;
    padding: 15px;
    background: var(--Color-Secundario);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.Btn-Main:hover {
    background: #0d2258 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(13, 34, 88, 0.3);
    transform: translateY(-2px) !important;
}

.Btn-Main:active {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

/* ── Botón Google ── */
.Btn-Google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.Btn-Google:hover {
    background-color: #f8fafc;
    border-color: #cbd5e0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* ── Social / divider / links ── */
.Social-Area { margin-top: 25px; text-align: center; }

.Divider-Text {
    font-size: 0.8rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 15px;
}
.Divider-Text::before,
.Divider-Text::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eee;
}

.Footer-Links { margin-top: 20px; text-align: center; }

.Link-Forgot {
    color: var(--Color-Secundario);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.2s;
}
.Link-Forgot:hover { opacity: 0.7; }

.Other-Methods-Area {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.Btn-Secondary-Link {
    background: none;
    border: none;
    color: var(--Color-Gris-Link);
    cursor: pointer;
    display: block;
    font-size: 0.85rem;
    margin: 8px 0;
    text-align: center;
    width: 100%;
    transition: color 0.2s ease;
    transform: none;
}
.Btn-Secondary-Link:hover {
    color: var(--Color-Secundario);
    transform: none;
    background: none;
}

/* ── Errores ── */
.Form-Errors-Modern {
    background: #fff5f5;
    color: #e53e3e;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border-left: 4px solid #e53e3e;
    animation: fadeInUp 0.4s ease-out;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .Login-ImageSide { display: none; }
    .MainFrame { max-width: 500px; }
    .CardLogin { padding: 30px; }

    .CardLogin::before {
        content: '';
        display: block;
        width: 130px;
        height: 50px;
        /*background-image: url("/static/core/images/Loyola.460a59e99472.png");*/
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        filter: invert(16%) sepia(85%) saturate(1500%) hue-rotate(214deg) brightness(85%);
        margin: 0 auto 20px;  /* centrado y espacio abajo */
    }

    
}