html,
body {
    font-family: "Inter", "Segoe UI", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
}

h1:focus {
    outline: none;
}

#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-ui .reload {
    margin-left: 1rem;
}

.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: rgb(217, 13, 111);
    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;
    color: rgb(217, 13, 111);
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Cargando");
}

#app {
    font-family: inherit;
}

.mud-drawer .nav-menu-tree-wrap .mud-input-control .mud-input-slot input {
    font-size: var(--mud-typography-caption-size, 0.8125rem);
}

.mud-drawer .mud-treeview-item-content .mud-icon-root,
.mud-drawer .mud-nav-menu .mud-nav-link .mud-icon-root {
    font-size: 1.125rem !important;
    width: 1.125rem !important;
    height: 1.125rem !important;
}

.mud-table-head .mud-table-cell:not(.filter-header-cell),
.mud-table-head .mud-table-cell:not(.filter-header-cell) .mud-typography,
.mud-table-head .mud-table-cell:not(.filter-header-cell) .mud-text-primary,
.mud-table-head .mud-table-cell:not(.filter-header-cell) .mud-text-secondary,
.mud-table-head .mud-table-cell:not(.filter-header-cell) label {
    color: var(--mud-palette-appbar-text) !important;
}

.mud-table-head .mud-table-cell:not(.filter-header-cell) {
    background-color: var(--mud-palette-appbar-background);
    font-weight: 600;
    border-bottom: 1px solid color-mix(in srgb, var(--mud-palette-appbar-text) 22%, transparent);
}

.mud-table-head .mud-table-cell:not(.filter-header-cell) .mud-table-sort-label,
.mud-table-head .mud-table-cell:not(.filter-header-cell) .mud-table-sort-label-icon {
    color: var(--mud-palette-appbar-text) !important;
}

.mud-table-head .mud-table-cell:not(.filter-header-cell) .mud-icon-button {
    color: var(--mud-palette-appbar-text) !important;
}

.mud-table-head .mud-table-cell:not(.filter-header-cell) .mud-icon-button:hover {
    background-color: color-mix(in srgb, var(--mud-palette-appbar-text) 14%, transparent);
}

.mud-table-body .mud-table-cell {
    font-size: var(--mud-typography-body1-size, 1rem);
    line-height: var(--mud-typography-body1-lineheight, 1.5);
    font-weight: var(--mud-typography-body1-weight, 400);
}

/* Catálogo SmartVentas: recuadro uniforme (global, sin depender del CSS aislado) */
.catalogo-card .catalogo-card-media {
    height: 160px;
    min-height: 160px;
    max-height: 160px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.catalogo-card .catalogo-card-media .catalogo-card-img {
    max-width: 100%;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.catalogo-cards-grid .catalogo-grid-item {
    display: flex;
    align-items: stretch;
}

.catalogo-cards-grid .catalogo-card {
    width: 100%;
    min-height: 360px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tabla: miniatura fija 40×40 */
.catalogo-table .catalogo-thumb {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

.catalogo-table .catalogo-thumb-img {
    max-width: 40px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.catalogo-table .mud-table-cell:first-child {
    width: 56px;
    max-width: 56px;
    padding-top: 4px;
    padding-bottom: 4px;
    vertical-align: middle;
}
