.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--mud-palette-success);
}

.invalid {
    outline: 1px solid var(--mud-palette-error);
}

.validation-message {
    color: var(--mud-palette-error);
}

#blazor-error-ui {
    color-scheme: light only;
    background: #FEF2F2;
    color: #991B1B;
    border-top: 2px solid #DC2626;
    bottom: 0;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
    font-weight: 600;
}

    #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: "Ha ocurrido un error."
    }

code {
    color: #c02d76;
}

/* ── Estandarización Global de Interfaz (1.0rem + High Density) ── */
html, body {
    font-size: 1.0rem !important;
    font-family: 'Inter', sans-serif !important;
}

/* Escala tipográfica corporativa sobre Inter (mínimo 12px en textos secundarios) */
.mud-typography {
    font-family: 'Inter', sans-serif !important;
}

.mud-typography-h4 {
    font-size: var(--sdd-text-2xl, 1.5rem);
    line-height: 1.25;
}

.mud-typography-h5 {
    font-size: var(--sdd-text-xl, 1.25rem);
    line-height: 1.3;
}

.mud-typography-h6 {
    font-size: var(--sdd-text-lg, 1.0625rem);
    line-height: 1.35;
}

.mud-typography-subtitle1 {
    font-size: var(--sdd-text-md, 0.9375rem);
    line-height: 1.4;
}

.mud-typography-subtitle2 {
    font-size: var(--sdd-text-sm, 0.8125rem);
    line-height: 1.4;
}

.mud-typography-body1 {
    font-size: var(--sdd-text-md, 0.9375rem);
    line-height: 1.5;
}

.mud-typography-body2 {
    font-size: var(--sdd-text-sm, 0.8125rem);
    line-height: 1.45;
}

.mud-typography-caption,
.mud-typography-overline {
    font-size: var(--sdd-text-xs, 0.75rem);
    line-height: 1.35;
}

/* Forzar apariencia "Dense" en todos los controles de entrada */
.mud-input-control {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}

.mud-input-slot {
    font-size: 1.0rem !important;
    padding-top: 12px !important; 
    padding-bottom: 12px !important;
}

.mud-input-label-outlined {
    transform: translate(14px, 18px) scale(1) !important;
}

.mud-input-label-outlined.mud-input-label-inputcontrol {
    transform: translate(14px, -8px) scale(0.75) !important;
    background-color: white !important;
    padding: 0 5px !important;
    z-index: 2;
}

.mud-input-outlined-border-inline {
    height: 48px !important;
}

.mud-button-root {
    font-size: 1.0rem !important;
    text-transform: none !important; /* Estilo más técnico */
}

/* ───────────────────────────────────────────────────────────── */

/* Forzar ancho total en contenedores */
.full-width-container {
    max-width: none !important;
    width: 100% !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}



.w-100 {
    width: 100% !important;
}

/* ── Limpieza de Cabeceras de Tablas (MudBlazor 9.x) ──── */
/* Ocultar los "6 puntos" de arrastre (drag-and-drop) para evitar que ocupen espacio en el header */
.drag-icon-options {
    display: none !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ocultar los "3 puntos simples" (menú de columna) */
.mud-menu-icon-button-activator {
    display: none !important;
}

/* ── Estándar de Tablas de Alta Densidad (30px) ─────────────────── */
/* Aplicable a MudTable y MudDataGrid globalmente */
.mud-table-row {
    height: var(--sdd-row-h, 40px) !important;
}

.mud-table-row .mud-table-cell {
    padding: 0px 8px !important;
    height: var(--sdd-row-h, 40px) !important;
    font-size: 1.0rem !important;
}

.mud-table-row .mud-table-cell .mud-chip {
    height: 20px !important;
    font-size: 0.75rem !important;
    padding: 0 8px !important;
}

.mud-table-row .mud-table-cell .mud-button-root.mud-icon-button {
    padding: 4px !important;
    margin: 0 !important;
    width: 28px !important;
    height: 28px !important;
}

.mud-table-row .mud-table-cell .mud-icon-root {
    font-size: 1.25rem !important;
}

/* Cabeceras estandarizadas con líneas divisorias verticales en gris claro */
.mud-table-head .mud-table-row {
    height: 40px !important;
}

.mud-table-head .mud-table-cell {
    background-color: var(--mud-palette-background-grey) !important;
    font-weight: bold !important;
    font-size: 1.0rem !important;
    padding: 2px 8px !important;
}

/* Líneas divisorias verticales entre columnas en los encabezados (gris claro sutil) */
.mud-table-head th:not(:last-child),
.mud-table-head .mud-table-cell:not(:last-child),
.mud-data-grid .mud-table-head th:not(:last-child),
.standard-grid .mud-table-head th:not(:last-child) {
    border-right: 1px solid var(--mud-palette-lines-default) !important;
}

/* ── MudDataGrid & MudTable: Alineación de encabezados Flex a la derecha y centro ── */
.mud-data-grid .mud-table-head th[style*="text-align:right"],
.mud-data-grid .mud-table-head th[style*="text-align: right"],
.mud-data-grid .mud-table-head th[style*="text-align:end"],
.mud-data-grid .mud-table-head th[style*="text-align: end"],
.mud-data-grid .mud-table-head th.header-align-right,
.mud-data-grid .mud-table-head th.text-right,
.mud-table .mud-table-head th[style*="text-align:right"],
.mud-table .mud-table-head th[style*="text-align: right"],
.mud-table .mud-table-head th.header-align-right,
.mud-table .mud-table-head th.text-right {
    text-align: right !important;
}

.mud-data-grid .mud-table-head th[style*="text-align:right"] .mud-data-grid-header-cell,
.mud-data-grid .mud-table-head th[style*="text-align: right"] .mud-data-grid-header-cell,
.mud-data-grid .mud-table-head th[style*="text-align:end"] .mud-data-grid-header-cell,
.mud-data-grid .mud-table-head th[style*="text-align: end"] .mud-data-grid-header-cell,
.mud-data-grid .mud-table-head th.header-align-right .mud-data-grid-header-cell,
.mud-data-grid .mud-table-head th.text-right .mud-data-grid-header-cell {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    text-align: right !important;
    width: 100% !important;
    margin-left: auto !important;
}

.mud-data-grid .mud-table-head th[style*="text-align:right"] .mud-data-grid-header-cell-sort-label,
.mud-data-grid .mud-table-head th[style*="text-align: right"] .mud-data-grid-header-cell-sort-label,
.mud-data-grid .mud-table-head th[style*="text-align:end"] .mud-data-grid-header-cell-sort-label,
.mud-data-grid .mud-table-head th[style*="text-align: end"] .mud-data-grid-header-cell-sort-label,
.mud-data-grid .mud-table-head th.header-align-right .mud-data-grid-header-cell-sort-label,
.mud-data-grid .mud-table-head th.text-right .mud-data-grid-header-cell-sort-label {
    display: inline-flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    text-align: right !important;
    width: 100% !important;
    margin-left: auto !important;
}

.mud-data-grid .mud-table-head th[style*="text-align:right"] .column-header,
.mud-data-grid .mud-table-head th[style*="text-align: right"] .column-header,
.mud-data-grid .mud-table-head th[style*="text-align:end"] .column-header,
.mud-data-grid .mud-table-head th[style*="text-align: end"] .column-header,
.mud-data-grid .mud-table-head th.header-align-right .column-header,
.mud-data-grid .mud-table-head th.text-right .column-header {
    text-align: right !important;
    display: inline-block !important;
}

.mud-table .mud-table-head th[style*="text-align:right"] .mud-table-sort-label,
.mud-table .mud-table-head th[style*="text-align: right"] .mud-table-sort-label {
    justify-content: flex-end !important;
}

.mud-data-grid .mud-table-head th[style*="text-align:center"] .mud-data-grid-header-cell,
.mud-data-grid .mud-table-head th[style*="text-align: center"] .mud-data-grid-header-cell {
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
}

.mud-data-grid .mud-table-head th[style*="text-align:center"] .mud-data-grid-header-cell-sort-label,
.mud-data-grid .mud-table-head th[style*="text-align: center"] .mud-data-grid-header-cell-sort-label {
    display: inline-flex !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
}

/* Fila seleccionada global (con contraste blanco y hover azul claro) */
.selected-user-row {
    background-color: var(--mud-palette-primary) !important;
    transition: background-color 0.15s ease-in-out;
}

.selected-user-row td,
.selected-user-row td *,
.selected-user-row .mud-icon-button,
.selected-user-row .mud-icon-root {
    color: #ffffff !important;
}

.selected-user-row:hover {
    background-color: var(--mud-palette-primary-darken) !important;
}

.selected-user-row:hover td,
.selected-user-row:hover td *,
.selected-user-row:hover .mud-icon-button,
.selected-user-row:hover .mud-icon-root {
    color: #ffffff !important;
}

/* ========================================
   ARTICULO DRAWER PANEL
   ======================================== */

/* Corregir iconos de inputs ocultos por regla global de .mud-drawer */
.fix-drawer-icons .mud-input-control .mud-icon-root {
    color: var(--mud-palette-text-secondary) !important;
}

/* ── Inputs compactos en el drawer de artículos ──────────────── */
/* Reducir altura de inputs outlined con Margin.Dense */
.fix-drawer-icons .mud-input-root-outlined.mud-input-root-adorned-start,
.fix-drawer-icons .mud-input-root-outlined.mud-input-root-adorned-end,
.fix-drawer-icons .mud-input-root-outlined {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    min-height: unset !important;
}

.fix-drawer-icons .mud-input.mud-input-outlined input,
.fix-drawer-icons .mud-input.mud-input-outlined textarea,
.fix-drawer-icons .mud-input-slot {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

/* Reducir label flotante */
.fix-drawer-icons .mud-input-label-outlined.mud-input-label-inputcontrol {
    font-size: 0.75rem !important;
}

/* Reducir selects */
.fix-drawer-icons .mud-select-input .mud-input-root {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

/* Reducir NumericField/TextField inner height */
.fix-drawer-icons .mud-input-control {
    margin-bottom: 4px !important;
}

.fix-drawer-icons .mud-input-outlined .mud-input-slot {
    min-height: 30px !important;
}

/* Ajustar icono botón + dentro de las filas */
.fix-drawer-icons .mud-icon-button {
    padding: 4px !important;
}

/* ========================================
   STANDARD DATA GRID (Contenedor y Paginación)
   ======================================== */
.full-width-grid .mud-table-root {
    width: 100% !important;
}

.standard-grid-container {
    position: relative !important;
    height: 100%;
    overflow: hidden;
    background-color: transparent !important;
}

.standard-grid-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.standard-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.standard-grid .mud-data-grid {
    height: 100% !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.standard-grid .mud-table-container {
    flex: 1 1 auto !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
}

.standard-grid .mud-table-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
    background-color: var(--mud-palette-surface) !important;
}

.standard-grid-no-toolbar .mud-table-toolbar {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.standard-grid-footer {
    flex: 0 0 auto;
    height: 48px;
    background-color: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-lines-default);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.standard-grid-body .mud-table-row,
.standard-grid-body .mud-table-root {
    background-color: transparent !important;
}

.sticky-footer {
    position: sticky;
    bottom: 0;
    background-color: var(--mud-palette-surface);
    z-index: 10;
    border-top: 1px solid var(--mud-palette-lines-default);
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.mud-bg-gray {
    background-color: var(--mud-palette-background-grey);
}
