h1:focus {
    outline: none;
}

.validation-message {
    color: #b00020;
    font-size: 0.85rem;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 1.25rem;
    background: lightyellow;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    z-index: 2000;
}

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

/* Logo and application name, at the left of the app bar and the sign-in header. The image is
   128 px so it stays sharp on high-density screens; it has a transparent background. */
.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.app-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

/* Account pages (static server-rendered, no MudBlazor interactivity) ---------------------- */
.account-page {
    min-height: 100vh;
    background: #eef1f5;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.account-header {
    display: flex; /* full width, unlike .app-brand's inline-flex */
    background: #1f3a5f;
    color: white;
    font-size: 1.25rem;
    padding: 0.75rem 1.5rem;
}

.account-card {
    max-width: 420px;
    margin: 3rem auto;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    padding: 1.5rem 2rem 2rem;
}

    /* The manage-account pages: room for the tabs and the settings rows. */
    .account-card:has(.account-tabs) {
        max-width: 620px;
    }

    .account-card h1 {
        font-size: 1.4rem;
        font-weight: 500;
        margin: 0 0 1rem;
    }

    .account-card label {
        display: block;
        margin: 0.75rem 0 0.25rem;
    }

    .account-card input[type=text],
    .account-card input[type=password],
    .account-card input:not([type]) {
        width: 100%;
        box-sizing: border-box;
        padding: 0.5rem;
        border: 1px solid #b0b7c3;
        border-radius: 4px;
        font-size: 1rem;
    }

    .account-card select {
        width: 100%;
        padding: 0.5rem;
        border: 1px solid #b0b7c3;
        border-radius: 4px;
        font-size: 1rem;
        background: white;
    }

    .account-card h2 {
        font-size: 1.1rem;
        font-weight: 500;
        margin: 1.5rem 0 0.25rem;
    }

    .account-card code {
        overflow-wrap: anywhere;
    }

    .account-card .account-check {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    .account-card button {
        margin-top: 1.25rem;
        width: 100%;
        padding: 0.6rem;
        border: 0;
        border-radius: 4px;
        background: #1f3a5f;
        color: white;
        font-size: 1rem;
        cursor: pointer;
    }

    .account-card button.account-secondary {
        background: white;
        color: #1f3a5f;
        border: 1px solid #1f3a5f;
    }

    .account-card button.account-inline {
        width: auto;
        margin: 0;
        padding: 0.3rem 0.75rem;
        font-size: 0.875rem;
    }

    .account-card .account-links {
        margin-top: 1rem;
        text-align: center;
    }

    .account-card .account-hint {
        color: #5a6270;
        font-size: 0.85rem;
        margin: 0.25rem 0 0;
    }

.account-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 0;
    color: #5a6270;
}

    .account-divider::before,
    .account-divider::after {
        content: "";
        flex: 1;
        border-top: 1px solid #d5dae1;
    }

/* Links inside the card look like links (the app's base styles strip that). */
.account-card a {
    color: #1a5fb4;
    text-decoration: underline;
    text-underline-offset: 2px;
}

    .account-card a:hover {
        color: #0f3f7a;
    }

    .account-card a:focus-visible {
        outline: 2px solid #1a5fb4;
        outline-offset: 2px;
        border-radius: 2px;
    }

.account-card a.account-back {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    text-decoration: none;
}

    .account-card a.account-back:hover {
        text-decoration: underline;
    }

/* Tabs between the manage-account pages; the current page is marked with aria-current. */
.account-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #d5dae1;
}

    .account-card .account-tabs a {
        padding: 0.3rem 0.65rem;
        border: 1px solid #c6cdd8;
        border-radius: 999px;
        color: #1f3a5f;
        font-size: 0.875rem;
        text-decoration: none;
        white-space: nowrap;
    }

        .account-card .account-tabs a:hover {
            background: #eef1f5;
            border-color: #1f3a5f;
        }

        .account-card .account-tabs a[aria-current=page] {
            background: #1f3a5f;
            border-color: #1f3a5f;
            color: white;
            font-weight: 600;
        }

/* Overview: one row per setting, with its status and what you can do about it. */
.account-settings {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    border: 1px solid #e1e5eb;
    border-radius: 6px;
}

    .account-settings li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem 0.9rem;
    }

        .account-settings li + li {
            border-top: 1px solid #e1e5eb;
        }

.account-setting-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.account-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
}

.account-status-on {
    background: #e8f5e9;
    color: #1e4620;
}

.account-status-off {
    background: #eef1f5;
    color: #4a5260;
}

.account-card a.account-action {
    flex-shrink: 0;
    padding: 0.35rem 0.9rem;
    border: 1px solid #1f3a5f;
    border-radius: 4px;
    color: #1f3a5f;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

    .account-card a.account-action:hover {
        background: #1f3a5f;
        color: white;
    }

.account-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1rem;
    margin: 0;
}

    .account-facts dt {
        color: #5a6270;
    }

    .account-facts dd {
        margin: 0;
        overflow-wrap: anywhere;
    }

.account-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .account-list li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid #eef1f5;
        overflow-wrap: anywhere;
    }

.account-success {
    background: #e8f5e9;
    color: #1e4620;
    border-radius: 4px;
    padding: 0.6rem 0.75rem;
}

.account-note {
    background: #fff4e5;
    color: #663c00;
    border-radius: 4px;
    padding: 0.6rem 0.75rem;
}

.account-error {
    background: #fdecea;
    color: #611a15;
    border-radius: 4px;
    padding: 0.6rem 0.75rem;
}

/* App -------------------------------------------------------------------------------------- */
/* Narrow date inputs. Set on a wrapper: a MudDatePicker's own Style also applies to its pop-up
   calendar, which then gets squeezed. */
.picker-field {
    width: 220px;
    max-width: 100%;
}

/* MudBlazor's own cell rules (.mud-table-root .mud-table-body .mud-table-cell) win over plain
   tr td rules, so row styles are scoped under them. */
.mud-table-root .mud-table-body .mud-table-row.row-failure .mud-table-cell {
    color: #8a1c1c;
}

.mud-table-root .mud-table-body .mud-table-cell.audit-summary {
    max-width: 40rem;
    overflow-wrap: anywhere;
    font-size: 0.8125rem;
}

.mud-table-root .mud-table-body .mud-table-row.row-locked .mud-table-cell {
    color: #6b6b6b;
    background-color: #f5f5f5;
}

.mud-table-root .mud-table-body .mud-table-row.row-totals .mud-table-cell {
    font-weight: 600;
}

/* Keep top-bar items on one line; the bar scrolls sideways on narrow windows instead of wrapping. */
.mud-appbar .mud-toolbar {
    overflow-x: auto;
}

    .mud-appbar .mud-button-label,
    .mud-appbar .mud-link,
    .mud-appbar .mud-typography {
        white-space: nowrap;
    }

    .mud-appbar .mud-toolbar > *,
    .mud-appbar .mud-button-root,
    .mud-appbar .mud-menu {
        flex-shrink: 0;
    }

/* Project Dashboard log cell: the border is always there (transparent) so hovering doesn't shift the layout. */
.editable {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 2px 4px;
    cursor: pointer;
    white-space: pre-wrap;
}

    .editable:hover {
        border-color: #66afe9;
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
    }

.report-params {
    max-width: 900px;
}
