﻿

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }


html, body {
    overflow-x: hidden;
    height: 100%;
    font-family: "Montserrat", "Open Sans", sans-serif;
/*    background-color: red;
*/    font-size: 14px;
    color: #343a40;
    line-height: 1.6;
}


.layout-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--bs-body-bg);
}

.sidebar {
    background-color: #0d6efd;
    color: white;
    width: 250px;
    transition: width 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 1rem 0.75rem;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    position: relative;
}
    .sidebar.collapsed:not(.mobile-visible) .nav-link .label {
        opacity: 0;
        width: 0px;
        overflow: hidden;
        transition: opacity 0.3s ease, width 0.3s ease;
    }

    .sidebar.collapsed:not(.mobile-visible) {
        width: 70px;
    }
        .sidebar.collapsed:not(.mobile-visible) .submenu-arrow {
            display: none;
        }
    .sidebar .nav-link.active .submenu-arrow {
        transform: rotate(90deg); /* flecha hacia abajo */
    }

    .sidebar .nav-link {
        padding: 0.65rem 0.85rem;
        border-radius: 0.375rem;
        transition: background-color 0.2s ease, border-left 0.2s ease;
        font-size: 1rem;
        font-weight: 500;
        position: relative;
        display: flex;
        align-items: center;
        border-left: 3px solid transparent;
    }

        .sidebar .nav-link i {
            font-size: 1.2rem;
            width: 24px;
            text-align: center;
            animation: iconPulse 1s infinite ease-in-out alternate;
        }

        .sidebar .nav-link span.label {
            /*  margin-left: 0.85rem;
            transition: opacity 0.3s ease;
            white-space: nowrap;*/
            margin-left: 0.85rem;
            transition: opacity 0.3s ease, width 0.3s ease;
            white-space: nowrap;
            display: inline-block;
            opacity: 1;
            width: auto;
        }

    .sidebar.collapsed:not(.mobile-visible) .nav-link span.label {
        opacity: 0;
        width: 0;
        overflow: hidden;
    }

    .sidebar .nav-link .submenu-arrow {
        margin-left: auto;
        font-size: 0.75rem;
        transition: transform 0.3s ease;
    }

    .sidebar .nav-link.active .submenu-arrow {
        transform: rotate(90deg);
    }

    .sidebar .nav-link:hover,
    .sidebar .nav-link.active {
        background-color: rgba(255, 255, 255, 0.06);
        border-left: 3px solid white;
    }

    .sidebar.mobile-hidden {
        transform: translateX(-100%);
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 250px;
    }

    .sidebar.mobile-visible {
        transform: translateX(0);
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        background-color: #0d6efd;
        z-index: 1051;
    }
    .sidebar .nav-link.toggle-submenu {
        cursor: pointer;
    }
    /* Esconde completamente los textos del menú en colapsado (solo escritorio) */
   

    /* Asegura que el sidebar desaparece en móvil cuando está oculto */
    .sidebar.mobile-hidden {
        display: none !important;
    }
    .sidebar.collapsed:not(.mobile-visible):hover .nav-link span.label {
        opacity: 1 !important;
        width: auto !important;
        overflow: visible;
    }

/* Añade animación opcional cuando se despliega */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.sidebar.mobile-visible {
    animation: slideInLeft 0.3s ease-out;
}
.sidebar.collapsed:not(.mobile-visible):hover {
    width: 250px;
    z-index: 1051;
}

.sidebar.collapsed:not(.mobile-visible):hover .nav-link .label {
    opacity: 1;
    width: auto;
    overflow: visible;
}
/* Submenu animation */
.submenu-enter {
    animation: fadeIn 0.25s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Topbar */
.topbar {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1040;
}



.topbar .btn-hamburger {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #212529;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
    .topbar .btn-hamburger:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }




/* Main content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #e8e9eb;
}

/* Badge */
.badge-pill {
    background-color: #dc3545;
    color: white;
    font-size: 0.65rem;
    padding: 0.2em 0.5em;
    border-radius: 10rem;
    margin-left: auto;
    animation: ping 1.5s infinite;
}

@keyframes ping {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    75% {
        transform: scale(1.3);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Icon pulse */
@keyframes iconPulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

/* Backdrop for mobile menu */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    z-index: 1049;
}

.form-floating .form-control:focus {
    border-color: #66afe9;
    box-shadow: 0 0 5px rgba(102, 175, 233, 0.6);
    transition: all 0.3s ease-in-out;
}

/* Opcional: también cuando esté activo */
.form-floating .form-control:not(:placeholder-shown) {
    border-color: #66afe9;
}
/*.mud-popover {
    background-color: white !important;
    border: 1px solid #dee2e6;
    box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    z-index: 3000 !important;
}

.mud-picker {
    background-color: white !important;
    color: #212529;
    border-radius: 0.75rem !important;
   
}
.custom-datepicker .mud-input-slot {
    background-color: white !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px;
    padding: 0.5rem;
    border-radius: 0.75rem !important;
    justify-content: space-between  !important;
    text-align: center;
}*/

/*Tablas*/
/* Estilo por defecto: ícono de + (fa-plus-circle) */
/*table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f055";*/ /* fa-plus-circle */
    /*color: #0d6efd;
    font-size: 1.1rem;
    border: none;
    background: none;
    vertical-align: middle;
    line-height: 1;
    margin-right: 4px;
}*/

/* Cuando está abierto (ícono de - fa-minus-circle) */
/*table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
    content: "\f056";*/ /* fa-minus-circle */
/*}*/
table.dataTable.dtr-column > tbody > tr > td.control:before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f055";  
    color: #0d6efd;
    font-size: 1.2rem;
}

table.dataTable.dtr-column > tbody > tr.parent > td.control:before {
    content: "\f056"; 
}



/* Asegura que no haya overflow bloqueado globalmente */
 

/* Asegura que los tabs sean scrollables horizontalmente */
.panel-header-resumen {
    background-color: #e9f7ef; /* verde claro, cambia si deseas */
    color: #155724; /* texto verde oscuro */
    font-weight: bold;
    border-radius:10px 10px 10px 10px;
    border:1px dashed black; 
    margin-bottom:20px;
}
.panel-header-detalles {
    background-color: #d6eaf8; /* azul más notorio */
    color: #154360; /* azul profundo para texto */
    font-weight: bold;
    border-radius: 10px 10px 10px 10px;
    border: 1px dashed black;
    margin-bottom: 20px;
}
.panel-header-acciones {
    background-color: #fff9e6; /* amarillo claro */
    color: #7d6608; /* amarillo oscuro tipo ámbar */

    font-weight: bold;
    border-radius: 10px 10px 10px 10px;
    border: 1px dashed black;
    margin-bottom: 20px;
}
.subusuario-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 .1rem .25rem rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
}

.subusuario-card-header:hover {
    background-color: #fff;
    box-shadow: 0 .25rem .5rem rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.subusuario-card-body {
    border-left: 4px solid #0d6efd;
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 .05rem .2rem rgba(0, 0, 0, 0.05);
    margin-top: 4px;
}

.info-subusuario {
    padding: 0.5rem 0;
}
.chk-deposito {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #198754; /* Verde Bootstrap */
    cursor: pointer;
}
/* El contenedor define la ALTURA; Chart.js se adapta gracias a maintainAspectRatio:false */
.chart-container {
    position: relative;
    height: 300px;
}

@media (min-width: 768px) {
    .chart-container {
        height: 340px;
    }
}