/* ============================================================
   GENERAL
   ============================================================ */
html, body {
    background-color: #1e222d !important;
    color: #d1d4dc !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;    
}

.app-container {
    background-color: #1e222d;
    min-height: 100vh;
    color: #d1d4dc;
}

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

.content {
    padding-top: 1.1rem;
}

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

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

.btn-primary {
    background-color: #2962ff !important;
    border-color: #2962ff !important;
    color: #fff !important;
}

    .btn-primary:hover {
        background-color: #1a4fd0 !important;
        border-color: #1a4fd0 !important;
    }

.btn-secondary {
    background-color: #363a45 !important;
    border-color: #363a45 !important;
    color: #d1d4dc !important;
}

    .btn-secondary:hover {
        background-color: #3a3f4a !important;
    }

.btn-success {
    background-color: #00d4aa !important;
    border-color: #00d4aa !important;
    color: #1e222d !important;
}

    .btn-success:hover {
        background-color: #00b892 !important;
    }

.btn-danger {
    background-color: #f23645 !important;
    border-color: #f23645 !important;
    color: #fff !important;
}

    .btn-danger:hover {
        background-color: #d42a38 !important;
    }

.btn-outline-light {
/*    border-color: #363a45 !important;
    color: #d1d4dc !important;*/
}

    .btn-outline-light:hover {
        background-color: #363a45 !important;
    }

.btn-outline-secondary {
    border-color: #363a45 !important;
    color: #d1d4dc !important;
}

    .btn-outline-secondary:hover {
        background-color: #363a45 !important;
    }

/* ============================================================
   FORMULARIOS
   ============================================================ */
.form-half {
    max-width: 30%;
    min-width: 300px;
}

.form-control,
.form-select {
    background-color: #1e222d !important;
    border: 1px solid #363a45 !important;
    color: #d1d4dc !important;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #2962ff !important;
        box-shadow: 0 0 0 0.2rem rgba(41, 98, 255, 0.25) !important;
        background-color: #1e222d !important;
        color: #d1d4dc !important;
    }

    .form-control:disabled,
    .form-control[readonly] {
        background-color: #2a2e39 !important;
        color: #787b86 !important;
    }

.form-label {
    color: #d1d4dc !important;
    font-weight: 500;
}

.form-check-label {
    color: #d1d4dc !important;
}

/* ============================================================
   TARJETAS
   ============================================================ */
.card {
    background-color: #2a2e39 !important;
    border: 1px solid #363a45 !important;
    border-radius: 8px !important;
    color: #d1d4dc !important;
}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid #363a45 !important;
    color: #d1d4dc !important;
}

.card-body {
    color: #d1d4dc !important;
}

.card-title {
    color: #d1d4dc !important;
}

.card-subtitle {
    color: #787b86 !important;
}

.card .text-muted {
    color: #787b86 !important;
}

/* ============================================================
   MODALES
   ============================================================ */
.modal-content {
    background-color: #2a2e39 !important;
    border: 1px solid #363a45 !important;
    color: #d1d4dc !important;
}

.modal-header {
    border-bottom: 1px solid #363a45 !important;
}

.modal-footer {
    border-top: 1px solid #363a45 !important;
}

.modal-title {
    color: #d1d4dc !important;
}

/* ============================================================
   NAVBAR - DROPDOWNS
   ============================================================ */
.app-navbar .dropdown-menu {
    background-color: #2a2e39 !important;
    border: 1px solid #363a45 !important;
}

.app-navbar .dropdown-item {
    color: #d1d4dc !important;
    background-color: transparent !important;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}

    .app-navbar .dropdown-item i {
        color: #787b86;
    }

    .app-navbar .dropdown-item:hover,
    .app-navbar .dropdown-item:focus {
        background-color: #363a45 !important;
        color: #ffffff !important;
    }

        .app-navbar .dropdown-item:hover i,
        .app-navbar .dropdown-item:focus i {
            color: #2962ff;
        }

/* ============================================================
   ALERTAS
   ============================================================ */
.alert-success {
    background-color: #2a2e39 !important;
    border-color: #00d4aa !important;
    color: #00d4aa !important;
}

.alert-danger {
    background-color: #2a2e39 !important;
    border-color: #f23645 !important;
    color: #f23645 !important;
}

.alert-warning {
    background-color: #2a2e39 !important;
    border-color: #f0b400 !important;
    color: #f0b400 !important;
}

/* ============================================================
   LISTAS
   ============================================================ */
.list-group-item {
    background-color: #2a2e39 !important;
    border-color: #363a45 !important;
    color: #d1d4dc !important;
}

.list-group-item-primary {
    background-color: #1a2a4a !important;
    border-color: #2962ff !important;
    color: #d1d4dc !important;
}

.list-group-item-light {
    background-color: #2a2e39 !important;
    color: #787b86 !important;
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress {
    background-color: #3a3f4a !important;
}

.progress-bar {
    background-color: #2962ff !important;
}

/* ============================================================
   COLORES DE TEXTO
   ============================================================ */
.text-light {
    color: #d1d4dc !important;
}

.text-muted {
    color: #787b86 !important;
}

.text-success {
    color: #00d4aa !important;
}

.text-danger {
    color: #f23645 !important;
}

.text-primary {
    color: #2962ff !important;
}

/* ============================================================
   SCROLL
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #1e222d;
}

::-webkit-scrollbar-thumb {
    background: #363a45;
    border-radius: 3px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #787b86;
    }

/* ============================================================
   TABLAS
   ============================================================ */

/* Contenedor con scroll */
.table-responsive-scroll {
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
}

/* Fijar encabezado - FONDO OSCURO */
.table-fixed-header {
    position: sticky;
    top: 0;
    z-index: 20;
}

    .table-fixed-header thead th {
        position: sticky;
        top: 0;
        background-color: #1e222d !important; /* ✅ Forzar fondo oscuro */
        border-bottom: 1px solid #363a45 !important;
        color: #787b86 !important;
        font-weight: 500;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
        box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
        /**/
        vertical-align: top !important;
        /* También podés agregar esto para mejor legibilidad */
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

/* Encabezados de tabla con fondo gris oscuro */
.header-gris-no-orden {
    background-color: #787b86 !important;
    color: #d1d4dc !important;
    /*cursor: pointer !important;*/
    transition: background-color 0.2s !important;
}

.orden-icon {
    font-size: 0.7rem;
    margin-left: 4px;
    color: #787b86;
}

/* Fijar pie de tabla */
.table-fixed-footer tfoot td,
.table-fixed-footer tfoot th {
    position: sticky;
    bottom: 0;
    /*background-color: #1e222d !important;*/
    background-color: #787b86 !important;
    z-index: 20;
    border-top: 1px solid #363a45 !important;
    box-shadow: 0 -2px 2px -1px rgba(0, 0, 0, 0.1);
}

/* Estilos base de tabla */
.table {
    background-color: transparent !important;
    color: #d1d4dc !important;
}

    /* ⚠️ NO forzar color en td con estilo inline */
    .table tbody td {
        border-bottom: 1px solid #363a45 !important;
        /* ❌ NO color: #d1d4dc !important */
    }

        /* ✅ Color por defecto SOLO para celdas SIN estilo inline */
        .table tbody td:not([style]) {
            color: #d1d4dc !important;
        }

/* Fondo de filas alternadas SOLO si no tienen estilo inline */
.table-striped tbody tr:not([style]) {
    background-color: #22262f !important;
}

    .table-striped tbody tr:not([style]):nth-of-type(even) {
        background-color: transparent !important;
    }

.table-hover tbody tr:hover td:not([style]) {
    /*background-color: #2a2e39 !important;*/
}

/* tfoot */
.table tfoot td {
    background-color: #1e222d !important;
    border-top: 1px solid #363a45 !important;
    color: #d1d4dc !important;
}

.table tfoot tr {
    background-color: #1e222d !important;
}

/* ============================================================
   ENCABEZADOS ORDENABLES
   ============================================================ */
.table-fixed-header th.ordenable-header {
    background-color: #2a2e39 !important;
    cursor: pointer !important;
    color: #d1d4dc !important;
}

.table-fixed-header th.ordenable-header:hover {
    background-color: #363a45 !important;
}


/* ============================================================
   TENENCIAS - FLEX
   ============================================================ */
.flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.flex-item {
    flex: 1;
    min-width: 400px;
}

    .flex-item table {
        width: 100% !important;
    }

/* ============================================================
   HOME PAGE
   ============================================================ */
.home-container {
    background-color: #1e222d;
    min-height: 100vh;
    padding: 20px;
    color: #d1d4dc;
}

    .home-container .card {
        background-color: #2a2e39 !important;
        border: 1px solid #363a45 !important;
    }

    .home-container .card-header {
        background-color: transparent !important;
        border-bottom: 1px solid #363a45 !important;
    }

    .home-container .card-body {
        color: #d1d4dc !important;
    }

    .home-container .text-muted {
        color: #787b86 !important;
    }

.bg-dark-secondary {
    background-color: #2a2e39 !important;
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #1e222d;
}

.login-card {
    background-color: #2a2e39;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

    .login-card h2 {
        color: #d1d4dc;
        margin-bottom: 0.5rem;
    }

    .login-card p {
        color: #787b86;
        margin-bottom: 2rem;
    }

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background-color: #fff;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .btn-google:hover {
        background-color: #e8eaed;
    }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/*@media (max-width: 991.98px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }
}*/

.fila-sector-oscura {
    background-color: #1e222d !important;
    color: whitesmoke !important;
}

.gris-claro {
    background-color: #2a2e39 !important;
    color: #d1d4dc !important;
}

.texto-debajo-titulos {    
    color: antiquewhite
}

.btn-refrescar {
    border-color: #363a45 !important;
    background:#2962ff;
    color: #d1d4dc !important;    
    width:100px
}

.btn-limpiar {
    border-color: #363a45 !important;
    background: #787b86 !important;
    color: #d1d4dc !important;
    width: 100px
}
    .btn-limpiar:hover {
        background: #1e222d !important;
        /*border-color: #5a5d66 !important;*/
        color: #ffffff !important;
    }
.btn-excel {
    border-color: #363a45 !important;
    background: #2c9b40 !important;
    color: #d1d4dc !important;
    width: 100px
}
.btn-nuevo-agregar {
    border-color: #363a45 !important;
    background: #2c9b40;
    color: #d1d4dc !important;
    width: 100px
}
.btn-cancelar {
    border-color: #363a45 !important;
    background: #f23645;
    color: #d1d4dc !important;
    width: 100px
}

.btn-fuente-grid {
    
}
    .btn-fuente-grid:hover {        
        color: #1e222d !important;

    }



.input-group-text {
    background-color: #1e222d !important;
    border: 1px solid #363a45 !important;
    color: #787b86 !important;
}

.form-control::placeholder,
.form-select::placeholder {
    color: #787b86 !important;
    opacity: 1;
}

/* ============================================================
   NAVBAR - Ítems del menú (SIEMPRE: ícono arriba, texto abajo)
   ============================================================ */
.app-navbar .navbar-nav .nav-link,
.app-navbar .navbar-nav .dropdown-toggle {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; /* ✅ Centrar horizontalmente */
    justify-content: center !important; /* ✅ Centrar verticalmente */
    text-align: center !important; /* ✅ Centrar texto */
    padding: 8px 12px !important;
    min-width: 70px !important;
    font-size: 0.75rem !important;
    gap: 2px !important;
    line-height: 1.2 !important;
    color: #c9d1d9 !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    width: auto !important;
    height: auto !important;
    /* ✅ Agregado para asegurar centrado */
    text-align-last: center !important;
    text-justify: center !important;
}

    /* ✅ Íconos - FORZAR CENTRADO */
    .app-navbar .navbar-nav .nav-link i,
    .app-navbar .navbar-nav .dropdown-toggle i {
        display: block !important;
        font-size: 1.6rem !important;
        margin-right: 0 !important;
        margin-left: 0 !important; /* ✅ Quitar margen izquierdo */
        margin-bottom: 2px !important;
        width: 100% !important; /* ✅ Ocupar todo el ancho */
        line-height: 1 !important;
        color: #c9d1d9 !important;
        float: none !important;
        /* ✅ Forzar centrado del ícono */
        text-align: center !important;
        align-self: center !important;
        justify-self: center !important;
    }

    /* ✅ Texto - FORZAR CENTRADO */
    .app-navbar .navbar-nav .nav-link span,
    .app-navbar .navbar-nav .dropdown-toggle span {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }



/* ============================================================
   REDUCIR TAMAÑO GENERAL DE LA APP
   ============================================================ */
html {
    font-size: 87.5% !important; /* 14px en lugar de 16px (equivalente a zoom 87.5%) */
}

/* Ajustar espaciados de Bootstrap */
.container, .container-fluid {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Reducir márgenes y paddings de tarjetas */
.card {
    margin-bottom: 0.75rem !important;
}

.card-body {
    padding: 0.75rem 1rem !important;
}

/* Reducir tamaño de títulos de tarjetas */
.card-title {
    font-size: 1.3rem !important;
}

.card-subtitle {
    font-size: 0.75rem !important;
}

/* Reducir tamaño de tablas */
.table {
    font-size: 0.85rem !important;
}

    .table td, .table th {
        padding: 0.4rem 0.5rem !important;
    }

/* Reducir tamaño de botones */
.btn {
    font-size: 0.8rem !important;
    padding: 0.3rem 0.6rem !important;
}

.btn-sm {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
}

/* Reducir tamaño de formularios */
.form-control, .form-select {
    font-size: 0.85rem !important;
    padding: 0.3rem 0.5rem !important;
}

.form-label {
    font-size: 0.85rem !important;
    margin-bottom: 0.2rem !important;
}

/* Reducir espaciado entre filas */
.row.g-3 {
    --bs-gutter-y: 0.5rem !important;
    --bs-gutter-x: 0.5rem !important;
}

/* Reducir márgenes de la navbar */
.app-navbar .navbar-nav .nav-link {
    padding: 6px 8px !important;
    font-size: 0.7rem !important;
}

/* Reducir tamaño de los encabezados */
h1 {
    font-size: 1.8rem !important;
}

h2 {
    font-size: 1.5rem !important;
}

h3 {
    font-size: 1.2rem !important;
}

h4 {
    font-size: 1rem !important;
}

h5 {
    font-size: 0.9rem !important;
}

h6 {
    font-size: 0.8rem !important;
}

.custom-select-dark {
    background-color: #2a2e39 !important;
    color: #d1d4dc !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d1d4dc' stroke-width='2' fill='none'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px !important;
    padding-right: 2rem !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Stop Trailing - Tabla transparente */
.tabla-stop-trailing {
    background-color: transparent !important;
    color: white !important;
}

    .tabla-stop-trailing thead,
    .tabla-stop-trailing tbody,
    .tabla-stop-trailing tr,
    .tabla-stop-trailing th,
    .tabla-stop-trailing td {
        background-color: transparent !important;
        color: white !important;
        border-color: rgba(255, 255, 255, 0.1);
    }

        .tabla-stop-trailing tbody tr:hover {
            background-color: rgba(255, 255, 255, 0.05) !important;
        }


.toast-header {
    background-color: black !important;
    color: #f23645 !important;
}
.toast-body {
    /*background-color: #2962ff !important;*/
    background-color: black !important;
    color: whitesmoke !important;
}
.btn-close {
    background-color: whitesmoke !important;
    color: whitesmoke !important;
}