/* ═══════════════════════════════════════════════════════════════
   LOGIN - Inspirado en app móvil pero con identidad web propia
   ═══════════════════════════════════════════════════════════════ */

/* Fondo degradado azul elegante */
html {
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, #1976D2 0%, #1565C0 35%, #0D47A1 100%);
    position: relative;
    overflow-x: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    width: 100%;
    max-width: 100vw;
}

/* Efecto sutil de luz ambiental */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}


/* Contenedor principal */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s ease-out;
    box-sizing: border-box;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo flotante arriba de la tarjeta con efecto glass */
.login-logo-inside {
    width: 100px;
    height: 100px;
    margin: 0 auto -50px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-radius: 24px;
    padding: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.login-logo-inside img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Filtro para convertir el SVG a azul corporativo */
    filter: brightness(0) saturate(100%) invert(32%) sepia(98%) saturate(1500%) hue-rotate(210deg) brightness(95%) contrast(95%);
}

/* Tarjeta blanca principal */
.login-container {
    background: #ffffff;
    border-radius: 24px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 70px 2.5rem 2.5rem;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}


/* Título */
.login-subtitle {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.02em;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: none;
    /* Labels ocultos, usamos placeholders flotantes */
}

/* Contenedor de input con icono */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

/* Inputs estilo pill con fondo gris suave */
.login-container .input-group>.form-control,
.login-container .input-group>.form-control:first-child,
.login-container .input-group>.form-control:last-child,
.login-container .input-group>.form-control:not(:first-child),
.login-container .input-group>.form-control:not(:last-child) {
    border-radius: 16px !important;
}

.input-group .form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px !important;
    font-size: 1rem;
    transition: all 0.25s ease;
    background-color: #f8fafc;
    color: #1e293b;
}

.input-group .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.input-group .form-control::placeholder {
    color: #94a3b8;
}

/* Icono dentro del input */
.input-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 10;
    pointer-events: none;
    font-size: 1.1rem;
    transition: color 0.25s ease;
}

.input-group .form-control:focus~.input-icon,
.input-group .form-control:focus+.input-icon {
    color: #3b82f6;
}

/* Switch de recuérdame */
.remember-me {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1.75rem;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    appearance: none;
    width: 48px;
    height: 26px;
    background: #cbd5e1;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: background 0.25s ease;
    flex-shrink: 0;
}

.remember-me input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    top: 3px;
    left: 3px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.remember-me input[type="checkbox"]:checked {
    background: #3b82f6;
}

.remember-me input[type="checkbox"]:checked::before {
    transform: translateX(22px);
}

.remember-me-label {
    color: #475569;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}

/* Botón principal */
.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Link olvidé contraseña */
.forgot-password {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #1d4ed8;
    text-decoration: underline;
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
    .login-container {
        padding: 75px 3rem 3rem;
    }

    .login-logo-inside {
        width: 110px;
        height: 110px;
        margin-bottom: -55px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .login-wrapper {
        max-width: 100%;
    }

    .login-logo-inside {
        width: 85px;
        height: 85px;
        margin-bottom: -42px;
        padding: 14px;
        border-radius: 20px;
    }

    .login-container {
        padding: 55px 1.5rem 2rem;
        border-radius: 20px;
    }

    .login-subtitle {
        font-size: 1.25rem;
    }

    .input-group .form-control {
        padding: 0.9rem 0.9rem 0.9rem 3rem;
        font-size: 0.95rem;
    }

    .btn-login {
        padding: 0.9rem 1.25rem;
        font-size: 1rem;
    }
}