html, body {
    margin: 0;
    font-family: 'Avenir Next', 'Segoe UI Variable', 'Segoe UI', sans-serif;
}

html {
    /* MudBlazor's own CSS sets this on body, not html - without it, page area below
       short content (e.g. min-height:100vh pushing html taller than body) falls
       through to the browser's default canvas fill instead of the theme background. */
    background-color: var(--mud-palette-background);
}

.dotmarc-brand { flex: 0 1 180px; min-width: 0; }
.dotmarc-brand a { display: flex; min-width: 0; }
.dotmarc-brand img { max-width: 100%; object-fit: contain; }
.dotmarc-desktop-navigation { display: flex; align-items: center; flex-shrink: 0; }
.dotmarc-mobile-navigation { display: none; }
.dotmarc-appbar .mud-icon-button { flex-shrink: 0; }
.dotmarc-navigation-menu { max-width: calc(100vw - 2rem); max-height: calc(100dvh - var(--mud-appbar-height) - var(--dev-banner-height, 0px) - 2rem) !important; overflow-y: auto; }
.dotmarc-navigation-menu .mud-menu-item { min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 1099.98px) {
    .dotmarc-desktop-navigation { display: none; }
    .dotmarc-mobile-navigation { display: flex; }
    .dotmarc-appbar .mud-toolbar { padding-inline: 12px; }
    .dotmarc-brand { flex-basis: 160px; }
    .dotmarc-brand img { height: 40px; }
    .dotmarc-appbar .mud-icon-button { min-width: 44px; min-height: 44px; }
}

/* Contextual "?" docs link (see DocsLink.razor): muted until hovered/focused, so it reads as a
   secondary affordance next to a heading rather than competing with the heading itself. */
.docs-link {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    color: var(--mud-palette-text-secondary);
}

.docs-link:hover,
.docs-link:focus-visible {
    color: var(--mud-palette-primary);
}

.dotmarc-footer {
    margin-top: 1rem;
    padding: 1rem 0 1.5rem;
    border-top: 1px solid var(--mud-palette-lines-default);
    text-align: center;
}

/* A button placed beside an outlined input. MudBlazor's outlined inputs are 56px tall and its buttons about 36px,
   so the row looked lopsided. This makes the button the same height as the input, keeping the row one control.
   The 8px top margin matches the space MudBlazor leaves above an outlined input for its floating label, so the
   tops line up as well as the heights. */
.mud-button-root.button-beside-input {
    height: 56px;
    margin-top: 8px;
}

/* Button labels are uppercase, and capital letters sit above the centre of their line box. An icon centred on the
   line box therefore read about 1px low against the text (measured on every icon button). Nudging it up by a
   fraction of the font size centres it on the capitals, and scales for small buttons. */
.mud-button-root .mud-button-icon-start,
.mud-button-root .mud-button-icon-end {
    transform: translateY(-0.08em);
}

/* The dashboard summary cards: the number is centred above its caption and sized with the viewport (bigger on wide
   screens, but small enough that six fit across at the medium breakpoint). */
.stat-card {
    text-align: center;
}

.stat-card .stat-value {
    font-size: clamp(1.75rem, 2.6vw, 2.75rem);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

/* The reject/quarantine reasons list: compact bullets, with reasons that have no messages dimmed. */
.reason-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.reason-list .reason-none {
    color: var(--mud-palette-text-secondary);
}

/* The "next" build's banner (see DevBuildBanner.razor). Fixed to the top, so it stays in view; the app bar and page content
   are pushed down by its height. A loud amber so it can't be mistaken for part of the product's own chrome. */
.dev-build-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    height: var(--dev-banner-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background: #b45309;
    color: #fff;
    font-size: 0.875rem;
    text-align: center;
}

html:has(.dev-build-banner) {
    --dev-banner-height: 2rem;
}

html:has(.dev-build-banner) .mud-appbar {
    top: var(--dev-banner-height);
}

html:has(.dev-build-banner) .mud-main-content {
    padding-top: calc(var(--mud-appbar-height) + var(--dev-banner-height));
}

@media (max-width: 600px) {
    html:has(.dev-build-banner) {
        --dev-banner-height: 3.25rem;
    }
}

/* The tab bar on tabbed pages (TabbedPage): a divider under the whole row, a thick indicator under the active tab, and a bolder active label.
   Scoped to .tabbed-page-tabs so the tabs inside a page, such as the PSA vendors, keep MudBlazor's own look. */
.tabbed-page-tabs > .mud-tabs-tabbar {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.tabbed-page-tabs > .mud-tabs-tabbar .mud-tab-slider {
    height: 3px;
}

.tabbed-page-tabs > .mud-tabs-tabbar .mud-tab {
    color: var(--mud-palette-text-primary);
}

.tabbed-page-tabs > .mud-tabs-tabbar .mud-tab.mud-tab-active {
    color: var(--mud-palette-primary);
    font-weight: 600;
}

/* The PSA vendor tabs on the Alerts & PSA > PSA tab: a compact row of pills, so they read as a choice inside the page rather than as page tabs.
   Scoped to .psa-vendor-tabs so the shell's tab bar and other tabs are untouched. */
.psa-vendor-tabs > .mud-tabs-tabbar {
    background: transparent;
    border-bottom: 0;
}

.psa-vendor-tabs > .mud-tabs-tabbar .mud-tabs-tabbar-wrapper {
    gap: 8px;
    padding: 4px 0;
}

.psa-vendor-tabs > .mud-tabs-tabbar .mud-tab-slider {
    display: none;
}

.psa-vendor-tabs > .mud-tabs-tabbar .mud-tab {
    min-width: 0;
    min-height: 32px;
    padding: 4px 16px;
    border-radius: 16px;
    border: 1px solid var(--mud-palette-lines-inputs);
    background: transparent;
    color: var(--mud-palette-text-primary);
    font-size: 0.8125rem;
    text-transform: none;
}

.psa-vendor-tabs > .mud-tabs-tabbar .mud-tab.mud-tab-active {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}
.domain-list-toolbar, .domain-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.domain-percentage { white-space: nowrap; }
.list-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; min-width: 0; width: 100%; }
.list-toolbar .list-search { flex: 1 1 240px; min-width: 0; }
.list-toolbar .list-sort, .list-toolbar > .mud-input-control, .list-toolbar > .mud-select { flex: 0 1 220px; min-width: 0; }
.list-toolbar > .list-search { flex: 1 1 240px; }
.list-filter-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.list-filter-fields > * { min-width: 0; }
.mud-table:has(.list-toolbar) .mud-table-toolbar { height: auto; min-height: 0; display: block; padding-top: 1rem; }
.mud-table:has(.list-toolbar) .mud-table-smalldevices-sortselect { display: none; }
@media (max-width: 600px) {
    .list-toolbar .list-search { flex-basis: 100%; }
    .list-toolbar .list-sort { flex: 1 1 100%; }
    .list-toolbar .mud-button-root { min-height: 44px; max-width: 100%; }
}
.domain-dns-toolbar {
    position: sticky;
    top: calc(var(--mud-appbar-height) + var(--dev-banner-height, 0px));
    z-index: 1100;
    padding: 0.75rem;
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-divider);
}
.domain-inventory .mud-table-cell { padding: 8px; }
.domain-inventory .mud-input-control { min-width: 0; }
.domain-inventory .mud-switch { margin: 0; }
.domain-status-icon { display: inline-flex; align-items: center; }
.domain-management-details { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding: 1rem 0.75rem; }
.domain-management-details > div { flex: 1 1 15rem; min-width: 0; }
.dashboard-operation-summary { cursor: pointer; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.dashboard-operation-summary + .domain-list-toolbar { margin-top: 1rem; }
.domain-table-scroll { position: fixed; bottom: 0; z-index: 1099; overflow-x: auto; background: var(--mud-palette-surface); border-top: 1px solid var(--mud-palette-divider); }
.domain-table-scroll > div { height: 1px; }
.domain-filter-bar > span { min-width: 0; overflow-wrap: anywhere; }
.domain-sort {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
}
.domain-sort:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.dashboard-metric { height: 100%; }
.dashboard-section-header { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; min-width: 0; }
.dashboard-section-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 100%; }
.dashboard-section-actions .mud-button-root { max-width: 100%; text-align: left; }
.dashboard-section-actions .mud-button-label { white-space: normal; overflow-wrap: anywhere; }
.dashboard-metric-content, .dashboard-metric-action { padding: 1.25rem; width: 100%; height: 100%; text-align: left; }
.dashboard-metric-action { display: block; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; border-radius: inherit; text-decoration: none; }
.dashboard-metric-action:hover { background: var(--mud-palette-action-default-hover); }
.dashboard-metric-action:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.dashboard-queue td, .dashboard-log { overflow-wrap: anywhere; }
.dashboard-attention .mud-table-cell { vertical-align: top; padding-block: 1rem; }
.dashboard-domain-name { display: block; font-weight: 600; margin-bottom: .35rem; }
.dashboard-pass-rate { font-weight: 600; font-size: 1rem; }
.dashboard-problem { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; margin-bottom: .75rem; padding-left: .75rem; border-left: 3px solid var(--mud-palette-warning); }
.dashboard-problem-checking { border-left-color: var(--mud-palette-info); }
.dashboard-issue-copy { flex: 1 1 12rem; min-width: 0; }
.dashboard-issue-kind { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--mud-palette-text-secondary); margin-bottom: .2rem; }
.dashboard-problem-checking .dashboard-issue-kind { color: var(--mud-palette-info); }
.dashboard-issue-description { display: block; font-weight: 400; line-height: 1.5; }
.dashboard-issue-action { display: inline-block; font-size: .8rem; font-weight: 500; text-decoration: underline; text-underline-offset: .2em; }
.dashboard-sender-review { margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--mud-palette-divider); }
.baseline-step summary { cursor: pointer; color: var(--mud-palette-text-secondary); }
.baseline-step .mud-simple-table .mud-table-cell { vertical-align: top; }
.dashboard-more-problems { margin-block: .5rem; }
.dashboard-more-problems summary { cursor: pointer; color: var(--mud-palette-text-secondary); }
.dashboard-investigations .mud-button { white-space: nowrap; }
.dashboard-investigations .mud-table-cell:first-child { min-width: 9rem; }
.dashboard-attention .mud-table-cell:first-child { min-width: 9rem; }
.dashboard-metrics .mud-grid-item { min-width: 0; }
@media (max-width: 599px) {
    .dashboard-metric-content, .dashboard-metric-action { padding: .75rem; }
    .dashboard-metric .mud-typography-h4 { font-size: 1.5rem; }
    .dashboard-queue .mud-table-cell { display: block; text-align: left !important; }
    .dashboard-queue .mud-table-cell::before { display: block; margin-bottom: .35rem; }
}
