:root {
    --bg: #0f1e4a;
    --bg-2: #0b1736;
    --panel: #0d1f58;
    --sidebar: #14151c;
    --sidebar-2: #191b24;
    --card: #ffffff;
    --muted: #9aa3b2;
    --brand: #4f46e5;
    --accent: #ffb020;
    --accent-2: #ff6b6b;
    --chip: #232636;
    --border: rgba(255, 255, 255, .08);
    --text: #101828;
}

/* Importar fuentes desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Open+Sans:wght@400;600;700&display=swap');

/* General */
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    background: linear-gradient(180deg, #081c44 0%, #020b1f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Open Sans', sans-serif; /* Fuente por defecto para todo el contenido */
}

/* Titulos dentro del login-box */
.login-box h2 {
    color: white;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif; /* Fuente para títulos */
}


/* Contenedor principal */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1020px;
    background: var(--bg-2);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
}

/* Parte izquierda */
.login-left {
    width: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-left img {
    width: 110px;
    padding: 10px;
    z-index: 3;
}

.logo {
    width: 180px;
    padding: 20px;
    margin-bottom: 20px;
    margin-left: 10px;
    position: absolute;
    top: -80px;
    left: -75px;
    background: linear-gradient(180deg, #4f46e5, #0d1f58);
    border-radius: 45%;
    z-index: 6;
    animation: bounce 2s ease-in-out infinite;
}

.login-box {
    background: linear-gradient(180deg, #0d1f58, #4f46e5);
    padding: 40px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 400px;
    box-sizing: border-box;
}

.login-box h2 {
    color: white;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.input-group {
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.input-group i {
    font-size: 20px;
    margin-right: 10px;
    color: var(--brand);
    flex-shrink: 0;
}

.input-group input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 0;
    font-size: 15px;
    box-sizing: border-box;
    width: 100%;
}

button {
    width: 60%;
    background-color: #4f46e5;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background-color: #0033aa;
}

.forgot {
    display: block;
    margin-top: 15px;
    color: #cce0ff;
    text-decoration: none;
    font-size: 14px;
}

/* Parte derecha */
.login-right {
    width: 60%;
    justify-content: center;
    align-items: center;
}

.image-shape {
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 15% 100%, 0% 50%);
    overflow: hidden;
    border-radius: 0 20px 20px 0;
}

.image-shape img {
    width: 100%;
    height: auto;
    display: block;
}

/* Animación de rebote para el logo */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.login-left>div:first-child {
    animation: bounce 2s ease-in-out infinite;
}

/* O si prefieres aplicarla directamente a la imagen */
.logo {
    animation: bounce 2s ease-in-out infinite;
}

/* RESPONSIVE */
body {
    overflow-x: hidden;
}

@media (max-width: 980px) {
    .login-container {
        width: 88%;
    }

    .logo {
        left: -60px;
        top: -50px;
    }
}

/* ── Tablet portrait: ocultar imagen, form ocupa todo el ancho ── */
@media (max-width: 780px) {
    .login-right {
        display: none;
    }

    .login-left {
        width: 100%;
        padding: 90px 24px 40px;
    }

    /* Logo centrado encima del formulario */
    .logo {
        width: 140px;
        top: -60px;
        left: 50%;
        transform: translateX(-50%);
    }

    .login-box {
        width: 90%;
        max-width: 420px;
    }
}

/* ── Móvil estándar (≤480px) ── */
@media (max-width: 480px) {
    body {
        height: 100vh;
        min-height: 100dvh;
        align-items: center;
        padding: 0;
    }

    .login-container {
        width: 94%;
        margin: 0 auto;
        border-radius: 14px;
    }

    .login-right {
        display: none;
    }

    /* Sin padding-top: el form queda centrado naturalmente */
    .login-left {
        width: 100%;
        padding: 32px 16px;
    }

    /* Ocultar logo flotante: en pantallas pequeñas no cabe bien */
    .logo {
        display: none;
    }

    .login-left > div:first-child {
        display: none;
    }

    .login-box {
        width: 100%;
        max-width: 100%;
        padding: 28px 16px 24px;
        border-radius: 12px;
    }

    .login-box h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .input-group {
        padding: 8px 10px;
    }

    .input-group input {
        font-size: 14px;
    }

    button {
        width: 78%;
        padding: 11px;
    }

    .forgot {
        font-size: 13px;
    }
}

/* ── Móvil muy pequeño (≤360px) ── */
@media (max-width: 360px) {
    .login-container {
        width: 97%;
        border-radius: 10px;
    }

    .login-left {
        padding: 24px 12px;
    }

    .login-box h2 {
        font-size: 20px;
    }

    button {
        width: 88%;
    }
}