/* Global: Montserrat + app theme (primary #2b59c3 via MudTheme) */
html {
    /* ~14px from 16px browser default — scales all rem-based Mud typography */
    font-size: 87.5%;
}

html,
body {
    font-family: "Montserrat", system-ui, sans-serif;
}

/* Stop work card — location field + GPS button on one row; field grows, button stays content-width */
.app-stopwork-location-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.app-stopwork-location-row {
    gap: 0.5rem 0.75rem;
}

.app-stopwork-location-field {
    flex: 1 1 260px;
    min-width: min(100%, 200px);
}

.app-stopwork-gps-controls {
    flex: 0 0 auto;
    max-width: 100%;
}

/* Caption under the GPS column only; spacer matches field width so text lines up with the button */
.app-stopwork-gps-caption-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.75rem;
    margin-top: 0.125rem;
}

.app-stopwork-gps-caption-spacer {
    flex: 1 1 260px;
    min-width: min(100%, 200px);
    min-height: 0;
    pointer-events: none;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.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: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* --- App-wide: pill / curved primary buttons --- */
.app-btn-pill.mud-button-root {
    /* border-radius: 9999px !important; */
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.mud-button-filled.mud-button-root,
.mud-button-outlined.mud-button-root {
    /* border-radius: 9999px !important; */
}

/* --- Auth pages: background (login / register) --- */
.auth-shell {
    min-height: 100vh;
}

.authentication-bg {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    padding: 2rem 1rem 3rem;
    background-color: #e8ecf4;
    background-image: url("/images/login-img.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

/* Theme-style veil over the photo (tune opacity or use rgba on background-color) */
.authentication-bg .bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #e8ecf4;
    opacity: 0.85;
}

.authentication-bg > .auth-page-inner {
    position: relative;
    z-index: 1;
}

.auth-page-inner {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.75rem;
}

.auth-brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(145deg, #1e3a8a 0%, #1e3a5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 14px rgba(43, 89, 195, 0.25);
}

.auth-brand-title {
    color: #1e3a5f !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

/* Login: Logo.svg is full-color (blues + white base layer). Do not use CSS filter — it
   recolors the whole graphic and turns the large white background path into a solid navy block. */
.auth-brand-logo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: 120px;
    width: auto;
    max-width: min(100%, 400px);
    object-fit: contain;
    object-position: center;
}

.auth-brand-logo--compact {
    height: 64px;
    max-width: min(100%, 220px);
    margin-bottom: 0.75rem;
}

.app-drawer-header-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
}

.app-drawer-logo {
    /* ~20% smaller than prior 64px / 240px cap */
    height: 51px;
    width: auto;
    max-width: min(100%, 192px);
    object-fit: contain;
    object-position: left center;
}

.auth-card {
    width: 100%;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 12px 40px rgba(30, 58, 95, 0.12) !important;
}

.auth-heading {
    color: #1e3a5f !important;
    font-weight: 700 !important;
}

.auth-subtitle {
    color: #64748b !important;
}

.auth-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.auth-label {
    color: #1e3a5f !important;
    font-weight: 700 !important;
}

.auth-link-forgot {
    color: #2b59c3 !important;
    font-weight: 500;
}

.auth-link-forgot:hover {
    text-decoration: underline;
}

.auth-input .mud-input-outlined-border {
    border-color: #cbd5e1 !important;
}

.auth-input .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #94a3b8 !important;
}

.auth-input .mud-input-outlined:focus-within .mud-input-outlined-border,
.auth-input .mud-input-outlined.mud-input-outlined-focused .mud-input-outlined-border {
    border-color: #2b59c3 !important;
}

.auth-input input::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

.auth-remember {
    color: #64748b;
}

.auth-remember label {
    color: #64748b !important;
}

.auth-footer-card {
    color: #64748b !important;
}

.auth-link-signup {
    color: #2b59c3 !important;
    font-weight: 600 !important;
}

.auth-site-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #64748b;
}

.auth-heart {
    color: #e11d48;
}

/* --- Main shell: match theme --- */
.app-page-title {
    color: #1e3a5f !important;
    font-weight: 700 !important;
    text-transform: none !important;
}

/* GHG Plan — summary tiles under emission grid */
.app-ghg-summary-wrap {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
}

.app-ghg-summary-tile {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%);
    height: 100%;
    box-sizing: border-box;
}

.letter-spacing-normal {
    letter-spacing: normal !important;
}

/* Dashboard — Permit to work horizontal bars */
.app-dashboard-ptw-total-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--mud-palette-primary, #2b59c3);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.app-dashboard-hbar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 180px;
}

.app-dashboard-hbar-row {
    display: grid;
    grid-template-columns: minmax(5.5rem, 30%) 1fr;
    gap: 0.5rem;
    align-items: stretch;
}

@media (min-width: 960px) {
    .app-dashboard-hbar-row {
        grid-template-columns: minmax(6rem, 28%) 1fr;
    }
}

.app-dashboard-hbar-y-label {
    font-size: 0.8125rem;
    color: #1e3a5f;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-self: center;
}

.app-dashboard-hbar-track {
    background: #eef2f7;
    border-radius: 6px;
    min-height: 30px;
    overflow: hidden;
}

.app-dashboard-hbar-fill {
    min-height: 30px;
    min-width: 1.5rem;
    background: linear-gradient(90deg, #2196f3 0%, #64b5f6 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 0.45rem;
    box-sizing: border-box;
    transition: width 0.25s ease;
}

.app-dashboard-hbar-fill-text {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* --- Global UI density: tighter spacing in main app (lists, forms, shell) --- */
.app-shell-page-container.mud-container {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

@media (min-width: 600px) {
    .app-shell-page-container.mud-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (min-width: 1280px) {
    .app-shell-page-container.mud-container {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

.app-dashboard-header.mud-paper {
    padding: 0.75rem 1rem !important;
    margin-bottom: 1rem !important;
}

@media (min-width: 600px) {
    .app-dashboard-header.mud-paper {
        padding: 1rem 1.125rem !important;
    }
}

.app-dashboard-header .mud-stack {
    gap: 0.75rem !important;
}

/* Common white cards (list bodies, edit forms) */
.mud-paper.app-surface-card.pa-4,
.mud-paper.app-surface-card.pa-4.pa-sm-5 {
    padding: 0.875rem 1rem !important;
}

@media (min-width: 600px) {
    .mud-paper.app-surface-card.pa-4.pa-sm-5 {
        padding: 1rem 1.125rem !important;
    }
}

.app-incidents-filters.mud-paper {
    padding: 0.65rem 0.85rem !important;
}

.app-incidents-filters .px-4.pb-4.pt-6 {
    padding: 1rem 1rem 0.85rem !important;
}

.app-incidents-stat .mud-stack.pa-4 {
    padding: 0.65rem 0.85rem !important;
}

.app-incidents-stat .app-page-title {
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
}

.app-shell-main .mud-table-head .mud-table-cell {
    padding: 0.45rem 0.65rem !important;
    font-size: 0.8125rem !important;
}

.app-shell-main .mud-table-body .mud-table-cell {
    padding: 0.4rem 0.65rem !important;
    font-size: 0.8125rem !important;
    vertical-align: middle;
}

.app-shell-main .mud-table-root {
    font-size: 0.8125rem;
}

.app-shell-main .mud-chip:not(.mud-chip-size-large) {
    height: 24px !important;
    min-height: 24px !important;
    font-size: 0.6875rem !important;
}

.app-shell-main .mud-button-root:not(.mud-icon-button) {
    min-height: 34px !important;
    font-size: 0.8125rem !important;
}

.app-shell-main .mud-button-root.mud-icon-button-size-small {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
}

/*
 * Sidebar logo band (MainLayout drawer header).
 * Manual tweaks: change padding (fourth value = space below logo before the divider line),
 * or border color/width. Logo image size: .app-drawer-logo above.
 */
.app-shell-drawer .mud-drawer-header {
    padding: 0.5rem 0.85rem 1rem 0.85rem !important;
    border-bottom: 1px solid var(--mud-palette-lines-default, #e2e8f0);
}

/* Space between the logo divider and the first nav link (e.g. Dashboard) */
.app-shell-drawer:not(.mud-drawer--closed) .mud-drawer-content > .app-sidebar-nav {
    padding-top: 0.625rem !important;
}

/*
 * Outlined fields: selected text in MudSelect sits in .mud-input-slot; typed values in
 * MudTextField / MudDatePicker / MudTimePicker live on input.mud-input-root / textarea,
 * which Mud often sizes larger — normalize so all outline fields match the select.
 */
.app-shell-main .mud-input-control input.mud-input-root,
.app-shell-main .mud-input-control textarea.mud-input-root,
.app-shell-main .mud-input.mud-input-outlined .mud-input-slot,
.app-shell-main .mud-select .mud-input-slot,
.app-shell-main .mud-select input.mud-input-root,
.app-shell-main .mud-autocomplete input.mud-input-root,
.app-shell-main .mud-autocomplete .mud-input-slot,
.app-shell-main .mud-picker-input input.mud-input-root,
.app-shell-main .mud-picker-input .mud-input-slot {
    font-size: 0.8125rem !important;
    line-height: 1.45 !important;
}

/*
 * MudTextField readonly “display” styling — OPT-IN ONLY.
 * Add Class="app-mud-readonly-field" alongside ReadOnly="true" (or conditional ReadOnly).
 * Never target input[readonly] in CSS: MudSelect, MudAutocomplete, and MudPicker also use
 * readonly on their inputs, so attribute-based rules always bleed into dropdowns/pickers.
 */
.mud-input-control.app-mud-readonly-field {
    --app-readonly-fill: color-mix(in srgb, var(--mud-palette-background-grey, #eceff1) 92%, var(--mud-palette-surface, #fff));
    --app-readonly-border: rgba(15, 23, 42, 0.09);
    --app-readonly-text: rgba(15, 23, 42, 0.42);
    /* Display-only: no focus / click — avoids outlined label “float” animation on click */
    pointer-events: none;
    cursor: default;
}

.mud-input-control.app-mud-readonly-field .mud-input-slot {
    background-color: var(--app-readonly-fill, #eef1f6) !important;
    border-radius: var(--mud-default-borderradius, 8px);
}

.mud-input-control.app-mud-readonly-field .mud-input-filled {
    background-color: var(--app-readonly-fill, #eef1f6) !important;
}

.mud-input-control.app-mud-readonly-field input.mud-input-root,
.mud-input-control.app-mud-readonly-field textarea.mud-input-root {
    color: var(--app-readonly-text, var(--mud-palette-text-secondary, rgba(15, 23, 42, 0.45))) !important;
    cursor: default;
    caret-color: transparent;
}

.mud-input-control.app-mud-readonly-field .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--app-readonly-border, rgba(15, 23, 42, 0.09)) !important;
}

.mud-input-control.app-mud-readonly-field:focus-within .mud-input-outlined .mud-input-outlined-border,
.mud-input-control.app-mud-readonly-field .mud-input-outlined.mud-input-outlined-focused .mud-input-outlined-border {
    border-color: rgba(15, 23, 42, 0.14) !important;
    border-width: 1px !important;
}

.app-shell-main .mud-divider.my-4 {
    margin-top: 0.85rem !important;
    margin-bottom: 0.85rem !important;
}

.app-shell-main .mud-divider.my-6 {
    margin-top: 1.15rem !important;
    margin-bottom: 1.15rem !important;
}

.app-shell-main .mud-paper.mb-4 {
    margin-bottom: 0.85rem !important;
}

.app-shell-main .mud-grid.mb-4 {
    margin-bottom: 0.85rem !important;
}

.app-surface-card {
    border-radius: 12px !important;
}

/* Dashboard: paired chart columns share row height; cards read as distinct panels */
.app-dashboard-chart-grid.mud-grid {
    align-items: stretch;
}

.app-dashboard-chart-grid > .mud-grid-item.d-flex {
    align-self: stretch;
}

.app-dashboard-chart-card.mud-paper {
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07) !important;
}

.app-dashboard-chart-body-fill {
    min-height: 320px;
}

.app-dashboard-pie-summary-line {
    flex-shrink: 0;
    border-top: 1px solid var(--mud-palette-lines-default, #e2e8f0);
    padding-top: 0.75rem !important;
    margin-top: 0.5rem !important;
}

/* Invisible duplicate line — matches visible summary height so paired chart cards align */
.app-dashboard-chart-footer-spacer {
    opacity: 0 !important;
    user-select: none !important;
    pointer-events: none !important;
}

/* My assignments / todos / watchlist — body fills card below header */
.app-dashboard-personal-grid > .mud-grid-item.d-flex {
    min-width: 0;
}

.app-dashboard-personal-body {
    min-width: 0;
    width: 100%;
}

.app-dashboard-fab-panel.mud-paper {
    border: 1px solid #cbd5e1 !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 36px rgba(15, 23, 42, 0.14) !important;
    background: #ffffff !important;
}

/* Exemption edit: grid columns need min-width 0 so MudSelect/MudPicker anchor correctly (avoids stray popover position). */
.app-exemption-edit .mud-grid-item {
    min-width: 0;
}

/* User guide: sidebar + optional decorative background on topic pages */
.app-guide-layout {
    align-items: flex-start;
}

@media (min-width: 960px) {
    .app-guide-nav-sticky {
        position: sticky;
        top: 0.75rem;
        max-height: calc(100vh - 5rem);
        overflow-y: auto;
    }
}

.app-guide-expansion-panels .mud-expand-panel-text {
    font-weight: 600;
}

/* Fills table cells so Preview/Download (and optional delete) align to the trailing edge */
.app-attachment-file-actions {
    width: 100%;
    box-sizing: border-box;
}

.app-exemption-disclaimer {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-radius: 10px !important;
    color: #b91c1c !important;
}

/* --- MudBlazor shell: drawer first (full height), app bar inside main content --- */
.app-mud-layout.mud-layout {
    flex-direction: row;
}

.app-shell-drawer.mud-drawer {
    border-right: 1px solid #e2e8f0;
}

.app-shell-drawer .mud-drawer-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #ffffff;
}

/* Mini rail collapsed: symmetric padding + center icon row */
.app-shell-drawer.mud-drawer--closed .mud-drawer-content {
    padding-left: 0.375rem !important;
    padding-right: 0.375rem !important;
}

.app-shell-drawer.mud-drawer--closed .app-sidebar-nav {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.app-shell-drawer.mud-drawer--closed .app-sidebar-nav .mud-nav-link {
    justify-content: center !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/*
 * Mini rail: MudNavGroup titles use the same .mud-nav-link row but add .mud-nav-link-expand-icon (caret).
 * That extra icon steals horizontal space and shifts the primary icon left vs plain MudNavLink rows.
 * Hide the caret in collapsed drawer and center the header button like other icons.
 */
.app-shell-drawer.mud-drawer--closed .app-sidebar-nav .mud-nav-group > button.mud-nav-link .mud-nav-link-expand-icon {
    display: none !important;
}

.app-shell-drawer.mud-drawer--closed .app-sidebar-nav .mud-nav-group > button.mud-nav-link {
    justify-content: center !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    gap: 0 !important;
}

.app-shell-drawer.mud-drawer--closed .app-sidebar-nav .mud-nav-group > button.mud-nav-link .mud-nav-link-text {
    display: none !important;
}

.app-drawer-title {
    color: #1e3a5f !important;
    font-weight: 700 !important;
}

.app-drawer-subtitle {
    color: #64748b !important;
}

.app-drawer-section {
    color: #94a3b8 !important;
    letter-spacing: 0.08em !important;
}

/*
 * MudBlazor adds padding-top to .mud-main-content for a fixed app bar that is a *sibling* of main.
 * Our MudAppBar lives *inside* MudMainContent, so that padding becomes empty space above the bar.
 */
.app-shell-main.mud-main-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #e8ecf4;
    min-width: 0;
    padding-top: 0 !important;
}

/* Fluid page column: use full width of main (avoids ~1280px max-width “letterbox” on wide screens). */
.app-shell-page-container {
    max-width: 100% !important;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

/* Toolbar only over the main column (not full viewport) — MudAppBar uses Fixed="false" */
.app-shell-main .app-shell-appbar.mud-appbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #1e3a5f !important;
}

/* Full-width toolbar row: left cluster vs right cluster (Mud default centers children otherwise). */
.app-shell-appbar.app-shell-appbar--split.mud-appbar {
    overflow: visible !important;
}

.app-shell-appbar.app-shell-appbar--split .mud-toolbar-appbar,
.app-shell-appbar.app-shell-appbar--split .mud-toolbar {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    min-height: 50px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.app-appbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
}

.app-appbar-right,
.app-appbar-actions.app-appbar-right {
    flex: 0 0 auto;
}

.app-appbar-tip {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0.25rem;
}

.app-appbar-tip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.app-tip-label {
    color: #2b59c3 !important;
    font-weight: 700 !important;
    margin-right: 0.35rem;
}

.app-appbar-brand-diamond {
    font-size: 1.25rem !important;
}

.app-appbar-actions {
    flex-shrink: 0;
}

/*
 * Icon hit area tuned so hover/ripple matches glyph; badge stays near bell.
 */
.app-shell-appbar .app-appbar-action.mud-icon-button {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 6px !important;
}

.app-shell-appbar .app-appbar-action.mud-icon-button .mud-icon-root {
    font-size: 1.35rem !important;
}

.app-shell-appbar .app-appbar-notify-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 0;
    overflow: visible !important;
    padding-top: 4px;
    align-self: center;
}

.app-shell-appbar .app-appbar-notify-badge .mud-badge,
.app-shell-appbar .app-appbar-notify-badge .mud-badge-content {
    overflow: visible !important;
}

/* MudBlazor badge DOM: overrides default badge anchor (all MudBadge instances unless you scope further). */
.mud-badge-root .mud-badge-wrapper {
    top: 9px !important;
    left: -7px !important;
}

.app-user-chip.mud-button-root {
    text-transform: none !important;
    min-width: 0 !important;
}

.app-user-chip:hover {
    background-color: rgba(43, 89, 195, 0.06) !important;
}

.app-user-initials.mud-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px !important;
    font-size: 0.6875rem;
    font-weight: 700;
}

.app-user-avatar-img-fill {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.app-profile-photo-label {
    cursor: pointer;
}

.app-user-first {
    color: #1e3a5f;
    font-weight: 600;
}

/* --- Profile drawer (right) --- */
.app-profile-drawer .mud-overlay-drawer {
    z-index: 1200;
}

.app-profile-drawer .mud-drawer-content {
    overflow-x: hidden;
    max-width: 100%;
}

.app-profile-drawer-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    background: #fff;
}

.app-profile-drawer-head {
    border-bottom: 1px solid #e2e8f0;
}

.app-profile-name {
    color: #1e3a5f !important;
    font-weight: 700 !important;
}

.app-profile-avatar-lg {
    width: 72px !important;
    height: 72px !important;
    border-radius: 12px !important;
    font-size: 1.5rem !important;
}

.app-profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.app-profile-role-line .mud-typography {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
}

.app-profile-role-chip.mud-chip {
    font-size: 0.65rem !important;
    height: 22px !important;
    padding: 0 8px !important;
}

/* Space below header / above quick actions; keeps tiles off the head border */
.app-profile-quick-actions {
    padding-top: 1rem !important;
    min-width: 0;
    max-width: 100%;
}

/* Equal-width columns; MudGrid + inline-flex MudBadge left a gap after the middle tile */
.app-profile-quick-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.app-profile-quick-cell {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-profile-quick-cell > .mud-button-root,
.app-profile-quick-cell > .app-profile-drawer-badge {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
}

/* Badge defaults to inline-flex and only wraps content — stretch to column width */
.app-profile-quick-cell .app-profile-drawer-badge {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.app-profile-quick-cell .app-profile-drawer-badge .mud-button-root {
    width: 100%;
}

/* Rounded rectangles — not circles — cleaner than default pill / round buttons */
.app-quick-tile.mud-button-root {
    min-height: 76px !important;
    padding: 0.5rem 0.35rem !important;
    border-radius: 10px !important;
    border-color: #e2e8f0 !important;
    background: #f1f5f9 !important;
    text-transform: none !important;
    box-shadow: none !important;
}

.app-quick-tile.mud-button-root:hover {
    background: #e2e8f0 !important;
}

.app-quick-tile-icon {
    font-size: 1.5rem !important;
}

.app-profile-dotted {
    border-top: 1px dashed #cbd5e1 !important;
    border-bottom: none !important;
    opacity: 1;
}

/* --- App bar: notification / activity log menus (MudMenu popover) --- */
.app-notif-mud-menu .mud-popover-paper,
.app-notif-mud-menu .mud-paper,
.app-logs-mud-menu .mud-popover-paper,
.app-logs-mud-menu .mud-paper {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 12px !important;
    max-width: min(420px, calc(100vw - 24px));
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18) !important;
}

.app-notif-panel {
    width: min(420px, calc(100vw - 24px));
    max-width: 100%;
    overflow: hidden;
    background: #fff;
}

.app-notif-header {
    background: #1e3a5f;
    color: #fff;
}

.app-notif-header-title {
    color: #fff !important;
    font-weight: 700 !important;
}

.app-notif-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.6rem 0.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-family: inherit;
}

.app-notif-tab:hover {
    color: #fff;
}

.app-notif-tab--active {
    color: #fff !important;
    border-bottom-color: #fff !important;
}

.app-notif-body {
    max-height: min(52vh, 420px);
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
}

.app-notif-item {
    border-bottom: 1px dashed #e2e8f0;
}

.app-notif-item:last-of-type {
    border-bottom: none;
}

.app-notif-item-main {
    flex: 1 1 auto;
    min-width: 0;
}

.app-notif-item-title {
    color: #1e3a5f !important;
    font-weight: 700 !important;
}

.app-notif-time {
    white-space: nowrap;
}

.app-notif-desc {
    font-size: 0.8125rem !important;
    line-height: 1.45 !important;
}

.app-notif-bot-avatar {
    flex-shrink: 0;
}

.app-notif-bot-icon {
    color: #fff !important;
}

.app-notif-overdue {
    font-size: 0.7rem !important;
    height: 22px !important;
}

.app-notif-primary-btn.mud-button-filled.mud-button-filled-primary {
    background: #e0edff !important;
    color: #1e3a5f !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.app-notif-primary-btn.mud-button-filled.mud-button-filled-primary:hover {
    background: #c7d9fc !important;
}

.app-notif-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.app-notif-footer-icon {
    opacity: 0.95;
}

/* --- App bar: activity / audit log panel --- */
.app-logs-panel {
    width: min(420px, calc(100vw - 24px));
    max-width: 100%;
    overflow: hidden;
    background: #fff;
}

.app-logs-header {
    border-bottom: 1px solid #e2e8f0;
}

.app-logs-tab-row {
    gap: 0.25rem;
}

.app-logs-tab {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.35rem 0.5rem 0.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-family: inherit;
}

.app-logs-tab:hover {
    color: #2b59c3;
}

.app-logs-tab--active {
    color: #2b59c3 !important;
    border-bottom-color: #2b59c3 !important;
}

.app-logs-close {
    color: #64748b !important;
}

.app-logs-subhead {
    background: #fafbfc;
    border-bottom: 1px solid #e2e8f0;
}

.app-logs-section-label {
    color: #94a3b8 !important;
    letter-spacing: 0.1em !important;
    font-weight: 700 !important;
    font-size: 0.65rem !important;
}

.app-logs-view-all.mud-button-root {
    font-weight: 700 !important;
    min-width: auto !important;
    padding: 4px 8px !important;
}

.app-logs-view-all-text {
    font-weight: 700 !important;
}

.app-logs-body {
    max-height: min(48vh, 380px);
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
}

.app-logs-row {
    border-bottom: 1px solid #e8edf2;
}

.app-logs-row:last-child {
    border-bottom: none;
}

.app-logs-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-logs-icon-box--login {
    background: #ede9fe;
    color: #6d28d9;
}

.app-logs-icon-box--logout {
    background: #f1f5f9;
    color: #64748b;
}

.app-logs-icon-box--password {
    background: #fef3c7;
    color: #b45309;
}

.app-logs-icon-box--edit {
    background: #fffbeb;
    color: #b45309;
}

.app-logs-icon-box--photo {
    background: #e0f2fe;
    color: #0369a1;
}

.app-logs-icon-box--default {
    background: #f1f5f9;
    color: #475569;
}

.app-logs-audit-toolbar {
    background: #fafbfc;
    border-bottom: 1px solid #e2e8f0;
}

.app-logs-search-field {
    flex: 1 1 auto;
    min-width: 0;
}

.app-logs-audit-row {
    border-bottom: 1px solid #e8edf2;
}

.app-logs-audit-row:last-child {
    border-bottom: none;
}

.app-logs-audit-row-trigger {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    border-radius: 0;
}

.app-logs-audit-row-trigger:hover {
    background: #f8fafc;
}

.app-logs-audit-row-trigger:focus-visible {
    outline: 2px solid #2b59c3;
    outline-offset: -2px;
}

.app-logs-audit-chevron {
    flex-shrink: 0;
    pointer-events: none;
}

.app-logs-audit-expand {
    border-top: 1px dashed #e2e8f0;
    background: #fafbfc;
}

.app-logs-audit-line + .app-logs-audit-line {
    border-top: 1px solid #eef2f6;
}

.app-logs-icon-box.app-logs-icon-box--sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.app-logs-audit-main {
    flex: 1 1 auto;
    min-width: 0;
}

.app-logs-audit-meta {
    flex-shrink: 0;
    min-width: 4.5rem;
}

.app-logs-audit-count {
    font-weight: 700 !important;
}

.app-logs-audit-avatar {
    flex-shrink: 0;
    width: 40px !important;
    height: 40px !important;
    font-size: 0.75rem !important;
}

.app-logs-audit-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-logs-row-text {
    flex: 1 1 auto;
    min-width: 0;
}

.app-logs-primary {
    color: #1e3a5f !important;
    font-weight: 700 !important;
}

.app-logs-secondary {
    font-size: 0.8125rem !important;
    line-height: 1.45 !important;
    margin-top: 2px;
}

.app-logs-time {
    flex-shrink: 0;
    white-space: nowrap;
    align-self: flex-start;
    padding-top: 2px;
}

.app-profile-scroll {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.app-profile-scroll-list .mud-list {
    width: 100%;
    max-width: 100%;
}

.app-profile-scroll-list .mud-list-item {
    max-width: 100%;
    box-sizing: border-box;
}

.app-profile-list .mud-list-item {
    border-radius: 10px !important;
}

.app-profile-list .mud-list-item .mud-list-item-icon {
    font-size: 1.65rem !important;
}

.app-profile-list-item .mud-list-item-text {
    margin-top: 2px;
    margin-bottom: 2px;
}

.app-appbar-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.app-appbar-title {
    color: #1e3a5f !important;
    font-weight: 700 !important;
}

.app-appbar-subtitle {
    color: #64748b !important;
}

.app-nav-section-label {
    color: #64748b !important;
    letter-spacing: 0.12em !important;
    font-weight: 700 !important;
    opacity: 0.95;
}

.app-nav-divider {
    opacity: 1;
    border-color: #e2e8f0 !important;
}

/* Mini rail: section chrome is noise when only icons show */
.app-shell-drawer.mud-drawer--closed .app-nav-section-label,
.app-shell-drawer.mud-drawer--closed .app-nav-divider {
    display: none !important;
}

.app-sidebar-nav .mud-nav-link {
    border-radius: 10px !important;
    margin-bottom: 2px !important;
    min-height: 38px !important;
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
}

.app-sidebar-nav .mud-nav-link.active {
    background-color: rgba(43, 89, 195, 0.1) !important;
    color: #2b59c3 !important;
}

.app-sidebar-nav .mud-nav-link:hover:not(.active) {
    background-color: #f1f5f9 !important;
}

/* Menu titles come from the database as authored (e.g. "GHG plan"); Mud/nav styling must not force title case. */
.app-sidebar-nav.mud-nav-menu .mud-nav-link,
.app-sidebar-nav.mud-nav-menu .mud-nav-group {
    text-transform: none !important;
}

/* --- App page header (shared) --- */
.app-page-breadcrumb-line {
    display: block;
}

/* Title block grows; toolbar stays top-right (same row or full-width row aligned end when wrapped). */
.app-page-header-text {
    flex: 1 1 0;
    min-width: 0;
}

.app-page-header-toolbar {
    margin-left: auto;
    flex-shrink: 0;
    justify-content: flex-end;
}

/* When the title wraps to its own row, toolbar drops below; span full width so actions stay right-aligned. */
@media (max-width: 900px) {
    .app-dashboard-header > .mud-stack.flex-wrap > .app-page-header-toolbar {
        flex-basis: 100%;
        justify-content: flex-end;
    }
}

/* --- Dashboard home --- */
.app-dashboard-header {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0;
    background: #fff !important;
}

.app-breadcrumb {
    color: #94a3b8 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.app-section-title {
    color: #1e3a5f !important;
    font-weight: 600 !important;
}

.app-stat-tile {
    border: 1px solid #e2e8f0;
    height: 100%;
}

.app-stat-avatar {
    width: 48px !important;
    height: 48px !important;
}

.app-action-card {
    border: 1px solid #e2e8f0;
    height: 100%;
}

/* --- Incidents page --- */
.app-incidents-stat {
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-incidents-stat:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.app-incidents-stat--selected {
    border: 2px solid #2b59c3 !important;
    box-shadow: 0 0 0 1px rgba(43, 89, 195, 0.12);
}

.app-incidents-filters {
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.app-incidents-filter-bar {
    border-bottom: 1px solid transparent;
}

.app-incidents-filters--open .app-incidents-filter-bar {
    border-bottom-color: #e2e8f0;
}

/* Filters: plain label above the field (not Mud outline/floating label on border) */
.app-incidents-filter-label {
    display: block;
    color: #334155 !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    line-height: 1.3;
    margin-bottom: 4px !important;
}

.app-incidents-filters .app-incidents-filter-field.mud-input-control {
    margin-top: 0;
}

/*
 * Outlined fields only (no Mud Label): one flat fill + one border — avoids Filled’s
 * “white pill on grey” double-layer from theme + our overrides.
 */
.app-incidents-filters .app-incidents-filter-field .mud-input-outlined-border {
    border-radius: 10px !important;
    border-color: #e2e8f0 !important;
}

.app-incidents-filters .app-incidents-filter-field .mud-input-outlined-border legend {
    width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
}

.app-incidents-filters .app-incidents-filter-field .mud-input,
.app-incidents-filters .app-incidents-filter-field .mud-input-root,
.app-incidents-filters .app-incidents-filter-field input.mud-input-root,
.app-incidents-filters .app-incidents-filter-field .mud-input-slot,
.app-incidents-filters .app-incidents-filter-field .mud-select .mud-input-root {
    background-color: #f8fafc !important;
    background-image: none !important;
}

.app-incidents-filters .app-incidents-filter-field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #f8fafc inset !important;
}

.app-incidents-filters .app-incidents-filter-field .mud-input-underline:before,
.app-incidents-filters .app-incidents-filter-field .mud-input-underline:after {
    display: none !important;
}

/* Admin — create user page: readable width + scrollable role grid */
.app-admin-user-create-card {
    max-width: 56rem;
}

.app-admin-user-create-roles {
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    max-height: min(50vh, 22rem);
    overflow-y: auto;
}

/* Who to inform / multi-user selects — avoid edge-to-edge stretch on wide layouts */
.app-notify-select-wrap {
    position: relative;
    width: 100%;
    max-width: min(100%, 32rem);
    padding-bottom: 1.5rem;
}

.app-notify-select {
    width: 100%;
}

.app-notify-select-count {
    position: absolute;
    right: 0;
    bottom: 0;
    line-height: 1.2;
    pointer-events: none;
}

/* Field inspection checklist grid — horizontal scroll, compact inputs */
.app-field-inspection-lines-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
}

.app-field-inspection-lines-table.mud-table-container {
    border-radius: 8px;
}

.app-fi-line-input.mud-input-control {
    margin-top: 0 !important;
}

/* MudSelect uses the same margin hooks but a different root; align with adjacent MudTextField cells */
.app-field-inspection-lines-table--compact .app-fi-line-select.mud-select,
.app-field-inspection-lines-table--compact .app-fi-line-select .mud-input-control {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.app-fi-line-select {
    min-width: 4.25rem;
}

/* Compact checklist grid — tighter columns for horizontal fit */
.app-field-inspection-lines-table--compact.mud-table-root .mud-table-container table {
    font-size: 0.8125rem;
}

.app-field-inspection-lines-table--compact .mud-table-head .mud-table-cell,
.app-field-inspection-lines-table--compact .mud-table-body .mud-table-cell {
    padding: 4px 6px !important;
    vertical-align: middle;
}

.app-fi-col-question {
    min-width: 7.5rem;
}

.app-fi-col-answer {
    min-width: 6rem;
}

.app-fi-col-score {
    min-width: 5rem;
}

.app-fi-line-select-score {
    min-width: 4.5rem !important;
    max-width: 9rem;
}

.app-fi-col-outcome {
    min-width: 7rem;
}

.app-fi-line-outcome-primary,
.app-fi-line-outcome-secondary {
    line-height: 1.25;
}

.app-fi-col-finding {
    min-width: 6rem;
}

.app-fi-col-action {
    min-width: 8rem;
}

.app-fi-line-select-action {
    min-width: 7rem !important;
    max-width: 11rem;
}

.app-fi-col-comment {
    min-width: 6rem;
}

.app-fi-col-photo {
    min-width: 7.25rem;
}

.app-fi-photo-cell {
    vertical-align: middle;
    white-space: nowrap;
}

.app-fi-photo-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
}

.app-fi-photo-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-fi-photo-attach {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    color: var(--mud-palette-primary);
    line-height: 0;
}

.app-fi-photo-attach:hover:not(.app-fi-photo-attach--disabled) {
    background: rgba(0, 0, 0, 0.06);
}

.app-fi-photo-attach--disabled {
    pointer-events: none;
    opacity: 0.45;
    cursor: not-allowed;
}

.app-fi-photo-queued-chip {
    margin-left: 2px !important;
    height: 22px !important;
    font-size: 0.65rem !important;
}

.app-fi-batch-overlay-card {
    max-width: 26rem;
}

.app-fi-line-question-text {
    line-height: 1.35;
}

.app-fi-line-photo-input {
    font-size: 0.75rem;
    max-width: 100%;
}

.app-field-inspection-lines-table--compact .mud-input-slot input.mud-input-root,
.app-field-inspection-lines-table--compact .mud-input-slot textarea.mud-input-root,
.app-field-inspection-lines-table--compact .app-fi-line-select .mud-input-slot input {
    font-size: 0.8125rem !important;
    padding: 4px 8px !important;
    min-height: 30px;
}

/* --- Account settings (/account): sidebar + content --- */
.account-settings-page {
    overflow: visible !important;
}

.account-settings-shell {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: stretch;
    min-height: min(70vh, 720px);
}

@media (max-width: 960px) {
    .account-settings-shell {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .account-settings-sidebar {
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }
}

.account-settings-sidebar {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-right: 1px solid #e2e8f0;
    padding: 1.75rem 1.25rem 2rem 1.5rem;
    box-sizing: border-box;
    overflow: visible;
}

.account-settings-nav-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 1rem 0;
    padding: 0 0.25rem;
    line-height: 1.3;
    white-space: normal;
    word-break: normal;
}

.account-settings-nav-item.mud-button-root {
    justify-content: flex-start !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    border-radius: 10px !important;
    padding: 0.625rem 0.875rem !important;
    min-height: 2.75rem !important;
    font-weight: 500 !important;
}

.account-settings-nav-item--active.mud-button-root {
    background: rgba(43, 89, 195, 0.14) !important;
    color: #1e3a5f !important;
    font-weight: 600 !important;
}

.account-settings-main {
    padding: 2rem 2rem 2.5rem 2.25rem;
    box-sizing: border-box;
    background: #fff;
}

@media (min-width: 961px) {
    .account-settings-main {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

.account-settings-section-title {
    color: #1e3a5f !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
}

.account-settings-section-hint {
    margin-bottom: 1.5rem !important;
    line-height: 1.45;
}

.account-settings-form {
    max-width: 28rem;
    width: 100%;
}

.account-settings-form .mud-input-control {
    margin-bottom: 0.25rem;
}

.account-settings-submit.mud-button-root {
    align-self: flex-start;
    min-width: 11rem;
    text-transform: none !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    margin-top: 0.5rem;
}

/* --- Admin: users / roles — room to breathe (tables + modals) --- */
.app-admin-modal-overlay.mud-overlay {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.app-admin-modal-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    width: 100%;
    padding: clamp(1rem, 3vw, 2.5rem);
    box-sizing: border-box;
}

.app-admin-modal-paper {
    width: 100%;
    border-radius: 16px !important;
    box-sizing: border-box;
}

.app-admin-modal-paper--form {
    max-width: min(48rem, 100%);
}

.app-admin-modal-paper--wide {
    max-width: min(64rem, 100%);
}

.app-admin-modal-paper .mud-input-control {
    margin-bottom: 0.25rem;
}

.app-admin-cell-primary {
    color: #1e3a5f !important;
    font-weight: 600;
}

.app-admin-perm-scroll {
    max-height: min(60vh, 28rem);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
    margin-right: -0.25rem;
}

.app-admin-perm-scroll .mud-checkbox {
    margin-bottom: 0.125rem;
}

/* Role management — full-page permission picker */
.app-admin-role-perm-search {
    min-width: min(100%, 14rem);
    max-width: 18rem;
}

.app-admin-role-module-head {
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
}

.app-admin-role-perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.75rem;
}

.app-admin-table .mud-table-head .mud-table-cell {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
    font-size: 0.8125rem !important;
    font-weight: 600;
}

.app-admin-table.app-admin-roles-table .mud-table-head .mud-table-cell {
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 0.75rem !important;
    color: var(--mud-palette-text-secondary);
    font-weight: 600;
}

.app-admin-table .mud-table-body .mud-table-cell {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
    font-size: 0.8125rem !important;
    vertical-align: middle;
}

.app-admin-table .mud-table-container {
    overflow-x: auto;
}

.app-admin-role-pick {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    max-height: min(42vh, 18rem);
    overflow-y: auto;
}

.app-incidents-table {
    overflow-x: auto;
}

/* Let row action popovers escape horizontal scroll clipping */
.app-incidents-table .mud-table-container {
    overflow-x: auto;
    overflow-y: visible;
}

.app-table-row-actions-menu .mud-menu-list {
    min-width: 220px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.app-table-row-actions-menu .mud-menu-item {
    padding-top: 0.625rem !important;
    padding-bottom: 0.625rem !important;
    min-height: 2.75rem;
}

.app-table-row-actions-menu .app-table-row-actions-divider {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.app-incidents-cell-wrap {
    max-width: min(560px, 100%);
    white-space: normal;
    line-height: 1.35;
}

.app-incidents-promo {
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.app-incidents-promo-btn.mud-button-root {
    background: rgba(43, 89, 195, 0.12) !important;
    color: #1e3a5f !important;
    text-transform: none;
    font-weight: 600;
    border-radius: 10px !important;
}

.app-incidents-promo-btn-desk.mud-button-root {
    background: rgba(20, 184, 166, 0.18) !important;
    color: #0f766e !important;
    text-transform: none;
    font-weight: 600;
    border-radius: 10px !important;
}

.app-incidents-promo-art {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.app-incidents-promo-art--a {
    background: linear-gradient(145deg, #e0e7ff 0%, #f8fafc 55%, #fef3c7 100%);
}

.app-incidents-promo-art--b {
    background: linear-gradient(145deg, #ccfbf1 0%, #f8fafc 50%, #e0f2fe 100%);
}

.app-incidents-promo-art .promo-art-icon {
    font-size: 3.25rem !important;
    opacity: 0.85;
    color: #2b59c3 !important;
}

.app-incidents-promo-art--b .promo-art-icon {
    color: #0d9488 !important;
}

/* Incident edit — compact MudTabs header (shorter strip, smaller labels + icons) */
.app-incident-edit-tabs .mud-tabs-toolbar,
.app-incident-edit-tabs .mud-tabs-toolbar-inner {
    min-height: 36px;
}

.app-incident-edit-tabs .mud-tab {
    min-height: 32px;
    padding: 0.15rem 0.6rem;
    font-size: 0.68rem;
    line-height: 1.15;
    letter-spacing: 0.02em;
}

.app-incident-edit-tabs .mud-tab.mud-tab-active {
    padding-bottom: 0.1rem;
}

.app-incident-edit-tabs .mud-tab .mud-icon-root,
.app-incident-edit-tabs .mud-tab .mud-svg-icon {
    font-size: 1.05rem !important;
    width: 1.05rem !important;
    height: 1.05rem !important;
}

/* Icon + label row inside each tab */
.app-incident-edit-tabs .mud-tab .mud-button-root,
.app-incident-edit-tabs .mud-tab.mud-button-root {
    gap: 0.35rem;
    min-height: 0;
}

/* Incident edit — MudTimePicker: smaller label / empty state text (align with MudSelect impact fixes) */
.app-shell-main .app-incident-edit-time-picker .mud-input-label,
.app-shell-main .mud-input-control.app-incident-edit-time-picker .mud-input-label {
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
}

.app-shell-main .app-incident-edit-time-picker input.mud-input-root,
.app-shell-main .app-incident-edit-time-picker .mud-input-slot,
.app-shell-main .mud-input-control.app-incident-edit-time-picker input.mud-input-root,
.app-shell-main .mud-input-control.app-incident-edit-time-picker .mud-input-slot {
    font-size: 0.8125rem !important;
    line-height: 1.45 !important;
}

.app-shell-main .app-incident-edit-time-picker input.mud-input-root::placeholder,
.app-shell-main .mud-input-control.app-incident-edit-time-picker input.mud-input-root::placeholder {
    font-size: 0.75rem !important;
}

/* --- Risk matrices (dialogs) --- */
.app-risk-form-divider {
    border-top: 1px dashed #cbd5e1;
    margin: 0;
}

.app-risk-matrix-dialog {
    max-width: 100%;
}

.app-risk-matrix-size-field .mud-input-control-input-container {
    background: #fcfdff;
    border-radius: 10px;
}

.app-risk-band-card {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 0.75rem;
    height: 100%;
}

.app-risk-band-card--low {
    background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
}

.app-risk-band-card--medium {
    background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 100%);
}

.app-risk-band-card--high {
    background: linear-gradient(180deg, #fff1f2 0%, #fef2f2 100%);
}

.app-risk-band-input {
    max-width: 7rem;
}

/* Global numeric input normalization: hide odd native spinner arrows and keep a clean text field look. */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* MudNumericField spinner alignment fix (global, high priority).
   Force absolute positioning so numeric icons don't stretch field height. */
.mud-input-control.mud-input-number-control .mud-input-slot {
    position: relative !important;
    padding-right: 2rem !important;
}

.mud-input-control.mud-input-number-control .mud-input-numeric-spin {
    position: absolute !important;
    right: 0.2rem !important;
    top: 1px !important;
    bottom: 1px !important;
    display: inline-flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 1.25rem !important;
}

.mud-input-control.mud-input-number-control .mud-input-numeric-spin button,
.mud-input-control.mud-input-number-control .mud-input-numeric-spin .mud-button-root {
    min-height: 0 !important;
    height: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Incident view — risk summary cards (aligned grid, band-aware score card) */
.app-incident-risk-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: stretch;
}

@media (max-width: 599.98px) {
    .app-incident-risk-summary-grid {
        grid-template-columns: 1fr;
    }
}

.app-incident-risk-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.9rem 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--mud-palette-lines-default);
    min-height: 9rem;
    height: 100%;
    background: var(--mud-palette-surface);
}

.app-incident-risk-card__label {
    color: var(--mud-palette-text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.app-incident-risk-card__value {
    font-weight: 700;
    line-height: 1.15;
    margin: 0.15rem 0;
    font-size: clamp(1.75rem, 4vw, 2.15rem);
}

/* Bottom region: band chip or option label — same min-height so rows align across cards */
.app-incident-risk-card__detail {
    margin-top: auto;
    width: 100%;
    min-height: 2.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.5rem;
}

.app-incident-risk-card__detail-caption {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--mud-palette-text-secondary);
    max-width: 100%;
    word-break: break-word;
}

.app-incident-risk-card--score.app-incident-risk-card--band-low {
    background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #6ee7b7;
}

.app-incident-risk-card--score.app-incident-risk-card--band-medium {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fbbf24;
}

.app-incident-risk-card--score.app-incident-risk-card--band-high {
    background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #f87171;
}

.app-incident-risk-card--score.app-incident-risk-card--band-neutral {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #cbd5e1;
}

.app-incident-risk-card--likelihood {
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #7dd3fc;
}

.app-incident-risk-card--severity {
    background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: #c4b5fd;
}

.app-incident-risk-summary-grid--compact {
    gap: 0.45rem;
}

.app-incident-risk-summary-grid--compact .app-incident-risk-card {
    padding: 0.45rem 0.45rem 0.4rem;
    min-height: 5.2rem;
    border-radius: 7px;
}

.app-incident-risk-summary-grid--compact .app-incident-risk-card__label {
    font-size: 0.6rem;
    margin-bottom: 0.1rem;
}

.app-incident-risk-summary-grid--compact .app-incident-risk-card__value {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    margin: 0.05rem 0;
}

.app-incident-risk-summary-grid--compact .app-incident-risk-card__detail {
    min-height: 1.4rem;
    padding-top: 0.15rem;
}

.app-incident-risk-matrix-meta {
    padding: 0.35rem 0 0;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8rem;
}

/* Incident view right column cards */
.app-incident-side-card {
    min-width: 320px;
}

.app-incident-side-item-card {
    min-width: 280px;
}

.app-timeline-scroll {
    max-height: 24rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.app-risk-matrix-scroll {
    overflow-x: auto;
}

.app-risk-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.app-risk-matrix-table th,
.app-risk-matrix-table td {
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.5rem;
    text-align: center;
    min-width: 2.5rem;
}

.app-risk-matrix-corner {
    font-size: 0.65rem;
    line-height: 1.2;
    text-align: left !important;
    background: #f8fafc;
    min-width: 5rem;
}

.app-risk-matrix-axis {
    background: #f1f5f9;
    font-weight: 600;
    color: #1e3a5f;
}

.app-risk-matrix-cell {
    vertical-align: middle;
}

.app-risk-matrix-cell--low {
    background: #ccfbf1;
}

.app-risk-matrix-cell--medium {
    background: #fef3c7;
}

.app-risk-matrix-cell--high {
    background: #fecaca;
}

.app-risk-matrix-cell--none {
    background: #f8fafc;
    color: #64748b;
}

.app-risk-matrix-cell--selected {
    box-shadow: inset 0 0 0 2px #2563eb;
    position: relative;
    z-index: 1;
}

/* Incident impact score selects: align empty placeholder size with selected numeric text */
.app-incident-impact-score-select.mud-select .mud-input-slot,
.app-incident-impact-score-select.mud-select input {
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
}

.app-risk-matrix-score {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}

.app-risk-matrix-level {
    font-size: 0.7rem;
}

/* Hazard templates — grid + chips */
.app-hazard-controls-cell {
    max-width: 36rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.app-hazard-sev-chip.mud-chip,
.app-hazard-lik-chip.mud-chip {
    font-weight: 600;
}

/* Staff wizard — profile avatar + file input overlay */
.app-staff-profile-row {
    align-items: flex-start;
}

.app-staff-profile-avatar-frame {
    width: 7rem;
    height: 7rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--mud-palette-background-grey, #f5f5f5);
    border: 1px solid var(--mud-palette-lines-default);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-staff-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-staff-profile-upload-wrap {
    position: relative;
    display: inline-block;
    border: 1px dashed var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    min-height: 2.5rem;
    cursor: pointer;
}

.app-staff-profile-upload-wrap:hover {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-primary-hover, rgba(0, 0, 0, 0.04));
}

.app-staff-profile-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 1;
    font-size: 0;
}

/* Staff directory table — real photo (MudAvatar+image can show empty grey if decode fails) */
.app-staff-dir-avatar-img {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
    background: var(--mud-palette-background-grey, #f5f5f5);
}

.app-staff-profile-hero-photo {
    flex-shrink: 0;
}

.app-staff-profile-hero-img {
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background-grey, #f5f5f5);
}

/* Staff directory — Export menu icons (approx. Excel green / Acrobat red) */
.app-export-menu-icon-excel {
    color: #217346 !important;
}

.app-export-menu-icon-pdf {
    color: #e53935 !important;
}

.app-export-menu-icon-zip {
    color: #f59e0b !important;
}

/* Action items — open vs closed row/card tint */
.app-action-item-row--open {
    background: color-mix(in srgb, var(--mud-palette-error) 14%, transparent);
}

.app-action-item-row--closed {
    background: color-mix(in srgb, var(--mud-palette-success) 14%, transparent);
}

.app-action-item-card {
    border: 1px solid var(--mud-palette-lines-default);
}

.app-action-item-card--open {
    background: color-mix(in srgb, var(--mud-palette-error) 14%, transparent);
}

.app-action-item-card--closed {
    background: color-mix(in srgb, var(--mud-palette-success) 14%, transparent);
}

/* Meeting / training detail — stat row equal height; attendance bar without cramped label */
.app-meeting-stat-grid .mud-grid-item {
    display: flex;
}

.app-meeting-stat-grid .mud-grid-item > .mud-paper {
    flex: 1 1 auto;
    width: 100%;
}

.app-meeting-attendance-bar {
    min-height: 0.5rem;
}

/* Dashboard — simple bar + floating quick actions */
.app-dashboard-bar-track {
    height: 0.5rem;
    background: var(--mud-palette-divider);
    border-radius: 4px;
    overflow: hidden;
}

.app-dashboard-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.2s ease;
}

.app-dashboard-fab {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 1200;
    max-width: min(100vw - 1rem, 52rem);
}

.app-dashboard-fab .mud-paper {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.app-dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.app-dashboard-kpi-tile {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.app-dashboard-kpi-tile:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.app-dashboard-kpi-avatar {
    width: 34px !important;
    height: 34px !important;
}

.app-dashboard-kpi-value {
    line-height: 1.1 !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em;
}

.app-dashboard-kpi-title {
    font-weight: 700 !important;
    font-size: 0.98rem !important;
    color: #1e293b !important;
}

.app-dashboard-kpi-title--header {
    color: #ffffff !important;
}

.app-dashboard-kpi-icon {
    font-size: 0.95rem !important;
}

.app-dashboard-kpi-metrics {
    align-items: stretch !important;
}

.app-dashboard-kpi-metric {
    min-width: 74px;
}

.app-dashboard-kpi-metric-label {
    display: block;
    margin-bottom: 0.2rem;
}

.app-dashboard-kpi-metric-box {
    min-height: 34px;
    border-radius: 8px;
    padding: 0.28rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

/* KPI tiles — HSE Intelligence Platform gradient reference (header band, 135deg) */
.app-dashboard-kpi-gradient .app-dashboard-kpi-tile {
    border: 0 !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.app-dashboard-kpi-header {
    padding: 0.65rem 0.85rem;
}

.app-dashboard-kpi-header .app-dashboard-kpi-avatar {
    background-color: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
}

.app-dashboard-kpi-body {
    padding: 0.65rem 0.85rem 0.75rem;
    background: var(--mud-palette-surface, #ffffff);
}

.app-dashboard-kpi-tile--incidents .app-dashboard-kpi-header {
    background: linear-gradient(135deg, #ff4e50, #fc913a);
}

.app-dashboard-kpi-tile--stop-work .app-dashboard-kpi-header {
    background: linear-gradient(135deg, #f7971e, #ffd200);
}

.app-dashboard-kpi-tile--exemptions .app-dashboard-kpi-header {
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
}

.app-dashboard-kpi-tile--ptw .app-dashboard-kpi-header {
    background: linear-gradient(135deg, #1d76db, #00b4d8);
}

.app-dashboard-kpi-tile--investigations .app-dashboard-kpi-header {
    background: linear-gradient(135deg, #eb5757, #b06ab3);
}

.app-dashboard-kpi-tile--action-items .app-dashboard-kpi-header {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.app-dashboard-kpi-tile--default .app-dashboard-kpi-header {
    background: linear-gradient(135deg, #64748b, #94a3b8);
}

.app-dashboard-pie-center .mud-chart-root {
    margin-inline: auto;
}

.app-dashboard-chart-wrap {
    width: 100%;
    min-height: 220px;
}

    .app-dashboard-chart-wrap .mud-chart-root,
    .app-dashboard-chart-wrap svg {
        max-width: 100%;
    }













.app-heinrich-svg {
    width: 100%;
    height: 320px;
}

.heinrich-slice {
    cursor: pointer;
    transition: filter 0.18s ease;
}

.heinrich-slice:hover {
    filter: brightness(1.08);
}

.heinrich-label {
    fill: white;
    font-size: 4.4px;
    font-weight: bold;
    pointer-events: none; /* so clicks go to polygon */
}

.heinrich-label-start {
    text-anchor: start;
}

.heinrich-label-end {
    text-anchor: end;
}

.heinrich-label-outside {
    fill: #1e293b;
    font-size: 4.2px;
    font-weight: 700;
    text-anchor: start;
    pointer-events: none;
}

.app-time-patterns-charts .mud-chart-legend {
    font-size: 0.95rem !important;
}

.app-time-patterns-charts .mud-chart-legend * {
    font-size: 0.95rem !important;
}

.app-time-patterns-charts .mud-chart-xaxis text,
.app-time-patterns-charts .mud-chart-root svg g text {
    font-size: 0.9rem !important;
}

.app-weekday-chart svg text,
.app-weekday-chart svg tspan {
    font-size: 1rem !important;
}

.app-dashboard-filter-drawer .mud-drawer-content {
    padding-top: 0.35rem !important;
}

.app-dashboard-filter-content {
    padding: 0.55rem 0.85rem 0.85rem;
}

.app-report-modal-wrap {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.app-report-modal {
    width: min(1100px, 100%);
    max-height: 90vh;
    padding: 1rem 1.1rem;
}

.app-report-modal-scroll {
    max-height: calc(90vh - 170px);
    overflow-y: auto;
    padding-right: 0.25rem;
}