﻿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;
}

.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: #9FC031;
    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, "Cargando");
}

#app {
    font-family: inherit;
}

/* Fondo degradado simétrico mientras Blazor WASM carga (0–100%). */
body:has(.loading-progress),
#app:has(.loading-progress) {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(145deg, #ecfccb 0%, #f4f6f8 45%, #ecfccb 100%) !important;
}

html.app-dark body:has(.loading-progress),
html.app-dark #app:has(.loading-progress),
html.dark body:has(.loading-progress),
html.dark #app:has(.loading-progress) {
    background: linear-gradient(145deg, #4a5f18 0%, #1a1a27 45%, #4a5f18 100%) !important;
}

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

/* Campos de solo lectura / numeric decimal FoxData */
.fox-field-readonly.mud-input-control .mud-input.mud-input-outlined {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 8%, var(--mud-palette-surface));
    border-radius: var(--mud-default-borderradius, 4px);
}
.fox-field-readonly.mud-input-control .mud-input.mud-input-outlined .mud-input-outlined-border {
    border-color: color-mix(in srgb, var(--mud-palette-lines-default) 65%, var(--mud-palette-primary) 35%);
}
.fox-field-readonly.mud-input-control .mud-input-slot.mud-input-root-outlined {
    background-color: transparent;
    cursor: default;
}
.fox-field-readonly.mud-input-control input[readonly],
.fox-field-readonly.mud-input-control textarea[readonly] {
    cursor: default;
}

/* Paneles con fondo suave (gastos). */
.mud-paper.cond-gasto-totales-panel {
    align-self: stretch;
    background-color: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface)) !important;
}