
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --blue: #1a3fa8;
    --blue-hover: #1648c2;
    --blue-dark: #0d2f6e;
    --blue-mid: #1251b5;
    --blue-light: #1a6cf0;
    --white: #ffffff;
    --gray-border: #d1d5db;
    --gray-text: #6b7280;
    --dark-text: #111827;
    --radius: 8px;
}

/* ── Reset global ──────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

body.dashboard-page {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: var(--white);
    height: 100vh; /* Cambiado de min-height a height fijo */
    overflow: hidden; /* Evita el scroll global */
}


.progressbar-heading {
    display: none !important;
}

/* ── Contenedor principal: dos columnas ────────────────────── */
/* Localiza esta sección y añade la línea de reverse */
.panel.panel-widget.agile-validation {
    width: 100%;
    min-height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    margin: 0;
    padding: 0;
}

/* ═══════════════════════════════════════════════════════════
   PANEL IZQUIERDO — Formulario de login
   ═══════════════════════════════════════════════════════════ */
#PanelL {
    min-height: 100vh;
    display: flex;
    align-items: center; /* centrado vertical real */
    justify-content: center;
    background: var(--white);
    position: relative;
    z-index: 2;
}

/* Contenedor del formulario */
.validation-grids.validation-grids-right.login-form {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Ocultar el h4 "ACCESO AL SISTEMA" (queda reemplazado por el logo) */
h4#contadorVisitas {
    display: none !important;
}

/* ── Logo institucional — centrado ─────────────────────────── */
#imgLogoInstitucional {
    display: block;
    max-width: 230px;
    max-height: 110px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto 36px auto;
}

/* ── CONTENEDOR DEL STEPPER ── */
.custom-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    margin-bottom: 24px;
    font-family: 'Inter', sans-serif;
}

    /* ── DISEÑO DE LOS BOTONES (STEPS) ── */
    .custom-stepper .step {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100px;
        text-decoration: none !important;
        outline: none !important; 
        cursor: pointer;
    }

    /* ── DISEÑO DE LA LÍNEA ── */
    .custom-stepper .line {
        width: 45px;
        height: 2px;
        background-color: #d1d5db;
        margin-top: 17px; 
    }

    /* ── CÍRCULOS Y TEXTO BASE ── */
    .custom-stepper .circle {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 8px;
        transition: all 0.3s ease;
    }

    .custom-stepper .text {
        font-size: 11px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    /* =========================================
   ESTADOS POR DEFECTO (Como tu imagen original)
   ========================================= */

    /* Paso 1: Inactivo (Gris) */
    .custom-stepper .step-1 .circle {
        background-color: #ffffff;
        border: 1.5px solid #d1d5db;
        color: #6b7280;
    }

    .custom-stepper .step-1 .text {
        color: #6b7280;
    }

    /* Paso 2: Activo (Azul) */
    .custom-stepper .step-2 .circle {
        background-color: #1a3fa8;
        border: 1.5px solid #1a3fa8;
        color: #ffffff;
    }

    .custom-stepper .step-2 .text {
        color: #1a3fa8;
    }


    /* =========================================
   EFECTO HOVER (Al pasar el mouse por el Paso 1)
   ========================================= */

    /* 1. El Paso 1 se vuelve Azul */
    .custom-stepper .step-1:hover .circle {
        background-color: #1a3fa8;
        border-color: #1a3fa8;
        color: #ffffff;
    }

    .custom-stepper .step-1:hover .text {
        color: #1a3fa8;
    }

    /* 2. El Paso 2 se vuelve Blanco/Gris automáticamente */
    .custom-stepper .step-1:hover ~ .step-2 .circle {
        background-color: #ffffff;
        border-color: #d1d5db;
        color: #6b7280;
    }

    .custom-stepper .step-1:hover ~ .step-2 .text {
        color: #6b7280;
    }

/* ── Stepper 1 → 2 (SVG inline vía background) ─────────────── */
.input-info {
    display: block !important;
    width: 100%;
    height: 72px;
    margin-bottom: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='72'%3E%3C!-- l%C3%ADnea conectora --%3E%3Cline x1='72' y1='20' x2='208' y2='20' stroke='%23d1d5db' stroke-width='2'/%3E%3C!-- C%C3%ADrculo 1 - inactivo --%3E%3Ccircle cx='72' cy='20' r='18' fill='white' stroke='%23d1d5db' stroke-width='1.5'/%3E%3Ctext x='72' y='25' text-anchor='middle' font-size='13' font-family='Inter%2Csans-serif' fill='%236b7280'%3E1%3C/text%3E%3Ctext x='72' y='52' text-anchor='middle' font-size='11' font-family='Inter%2Csans-serif' fill='%236b7280'%3EElegir Colegio%3C/text%3E%3C!-- C%C3%ADrculo 2 - activo --%3E%3Ccircle cx='208' cy='20' r='18' fill='%231a3fa8'/%3E%3Ctext x='208' y='25' text-anchor='middle' font-size='13' font-family='Inter%2Csans-serif' fill='white' font-weight='bold'%3E2%3C/text%3E%3Ctext x='208' y='52' text-anchor='middle' font-size='11' font-family='Inter%2Csans-serif' fill='%231a3fa8' font-weight='600'%3EIniciar Sesi%C3%B3n%3C/text%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 280px 72px;
}

/* ── Card del form — sin decoración ────────────────────────── */
.widget-shadow.login-form-shadow {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    width: 100%;
}

.form-body.form-body-info {
    padding: 0;
    width: 100%;
}

/* ── Form Groups ────────────────────────────────────────────── */
.form-group {
    width: 100%;
    margin-bottom: 16px;
}

/* ── Inputs — igual a imagen 1 ─────────────────────────────── */
.input-group {
    display: flex;
    align-items: center;
    width: 100%;
    height: 48px;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    background: #ffffff;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .input-group:focus-within {
        border-color: #93afd4;
        box-shadow: 0 0 0 3px rgba(26, 63, 168, 0.08);
    }

/* Icono addon */
.input-group-addon {
    width: 40px;
    min-width: 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

    .input-group-addon img.glyphicon {
        position: static !important;
        margin-top: 0 !important;
        width: 16px;
        height: 16px;
        object-fit: contain;
        opacity: 0.38;
        display: block;
    }

    .input-group-addon i.glyphicon {
        display: none !important;
    }

/* Campo de texto */
.form-control.validarGroup {
    flex: 1;
    height: 100% !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--dark-text) !important;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    padding: 0 12px 0 0;
    line-height: 48px;
}

    /* Placeholder — gris claro */
    .form-control.validarGroup::placeholder {
        color: #9ca3af !important;
        font-size: 14px;
    }

::-webkit-input-placeholder {
    color: #9ca3af !important;
}

::-moz-placeholder {
    color: #9ca3af !important;
}

:-ms-input-placeholder {
    color: #9ca3af !important;
}

/* Autocomplete override — fondo blanco */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: var(--dark-text) !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Mostrar contraseña */
#divMContra {
    margin-top: -4px;
    margin-bottom: 8px;
}

    #divMContra label.css-label {
        color: var(--gray-text);
        font-size: 12px;
    }

/* Error */
#lblMensaje {
    background: rgba(220,38,38,0.08) !important;
    color: #dc2626 !important;
    border-radius: 6px;
    padding: 5px 12px !important;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
}

/* ── Bottom: botones y links ────────────────────────────────── */
.bottom {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    /* Container del botón Ingresar — full width */
    .bottom > div[style*="text-align: center; position: relative"] {
        width: 100% !important;
    }

/* Botón INGRESAR */
#btnEntrar,
input[id$="btnEntrar"] {
    display: block !important;
    width: 100% !important;
    max-width: 295px !important;
    height: 40px !important;
    margin: 0 auto !important;
    background: var(--blue) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    text-transform: none !important;
    font-weight: 500 !important;
}

    #btnEntrar:hover {
        background: var(--blue-hover) !important;
        box-shadow: 0 4px 18px rgba(26,63,168,0.38);
        transform: translateY(-1px);
    }

    #btnEntrar:active {
        transform: translateY(0);
    }


.loginbox-v4__separator-container {
    width: 100%;
    margin: 16px 0 10px;
}

.loginbox-v4__separator {
    border-top-color: #e5e7eb;
}

.loginbox-v4__separator-text {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

/* Este es el div que contiene al Repeater */
.bottom > div:has(#RepeaterOAuth) {
    width: 100% !important;
    max-width: 295px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Alinear botones OAuth con el botón INGRESAR */
#RepeaterOAuth {
    display: flex !important;
    justify-content: space-between !important;
    gap: 15px !important;
    margin-top: 20px !important;
    width: 100% !important;
    max-width: 295px !important; 
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}
    #RepeaterOAuth .custom,
    #RepeaterOAuth a.custom {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 42px !important;
        padding: 0 !important; 
        font-size: 13px !important;
        border: 1px solid #d1d5db !important;
        border-radius: 6px !important;
        box-shadow: none !important;
        position: static !important;
        margin: 0 !important;
    }

        #RepeaterOAuth .custom img,
        #RepeaterOAuth a.custom img {
            position: static !important; 
            margin-right: 8px !important;
            width: 18px !important;
            height: 18px !important;
        }

        /* Quitar el subrayado al pasar el mouse en los botones OAuth */
        #RepeaterOAuth a.custom:hover,
        a.custom:hover,
        .custom:hover {
            text-decoration: none !important;
        }

/* En móviles apilamos */
@media (max-width: 480px) {
    #RepeaterOAuth {
        flex-direction: column !important;
        max-width: 360px !important;
        gap: 12px !important;
    }

        #RepeaterOAuth .custom,
        #RepeaterOAuth a.custom {
            width: 100% !important;
        }
}

/* Botón azul principal alineado */
.btn-ingresar-personalizado {
    display: block !important;
    width: 100% !important;
    max-width: 295px !important; 
    height: 42px !important;
    margin: 20px auto 10px !important; 
    background: #1a3fa8 !important;
    border: none !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    cursor: pointer;
    transition: background 0.3s;
}

a.custom, .custom {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 140px !important;
    height: 42px !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    color: #374151 !important;
    font-size: 13px !important;
}

    .custom img {
        width: 16px !important;
        height: 16px !important;
        position: static !important;
        margin: 0 !important;
    }

/* "Olvidaste tu contraseña?" — gris, a la derecha */
div[style*="margin: 15px auto 0; text-align: center"]:has(a[href*="forgottenpass"]) {
    width: 100% !important;
    text-align: right !important;
    margin: 4px 0 14px !important;
}

div[style*="margin: 15px auto 0; text-align: center"] a[href*="forgottenpass"] {
    font-size: 12.5px !important;
    color: var(--gray-text) !important;
    text-decoration: none !important;
}


/* Contenedor de links de privacidad y términos */
.bottom div:has(> a[href*="privacidad"]),
.bottom div:has(> a[href*="termino"]) {
    display: inline-block !important;
    margin: 0 8px !important; 
    width: auto !important;
}

/* Estilo para los enlaces */
div[style*="margin: 15px auto 0; text-align: center"] a[href*="privacidad"],
div[style*="margin: 15px auto 0; text-align: center"] a[href*="termino"] {
    font-size: 11px !important;
    color: var(--gray-text) !important; 
    transition: color 0.2s;
}

div[style*="margin: 15px auto 0; text-align: center"] a:hover {
    color: var(--blue) !important;
    text-decoration: none !important;
}


/* Logo Control Academic */
.bottom img[src*="logo-control"] {
    display: block !important;
    margin: 18px auto 6px !important;
    width: 120px !important;
    height: auto !important;
}

/* ── Ocultar elementos no usados ────────────────────────────── */
.footer {
    display: none !important;
}

.iconos-footer {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   PANEL DERECHO (Visualmente el Izquierdo) — azul con logo
   ═══════════════════════════════════════════════════════════ */
#PanelB {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    height: 100vh !important;
    background: linear-gradient(rgba(9, 30, 66, 0.4), rgba(26, 63, 168, 0.4)), url("https://controlacademic.co/cis/Imagenes/login/cis/background.jpg") no-repeat center center !important;
    background-size: cover !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    /* ── Transparencia Crítica ────────────────────────────────── */
    #PanelB,
    #PanelB > div,
    #PanelB .panel,
    #PanelB .panel-heading,
    #PanelB .panel-body {
        background: transparent !important;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

        /* ── Elementos internos del panel ─────────────────────────── */
        #PanelB .img-responsive {
            max-width: 220px;
            filter: brightness(0) invert(1);
            margin: 0 auto 24px auto !important;
            display: block;
        }

        #PanelB .panel-body p {
            color: rgba(255, 255, 255, 0.95);
            font-family: 'Inter', sans-serif;
            font-size: 16px;
            line-height: 1.6;
            text-align: center;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }

        /* Iconos de navegadores */
        #PanelB .logos-navegadores img {
            filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
            transition: transform 0.2s ease;
        }

            #PanelB .logos-navegadores img:hover {
                transform: scale(1.05);
            }

        #PanelB .logos-navegadores a {
            color: #fff !important;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            padding: 4px 8px !important;
        }


/* Contenedor de ilustración izquierdo (mejor control y responsive) */
.panel-illustration {
    flex: 0 0 50%;
    max-width: 50%;
    height: 100vh;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    display: block;
    box-sizing: border-box;
}

.panel.panel-widget.agile-validation > .validation-grids.validation-grids-right.login-form {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Fix: asegurar que la ilustración ocupe la mitad y no se "hunda" */
.panel.panel-widget.agile-validation {
    flex-wrap: nowrap !important;
    align-items: stretch !important;
}

.panel-illustration {
    display: flex !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
    min-height: 100vh !important;
    height: auto !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box !important;
}

/* ── SEPARADOR "O INGRESA CON" ── */
.login-separator {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 295px; 
    margin: 20px auto 5px auto;
}

    .login-separator .line {
        flex-grow: 1; 
        height: 1px;
        background-color: #e5e7eb;
    }

    .login-separator .text {
        margin: 0 12px; 
        color: #4b5563; 
        font-size: 10px !important;
        font-family: 'Inter', sans-serif;
        font-weight: 600;
        letter-spacing: 0.5px;
    }

/* ── ENLACES LEGALES (Pequeños y en línea) ── */
.footer-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 25px;
    width: 100%;
}

    .footer-legal-links a {
        color: #9ca3af !important; 
        font-size: 10px !important; 
        font-family: 'Inter', sans-serif;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        text-decoration: none !important; 
        letter-spacing: 0.5px;
        transition: color 0.2s ease;
    }

        .footer-legal-links a:hover {
            color: #1a3fa8 !important; 
        }

#piezaSVG {
    position: absolute;
    top: -30px;
    left: 65%;
    transform: translateX(-50%);
    height: 110vh;
    width: 27%;
    object-fit: initial;
    object-position: left center;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(-5px 0 15px rgba(0, 0, 0, 0.3));
    transform: translateX(-50%) rotate(2deg);
}
/* ── FUERZA AL CARRUSEL DINÁMICO A OCUPAR TODO EL CONTENEDOR ── */
#carouselLogin .carousel-inner .item,
#carouselLogin .carousel-inner .item img {
    width: 100% !important;
    height: 100vh !important;
    object-fit: cover !important;
    display: block;
}


/* ── 1.5. LAPTOPS Y PANTALLAS MEDIANAS (1101px a 1350px) ── */
@media (min-width: 1101px) and (max-width: 1355px) {
    #LadoIzquierdo {
        flex: 0 0 55% !important;
        max-width: 55% !important;
    }

    #LadoDerecho {
        flex: 0 0 45% !important;
        max-width: 45% !important;
    }

    /* pieza a la nueva línea divisoria (55%) */
    #piezaSVG {
        left: 56% !important;
        width: 22%; 
    }

    
    .validation-grids.validation-grids-right.login-form {
        transform: scale(0.92);
        transform-origin: center center;
    }
}

/* ── 2. TABLETS (Pantallas entre 851px y 1100px) ── */
@media (max-width: 1100px) {
    /* Repartimos el espacio 50/50 para que el formulario no quede tan apretado */
    #LadoIzquierdo {
        flex: 0 0 63% !important;
        max-width: 63% !important;
    }

    #LadoDerecho {
        flex: 0 0 37% !important;
        max-width: 37% !important;
    }

    /* Movemos la pieza a la nueva línea divisoria del medio (50%) */
    #piezaSVG {
        left: 64% !important;
        width: 34%;

    }

    /* REDUCIMOS EL TAMAÑO DEL FORMULARIO */
    .validation-grids.validation-grids-right.login-form {
        transform: scale(0.8); /* Achica todo el formulario a un 85% de su tamaño */
        transform-origin: center center; /* Lo mantiene centrado mientras se achica */
        max-width: 320px !important; /* Asegura que no se desborde */
    }
}

/* ── 3. CELULARES (850px o menos) ── */
@media (max-width: 850px) {
    /* Ocultamos la imagen izquierda y la pieza SVG */
    #LadoIzquierdo, #piezaSVG {
        display: none !important;
    }

    /* El formulario ocupa todo el ancho de la pantalla */
    #LadoDerecho {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 20px; /* Espacio para que no pegue a los bordes del celular */
    }

    /* RESTAURAMOS EL TAMAÑO ORIGINAL DEL FORMULARIO */
    .validation-grids.validation-grids-right.login-form {
        transform: scale(1) !important; /* Anula el achicamiento de la tablet */
        max-width: 360px !important; /* Vuelve a su ancho normal */
        margin: 0 auto !important; /* Asegura que quede perfectamente centrado */
    }

    /* Vuelve al tamaño original del logo (si quieres que sea un poco más chico en celular, cámbialo a 180px) */
    #imgLogoInstitucional {
        max-width: 230px !important;
    }
}


.carousel-fade .carousel-inner .item {
    transition: opacity 0.8s ease-in-out !important;
    opacity: 0;
    transform: none !important;
    position: absolute !important; /* Apila las fotos una sobre otra */
    left: 0 !important;
    top: 0 !important;
    display: block !important;
    width: 100%;
    z-index: 1;
}

    /* La imagen actualmente visible */
    .carousel-fade .carousel-inner .item.active {
        opacity: 1;
        z-index: 2; /* Un nivel más arriba */
        position: relative !important; /* Mantiene la estructura del contenedor */
    }

    /* La nueva imagen que está a punto de entrar se pone por ENCIMA de todas */
    .carousel-fade .carousel-inner .item.next,
    .carousel-fade .carousel-inner .item.prev {
        z-index: 3; /* Nivel superior */
        opacity: 0; /* Empieza totalmente transparente */
    }

        /* La nueva imagen completando su entrada (se hace visible gradualmente) */
        .carousel-fade .carousel-inner .item.next.left,
        .carousel-fade .carousel-inner .item.prev.right {
            opacity: 1;
        }

    .carousel-fade .carousel-inner .item.active.left,
    .carousel-fade .carousel-inner .item.active.right {
        opacity: 1 !important;
        z-index: 2; /* Se mantiene por debajo de la nueva imagen (z-index 3) */
    }