/* Application chrome that lives outside the Blazor/MudBlazor render tree: the boot splash, the
   error bar, and the print stylesheet for the consolidated report (SPEC-009).
   Everything else is themed through Theme/GfgTheme.cs and css/gfg-tokens.css.
   Note: no global font-family here on purpose — it would override the theme typography. */

h1:focus {
    outline: none;
}

/* ---------------------------------------------------------------- Boot splash --
   First thing anyone sees: light paper field with a turquoise progress ring. */
body {
    margin: 0;
    background-color: #f6f9f8;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 7rem;
    height: 7rem;
    inset: 30vh 0 auto 0;
    margin: 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e2e9e8;
        stroke-width: 0.35rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #2fae9a;
            stroke-linecap: round;
            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;
    inset: calc(30vh + 2.9rem) 0 auto 0;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #28333b;
}

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

/* ------------------------------------------------------------------ Error bar -- */
#blazor-error-ui {
    color-scheme: light only;
    background: #28333b;
    color: #ffffff;
    border-top: 3px solid #71e4d1;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
    bottom: 0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.7rem 1.25rem 0.8rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .reload {
        color: #71e4d1;
        font-weight: 600;
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.6rem;
    }

.blazor-error-boundary {
    background: #c0392b;
    padding: 1rem 1.25rem;
    color: white;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}

    .blazor-error-boundary::after {
        content: "Ocurrió un error inesperado.";
    }

.validation-message {
    color: #c0392b;
}

/* ---------------------------------------------------------------------- Print --
   Drop the app chrome and every interactive control so the browser produces a clean
   report page (SPEC-009: apto para impresión, carta horizontal). */
@media print {
    @page {
        size: letter landscape;
        margin: 10mm;
    }

    .mud-appbar,
    .mud-drawer,
    .mud-drawer-mini,
    .gfg-rail,
    .report-toolbar,
    .report-toggle,
    .report-actions,
    .page-header__actions,
    .periods-filters,
    .mud-snackbar-location-bottom-left,
    .mud-overlay {
        display: none !important;
    }

    .mud-main-content {
        padding: 0 !important;
        margin: 0 !important;
        background: #fff !important;
    }

    .mud-layout,
    .mud-container {
        background: #fff !important;
        max-width: none !important;
        padding: 0 !important;
    }

    /* Sticky offsets are meaningless on paper and would clip rows. */
    .report-table thead th,
    .report-table td.name,
    .report-bar {
        position: static !important;
    }

    .table-wrap {
        overflow: visible !important;
        border: none !important;
        box-shadow: none !important;
    }

    .kpi {
        break-inside: avoid;
        box-shadow: none !important;
    }

    .report-table tr {
        break-inside: avoid;
    }
}
