@media print {
    /* Hide chrome that has no place on paper. */
    .sidebar,
    .top-row,
    .nav-scrollable,
    .navbar,
    .mud-appbar,
    .mud-drawer,
    .mud-snackbar-container,
    .mud-overlay,
    #blazor-error-ui,
    .loading-progress,
    .loading-progress-text {
        display: none !important;
    }

    /* Hide interactive bits inside the printed page. */
    .no-print,
    .mud-button-root,
    .mud-icon-button,
    .mud-input-control,
    .mud-tabs-toolbar {
        display: none !important;
    }

    /* Show the active tab panel only, flatten its container. */
    .mud-tabs-panels {
        height: auto !important;
        overflow: visible !important;
    }
    .mud-tab-panel {
        display: block !important;
    }

    /* Strip card chrome so tables get the full page. */
    .mud-paper,
    .mud-container {
        background: none !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }

    main,
    .content {
        overflow: visible !important;
        height: auto !important;
        padding: 0 !important;
    }

    /* Tables. */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }
    th, td {
        border: 1px solid #999 !important;
        padding: 4px 6px !important;
        font-size: 11pt !important;
    }
    thead {
        display: table-header-group; /* repeat header on each page */
    }
    tr {
        page-break-inside: avoid;
    }

    /* Force black on white for ink savings + legibility. */
    body, html {
        background: #fff !important;
        color: #000 !important;
    }

    /* Drop the colored chips down to plain text. */
    .mud-chip {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #666 !important;
    }

    @page {
        margin: 1cm;
    }
}
