﻿/* =========================================
   RESET & BASE
========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --navy: #0a1628;
    --navy-mid: #102040;
    --navy-card: #0d1f3c;
    --accent: #1e6fcf;
    --accent-2: #00c6ff;
    --gold: #e8b94a;
    --text-main: #e8edf5;
    --text-muted: #8fa3bf;
    --border: rgba(30,111,207,0.35);
    --shadow: 0 8px 32px rgba(0,0,0,0.55);
    --radius: 10px;
    --input-bg: rgba(255,255,255,0.05);
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--navy);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    min-height: 100vh;
}

    /* Fondo con gradiente */
    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background: radial-gradient(ellipse 80% 60% at 20% 50%, rgba(30,111,207,0.18) 0%, transparent 70%), radial-gradient(ellipse 60% 80% at 80% 80%, rgba(0,198,255,0.10) 0%, transparent 70%), var(--navy);
        z-index: 0;
        pointer-events: none;
    }

    /* Líneas de cuadrícula decorativas */
    body::after {
        content: '';
        position: fixed;
        inset: 0;
        background-image: linear-gradient(rgba(30,111,207,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(30,111,207,0.05) 1px, transparent 1px);
        background-size: 48px 48px;
        z-index: 0;
        pointer-events: none;
    }

/* =========================================
   WRAPPER PRINCIPAL
========================================= */
#header {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.login-wrapper {
    width: 100%;
    max-width: 1100px;
}

/* =========================================
   GRID PRINCIPAL
========================================= */
.login-grid {
    display: flex;
    gap: 28px;
    align-items: stretch;
    animation: fadeUp 0.5s ease both;
}

.col-carousel {
    flex: 1 1 0;
    min-width: 0;
}

.col-login {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
}

/* =========================================
   CARRUSEL
========================================= */
.carousel-shell {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    height: 86%;
    min-height: 380px;
}

#myCarousel,
#myCarousel .carousel-inner,
#myCarousel .carousel-item {
    height: 100%;
}

    #myCarousel .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border: none;
    }

    /* Indicadores */
    #myCarousel .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: rgba(255,255,255,0.4);
        border: none;
        opacity: 1;
        transition: all 0.3s;
    }

    #myCarousel .carousel-indicators .active {
        background-color: var(--accent-2);
        width: 24px;
        border-radius: 4px;
    }

    /* Controles (aparecen al pasar el mouse) */
    #myCarousel .carousel-control-prev,
    #myCarousel .carousel-control-next {
        background: rgba(10,22,40,0.55);
        width: 44px;
        opacity: 0;
        transition: opacity 0.3s;
    }

.carousel-shell:hover .carousel-control-prev,
.carousel-shell:hover .carousel-control-next {
    opacity: 1;
}

/* =========================================
   PANEL DE LOGIN
========================================= */
#RegUser {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 86%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

    /* Línea de acento superior */
    #RegUser::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--accent), var(--accent-2));
    }

.logo-wrap {
    text-align: center;
}

    .logo-wrap img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
        /*margin: 20px auto 40px auto;*/
    }

.section-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* =========================================
   INPUTS
========================================= */
.input-group {
    margin-bottom: 10px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.25s;
    flex-wrap: nowrap;
}

    .input-group:focus-within {
        border-color: var(--accent-2);
        box-shadow: 0 0 0 3px rgba(0,198,255,0.15);
    }

    .input-group .input-group-text {
        background: rgba(30,111,207,0.18);
        border: none;
        color: var(--accent-2);
        border-radius: 0;
        font-size: 14px;
    }

    .input-group .form-control {
        background: var(--input-bg);
        border: none;
        color: var(--text-main);
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        box-shadow: none;
        border-radius: 0;
    }

        .input-group .form-control:focus {
            background: var(--input-bg);
            color: var(--text-main);
            box-shadow: none;
            outline: none;
        }

        .input-group .form-control::placeholder {
            color: var(--text-muted);
        }

        /* Evita el fondo amarillo/blanco del autocompletado del navegador */
        .input-group .form-control:-webkit-autofill {
            -webkit-box-shadow: 0 0 0 1000px #13284d inset;
            -webkit-text-fill-color: var(--text-main);
            caret-color: var(--text-main);
        }

.field-error {
    display: block;
    color: #ff6b6b;
    font-size: 12px;
    margin: -4px 0 8px;
}

/* =========================================
   BOTÓN
========================================= */
.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), #155ab0);
    border: none;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.5px;
    border-radius: 6px;
    padding: 10px 0;
    margin-top: 4px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(30,111,207,0.35);
    cursor: pointer;
}

    .btn-login:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 24px rgba(30,111,207,0.5);
    }

    .btn-login:active {
        transform: translateY(0);
    }

/* =========================================
   MENSAJES
========================================= */
.info-label {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 0;
}

.alert-login {
    text-align: center;
    font-size: 13px;
    color: #ffb3b3;
    background: rgba(220,53,69,0.15);
    border: 1px solid rgba(220,53,69,0.45);
    border-radius: 6px;
    padding: 8px 10px;
}

/* =========================================
   RESPONSIVE
========================================= */

/* Tablet y móvil: oculta carrusel, centra login */
@media (max-width: 900px) {
    .login-grid {
        flex-direction: column;
    }

    .col-carousel {
        display: none;
    }

    .col-login {
        flex: none;
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
    }
}

/* Móvil */
@media (max-width: 540px) {
    #header {
        padding: 12px;
    }

    #RegUser {
        padding: 20px 16px;
    }
}

/* =========================================
   ANIMACIÓN DE ENTRADA
========================================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
