/* ============================================================
   GRUPO PACÍFICO / GRUPO ISAI - LOGIN CORPORATIVO
   100% OFFLINE (Sin dependencias externas ni CDN)
   Alineado con el ecosistema de Navbar & Sidebar (#002d59)
   ============================================================ */

:root {
    --login-navy-950: #001020;
    --login-navy-900: #00162e;
    --login-navy-800: #001f3f;
    --login-navy-700: #002d59;
    --login-navy-600: #004a94;
    --login-navy-500: #0056b3;
    --login-accent: #0b6e76;
    --login-orange: #eb720e;
    --login-surface: #ffffff;
    --login-border: #cbd5e1;
    --login-border-focus: #004a94;
    --login-text-dark: #0f172a;
    --login-text-muted: #64748b;
    --login-bg-input: #f8fafc;
    /* Fuente del sistema 100% nativa y offline: rápida, nítida y sin latencia */
    --login-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--login-font);
    background-color: var(--login-navy-950);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.contenedor-login {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    background:
        radial-gradient(ellipse 90% 65% at 50% -10%, rgba(0, 74, 148, 0.42) 0%, transparent 75%),
        radial-gradient(circle at 95% 95%, rgba(11, 110, 118, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 5% 95%, rgba(0, 31, 63, 0.5) 0%, transparent 55%),
        linear-gradient(145deg, #001020 0%, #001e3d 50%, #002d59 100%);
    position: relative;
    overflow: hidden;
}

/* Patrón geométrico sutil 100% en CSS puro (cero peticiones de red) */
.contenedor-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.05) 1.2px, transparent 1.2px);
    background-size: 28px 28px;
    pointer-events: none;
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    animation: fadeInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card {
    background: var(--login-surface);
    border-radius: 18px;
    padding: 38px 36px 32px 36px;
    box-shadow:
        0 25px 60px -15px rgba(0, 15, 35, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
}

/* Línea decorativa superior con los colores corporativos */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--login-navy-700) 0%, var(--login-navy-500) 65%, var(--login-orange) 100%);
}

/* Encabezado y Logo */
.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.img_contenedor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.img_estilo_logo {
    max-height: 68px;
    max-width: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
}

.login-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--login-text-dark);
    margin-bottom: 5px;
    letter-spacing: -0.02em;
}

.subtitle-login {
    font-size: 13.5px;
    color: var(--login-text-muted);
    font-weight: 400;
    line-height: 1.45;
}

/* Campos del Formulario */
.form-login-estilos .form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.input-icon-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-group .input-icon {
    position: absolute;
    left: 14px;
    font-size: 14px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.estilos-inputs-login {
    width: 100% !important;
    height: 46px !important;
    padding: 10px 16px 10px 42px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: var(--login-text-dark) !important;
    background-color: var(--login-bg-input) !important;
    border: 1.5px solid var(--login-border) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.estilos-inputs-login::placeholder {
    color: #94a3b8 !important;
    font-size: 13px !important;
}

.estilos-inputs-login:focus {
    background-color: #ffffff !important;
    border-color: var(--login-border-focus) !important;
    box-shadow: 0 0 0 3.5px rgba(0, 74, 148, 0.14) !important;
    outline: none !important;
}

.input-icon-group:focus-within .input-icon {
    color: var(--login-navy-600);
}

/* Botón Ver / Ocultar Contraseña */
.btn-toggle-password {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px 8px;
    font-size: 14px;
    transition: color 0.15s ease, transform 0.15s ease;
    z-index: 2;
}

.btn-toggle-password:hover {
    color: var(--login-text-dark);
    transform: scale(1.1);
}

.btn-toggle-password:focus {
    outline: none;
}

/* Botón Iniciar Sesión */
.btn-login {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--login-navy-700) 0%, var(--login-navy-600) 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 4px 14px rgba(0, 45, 89, 0.28);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 6px;
    text-transform: uppercase;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--login-navy-800) 0%, var(--login-navy-700) 100%);
    box-shadow: 0 8px 22px rgba(0, 45, 89, 0.38);
    transform: translateY(-2px);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 45, 89, 0.2);
}

.btn-login:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Alerta de Error */
.alert-login-error {
    margin-top: 18px;
    padding: 11px 14px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    color: #991b1b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

.alert-login-error i {
    font-size: 15px;
    flex-shrink: 0;
}

/* Indicador de seguridad */
.login-security-tag {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    font-size: 11.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.login-security-tag i {
    color: var(--login-navy-600);
}

/* Pie del Login */
.login-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
}

.login-footer span {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Móvil */
@media (max-width: 480px) {
    .contenedor-login {
        padding: 16px;
    }

    .login-card {
        padding: 28px 20px 24px 20px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 19px;
    }

    .subtitle-login {
        font-size: 12.5px;
    }

    .estilos-inputs-login {
        height: 44px !important;
        font-size: 13.5px !important;
    }

    .btn-login {
        height: 45px;
        font-size: 13.5px;
    }
}
