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."
    }

/* Sign-in and password pages (static server rendering, AccountLayout). */
.account-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background-gray);
    padding: 16px;
}

.account-card {
    width: 100%;
    max-width: 420px;
}

.account-card label {
    display: block;
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 12px 0 4px;
}

.account-card input:not([type=hidden]) {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font: inherit;
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: var(--mud-default-borderradius);
}

.account-card label.check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.account-card input[type=checkbox] {
    width: auto;
    margin: 0;
}

.account-card input:focus {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -1px;
}

.account-card .actions {
    margin-top: 24px;
}

/* Under the app bar while the page waits for the database (PageLoad). */
.page-load-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Company list: a cell at 1% width shrinks its column to the content, so the name columns get the width left over.
   Only the cells keep to one line; a header may wrap, so "Net profit (MKD)" does not widen its column. */
.company-grid td.fit {
    width: 1%;
    white-space: nowrap;
}

.company-grid td.grow {
    min-width: 220px;
}

.company-grid td.num {
    text-align: right;
}

.company-grid th.num .sortable-column-header {
    text-align: right;
}

.company-grid .mud-table-head .mud-table-cell:not(:last-child) {
    border-right: 1px solid var(--mud-palette-table-lines);
}

/* Phones and small tablets. Every stack of controls in a row wraps instead of widening the page, a field given a
   width for the desktop takes the whole line, and a wide table scrolls inside itself rather than the page. */
.mud-table-container {
    overflow-x: auto;
}

/* ---- Phones and tablets. A MudStack is plain d-flex, so rows that must wrap say so here or with Wrap. */
.company-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* The label column of a table of years stays put while the years scroll under it. */
.pin-first tr > :first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--mud-palette-surface);
}

.company-grid th.num,
.company-grid td.num {
    white-space: nowrap;
}

.job-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.job-cards {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 8px;
}

.job-cards-loading {
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
}

.job-card {
    padding: 12px 12px 4px 12px;
    cursor: pointer;
}

.job-card-title {
    overflow-wrap: anywhere;
}

@media (max-width: 959.98px) {
    .mud-main-content {
        overflow-x: clip;
    }

    .hide-sm {
        display: none !important;
    }

    .company-actions {
        width: 100%;
    }
}

@media (max-width: 599.98px) {
    .mud-main-content .mud-input-control {
        max-width: 100%;
    }

    .mud-main-content .mud-typography-h4 {
        font-size: 1.5rem;
    }

    .mud-main-content .mud-typography-h5 {
        font-size: 1.25rem;
    }

    .mud-main-content .mud-paper.pa-4 {
        padding: 12px !important;
    }

    .mud-main-content .mud-paper .mud-link {
        overflow-wrap: anywhere;
    }

    .mud-dialog {
        margin: 8px;
        max-width: calc(100vw - 16px) !important;
    }

    .company-grid td.grow {
        min-width: 160px;
        overflow-wrap: break-word;
    }

    .company-grid .mud-table-cell {
        padding: 8px !important;
    }

    .pin-first tr > :first-child {
        max-width: 45vw;
        overflow-wrap: break-word;
    }

    /* A label above its value: the value gets the whole width instead of 60% of it. */
    .detail-row,
    .detail-row td {
        display: block;
        width: auto !important;
    }

    .detail-row td:first-child {
        border-bottom: none;
        padding-bottom: 0;
        font-size: 0.75rem;
    }

    .detail-row td:last-child {
        padding-top: 2px;
        overflow-wrap: anywhere;
    }

    .job-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .job-actions > :first-child {
        grid-column: 1 / -1;
    }

    .job-actions > *,
    .job-actions .mud-button-root,
    .job-actions .mud-input-control {
        width: 100% !important;
        min-width: 0;
    }

    /* One line each and the same height: in capitals "Cancel queued (2788)" did not fit half a phone. */
    .job-actions .mud-button-root {
        min-height: 40px;
        height: 100%;
        white-space: nowrap;
        text-transform: none;
        padding-left: 8px;
        padding-right: 8px;
    }

    .job-filters .f-text {
        width: 100% !important;
        flex: 1 1 100%;
    }

    .job-filters .f-half {
        width: auto !important;
        flex: 1 1 0;
        min-width: 0;
    }

    .job-pager > :first-child {
        flex-grow: 1;
    }

    .job-pager .job-size {
        order: 3;
        width: 6.5rem !important;
    }

    .job-pager .job-pages {
        order: 4;
        flex-basis: 100%;
        justify-content: center;
    }
}

/* A table turned into rows of a line or two, for below a desktop. */
.phone-list .phone-row {
    padding: 10px 12px;
    border-bottom: 1px solid var(--mud-palette-table-lines);
    overflow-wrap: anywhere;
}

.phone-list .phone-row:last-child {
    border-bottom: none;
}

/* A space's upload area: the file input lies invisibly over it, so a drop or a click anywhere lands on the input. */
.space-drop-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 10;
    cursor: pointer;
}
