﻿/* ==========================================================================
   SIECloud ERP · Login v2 (retoque leve, 17/10/2026)
   Va en: WA/Content/css/login-v2.css
   Lo carga Login.cshtml SOLO cuando el body lleva la clase "sie-login-v2"
   (cookie sieLoginV2=1, se activa con ?login=nuevo). Sin eso, el login es el de siempre.
   Colores SIECloud: azul marino #20374a / #2d485f, azul #2baae2 / #1E95CF. Nada externo.
   ========================================================================== */

/* --- Foto de fondo: mantiene su forma (cover) en vez de estirarse (100% 100%) --- */
body.sie-login-v2 {
    background-size: cover !important;
    background-position: 50% 62% !important; /* un poco abajo del centro: el volcán siempre a la vista */
    background-attachment: fixed !important;
    font-family: 'Segoe UI', Calibri, sans-serif;
}
/* En celular y tablet "fixed" agranda la foto (iPhone); ahí va normal */
@media (max-width: 992px), (hover: none) {
    body.sie-login-v2 {
        background-attachment: scroll !important;
        min-height: 100vh;
    }
}

/* --- Tarjeta: azul marino SIE transparente, esquinas apenas redondeadas --- */
/* El vidrio (desenfoque + azul) va en una capa ::before DETRÁS del contenido y no en la tarjeta misma:
   si va en la tarjeta, Chrome dibuja el logo y los textos dentro de esa capa filtrada y se ven suaves */
.sie-login-v2 .auth-box.bg-white-deg {
    position: relative;
    isolation: isolate;
    background: transparent !important;
    border: 0 !important; /* sin borde blanco alrededor de la tarjeta (pedido 17/10) */
    border-radius: 10px !important;
    box-shadow: 0 20px 50px rgba(10,20,30,.35) !important;
    color: #fff;
}

    .sie-login-v2 .auth-box.bg-white-deg::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        background: linear-gradient(160deg, rgba(32,55,74,.58), rgba(45,72,95,.46));
        -webkit-backdrop-filter: blur(7px) saturate(1.1);
        backdrop-filter: blur(7px) saturate(1.1);
        pointer-events: none;
    }

.sie-login-v2 .auth-box .card-block {
    background: transparent !important;
}

/* --- Etiquetas de los campos --- */
.sie-login-v2 .sie-lbl {
    display: block;
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    color: #a9c4d8;
}

.sie-login-v2 .form-group.form-primary {
    margin-top: 18px !important;
}

/* --- Usuario y Contraseña: recuadro suave con ícono (en vez de solo la línea) --- */
.sie-login-v2 #Usuario,
.sie-login-v2 #Contrasenia { /* solo estos dos: el campo del modal de contraseña sigue igual */
    height: 44px;
    padding: 0 12px 0 44px !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    border-radius: 6px !important;
    background-color: rgba(255,255,255,.12) !important;
    color: #fff !important;
    font-size: 15px;
    box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.sie-login-v2 .form-group:has(> #Usuario)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8f2fa' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E") !important;
}

.sie-login-v2 .form-group:has(> #Contrasenia)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8f2fa' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") !important;
}

.sie-login-v2 #Usuario:focus,
.sie-login-v2 #Contrasenia:focus {
    border-color: #7fd0f5 !important;
    box-shadow: 0 0 0 3px rgba(43,170,226,.25) !important;
    outline: none;
}
/* Íconos: los dibuja el contenedor del campo (::after), no el campo. Así ni el autocompletar de Chrome
   (que borra el fondo del campo) ni la plantilla (que juega con .form-bar al escribir) los pueden quitar */
.sie-login-v2 .auth-box .form-group {
    position: relative;
}

.sie-login-v2 .auth-box .form-bar {
    display: none !important;
}
/* la línea animada de la plantilla */
.sie-login-v2 .form-group:has(> #Usuario)::after,
.sie-login-v2 .form-group:has(> #Contrasenia)::after {
    content: "";
    display: block;
    position: absolute;
    left: 13px;
    bottom: 0;
    width: 19px;
    height: 44px;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 19px 19px !important;
    opacity: .9;
    pointer-events: none;
    z-index: 3;
}

.sie-login-v2 .auth-box input::placeholder {
    color: #b3c8d8 !important;
    opacity: 1 !important;
}
/* Autocompletar de Chrome: no deja que pinte el campo de celeste (se le "congela" el fondo con una transición
   muy larga, así se mantienen nuestro fondo y el ícono) y el texto queda blanco. Va con #id para ganarle a la regla de arriba */
.sie-login-v2 #Usuario:-webkit-autofill,
.sie-login-v2 #Usuario:-webkit-autofill:hover,
.sie-login-v2 #Usuario:-webkit-autofill:focus,
.sie-login-v2 #Contrasenia:-webkit-autofill,
.sie-login-v2 #Contrasenia:-webkit-autofill:hover,
.sie-login-v2 #Contrasenia:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    transition: background-color 600000s 0s, color 600000s 0s !important;
}

/* --- Combo de Empresa (DevExpress) con el mismo recuadro --- */
.sie-login-v2 .sie-grupo-empresa .dxeButtonEdit_DevEx {
    width: 100% !important;
    height: 44px;
    border: 1px solid rgba(255,255,255,.22) !important;
    border-radius: 6px !important;
    background: rgba(255,255,255,.12) !important;
    overflow: hidden;
}

    .sie-login-v2 .sie-grupo-empresa .dxeButtonEdit_DevEx .dxeEditArea_DevEx,
    .sie-login-v2 .sie-grupo-empresa .dxeButtonEdit_DevEx input {
        background: transparent !important;
        color: #fff !important;
        font-size: 15px !important;
    }

.sie-login-v2 .sie-grupo-empresa .dxeButtonEditButton_DevEx {
    background: transparent !important;
    border: 0 !important;
    width: 34px;
}
/* La flechita del combo viene oscura de DevExpress: se pasa a blanco para que se vea sobre el azul */
/* Texto seleccionado dentro de los campos: el azul fuerte de Windows contrasta mal sobre el azul marino; va en celeste SIE suave */
.sie-login-v2 .auth-box input::selection,
.sie-login-v2 .sie-grupo-empresa input::selection {
    background: rgba(127,208,245,.35);
    color: #fff;
}
/* La flechita triangular de DevExpress se esconde y en su lugar va el mismo chevron del mockup */
.sie-login-v2 .sie-grupo-empresa td.dxeButtonEditButton_DevEx:last-child img,
.sie-login-v2 .sie-grupo-empresa td.dxeButtonEditButton_DevEx:last-child [class*="dxEditors_edtDropDown"] {
    opacity: 0 !important;
}

.sie-login-v2 .sie-grupo-empresa td.dxeButtonEditButton_DevEx:last-child {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8f2fa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / 18px 18px !important;
    opacity: .9;
}

/* --- Lista desplegable del combo de Empresa (DevExpress la dibuja aparte, al final del body) ---
   Mismo azul marino de la tarjeta, texto claro, la empresa bajo el mouse en azul SIE */
.sie-login-v2 .dxpcDropDown_DevEx,
.sie-login-v2 .dxeDropDownWindow_DevEx {
    border: 1px solid rgba(127,208,245,.25) !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(10,20,30,.45) !important;
    background: #20374a !important;
}

    .sie-login-v2 .dxpcDropDown_DevEx .dxeListBox_DevEx,
    .sie-login-v2 .dxeDropDownWindow_DevEx .dxeListBox_DevEx,
    .sie-login-v2 .dxeListBox_DevEx .dxeLTM,
    .sie-login-v2 .dxeListBox_DevEx table,
    .sie-login-v2 .dxeListBox_DevEx div {
        background: #20374a !important;
        border: 0 !important;
    }

.sie-login-v2 .dxeListBoxItem_DevEx {
    color: #e3eef6 !important;
    font-family: 'Segoe UI', Calibri, sans-serif !important;
    font-size: 14px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    border-bottom: 1px solid rgba(255,255,255,.06) !important;
    background: transparent !important;
}

.sie-login-v2 .dxeListBoxItemHover_DevEx,
.sie-login-v2 .dxeListBoxItemHover_DevEx td,
.sie-login-v2 tr.dxeListBoxItemRow_DevEx:hover td {
    background: rgba(43,170,226,.35) !important;
    color: #fff !important;
}

.sie-login-v2 .dxeListBoxItemSelected_DevEx,
.sie-login-v2 .dxeListBoxItemSelected_DevEx td {
    background: linear-gradient(90deg, #2baae2, #1E95CF) !important;
    color: #fff !important;
}

.sie-login-v2 .dxeListBoxItem_DevEx > img,
.sie-login-v2 .dxeIIC > img {
    border-radius: 3px;
}
/* Barra de desplazamiento de la lista, delgada y en azul SIE */
.sie-login-v2 .dxeListBox_DevEx * {
    scrollbar-width: thin;
    scrollbar-color: rgba(43,170,226,.6) transparent;
}

.sie-login-v2 .dxeListBox_DevEx ::-webkit-scrollbar {
    width: 6px;
}

.sie-login-v2 .dxeListBox_DevEx ::-webkit-scrollbar-thumb {
    background: rgba(43,170,226,.6);
    border-radius: 6px;
}

.sie-login-v2 .dxeListBox_DevEx ::-webkit-scrollbar-track {
    background: transparent;
}

/* --- Botón Ingresar: azul SIE con degradado (le gana al style en línea) --- */
.sie-login-v2 .hoverButton {
    background: linear-gradient(135deg, #2baae2, #1E95CF) !important;
    border: 0 !important;
    border-radius: 6px !important;
    height: 46px;
    font-size: 18px !important;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(30,149,207,.35);
    transition: filter .15s ease, box-shadow .15s ease;
}

    .sie-login-v2 .hoverButton:hover {
        background: linear-gradient(135deg, #3bb6ea, #2baae2) !important;
        box-shadow: 0 10px 24px rgba(30,149,207,.45);
    }

/* --- Pie: copyright, versión e Idioma, separados por una línea fina --- */
.sie-login-v2 .sie-pie-login {
    border-top: 1px solid rgba(255,255,255,.14);
    padding-top: 14px !important;
}

    .sie-login-v2 .sie-pie-login .text-white-100 {
        color: #d7e6f1 !important;
    }

    .sie-login-v2 .sie-pie-login a.text-white-100,
    .sie-login-v2 .sie-pie-login .fa-globe {
        color: #7fd0f5 !important;
    }

/* --- Celular: la tarjeta usa casi todo el ancho --- */
@media (max-width: 500px) {
    .sie-login-v2 .auth-box {
        width: calc(100vw - 24px) !important;
        max-width: 420px;
    }

    .sie-login-v2 #Usuario, .sie-login-v2 #Contrasenia {
        font-size: 16px;
    }
    /* evita el zoom del iPhone */
}

/* --- Logo: sombra muy leve para que el borde blanco se despegue del fondo translúcido y se lea más definido --- */
.sie-login-v2 .sie-logo-login {
    filter: drop-shadow(0 1px 1.5px rgba(10,20,30,.45));
}
