﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

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

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgO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z4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.spinner {
    border: 16px solid #72c02c;
    border-top: 16px solid #161717;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.alinear-spinner-50 {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50vh;
}

/* Para dispositivos móviles */
@media screen and (max-width: 767px) {
    .card-login {
        width: 90%;
        margin: 0 auto;
    }

    /* Ocultar los botones en móviles */
    .hide-on-mobile {
        display: none !important;
    }

    /* Mostrar el menú desplegable en móviles */
    .show-on-mobile {
        display: block !important;
    }

    .flex-column-on-mobile {
        flex-direction: column !important;
        align-items: flex-start !important; /* Alinea los elementos a la izquierda */
        margin-left: 0 !important; /* Asegúrate de que no hay margen a la izquierda */
    }

    .full-height-scrollable {
        height: calc(100vh - 200px);
        overflow-y: auto;
        width: 100%;
        margin: 0 auto;
        margin-top: 20px;
    }

    .full-height-scrollable-arqueos {
        height: calc(100vh - 200px);
        overflow-y: auto;
        width: 100%;
        margin: 0 auto;
        margin-top: 20px;
    }
}

/* Para pantallas de escritorio o dispositivos con un ancho mínimo de 768px */
@media screen and (min-width: 768px) {
    .card-login {
        width: 50%;
        margin: 0 auto;
    }

    .donut-inner-text {
        font-size: 0.2rem; /* Tamaño para pantallas grandes */
    }

    /* Asegurarse de que los botones sean visibles en pantallas más grandes */
    .hide-on-mobile {
        display: block !important;
    }

    /* Ocultar el menú desplegable en pantallas más grandes */
    .show-on-mobile {
        display: none !important;
    }

    .full-height-scrollable {
        height: calc(100vh - 200px);
        overflow-y: auto;
        width: 60%;
        margin: 0 auto;
        margin-top: 20px;
    }

    .full-height-scrollable-arqueos {
        height: calc(100vh - 200px);
        overflow-y: auto;
        width: 90%;
        margin: 0 auto;
        margin-top: 20px;
    }
}

/* Para dispositivos con un ancho máximo de 768px */
@media only screen and (max-width: 768px) {
    .donut-inner-text {
        font-size: 2px;
    } 
}


.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.fondo-difuso {
    backdrop-filter: blur(10px);
}

.margin-left-botones {
    margin-left: 5px !important;
}

.margin-right-botones {
    margin-right: 5px !important;
}

.shadow-effect {
    transition: box-shadow 0.3s;
    cursor: pointer;
}

.shadow-effect:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.responsive-image {
    max-width: 100%; /* Esto hace que la imagen sea máx. del 100% del contenedor padre */
    height: auto; /* Esto mantiene la relación de aspecto de la imagen */
    display: block; /* Evita que la imagen sea inline y permite margin/padding */
}


/* ========================================
   CSS GENÉRICO PARA TABLAS - DARK MODE
   ======================================== */

/* Contenedores de tabla */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
}

/* Tablas base - TODOS los selectores posibles */
table,
.table,
table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}

    /* Headers de tabla - Modo Light - MÁS ESPECÍFICO */
    table thead th,
    table th,
    .table thead th,
    .table th,
    table.table thead th,
    table.table th {
        background-color: #1976d2 !important;
        color: white !important;
        padding: 12px 8px !important;
        font-weight: 600 !important;
        border: 1px solid #1565c0 !important;
        text-align: left !important;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    /* Celdas de datos - Modo Light */
    table tbody td,
    table td,
    .table tbody td,
    .table td,
    table.table tbody td,
    table.table td {
        padding: 8px !important;
        border-bottom: 1px solid var(--mud-palette-lines-default) !important;
        color: var(--mud-palette-text-primary) !important;
        transition: background-color 0.2s ease;
    }

    /* Filas hover - Modo Light */
    table tbody tr:hover,
    table tr:hover,
    .table tbody tr:hover,
    .table tr:hover,
    table.table tbody tr:hover,
    table.table tr:hover {
        background-color: rgba(25, 118, 210, 0.05) !important;
    }

    /* Filas alternadas - Modo Light */
    table tbody tr:nth-child(even),
    .table tbody tr:nth-child(even),
    table.table tbody tr:nth-child(even) {
        background-color: rgba(0, 0, 0, 0.02) !important;
    }

/* Texto alineado a la derecha */
.text-right {
    text-align: right !important;
}

/* Texto centrado */
.text-center {
    text-align: center !important;
}

/* ========================================
   MODO DARK - ESTILOS ESPECÍFICOS
   ======================================== */

/* Contenedores en Dark Mode */
.mud-theme-dark .table-responsive,
body.mud-theme-dark .table-responsive,
html.mud-theme-dark .table-responsive {
    background: var(--mud-palette-surface) !important;
    border-color: rgba(114, 192, 44, 0.2) !important;
}

/* Tablas en Dark Mode */
.mud-theme-dark table,
.mud-theme-dark .table,
.mud-theme-dark table.table,
body.mud-theme-dark table,
body.mud-theme-dark .table,
body.mud-theme-dark table.table,
html.mud-theme-dark table,
html.mud-theme-dark .table,
html.mud-theme-dark table.table {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
}

    /* Headers en Dark Mode - MUY ESPECÍFICO */
    .mud-theme-dark table thead th,
    .mud-theme-dark table th,
    .mud-theme-dark .table thead th,
    .mud-theme-dark .table th,
    .mud-theme-dark table.table thead th,
    .mud-theme-dark table.table th,
    body.mud-theme-dark table thead th,
    body.mud-theme-dark table th,
    body.mud-theme-dark .table thead th,
    body.mud-theme-dark .table th,
    body.mud-theme-dark table.table thead th,
    body.mud-theme-dark table.table th,
    html.mud-theme-dark table thead th,
    html.mud-theme-dark table th,
    html.mud-theme-dark .table thead th,
    html.mud-theme-dark .table th,
    html.mud-theme-dark table.table thead th,
    html.mud-theme-dark table.table th {
        background-color: #2d2d2d !important;
        color: #72c02c !important;
        border-color: rgba(114, 192, 44, 0.3) !important;
    }

    /* Celdas en Dark Mode */
    .mud-theme-dark table tbody td,
    .mud-theme-dark table td,
    .mud-theme-dark .table tbody td,
    .mud-theme-dark .table td,
    .mud-theme-dark table.table tbody td,
    .mud-theme-dark table.table td,
    body.mud-theme-dark table tbody td,
    body.mud-theme-dark table td,
    body.mud-theme-dark .table tbody td,
    body.mud-theme-dark .table td,
    body.mud-theme-dark table.table tbody td,
    body.mud-theme-dark table.table td,
    html.mud-theme-dark table tbody td,
    html.mud-theme-dark table td,
    html.mud-theme-dark .table tbody td,
    html.mud-theme-dark .table td,
    html.mud-theme-dark table.table tbody td,
    html.mud-theme-dark table.table td {
        color: var(--mud-palette-text-primary) !important;
        border-bottom-color: rgba(255, 255, 255, 0.1) !important;
    }

    /* Hover en Dark Mode */
    .mud-theme-dark table tbody tr:hover,
    .mud-theme-dark table tr:hover,
    .mud-theme-dark .table tbody tr:hover,
    .mud-theme-dark .table tr:hover,
    .mud-theme-dark table.table tbody tr:hover,
    .mud-theme-dark table.table tr:hover,
    body.mud-theme-dark table tbody tr:hover,
    body.mud-theme-dark table tr:hover,
    body.mud-theme-dark .table tbody tr:hover,
    body.mud-theme-dark .table tr:hover,
    body.mud-theme-dark table.table tbody tr:hover,
    body.mud-theme-dark table.table tr:hover,
    html.mud-theme-dark table tbody tr:hover,
    html.mud-theme-dark table tr:hover,
    html.mud-theme-dark .table tbody tr:hover,
    html.mud-theme-dark .table tr:hover,
    html.mud-theme-dark table.table tbody tr:hover,
    html.mud-theme-dark table.table tr:hover {
        background-color: rgba(114, 192, 44, 0.08) !important;
    }

    /* Filas alternadas en Dark Mode */
    .mud-theme-dark table tbody tr:nth-child(even),
    .mud-theme-dark .table tbody tr:nth-child(even),
    .mud-theme-dark table.table tbody tr:nth-child(even),
    body.mud-theme-dark table tbody tr:nth-child(even),
    body.mud-theme-dark .table tbody tr:nth-child(even),
    body.mud-theme-dark table.table tbody tr:nth-child(even),
    html.mud-theme-dark table tbody tr:nth-child(even),
    html.mud-theme-dark .table tbody tr:nth-child(even),
    html.mud-theme-dark table.table tbody tr:nth-child(even) {
        background-color: rgba(255, 255, 255, 0.02) !important;
    }

/* ========================================
   ESTILOS ESPECIALES PARA SUBTOTALES Y TOTALES
   ======================================== */

/* Filas de grupo/categoría */
table tr td[style*="font-weight: bold"],
table tr td[style*="font-style: italic"],
.table tr td[style*="font-weight: bold"],
.table tr td[style*="font-style: italic"] {
    background-color: rgba(25, 118, 210, 0.1) !important;
    color: #1976d2 !important;
    font-weight: bold !important;
}

/* Texto en negrita y cursiva (subtotales) */
table td b i,
table td i b,
.table td b i,
.table td i b {
    color: #1976d2 !important;
}

/* Dark Mode para elementos especiales */
.mud-theme-dark table tr td[style*="font-weight: bold"],
.mud-theme-dark table tr td[style*="font-style: italic"],
.mud-theme-dark .table tr td[style*="font-weight: bold"],
.mud-theme-dark .table tr td[style*="font-style: italic"],
body.mud-theme-dark table tr td[style*="font-weight: bold"],
body.mud-theme-dark table tr td[style*="font-style: italic"],
body.mud-theme-dark .table tr td[style*="font-weight: bold"],
body.mud-theme-dark .table tr td[style*="font-style: italic"],
html.mud-theme-dark table tr td[style*="font-weight: bold"],
html.mud-theme-dark table tr td[style*="font-style: italic"],
html.mud-theme-dark .table tr td[style*="font-weight: bold"],
html.mud-theme-dark .table tr td[style*="font-style: italic"] {
    background-color: rgba(114, 192, 44, 0.15) !important;
    color: #72c02c !important;
}

.mud-theme-dark table td b i,
.mud-theme-dark table td i b,
.mud-theme-dark .table td b i,
.mud-theme-dark .table td i b,
body.mud-theme-dark table td b i,
body.mud-theme-dark table td i b,
body.mud-theme-dark .table td b i,
body.mud-theme-dark .table td i b,
html.mud-theme-dark table td b i,
html.mud-theme-dark table td i b,
html.mud-theme-dark .table td b i,
html.mud-theme-dark .table td i b {
    color: #72c02c !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    table {
        font-size: 12px;
    }

        table thead th,
        table th {
            padding: 8px 4px;
        }

        table tbody td,
        table td {
            padding: 6px 4px;
        }

    .table-responsive {
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    table {
        font-size: 11px;
    }

        table thead th,
        table th {
            padding: 6px 2px;
        }

        table tbody td,
        table td {
            padding: 4px 2px;
        }
}

/* ========================================
   UTILIDADES ADICIONALES
   ======================================== */

/* Para ocultar elementos en móviles */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }

    .show-on-mobile {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    .show-on-mobile {
        display: none !important;
    }

    .hide-on-mobile {
        display: initial !important;
    }
}

/* Márgenes para botones */
.margin-left-botones {
    margin-left: 8px;
}