@import url('materialicons/materialiconsRegular.css');
@import url('cssEstilosCompanias/estilosCompanias.css');
@import url('tablerIcons/tabler-icons.min.css');
@import url('fonts/fonts.css');

/* ==============================
   Dark Mode Variables y Estilos
   ============================== */
:root {
    /*Light mode*/
    --bg-color: #ffffff;
    --text-color: #000000;
    --navbar-bg: #f8f9fa;
    --card-bg: #ffffff;
    --color-background-body: #f1f5fb;
    --color-body: #474f5c;
    --color-primary: #226ce7;
    --color-muted: #9ca2ae;
    --color-white: white;
    --color-black: black;
    --bg-modal: rgba(0, 0, 0, 0.5); /* Negro con transparencia */
    --bg-modalBody: white;
    --bg-body: white;
    /*ColoresCliente*/
    --colorBgPrimary: red;
    --colorPrimary: red;
    --colorBgSecundary: blue;
    --colorSecundary: blue;
    --bgc-header: red;
    --color-header: white;
    /*fuentes del proyecto*/
    --font-title: 'Marcellus', Arial;
    --font-principal: 'Segoe UI', serif; 
    --font-special: 'Segoe UI', cursive;
    /* Uso de clamp() para tamaños de fuente responsivos que se ajustan automáticamente basados en el viewport sin necesidad de media queries */
    --tamano-fuente-peq: clamp(0.8rem, 0.7rem + 0.5vw, 1rem);
    --tamano-fuente-base: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
    --tamano-fuente-grande: clamp(1.5rem, 1.4rem + 0.5vw, 2rem);
    --tamano-fuente-xl: clamp(2rem, 1.8rem + 1vw, 3rem);
}

.dark-mode {
    --bg-color: #121212;
    --text-color: #f5f5f5;
    --navbar-bg: #1f1f1f;
    --card-bg: #1e1e1e;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--color-background-body);
    background-color: var(--bg-color);
    color: var(--color-body);
    color: var(--text-color);
    font-size: var(--tamano-fuente-peq);
    font-family: var(--font-principal);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2 {
    font-family: var(--font-title);
}

/* Ajustes opcionales para Bootstrap */
.navbar, .card {
    background-color: var(--navbar-bg) !important;
    color: var(--text-color) !important;
}

.btn-theme {
    border: none;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

    .btn-theme:hover {
        transform: scale(1.1);
    }

@media (width >= 500px) {
    body {
        padding: 0;
    }
}

.font-size_principal {
    font-size: 1rem;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.1rem #258cfb;
}

.btn:focus, .btn:active:focus {
    box-shadow: none;
    border: none;
}

.content {
    padding-top: 0.688rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5N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1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/*Table*/
.tablePersonalizada {
    font-size: var(--tamano-fuente-peq);
    vertical-align: middle;
}

.theadPersonalizada {
    font-weight: bold;
}

/*Modals*/
.fadeModalIn {
    -webkit-animation: fadeinout 0.2s linear forwards;
    animation: fadeinout 0.4s linear for;
}

@-webkit-keyframes fadeinout {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes fadeinout {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }
}

/*LoginControl*/
@keyframes move {
    100% {
        transform: translateY(-120px);
    }
}

.backgroundLogin {
    position: fixed;
    inset: 0;
}

    .backgroundLogin::before,
    .backgroundLogin::after {
        content: "";
        position: inherit;
        border-radius: 47% 53% 61% 39% / 45% 51% 49% 55%;
        width: 100vmin;
        height: 100vmin;
        animation: move 10s alternate infinite linear;
    }

    .backgroundLogin::before {
        top: -40vmin;
        left: -50vmin;
    }

    .backgroundLogin::after {
        right: -50vmin;
        bottom: -55vmin;
        animation-direction: alternate-reverse;
    }

    .backgroundLogin::before {
        background: var(--colorPrimary) !important;
    }

    .backgroundLogin::after {
        background: var(--colorSecundary) !important;
    }

.cardLogin {
    overflow: hidden;
    position: relative;
    z-index: 3;
    width: 85vw;
    margin: 5% 1.25rem;
    padding: 3.375rem 1.875rem;
    border-radius: 1.5rem;
    background: rgb(255 255 255 / 100%);
    backdrop-filter: blur(6.25rem);
    text-align: center;
    box-shadow: 0 6.25rem 6.25rem rgb(0 0 0 / 10%);
}

@media (width >= 680px) {
    .cardLogin {
        margin: 0;
        margin-top: 5%;
        width: 60vw;
        max-width: 26.25rem;
    }
}

.cardLogin .logo {
    position: absolute;
    top: 0;
    left: -10%;
    padding: 0.938rem 0;
    /*border-bottom-left-radius: 50%;
    border-bottom-right-radius: 50%;*/
    width: 120%;
    height: 7.75rem;
    margin-bottom: 1.25rem;
    object-fit: contain;
}

.cardLogin > h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 7.25rem 0 0.25rem;
}

.cardLogin > h3 {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 2.75rem;
    color: var(--color-muted);
}

.formLogin {
    margin: 0 0 2rem;
    display: grid;
    gap: 0.75rem;
}

    .formLogin :is(input, button) {
        width: 100%;
        height: 3.5rem;
        border-radius: 0.5rem;
        font-size: 1rem;
        font-family: inherit;
    }

.textboxLogin {
    position: relative;
}

    .textboxLogin input {
        border: 0;
        padding: 0 1rem 0 2.5rem !important;
        color: inherit;
        background: rgb(0 0 0 / 4%);
    }

        .textboxLogin input::placeholder {
            color: var(--color-muted);
        }

    .textboxLogin > span {
        position: absolute;
        top: 50%;
        left: 0.625rem;
        translate: 0 -50%;
        pointer-events: none;
        color: var(--color-muted);
    }

    .textboxLogin .iconLogin {
        color: var(--color-muted);
        font-size: 1.25rem !important;
        left: 0.625rem;
        pointer-events: none;
        position: absolute;
        translate: 0 -50%;
        top: 50%;
    }

.formLogin > button {
    border: 0;
    color: #f9f9f9;
    background: var(--colorPrimary);
    display: grid;
    place-items: center;
    font-weight: 500;
    cursor: pointer;
}

.cardLogin > footer {
    color: var(--color-muted);
    font-size: 1rem;
}

.cardLogin > a {
    display: block;
    margin: 0 0 3.5rem;
}

.cardLogin a {
    font-size: 1rem;
    font-weight: 500;
    color: #216ce7;
}

/*HeaderControl*/
header {
    font-family: var(--font-principal);
}

.textUserName {
    font-size: 0.75rem;
    font-weight: bold;
}

/*SidebarUser*/
/* Estilos básicos */
.logo {
    font-size: 0.938rem;
    color: white;
    text-decoration: none;
}

.menu-toggle {
    display: none;
    font-size: 0.938rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Links del menú */
.nav-links {
    display: flex;
    gap: 0.625rem;
}

    .nav-links a {
        color: white;
        text-decoration: none;
        font-weight: bold;
    }

    .nav-links button {
        color: white;
        text-decoration: none;
        font-weight: bold;
    }

/* Responsive: ocultar menú y mostrar botón */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 0.625rem;
    }

        .nav-links.open {
            display: flex;
        }

        .nav-links a {
            padding: 0.313rem 0;
        }

        .nav-links button {
            padding: 0.313rem 0;
        }
}

/* Suavizar la animación de aparición del menú */
.animated-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

    /* Cuando el menú está abierto */
    .animated-menu.show {
        max-height: 500px; /* Valor suficientemente alto para mostrar todo el contenido */
    }

/*SidebarUserControl*/
/* Fondo semitransparente */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-modal); 
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    pointer-events: none; /* Evita que interfiera cuando está oculto */
    z-index: 99;
}

    .overlay.visible {
        opacity: 1;
        pointer-events: auto;
    }

.sidebar-container {
    background: var(--bg-modalBody);
    box-shadow: -2px 0 5px var(--bg-modal);
    color: var(--color-black);
    font-size: 0.75rem;
    height: 100%;
    padding: 20px;
    position: fixed;
    right: -600px; /* Oculto por defecto */
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    top: 0;
    width: 800px;
    z-index: 100;
}

    .sidebar-container.visible {
        transform: translateX(0);
        right: 0;
    }

    .sidebar-container.hidden {
        transition: transform 0.3s ease;
        transform: translateX(100%);
        /*right: -300px;*/
    }

    .sidebar-container .form-control {
        font-size: 0.75rem;
        padding: 0.5rem !important;
    }

.close-button {
    background: red;
    border: none;
    padding: 0.625rem;
    cursor: pointer;
    color: white;
    font-size: 1rem;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .sidebar-container {
        width: 100%; /* En móviles ocupa toda la pantalla */
    }
}


/*AplicacionesControl*/
.aplicacionesControl {
    width: 100%;
}

    .aplicacionesControl .aplicacionesControl-Header {
        align-items: center;
        display: flex;
        justify-content: center;
        margin: .313rem; 
        width: 100%;
    }

    .aplicacionesControl .aplicacionesControl-Body {
        align-items: center;
        display: flex;
        justify-content: center;
    }

        .aplicacionesControl .aplicacionesControl-Body .listButtons {
            align-items: center;
            display: flex;
            justify-content: center;
        }

            .aplicacionesControl .aplicacionesControl-Body .listButtons .button {
                align-items: center;
                background: #00d4ff;
                background: linear-gradient(90deg, rgba(0, 212, 255, 1) 0%, rgba(5, 71, 161, 1) 91%);
                border-radius: 10%;
                color: white;
                display: flex;
                flex-direction: column;
                font-size: calc(0.813rem + .6vw);
                font-weight: bold;
                justify-content: center;
                object-fit: contain;
                padding: 0.938rem;
                position: relative;
                transition: all 0.5s ease;
                overflow: hidden;
            }

                .aplicacionesControl .aplicacionesControl-Body .listButtons .button::before {
                    content: '';
                    position: absolute;
                    top: -50%;
                    left: -50%;
                    width: 200%;
                    height: 200%;
                    background: linear-gradient( 0deg, transparent, transparent 30%, rgba(0,255,255,0.3) );
                    transform: rotate(-45deg);
                    transition: all 0.5s ease;
                    opacity: 0;
                }

                .aplicacionesControl .aplicacionesControl-Body .listButtons .button:hover {
                    transform: scale(1.05);
                    box-shadow: 0 0 20px rgba(0,255,255,0.5);
                }

                    .aplicacionesControl .aplicacionesControl-Body .listButtons .button:hover::before {
                        opacity: 1;
                        transform: rotate(-45deg) translateY(100%);
                    }

            .aplicacionesControl .aplicacionesControl-Body .listButtons .button img {
                object-fit:contain;
                height: 3.75rem;
            }

/*AplicacionesControl con metodología BEM*/
.aplicacionesControl {
    width: 100%;
}

.aplicacionesControl__header {
    align-items: center;
    display: flex;
    justify-content: center;
    margin: .313rem;
    width: 100%;
}

.aplicacionesControl__listaApps {
    align-items: center;
    display: flex;
    justify-content: center;
}

.listaApps__app {
    align-items: center;
    display: flex;
    justify-content: center;
    margin: 0.625rem 0;
}

.app__link {
    align-items: center;
    background: #00d4ff;
    background: linear-gradient(90deg, rgba(0, 212, 255, 1) 0%, rgba(5, 71, 161, 1) 91%);
    border-radius: .625rem;
    color: white;
    display: flex;
    flex-direction: column;
    font-size: .938rem;
    font-weight: bold;
    height: 6.25rem;
    justify-content: center;
    object-fit: contain;
    padding: .938rem;
    position: relative;
    transition: all 0.5s ease;
    overflow: hidden;
    width: 100%;
}

    .app__link::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient( 0deg, transparent, transparent 30%, rgba(0,212,255,0.3) );
        transform: rotate(-45deg);
        transition: all 0.5s ease;
        opacity: 0;
    }

    .app__link:hover {
        color: white;
        transform: scale(1.05);
        box-shadow: 0 0 1.25rem rgba(0,255,255,0.5);
    }

        .app__link:hover::before {
            opacity: 1;
            transform: rotate(-45deg) translateY(100%);
        }

/*Color de productos y aplicaciones Modificadores*/
.app__link--azul {
    background: #00d4ff;
    background: linear-gradient(90deg, rgba(0, 212, 255, 1) 0%, rgba(5, 71, 161, 1) 91%);
}

    .app__link--azul::before {
        background: linear-gradient( 0deg, transparent, transparent 30%, rgba(0,212,255,0.3) );
    }

    .app__link--azul:hover {
        box-shadow: 0 0 1.25rem rgba(0,212,255,0.5);
    }

.app__link--rojo {
    background: #F59980;
    background: linear-gradient(90deg,rgba(245, 153, 128, 1) 0%, rgba(191, 65, 102, 1) 91%);
}
    .app__link--rojo::before {
        background: linear-gradient( 0deg, transparent, transparent 30%, rgba(245, 153, 128,0.3) );
    }
    .app__link--rojo:hover {
        box-shadow: 0 0 1.25rem rgba(245, 153, 128,0.5);
    }

.app__link--default {
    background: #3B2667;
    background: linear-gradient(90deg,rgba(59, 38, 103, 1) 0%, rgba(165, 106, 214, 1) 91%);
}

    .app__link--default::before {
            background: linear-gradient( 0deg, transparent, transparent 30%, rgba(59, 38, 183,0.3) );
        }
    .app__link--default:hover {
        box-shadow: 0 0 1.25rem rgba(59, 38, 103,0.5);
    }

.link__img {
    object-fit: contain;
    height: 3.75rem;
}

input.is-invalid {
    outline: 1px solid #dc3545 !important;
}

.font-size-small {
    font-size: 0.8rem !important;
}

/* Animación personalizada para APRO Sistema */
.modal-zoom-in {
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Efecto rebote suave */
}

.modal.show .modal-zoom-in {
    transform: scale(1);
    opacity: 1;
}

/* Opcional: Difuminado del fondo más lento */
.modal-backdrop-blur {
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.4s ease;
}

.modal.show ~ .modal-backdrop-blur {
    backdrop-filter: blur(5px);
}

/* Animación para la barra de progreso del modal */
@keyframes modal-progress-shrink {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.animate-progress {
    animation-name: modal-progress-shrink;
    animation-fill-mode: forwards;
}