#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: "Ocorreu um erro inesperado. Recarregue a página ou procure o suporte.";
}

.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");
}

code {
    color: #c02d76;
}

.mud-table-cell {
    padding: 2px 4px 2px 4px !important;
    padding-inline-start: 4px !important;
    padding-inline-end: 4px !important;
}

.mud-table .mud-button-filled-size-small {
    padding: 0 6px !important;
    font-size: 0.7625rem !important;
}

.align-text-end, 
.align-text-end input {
    text-align: end !important;
}

.align-text-right, 
.align-text-right input {
    text-align: right !important;
}

.align-text-center, 
.align-text-center input {
    text-align: center !important;
}

.C-Uppercase input.mud-input-slot {
    text-transform: uppercase;
}

/* Estilos para o Floating Action Button (FAB) */
.mud-fab-bottom-right {
    position: fixed !important;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

/* Melhorias visuais para tabelas */
.mud-table-container {
    border-radius: 4px;
    overflow: hidden;
}

/* Texto truncado com ellipsis */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Alinhamento de ícones nos chips */
.mud-chip .mud-icon-root {
    margin-right: 4px;
}

/* Coluna do IPI com posicionamento relativo para ancorar o switch */
.ipi-col {
    position: relative;
}

/* Switch acima do campo, sem ocupar altura */
.ipi-switch {
    position: absolute;
    top: -14px; /* ajuste fino conforme seu tema */
    left: 70px; /* ou right: 8px; se preferir */
}

/* Rótulo do switch */
.ipi-switch-label {
    position: absolute;
    top: -2px;
    left: 125px; /* alinha ao lado do switch */
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.ipi-percent {
    top: -24px;
}

.nav-menu-search .nav-menu-search-input,
.nav-menu-search-input,
.nav-menu-search input.mud-input-slot {
    color: #fff !important;
}

.nav-menu-search .nav-menu-search-input::placeholder,
.nav-menu-search-input::placeholder,
.nav-menu-search input.mud-input-slot::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

.floating-navmenu.mud-paper,
.floating-navmenu {
    position: fixed;
    top: var(--mud-appbar-height, 64px);
    left: 0;
    width: 300px;
    max-height: calc(100vh - var(--mud-appbar-height, 64px));
    overflow: auto;
    z-index: 1400;
    background-color: var(--mud-palette-drawer-background) !important;
    background: var(--mud-palette-drawer-background) !important;
    color: var(--mud-palette-drawer-text) !important;
    border-right: 1px solid var(--mud-palette-divider);
    border-radius: 0;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.floating-navmenu .mud-nav-link,
.floating-navmenu .mud-nav-group,
.floating-navmenu .mud-navmenu {
    color: var(--mud-palette-drawer-text);
}

.floating-navmenu .mud-icon-root {
    color: var(--mud-palette-drawer-icon);
}

.floating-navmenu .mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.floating-navmenu .mud-nav-group .mud-nav-link,
.floating-navmenu .mud-nav-group .mud-nav-link-text {
    color: var(--mud-palette-drawer-text);
}

.floating-navmenu .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.floating-navmenu .mud-input:hover .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.45) !important;
}

.appbar-menu-activator {
    display: inline-flex;
    align-items: center;
}

.appbar-hubs {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    margin-right: 4px;
}

.appbar-hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.appbar-hub-label {
    color: #ff6b35 !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.appbar-hub-badge {
    min-width: 24px !important;
    height: 24px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: #4caf50 !important;
    color: #fff !important;
    pointer-events: none;
}

.appbar-hub-badge .mud-chip-content,
.appbar-hub-badge .mud-chip-label,
.appbar-hub-badge .mud-typography {
    color: #fff !important;
    font-weight: 700;
}

.ci-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: calc(100vh - 140px);
    color: #2b2b2b;
}

.ci-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ci-title {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ci-subtitle {
    margin: 2px 0 0;
    color: #6b7280;
    font-size: 0.92rem;
}

.ci-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ci-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.ci-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: #4b5563;
    padding: 10px 12px 12px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.ci-tab--active {
    color: #111827;
    border-bottom-color: #e11d48;
}

.ci-tab-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: #fb7185;
    color: #fff;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ci-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ci-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
    gap: 8px;
    flex: 1;
    align-items: end;
}

.ci-date-range {
    display: flex;
    gap: 8px;
    align-items: end;
}

.ci-date-range .sb-period-date { width: 170px; }

.ci-date-range .sb-period-date input {
    text-align: center !important;
}

.ci-date-range .sb-period-date .mud-picker-inline,
.ci-date-range .sb-period-date .mud-picker-open,
.ci-date-range .sb-period-date .mud-picker-paper {
    width: auto !important;
    min-width: 300px !important;
}

.ci-date-range .sb-period-date .mud-picker-paper {
    transform: scale(0.9);
    transform-origin: top left;
}

.ci-legend {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}

.ci-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ci-situacao {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.ci-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}

.ci-dot--novo { background: #9ca3af; }
.ci-dot--visto { background: #eab308; }
.ci-dot--aprovado { background: #16a34a; }
.ci-dot--devolvido { background: #dc2626; }

.ci-action--novo,
.ci-action--novo .mud-icon-root,
.ci-action--novo svg { color: #9ca3af !important; fill: currentColor; }
.ci-action--visto,
.ci-action--visto .mud-icon-root,
.ci-action--visto svg { color: #eab308 !important; fill: currentColor; }
.ci-action--aprovado,
.ci-action--aprovado .mud-icon-root,
.ci-action--aprovado svg { color: #16a34a !important; fill: currentColor; }
.ci-action--devolvido,
.ci-action--devolvido .mud-icon-root,
.ci-action--devolvido svg { color: #dc2626 !important; fill: currentColor; }

.ci-codigo {
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.ci-desc {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    max-width: 340px;
    white-space: normal;
}

.ci-desc strong {
    font-size: 0.88rem;
    line-height: 1.25;
}

.ci-desc small {
    color: #6b7280;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ci-vez {
    color: #b91c1c;
    font-weight: 700;
}

.ci-vez--done {
    color: #166534;
}

.ci-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.ci-pill--ok { background: #dbeafe; color: #1d4ed8; }
.ci-pill--ask { background: #fef3c7; color: #b45309; }
.ci-pill--rev { background: #ede9fe; color: #6d28d9; }
.ci-pill--no { background: #fee2e2; color: #b91c1c; }
.ci-pill--sign { background: #fce7f3; color: #be185d; }

.ci-atividade {
    width: 100%;
    margin: 16px 0 8px 0;
}

.app-dark .sb-table-collapsebar .sb-table-title,
.app-dark .sb-table-collapsebar .sb-table-title *,
[data-mud-theme="dark"] .sb-table-collapsebar .sb-table-title,
[data-mud-theme="dark"] .sb-table-collapsebar .sb-table-title * {
    color: #fff !important;
}

.app-dark .ci-page,
[data-mud-theme="dark"] .ci-page {
    color: var(--mud-palette-text-primary);
}

.app-dark .ci-title,
[data-mud-theme="dark"] .ci-title {
    color: #ff6b35 !important;
}

.app-dark .ci-tab,
[data-mud-theme="dark"] .ci-tab {
    color: rgba(255, 255, 255, 0.72);
}

.app-dark .ci-tab--active,
[data-mud-theme="dark"] .ci-tab--active {
    color: #fff !important;
}

@media (max-width: 1100px) {
    .ci-filters {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

