html, body {
    font-family: 'Roboto', sans-serif;
    height: 100%;
    margin: 0;
    /* Driven by MudThemeProvider so it tracks light/dark mode. */
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

.mud-layout {
    height: 100vh;
}

.mud-main-content {
    height: calc(100vh - 48px);
    overflow-y: auto;
    padding-bottom: 0 !important;
    --mud-bottom-appbar-height: 0px !important;
}

/* List pages: keep the page header and table header fixed; only the table rows scroll. */
.list-page {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.list-page-header {
    flex-shrink: 0;
}

.list-page-table {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

    .list-page-table > .mud-table {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

        .list-page-table > .mud-table > .mud-table-container {
            flex: 1 1 auto;
            min-height: 0;
        }

.field-card {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.field-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18) !important;
}

.selected-field {
    border-color: var(--mud-palette-primary) !important;
    background-color: var(--mud-palette-primary-hover) !important;
}

/* Ensure MudBlazor confirmation dialogs render above custom overlays */
.mud-dialog-container {
    z-index: 10002 !important;
}

/* Syncfusion PDF viewer full height */
.e-pdfviewer {
    height: 100% !important;
}

/* Slimmer snackbars — vertically tighter, smaller text. Position is set globally to TopCenter
   in Program.cs; mud-snackbar-location-top-center already centers the stack horizontally. */
.mud-snackbar {
    min-height: 32px !important;
    padding: 4px 12px !important;
    font-size: 0.8125rem !important;
    line-height: 1.25 !important;
}
.mud-snackbar .mud-snackbar-content-message {
    padding: 2px 0 !important;
}
.mud-snackbar .mud-icon-button {
    padding: 2px !important;
    width: 24px;
    height: 24px;
}
