/* WiseACS portal, Step 18A: the sign-in and account pages. Colours are tokens so Step 18B can swap in the MudBlazor
   themes (light, dark, high contrast) and an airline's brand colour without touching the pages. */

:root {
    --brand: #1b4f8a;
    --brand-contrast: #ffffff;
    --text: #1d2430;
    --muted: #5a6475;
    --surface: #ffffff;
    --background: #eef2f7;
    --border: #cfd6e0;
    --error: #b3261e;
    --error-surface: #fdecea;
    --ok: #1e6b3a;
    --ok-surface: #e7f4ec;
    --warning-surface: #fff4e0;
    --focus: #f0a400;
    color-scheme: light;
}

/* Dark: chosen, or "system" on a device set to dark. The brand colour of an airline applies to the light look only. */
@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] {
        --brand: #7fb2ec;
        --brand-contrast: #0d1521;
        --text: #e6eaf0;
        --muted: #a9b3c2;
        --surface: #18202b;
        --background: #0f151d;
        --border: #36414f;
        --error: #ffb4ab;
        --error-surface: #3a1715;
        --ok: #8fd6a5;
        --ok-surface: #13301f;
        --warning-surface: #3a2c10;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --brand: #7fb2ec;
    --brand-contrast: #0d1521;
    --text: #e6eaf0;
    --muted: #a9b3c2;
    --surface: #18202b;
    --background: #0f151d;
    --border: #36414f;
    --error: #ffb4ab;
    --error-surface: #3a1715;
    --ok: #8fd6a5;
    --ok-surface: #13301f;
    --warning-surface: #3a2c10;
    color-scheme: dark;
}

/* High contrast: white on black, yellow for what can be clicked; no brand colour. */
:root[data-theme="high-contrast"] {
    --brand: #ffff00;
    --brand-contrast: #000000;
    --text: #ffffff;
    --muted: #ffffff;
    --surface: #000000;
    --background: #000000;
    --border: #ffffff;
    --error: #ff6b6b;
    --error-surface: #000000;
    --ok: #7cff7c;
    --ok-surface: #000000;
    --warning-surface: #000000;
    --focus: #00ffff;
    color-scheme: dark;
}
/* An airline's brand colour (checked for contrast against white) on its sign-in page, in the light look only. */
:root[data-theme="light"] .account-page { --brand: var(--airline-brand, #1b4f8a); }
@media (prefers-color-scheme: light) {
    :root[data-theme="system"] .account-page { --brand: var(--airline-brand, #1b4f8a); }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--background);
}

a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; }

.brand { display: inline-block; font-weight: 700; font-size: 1.25rem; color: var(--brand); text-decoration: none; margin-bottom: 1.25rem; }

/* Sign-in and account pages: one centred card. */
.account-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; }
.account-card { width: 100%; max-width: 30rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 2rem; }

.stack { display: flex; flex-direction: column; gap: 0.4rem; }
.stack label { font-weight: 600; margin-top: 0.6rem; }
.stack label.check { font-weight: 400; display: flex; gap: 0.5rem; align-items: center; }

input[type=text], input[type=email], input[type=password], input:not([type]) {
    font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); width: 100%;
}

button { font: inherit; cursor: pointer; border-radius: 6px; padding: 0.65rem 1rem; border: 1px solid transparent; }
button.primary { background: var(--brand); color: var(--brand-contrast); margin-top: 1rem; }
button.secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
button.danger { background: var(--error); color: var(--surface); }
button.link { background: none; border: none; color: var(--brand); padding: 0; text-decoration: underline; }
button.link.danger { color: var(--error); }
form.inline { display: inline; }

/* The sign-in picture CAPTCHA. */
.captcha { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.6rem; }
.captcha label { font-weight: 600; }
.captcha-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.captcha-row img { border: 1px solid var(--border); border-radius: 4px; background: #f4f6fa; max-width: 100%; }
.captcha input { text-transform: uppercase; letter-spacing: 0.2em; }

.or { text-align: center; color: var(--muted); margin: 0.5rem 0; }
.links { margin-top: 1.25rem; }
.field-error { color: var(--error); font-size: 0.9rem; }

.alert { border-radius: 6px; padding: 0.75rem 1rem; margin: 0 0 1rem; }
.alert p { margin: 0.25rem 0; }
.alert.error { background: var(--error-surface); color: var(--error); }
.alert.ok { background: var(--ok-surface); color: var(--ok); }
.alert.warning { background: var(--warning-surface); }

.timer { font-weight: 600; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.actions { padding-left: 1.2rem; }
.steps li { margin-bottom: 1rem; }
.qr svg { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 4px; }
.codes { columns: 2; list-style: none; padding: 0; font-size: 1.05rem; }
table.list { width: 100%; border-collapse: collapse; }
table.list td { padding: 0.5rem 0.25rem; border-bottom: 1px solid var(--border); }

/* Signed-in pages (replaced by the MudBlazor layout in Step 18B). */
.topbar { display: flex; gap: 1.25rem; align-items: center; padding: 0.75rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar .brand { margin: 0; margin-inline-end: auto; }
.content { padding: 1.5rem; max-width: 70rem; margin: 0 auto; }
.note { color: var(--muted); }

.footer { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; color: var(--muted); font-size: 0.85rem; padding: 1.5rem 1rem; }

/* The sign-in pages: the airline's logo, and the language and theme pickers under the card. */
.account-brand { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.account-brand .brand { margin-bottom: 0; }
.airline-logo { max-height: 48px; max-width: 180px; }
.airline-name { font-weight: 700; font-size: 1.1rem; }
.pickers { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; margin-top: 1rem; font-size: 0.9rem; }
.picker-group { display: inline-flex; gap: 0.75rem; flex-wrap: wrap; }
.pickers button[aria-current="true"] { font-weight: 700; text-decoration: none; }

/* The signed-in layout (MudBlazor): the brand in the top bar and the switchers' choices. */
.brand-mark { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; margin-inline-start: 0.5rem; }
.brand-mark img { max-height: 36px; max-width: 140px; background: #fff; border-radius: 4px; padding: 2px; }
.menu-form { display: flex; flex-direction: column; min-width: 14rem; padding: 0.25rem 0; }
.menu-option { display: block; width: 100%; text-align: start; background: none; border: none; border-radius: 0; padding: 0.55rem 1rem; color: var(--mud-palette-text-primary); font: inherit; cursor: pointer; }
.menu-option:hover, .menu-option:focus-visible { background: var(--mud-palette-action-default-hover); }
.menu-option[aria-current="true"] { font-weight: 700; }
.menu-option small { color: var(--mud-palette-text-secondary); margin-inline-start: 0.5rem; }
.menu-option.unavailable { color: var(--mud-palette-text-disabled); cursor: not-allowed; }
.menu-heading { padding: 0.5rem 1rem 0.25rem; font-size: 0.8rem; text-transform: uppercase; color: var(--mud-palette-text-secondary); }
.workspace-card.unavailable { opacity: 0.55; }
.workspace-choose { background: var(--mud-palette-primary); color: var(--mud-palette-primary-text); border: none; border-radius: 4px; padding: 0.5rem 1rem; font: inherit; cursor: pointer; }

/* The live status page (Step 19; the user's colours, 25 Oct 2026). Each status has a colour (--status), the text on it
   (--status-text, at least 4.5:1) and a light row tint (--status-tint, see-through so it suits the light and dark looks).
   The word and the icon always come with the colour, so colour is never the only sign. */
.status-accepted { --status: #2e7d32; --status-text: #ffffff; --status-tint: rgba(46, 125, 50, 0.12); }
.status-sent { --status: #1565c0; --status-text: #ffffff; --status-tint: rgba(21, 101, 192, 0.12); }
.status-waiting, .status-sending { --status: #546e7a; --status-text: #ffffff; --status-tint: rgba(84, 110, 122, 0.10); }
.status-retrying { --status: #f9a825; --status-text: #000000; --status-tint: rgba(249, 168, 37, 0.16); }
.status-blocked { --status: #6a1b9a; --status-text: #ffffff; --status-tint: rgba(106, 27, 154, 0.12); }
.status-rejected { --status: #d32f2f; --status-text: #ffffff; --status-tint: rgba(211, 47, 47, 0.12); }
.status-failed { --status: #8e0000; --status-text: #ffffff; --status-tint: rgba(142, 0, 0, 0.16); }
.status-superseded { --status: #616161; --status-text: #ffffff; --status-tint: rgba(97, 97, 97, 0.08); }

.status-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.6rem 0.15rem 0.45rem; border-radius: 999px; background: var(--status); color: var(--status-text); font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.status-chip .mud-icon-root { color: var(--status-text); }

.status-cards { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.5rem; }
@media (max-width: 1100px) { .status-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .status-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.status-card { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 0.4rem; padding: 0.35rem 0.6rem; text-align: start; font: inherit; cursor: pointer;
    background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); border: 1px solid var(--mud-palette-lines-default); border-inline-start: 5px solid var(--status); border-radius: 6px; min-width: 0; }
.status-card:hover, .status-card:focus-visible { background: var(--status-tint); }
.status-card.selected { background: var(--status-tint); outline: 2px solid var(--status); outline-offset: -2px; }
.status-card-label { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-card-label .mud-icon-root { color: var(--status); }
.status-card-count { font-size: 1.35rem; font-weight: 700; line-height: 1.1; grid-row: span 2; }
.status-card-note { font-size: 0.7rem; color: var(--mud-palette-text-secondary); white-space: nowrap; }

.status-filters .status-filter { min-width: 9.5rem; max-width: 13rem; }
.status-filters .status-search { min-width: 14rem; max-width: 20rem; }

.status-table-area .mud-table-container { max-height: calc(100vh - 17.5rem); min-height: 12rem; overflow-y: auto; }
.status-table .mud-table-cell { padding: 0.15rem 0.5rem; font-size: 0.82rem; line-height: 1.25; }
.status-table .mud-table-head .mud-table-cell { font-weight: 700; }
.status-table .status-chip { font-size: 0.75rem; padding: 0.05rem 0.5rem 0.05rem 0.35rem; }
.status-table tr.status-row td { background: var(--status-tint); }
.status-table tr.status-row td:first-child { border-inline-start: 4px solid var(--status); }
.status-table tr.status-superseded td { text-decoration: line-through; color: var(--mud-palette-text-secondary); }
.status-table tr.status-superseded .status-chip { text-decoration: none; }
.status-table tr.status-row-new td { animation: status-new 5s ease-out; }
@keyframes status-new { from { background: rgba(255, 213, 79, 0.55); } to { background: var(--status-tint); } }
@media (prefers-reduced-motion: reduce) { .status-table tr.status-row-new td { animation: none; outline: 2px solid #f0a400; outline-offset: -2px; } }
.status-document { font-family: Consolas, "Courier New", monospace; white-space: nowrap; }
.status-error { max-width: 22rem; overflow-wrap: anywhere; }
.status-more-errors { color: var(--mud-palette-text-secondary); margin-inline-start: 0.35rem; white-space: nowrap; }

.live-indicator { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; }
.live-indicator.on { color: var(--mud-palette-success); }
.live-indicator.off { color: var(--mud-palette-text-secondary); }

/* High contrast: no tints; the colours as borders on black, the words in white. */
:root[data-theme="high-contrast"] .status-chip { background: #000000; color: #ffffff; border: 2px solid var(--status); }
:root[data-theme="high-contrast"] .status-chip .mud-icon-root { color: #ffffff; }
:root[data-theme="high-contrast"] .status-table tr.status-row td,
:root[data-theme="high-contrast"] .status-card:hover,
:root[data-theme="high-contrast"] .status-card.selected { background: #000000; }
:root[data-theme="high-contrast"] .status-retrying { --status: #ffd54f; }
:root[data-theme="high-contrast"] .status-failed { --status: #ff6b6b; }
:root[data-theme="high-contrast"] .status-blocked { --status: #e1a6ff; }
:root[data-theme="high-contrast"] .status-sent { --status: #82b1ff; }

/* The wall screen (Step 19; v2): the whole screen, readable from across the room; the table takes what is left (as many
   filings as fit, no page scroll); "Needs attention" first, flashing red while a new critical problem is unacknowledged. */
.wall-layout { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.wall-page { flex: 1; min-height: 0; padding: 0.75rem 1.25rem 0.25rem; display: flex; flex-direction: column; }
.live-status.wall { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.live-status.wall .status-table-area { flex: 1; min-height: 0; display: flex; }
.live-status.wall .status-table-area .mud-table { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.live-status.wall .status-table-area .mud-table-container { max-height: none; min-height: 0; flex: 1; overflow: hidden; }
.live-status.wall .status-table .mud-table-cell { font-size: 0.95rem; padding: 0.2rem 0.6rem; }
.wall-header h1 { font-size: 1.7rem; font-weight: 700; }
.wall-header .live-indicator { font-size: 1rem; }
/* The dashboard's "Live" (user, 16 Nov 2026: "slightly enlarged and bold so that it is prominently visible"): a bolder,
   larger pill in its state's colour; "Not live" and "Connecting" keep the same size in grey. */
.dash .live-indicator { font-size: 1rem; font-weight: 800; gap: 0.35rem; padding: 4px 12px 4px 8px; border-radius: 999px; border: 1px solid transparent; }
.dash .live-indicator .mud-icon-root { font-size: 1.3rem; }
.dash .live-indicator.on { background: color-mix(in srgb, var(--mud-palette-success) 14%, transparent); border-color: color-mix(in srgb, var(--mud-palette-success) 45%, transparent); }
.dash .live-indicator.off { background: color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent); border-color: var(--mud-palette-lines-default); }
html[data-theme="high-contrast"] .dash .live-indicator { border-color: currentColor; background: transparent; }
/* "Live" alone in the top right corner of the dashboard; the other controls stay one line as before, kept clear of it:
   beside the title they start below the pill, on a phone the title leaves room for it. */
.dash-head { position: relative; }
.dash-live-corner { position: absolute; top: 0; right: 0; z-index: 1; display: inline-flex; align-items: center; gap: 10px; }
.dash-updated { white-space: nowrap; }
.dash-head .wa-page-actions { padding-top: 46px; }
@media (max-width: 959.98px) {
    .dash-head .wa-page-actions { padding-top: 0; }
    .dash-head .wa-page-title-line { padding-right: 15rem; }
}
@media (max-width: 599.98px) {
    .dash-live-corner { flex-direction: column; align-items: flex-end; gap: 2px; }
    .dash-head .wa-page-title-line { padding-right: 8rem; }
}
.wall-updated { font-size: 0.95rem; color: var(--mud-palette-text-secondary); }
.wall-clock { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-inline-start: 0.75rem; }
.status-cards.wall .status-card { padding: 0.5rem 0.8rem; cursor: default; }
.status-cards.wall .status-card-label { font-size: 1rem; }
.status-cards.wall .status-card-count { font-size: 2rem; }
.wall-footer { display: flex; align-items: center; gap: 1rem; padding: 0.25rem 1.25rem; font-size: 0.8rem; color: var(--mud-palette-text-secondary); }
.wall-footer form { margin-inline-start: auto; }
.wall-sign-out { background: none; border: none; padding: 0; font: inherit; color: var(--mud-palette-text-secondary); text-decoration: underline; cursor: pointer; }

.attention-panel { border: 2px solid #d32f2f; border-radius: 8px; padding: 0.4rem 0.75rem; margin-bottom: 0.5rem; max-height: 34vh; overflow: hidden; display: flex; flex-direction: column; background: rgba(211, 47, 47, 0.06); }
.attention-panel.empty { border-color: #2e7d32; background: rgba(46, 125, 50, 0.06); }
.attention-panel.flashing { animation: attention-flash 1s steps(2, start) infinite; }
@keyframes attention-flash { 50% { background: rgba(211, 47, 47, 0.35); border-color: #ff1744; } }
@media (prefers-reduced-motion: reduce) { .attention-panel.flashing { animation: none; background: rgba(211, 47, 47, 0.3); } }
.attention-header { display: flex; align-items: center; gap: 0.5rem; }
.attention-header h2 { font-size: 1.1rem; margin: 0; }
.attention-header .mud-icon-root { color: #d32f2f; }
.attention-panel.empty .attention-header .mud-icon-root { color: #2e7d32; }
.attention-count { font-weight: 700; font-size: 1.1rem; background: #d32f2f; color: #fff; border-radius: 999px; padding: 0 0.55rem; }
.attention-panel.empty .attention-count { background: #2e7d32; }
.alarm-enable, .alarm-acknowledge { font: inherit; font-weight: 700; border-radius: 4px; padding: 0.2rem 0.7rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem; }
.alarm-enable { background: #f9a825; color: #000; border: none; }
.alarm-acknowledge { background: #d32f2f; color: #fff; border: none; }
.alarm-on { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; color: var(--mud-palette-text-secondary); }
.attention-none { margin: 0.25rem 0 0; }
.attention-list { list-style: none; margin: 0.3rem 0 0; padding: 0; overflow: hidden; display: grid; gap: 0.2rem; }
.attention-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.9rem; padding: 0.2rem 0.5rem; border-radius: 4px; border-inline-start: 5px solid; font-size: 0.95rem; }
.attention-item.level-critical { border-color: #d32f2f; background: rgba(211, 47, 47, 0.14); }
.attention-item.level-high { border-color: #ef6c00; background: rgba(239, 108, 0, 0.12); }
.attention-item.level-medium { border-color: #f9a825; background: rgba(249, 168, 37, 0.12); }
.attention-item.acknowledged { opacity: 0.75; }
.attention-level { font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.04em; }
.attention-reason { font-weight: 600; }
.attention-document { font-family: Consolas, "Courier New", monospace; }
.attention-error { color: var(--mud-palette-text-secondary); overflow-wrap: anywhere; }
:root[data-theme="high-contrast"] .attention-panel, :root[data-theme="high-contrast"] .attention-item { background: #000; }

/* The shipments list and the shipment page (Step 19). */
.status-row-link, .shipments-table tr.shipment-row { cursor: pointer; }
.shipment-link { font-weight: 700; color: var(--mud-palette-primary); text-decoration: none; }
.shipment-flag { display: inline-block; margin-inline-start: 0.35rem; padding: 0 0.4rem; border-radius: 4px; font-family: inherit; font-size: 0.7rem; background: var(--mud-palette-action-default-hover); color: var(--mud-palette-text-secondary); }
.filing-count { display: inline-flex; align-items: center; gap: 0.2rem; margin-inline-end: 0.5rem; white-space: nowrap; font-size: 0.78rem; }
.shipment-warnings { display: inline-block; min-width: 1.4rem; text-align: center; border-radius: 999px; background: #f9a825; color: #000; font-weight: 700; font-size: 0.78rem; }
.shipments-warnings-only { margin-inline-start: 0.25rem; }
.shipment-tabs .mud-tabs-panels { padding: 0.75rem; }
.document-history { margin-bottom: 1rem; }
.document-title { font-size: 1rem; margin: 0 0 0.35rem; display: flex; gap: 0.5rem; align-items: baseline; }
.document-type { font-weight: 700; }
.document-version { border-inline-start: 4px solid var(--status); background: var(--status-tint); border-radius: 4px; padding: 0.35rem 0.6rem; margin-bottom: 0.35rem; font-size: 0.85rem; }
.document-version-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; }
.document-message-id { font-family: Consolas, "Courier New", monospace; color: var(--mud-palette-text-secondary); }
.filing-errors, .referrals { margin: 0.3rem 0 0; padding-inline-start: 1.2rem; }
.filing-fix { color: var(--mud-palette-text-secondary); }
.referral-open { font-weight: 600; }
.attempts { margin-top: 0.25rem; }
.attempts summary { cursor: pointer; color: var(--mud-palette-text-secondary); }
.message-compare { margin-top: 0.4rem; }
.message-compare-title { font-weight: 600; margin-bottom: 0.2rem; }
.message-text { font-family: Consolas, "Courier New", monospace; font-size: 0.82rem; background: var(--mud-palette-background-gray); border: 1px solid var(--mud-palette-lines-default); border-radius: 4px; padding: 0.5rem; margin: 0.25rem 0; overflow-x: auto; white-space: pre; }
.message-text .line-added { display: block; background: rgba(46, 125, 50, 0.18); }
.message-text .line-removed { display: block; background: rgba(211, 47, 47, 0.16); text-decoration: line-through; }
.message-text .line-same { display: block; }
.shipment-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; font-size: 0.9rem; }
.shipment-details h2 { font-size: 1rem; margin: 0 0 0.35rem; }
.party { margin-bottom: 0.4rem; }
.received-message { border-bottom: 1px solid var(--mud-palette-lines-default); padding: 0.3rem 0; font-size: 0.88rem; }
.received-reference { color: var(--mud-palette-text-secondary); margin-inline-start: 0.5rem; overflow-wrap: anywhere; }
.shipment-warning-list { padding-inline-start: 1.2rem; font-size: 0.88rem; }
.warning-open { font-weight: 600; }
.warning-resolved { color: var(--mud-palette-text-secondary); }
.shipment-versions { font-size: 0.88rem; }
.refile-confirm { font-weight: 600; }

/* Errors to fix (Step 19): the four tabs with their counts, the rejected tab's codes, the bulk bar, the menu's badge. */
.error-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
@media (max-width: 700px) { .error-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.error-tab { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.7rem; font: inherit; font-weight: 600; cursor: pointer; text-align: start;
    background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); border: 1px solid var(--mud-palette-lines-default); border-radius: 6px; min-width: 0; }
.error-tab:hover, .error-tab:focus-visible { background: var(--mud-palette-action-default-hover); }
.error-tab.selected { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; background: var(--mud-palette-action-default-hover); }
.error-tab-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.error-tab-count { font-size: 1.1rem; font-weight: 700; color: var(--mud-palette-text-secondary); }
.error-tab-count.some { color: #d32f2f; }
.error-advice { color: var(--mud-palette-text-secondary); max-width: 70rem; }

/* Referrals (Step 19): a DNL red, a request amber, an AC green; the flight red when it leaves within 3 hours. */
.referral-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 700px) { .referral-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.referral-kind { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 0.6rem; font-size: 0.78rem; font-weight: 700; color: #fff; }
.referral-dnl { background: #b71c1c; }
.referral-rfi, .referral-rfs { background: #e65100; }
.referral-ac { background: #2e7d32; }
.referral-dnl-row { background: rgba(183, 28, 28, 0.08); }
.referral-rfi-row, .referral-rfs-row { background: rgba(230, 81, 0, 0.06); }
.referral-row-closed { color: var(--mud-palette-text-secondary); }
.referral-row-overdue, .referral-overdue { background: rgba(230, 81, 0, 0.08); font-weight: 600; }
.referral-code { font-family: var(--mud-typography-default-family); font-weight: 600; margin-top: 0.15rem; }
.referral-note, .referral-explanation, .referral-doctype, .referral-age, .referral-assigned, .referral-answered, .referral-closed, .referral-house, .referral-answer-note
    { font-size: 0.8rem; color: var(--mud-palette-text-secondary); }
.referral-fix { font-size: 0.85rem; }
.referral-pieces, .referral-refiled { font-size: 0.8rem; font-weight: 600; }
.referral-flight-soon, .referral-flight-soon a { color: #b71c1c; font-weight: 700; }
.referral-actions { display: flex; flex-wrap: wrap; gap: 0.1rem; margin-top: 0.2rem; }
.referral-note-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.3rem; max-width: 32rem; }
.referral-note-form .referral-note-text { flex: 1 1 18rem; }
.referral-message { white-space: pre-wrap; font-size: 0.75rem; margin: 0; max-height: 10rem; overflow: auto; }
.referral-status { font-weight: 600; }
:root[data-theme="high-contrast"] .referral-kind { outline: 2px solid currentColor; }
.error-codes { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.error-code { font: inherit; font-size: 0.78rem; cursor: pointer; border-radius: 999px; padding: 0.1rem 0.6rem; border: 1px solid #d32f2f; background: rgba(211, 47, 47, 0.08); color: var(--mud-palette-text-primary); }
.error-code.selected { background: #d32f2f; color: #ffffff; }
.error-code-count { font-weight: 700; margin-inline-start: 0.2rem; }
.bulk-too-many { color: #d32f2f; font-size: 0.85rem; }
.bulk-skipped { margin: 0.2rem 0 0; padding-inline-start: 1.2rem; }
.warning-row td:first-child, .refused-row td:first-child { border-inline-start: 4px solid #f9a825; }
.warning-name { display: block; }
.warning-advice { color: var(--mud-palette-text-secondary); max-width: 26rem; }
.error-subdocument { color: var(--mud-palette-text-secondary); }
.input-errors { margin: 0; padding-inline-start: 1.1rem; }
.input-parts-missing { font-weight: 600; }
.errors-badge { display: inline-block; min-width: 1.4rem; margin-inline-start: 0.4rem; padding: 0 0.35rem; text-align: center; border-radius: 999px; background: #d32f2f; color: #ffffff; font-weight: 700; font-size: 0.75rem; line-height: 1.3rem; }
:root[data-theme="high-contrast"] .error-code.selected, :root[data-theme="high-contrast"] .errors-badge { background: #000000; color: #ffffff; border: 2px solid #ff6b6b; }

/* Flights (Step 19): each manifest's status and deadline on the list, what a blocked manifest waits for, ULD parts. */
.flights-table tr.flight-row { cursor: pointer; }
.manifest-summary { display: inline-flex; align-items: center; gap: 0.25rem; margin-inline-end: 0.75rem; white-space: nowrap; font-size: 0.78rem; }
.manifest-airport { font-family: Consolas, "Courier New", monospace; font-weight: 700; }
.manifest-deadline { color: var(--mud-palette-text-secondary); font-size: 0.78rem; white-space: nowrap; }
.manifest-deadline.missed { color: #d32f2f; font-weight: 700; }
.document-title .manifest-deadline { margin-inline-start: auto; font-size: 0.85rem; }
.waiting-for { border-inline-start: 4px solid #6a1b9a; background: rgba(106, 27, 154, 0.08); border-radius: 4px; padding: 0.35rem 0.6rem; margin-bottom: 0.35rem; font-size: 0.85rem; }
.waiting-for ul { margin: 0.2rem 0 0; padding-inline-start: 1.2rem; }
.waiting-for li { display: flex; align-items: center; gap: 0.5rem; }
.waiting-for-note, .waiting-not-filed, .stops-note { color: var(--mud-palette-text-secondary); }
.load-part { display: inline-block; margin-inline-end: 0.75rem; white-space: nowrap; }
/* Data entry (Step 19): the upload form, the preview's masters and problems, the recent uploads' results. */
.upload-input { font-size: 0.9rem; }
.upload-kind .mud-radio { align-items: flex-start; }
.upload-adds-up { color: #2e7d32; font-size: 0.8rem; }
.upload-not-adding-up { color: #c62828; font-weight: 700; font-size: 0.8rem; }
.upload-issue-error, .upload-outcome-refused { color: #c62828; font-weight: 700; }
.upload-issue-warning { color: #ef6c00; }
.upload-outcome-filed { color: #2e7d32; font-weight: 700; }
.upload-outcome-duplicate { color: var(--mud-palette-text-secondary); }
.upload-saved { margin: 0.25rem 0 0; padding-inline-start: 1.2rem; }
.upload-houses { max-height: 20rem; overflow: auto; }
:root[data-theme="high-contrast"] .upload-not-adding-up, :root[data-theme="high-contrast"] .upload-issue-error { text-decoration: underline; }

/* The dashboard (Step 19, the start page; the look of the mockup the user accepted, 29 Oct 2026). Chart colours are
   tokens read by dashboard-charts.js, so each look draws its own; the icons of the cards follow the same roles. */
:root {
    --chart-accepted: #2e7d32;
    --chart-rejected: #d32f2f;
    --chart-failed: #8e0000;
    --chart-progress: #90a4ae;
    --chart-ac: #2e7d32;
    --chart-rfi: #f9a825;
    --chart-rfs: #6a1b9a;
    --chart-dnl: #d32f2f;
    --chart-filed: #1b4f8a;
    --chart-time: #00838f;
    --chart-grid: rgba(16, 24, 40, 0.07);
    --chart-tooltip: #1d2430;
}

@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] {
        --chart-accepted: #66bb6a;
        --chart-rejected: #ef5350;
        --chart-failed: #ffab91;
        --chart-progress: #607d8b;
        --chart-ac: #66bb6a;
        --chart-rfi: #ffd54f;
        --chart-rfs: #ce93d8;
        --chart-dnl: #ef5350;
        --chart-filed: #90caf9;
        --chart-time: #80deea;
        --chart-grid: rgba(255, 255, 255, 0.08);
        --chart-tooltip: #0b1016;
    }
}

:root[data-theme="dark"] {
    --chart-accepted: #66bb6a;
    --chart-rejected: #ef5350;
    --chart-failed: #ffab91;
    --chart-progress: #607d8b;
    --chart-ac: #66bb6a;
    --chart-rfi: #ffd54f;
    --chart-rfs: #ce93d8;
    --chart-dnl: #ef5350;
    --chart-filed: #90caf9;
    --chart-time: #80deea;
    --chart-grid: rgba(255, 255, 255, 0.08);
    --chart-tooltip: #0b1016;
}

:root[data-theme="high-contrast"] {
    --chart-accepted: #7cff7c;
    --chart-rejected: #ff6b6b;
    --chart-failed: #ffab91;
    --chart-progress: #ffffff;
    --chart-ac: #7cff7c;
    --chart-rfi: #ffd54f;
    --chart-rfs: #e1a6ff;
    --chart-dnl: #ff6b6b;
    --chart-filed: #82b1ff;
    --chart-time: #80deea;
    --chart-grid: rgba(255, 255, 255, 0.3);
    --chart-tooltip: #000000;
}

.dash { display: flex; flex-direction: column; gap: 18px; }
.dash-head { gap: 12px; }
.dash-sub { font-size: 0.8rem; color: var(--mud-palette-text-secondary); }
.dash-heading { margin: 0; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mud-palette-text-secondary); }
.dash-section { display: flex; flex-direction: column; gap: 10px; }
.dash-segs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--mud-palette-lines-default); }
.dash-seg { border: 0; background: transparent; color: var(--mud-palette-text-secondary); font: inherit; font-size: 0.85rem; font-weight: 600; padding: 6px 14px; border-radius: 8px; cursor: pointer; min-height: 36px; }
.dash-seg.on { background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }
.dash-seg:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.dash-look { margin: 0; }
.dash-look .dash-seg { display: inline-flex; align-items: center; gap: 4px; }
/* The document switch (14 Nov 2026): may wrap on a narrow screen, never scrolls the page sideways. */
.dash-types { flex-wrap: wrap; max-width: 100%; }
.dash-types .dash-seg { padding: 6px 10px; }
/* "FWB 120 · FHL 340 · FFM 12" under a period card's figure. */
.dash-split { font-size: 0.72rem; color: var(--mud-palette-text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dash-grid-now { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.dash-grid-period { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.dash-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dash-span2 { grid-column: span 2; }
@media (max-width: 1280px) { .dash-grid-now { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-grid-period { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) { .dash-grid-3 { grid-template-columns: minmax(0, 1fr); } .dash-span2 { grid-column: auto; } }
@media (max-width: 600px) { .dash-grid-now, .dash-grid-period { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.dash-c-dnl, .dash-c-rej { --c: var(--chart-rejected); }
.dash-c-req { --c: #b26a00; }
.dash-c-dec { --c: var(--chart-rfs); }
.dash-c-wait { --c: #1565c0; }
.dash-c-ffm, .dash-c-time { --c: var(--chart-time); }
.dash-c-err, .dash-c-fail { --c: var(--chart-failed); }
.dash-c-filed { --c: var(--chart-filed); }
.dash-c-acc { --c: var(--chart-accepted); }
:root[data-theme="dark"] .dash-c-req, :root[data-theme="high-contrast"] .dash-c-req { --c: #ffd54f; }
:root[data-theme="dark"] .dash-c-wait, :root[data-theme="high-contrast"] .dash-c-wait { --c: #90caf9; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .dash-c-req { --c: #ffd54f; } :root[data-theme="system"] .dash-c-wait { --c: #90caf9; } }

.dash-kpi { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; min-width: 0; overflow: hidden;
    background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); text-decoration: none;
    border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease; }
a.dash-kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16, 24, 40, 0.14); color: var(--mud-palette-text-primary); }
a.dash-kpi:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.dash-kpi.alarm { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--mud-palette-surface)); }
.dash-kpi-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dash-ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.dash-ico .mud-icon-root { color: var(--c); }
.dash-lbl { font-size: 0.82rem; font-weight: 600; color: var(--mud-palette-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-num { font-size: 1.9rem; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.dash-figure { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.dash-note { font-size: 0.75rem; color: var(--mud-palette-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-go { font-size: 0.75rem; font-weight: 600; color: var(--c); }
.dash-delta { font-size: 0.75rem; font-weight: 600; }
.dash-delta.good { color: #2e7d32; }
.dash-delta.bad { color: #c62828; }
.dash-delta.flat { color: var(--mud-palette-text-secondary); }
:root[data-theme="dark"] .dash-delta.good, :root[data-theme="high-contrast"] .dash-delta.good { color: #a5d6a7; }
:root[data-theme="dark"] .dash-delta.bad, :root[data-theme="high-contrast"] .dash-delta.bad { color: #ff8a80; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .dash-delta.good { color: #a5d6a7; } :root[data-theme="system"] .dash-delta.bad { color: #ff8a80; } }
.dash-spark { margin: 0 -4px -6px; }

.dash-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px 18px;
    background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08); }
.dash-ph { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.dash-ph h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.dash-more { margin-inline-start: auto; font-size: 0.82rem; font-weight: 600; text-decoration: none; color: var(--mud-palette-primary); }
.dash-chart { position: relative; width: 100%; }
.dash-empty { margin: 0; color: var(--mud-palette-text-secondary); }

.dash-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; font-size: 0.82rem; }
.dash-legend-item { display: flex; align-items: center; gap: 8px; color: var(--mud-palette-text-secondary); min-width: 0; }
.dash-legend-item b { margin-inline-start: auto; color: var(--mud-palette-text-primary); font-variant-numeric: tabular-nums; }
.dash-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; }
.dash-dot.chart-ac { background: var(--chart-ac); }
.dash-dot.chart-rfi { background: var(--chart-rfi); }
.dash-dot.chart-rfs { background: var(--chart-rfs); }
.dash-dot.chart-dnl { background: var(--chart-dnl); }

.dash-att-list, .dash-ffm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dash-att { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 10px 12px;
    border: 1px solid var(--mud-palette-lines-default); border-radius: 10px; color: var(--mud-palette-text-primary); text-decoration: none; }
.dash-att:hover { background: var(--mud-palette-action-default-hover); color: var(--mud-palette-text-primary); }
.dash-att.level-critical { border-color: color-mix(in srgb, var(--chart-rejected) 45%, transparent); background: color-mix(in srgb, var(--chart-rejected) 5%, transparent); }
.dash-att-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-att-reason { font-weight: 600; font-size: 0.9rem; }
.dash-att-detail { font-size: 0.78rem; color: var(--mud-palette-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-lv { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-align: center; white-space: nowrap; }
.dash-lv.level-critical { background: #d32f2f; color: #ffffff; }
.dash-lv.level-high { background: #f9a825; color: #1d2430; }
.dash-lv.level-medium { background: #546e7a; color: #ffffff; }

.dash-ffm { display: flex; flex-direction: column; gap: 6px; color: var(--mud-palette-text-primary); text-decoration: none; padding: 4px 2px; border-radius: 8px; }
.dash-ffm:hover { background: var(--mud-palette-action-default-hover); color: var(--mud-palette-text-primary); }
.dash-ffm-top, .dash-ffm-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-ffm-bottom { font-size: 0.78rem; color: var(--mud-palette-text-secondary); }
.dash-ffm-left { margin-inline-start: auto; font-size: 0.82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-ffm-left.u1 { color: var(--chart-rejected); }
.dash-ffm-state { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; }
.dash-bar { display: block; height: 6px; border-radius: 999px; overflow: hidden; background: var(--mud-palette-lines-default); }
.dash-bar > span { display: block; height: 100%; border-radius: 999px; }
.dash-bar .u1 { background: var(--chart-rejected); }
.dash-bar .u2 { background: var(--chart-rfi); }
.dash-bar .u3 { background: #1565c0; }

.dash-table-box { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.dash-table th { text-align: start; font-size: 0.75rem; font-weight: 600; color: var(--mud-palette-text-secondary); padding: 6px 10px; border-bottom: 1px solid var(--mud-palette-lines-default); }
.dash-table td { padding: 7px 10px; border-bottom: 1px solid var(--mud-palette-lines-default); white-space: nowrap; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table tr:hover td { background: var(--mud-palette-action-default-hover); }
.dash-table .status-chip { font-size: 0.75rem; padding: 0.05rem 0.5rem 0.05rem 0.35rem; }
.dash-table tr.status-row-new td { animation: status-new 5s ease-out; }
.dash-reply-cell { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; color: var(--mud-palette-text-secondary); }

:root[data-theme="high-contrast"] .dash-kpi,
:root[data-theme="high-contrast"] .dash-panel { box-shadow: none; border-color: #ffffff; }
:root[data-theme="high-contrast"] .dash-kpi.alarm { background: #000000; border-width: 3px; }
@media (prefers-reduced-motion: reduce) {
    .dash-kpi { transition: none; }
    a.dash-kpi:hover { transform: none; }
    .dash-table tr.status-row-new td { animation: none; outline: 2px solid #f0a400; outline-offset: -2px; }
}

/* The WiseACS look (UI redesign, 2 Nov 2026; the mockup the user approved): the dashboard's cards, headings and spacing on
   every page. Page header, filter card, section cards and a bottom action bar come from the shared components in
   Portal.Client/Layout (PageHeader, FilterBar, SectionCard, ActionBar). Phone under 600 px, tablet 600-960 px. Colours
   come from MudBlazor's palette, so light, dark, high contrast and the airline's brand colour keep working. */
:root {
    --wa-head: #f6f8fb;
    --wa-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
    --wa-shadow-raised: 0 4px 16px rgba(16, 24, 40, 0.14);
    --wa-mono: Consolas, "Cascadia Mono", "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] { --wa-head: rgba(255, 255, 255, 0.04); --wa-shadow: none; --wa-shadow-raised: 0 4px 16px rgba(0, 0, 0, 0.5); }
}
:root[data-theme="dark"] { --wa-head: rgba(255, 255, 255, 0.04); --wa-shadow: none; --wa-shadow-raised: 0 4px 16px rgba(0, 0, 0, 0.5); }
:root[data-theme="high-contrast"] { --wa-head: transparent; --wa-shadow: none; --wa-shadow-raised: none; }

.wa-mono { font-family: var(--wa-mono); }
.wa-nowrap { white-space: nowrap; }
.wa-stack { display: flex; flex-direction: column; gap: 16px; }
.wa-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .wa-grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* Page header. */
.wa-page-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.wa-back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 32px; font-size: 0.85rem; font-weight: 600; color: var(--mud-palette-primary); text-decoration: none; }
.wa-back:hover { text-decoration: underline; }
.wa-page-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.wa-page-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 20rem; }
.wa-page-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.wa-h1 { margin: 0; font-size: 1.6rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--mud-palette-text-primary); overflow-wrap: anywhere; }
.wa-h1.status-document, .wa-h1.wa-mono { font-family: var(--wa-mono); letter-spacing: 0; }
.wa-page-sub { font-size: 0.88rem; color: var(--mud-palette-text-secondary); }
.wa-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Cards. */
.wa-card { background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; box-shadow: var(--wa-shadow); padding: 16px; min-width: 0; }
.wa-card-flush { padding: 0; overflow: hidden; }
.wa-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 12px; }
.wa-card-flush > .wa-card-head { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--mud-palette-lines-default); }
.wa-h2 { margin: 0; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mud-palette-text-secondary); }
.wa-card-note { font-size: 0.82rem; color: var(--mud-palette-text-secondary); }
.wa-card-actions { margin-inline-start: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wa-card > .mud-table, .wa-card > .mud-simple-table, .wa-card .status-table-area > .mud-table { background: transparent; box-shadow: none; border: 0; border-radius: 0; }
.wa-card .mud-paper-outlined.mud-table { border: 0; }

/* Facts: small tiles of figures (pieces, weight, route) at the top of a detail page. */
.wa-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 10px; }
.wa-fact { padding: 10px 12px; border-radius: 10px; background: var(--wa-head); border: 1px solid var(--mud-palette-lines-default); min-width: 0; }
.wa-fact-label { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mud-palette-text-secondary); }
.wa-fact-value { display: block; font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }

/* Filter card: one wrapping row; on a phone the search stays and the rest folds behind "Filters". */
.wa-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px; margin-bottom: 16px; background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; box-shadow: var(--wa-shadow); }
.wa-filters-body { display: contents; }
.wa-filters-search { flex: 1 1 16rem; min-width: 0; max-width: 26rem; }
.wa-filters-search .status-search { max-width: none; min-width: 0; }
.wa-filters-toggle { display: none; }

/* Tables: the dashboard's header row; lists become cards on a phone (MudTable Breakpoint.Xs adds mud-xs-table). */
.wa-table .mud-table-head .mud-table-cell,
.wa-card .mud-simple-table thead th { background: var(--wa-head); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mud-palette-text-secondary); white-space: nowrap; }
.wa-table .mud-table-body .mud-table-cell { padding-top: 0.35rem; padding-bottom: 0.35rem; }
.wa-card .mud-simple-table .mud-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wa-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Tabs that switch a list (Errors to fix, Referrals): a row that scrolls sideways on a phone. */
.error-tab { border-radius: 10px; box-shadow: var(--wa-shadow); min-height: 44px; }
.error-tab.selected { background: var(--mud-palette-surface); outline-width: 2px; }

/* The bottom action bar of forms and detail pages. */
.wa-actionbar { position: sticky; bottom: 0; z-index: 5; margin-top: 16px; padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px)); }
.wa-actionbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 14px; background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; box-shadow: var(--wa-shadow-raised); }
.wa-actionbar-status { flex: 1 1 12rem; min-width: 0; font-size: 0.85rem; color: var(--mud-palette-text-secondary); }
.wa-actionbar-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-inline-start: auto; }

/* A form's error summary: what to fix, each a link to its field. */
.wa-problems { border: 1px solid rgba(211, 47, 47, 0.35); background: rgba(211, 47, 47, 0.07); border-radius: 12px; padding: 12px 16px; }

/* Long names in the top bar (customs, airline, person) give way on a small screen. */
.mud-appbar .mud-button-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mud-appbar .mud-menu .mud-button-root { max-width: 16rem; }
/* The label hides what overflows it, and MudBlazor pulls its icons 4px outside the label: keep them whole. */
.mud-appbar .mud-button-root .mud-button-icon-start { margin-inline-start: 0; flex-shrink: 0; }
.mud-appbar .mud-button-root .mud-button-icon-end { margin-inline-end: 0; flex-shrink: 0; }

@media (max-width: 960px) {
    .mud-appbar .mud-menu .mud-button-root { max-width: 11rem; }
}

@media (max-width: 599.98px) {
    .wa-page-head { margin-bottom: 12px; }
    .wa-h1 { font-size: 1.3rem; }
    .wa-page-actions { width: 100%; }
    .wa-card { padding: 12px; border-radius: 10px; }
    .wa-card-flush { padding: 0; }
    .wa-stack, .wa-grid-2 { gap: 12px; }
    .wa-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .wa-filters { padding: 10px 12px; gap: 8px; margin-bottom: 12px; }
    .wa-filters-search { order: 1; flex: 1 1 0; max-width: none; }
    .wa-filters-toggle { order: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--mud-palette-lines-inputs); border-radius: 10px; background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); font: inherit; font-weight: 600; cursor: pointer; }
    .wa-filters-toggle[aria-expanded="true"] { border-color: var(--mud-palette-primary); color: var(--mud-palette-primary); }
    .wa-filters-body { order: 3; display: none; width: 100%; }
    .wa-filters.open .wa-filters-body { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
    .wa-filters .wa-filters-body .status-filter, .wa-filters .wa-filters-body .status-search { min-width: 0; max-width: none; width: 100%; }
    .wa-filters > :not(.wa-filters-search):not(.wa-filters-toggle):not(.wa-filters-body) { order: 4; }

    /* A list card gives way to its rows, each a card of its own. */
    .wa-card.wa-list { background: transparent; border: 0; box-shadow: none; padding: 0; overflow: visible; }
    .wa-card.wa-list > .wa-card-head { padding: 0 2px 8px; border: 0; }
    .wa-table.mud-xs-table { background: transparent; }
    .status-table-area .wa-table.mud-xs-table .mud-table-container,
    .wa-table.mud-xs-table .mud-table-container { max-height: none; overflow: visible; }
    .wa-table.mud-xs-table .mud-table-root, .wa-table.mud-xs-table .mud-table-body { display: block; }
    .wa-table.mud-xs-table .mud-table-body { border-top: 0; }
    .wa-table.mud-xs-table .mud-table-body .mud-table-row { display: block; margin-bottom: 10px; background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; box-shadow: var(--wa-shadow); overflow: hidden; }
    .wa-table.mud-xs-table .mud-table-body .mud-table-row .mud-table-cell { gap: 12px; padding: 4px 14px; font-size: 0.86rem; background: transparent; border: 0; text-align: end !important; }
    .wa-table.mud-xs-table .mud-table-body .mud-table-row .mud-table-cell:first-child { padding-top: 10px; font-size: 0.95rem; font-weight: 700; }
    .wa-table.mud-xs-table .mud-table-body .mud-table-row .mud-table-cell:last-child { padding-bottom: 10px; border-bottom: 0; }
    .wa-table.mud-xs-table .mud-table-cell::before { flex: none; font-size: 0.75rem; font-weight: 600; color: var(--mud-palette-text-secondary); text-align: start; }
    .wa-table.mud-xs-table tr.status-row { background: var(--status-tint); border-inline-start: 5px solid var(--status); }
    .wa-table.mud-xs-table tr.status-row td, .wa-table.mud-xs-table tr.status-row td:first-child { background: transparent; border-inline-start: 0; }
    .wa-table.mud-xs-table tr.warning-row, .wa-table.mud-xs-table tr.refused-row { border-inline-start: 5px solid #f9a825; }
    .wa-table.mud-xs-table tr.warning-row td:first-child, .wa-table.mud-xs-table tr.refused-row td:first-child { border-inline-start: 0; }
    .wa-table.mud-xs-table .mud-table-pagination { background: transparent; }

    /* Simple tables (admin pages, a shipment's houses) keep their columns and scroll sideways inside their card. */
    .wa-card .mud-simple-table table, .wa-scroll > table, .wa-scroll .mud-table-root { min-width: 34rem; }

    .error-tabs, .referral-tabs { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: thin; }
    .error-tabs .error-tab { flex: 0 0 auto; max-width: 15rem; }
    .status-cards { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: thin; }
    .status-cards .status-card { flex: 0 0 auto; min-width: 8.5rem; }
    .status-table-area .mud-table-container { max-height: none; }

    .wa-actionbar-buttons { width: 100%; margin-inline-start: 0; }
    .wa-actionbar-buttons > * { flex: 1 1 auto; }

    .mud-appbar .mud-menu .mud-button-root { max-width: 7.5rem; min-width: 0; padding-inline: 6px; }
    .brand-mark img { max-width: 96px; }
}

:root[data-theme="high-contrast"] .wa-card,
:root[data-theme="high-contrast"] .wa-filters,
:root[data-theme="high-contrast"] .wa-actionbar-inner,
:root[data-theme="high-contrast"] .wa-fact { border-color: #ffffff; }
@media print { .wa-actionbar { position: static; } .wa-filters-toggle { display: none; } }

/* Admin pages (UI redesign): AdminLayout wraps each one in .wa-admin, so their titles, outlined papers and simple tables
   take the same card look as the rest of the portal, and wide tables scroll sideways on a phone. */
.wa-admin h1.mud-typography-h4 { font-size: 1.6rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 16px !important; }
.wa-admin h2.mud-typography-h6 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mud-palette-text-secondary); }
.wa-admin .mud-paper-outlined { border-radius: 12px; box-shadow: var(--wa-shadow); }
.wa-admin .mud-simple-table { background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; box-shadow: var(--wa-shadow); overflow: hidden; }
.wa-admin .mud-paper .mud-simple-table { border: 0; border-radius: 0; box-shadow: none; }
.wa-admin .mud-simple-table thead th { background: var(--wa-head); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mud-palette-text-secondary); white-space: nowrap; }
.wa-admin .mud-simple-table .mud-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wa-admin .mud-tabs { border-radius: 12px; overflow: hidden; }
@media (max-width: 599.98px) {
    .wa-admin h1.mud-typography-h4 { font-size: 1.3rem; margin-bottom: 12px !important; }
    .wa-admin .mud-paper-outlined { border-radius: 10px; padding: 12px !important; }
    .wa-admin .mud-simple-table table { min-width: 34rem; }
    .wa-admin .mud-stack-row { flex-wrap: wrap; }
}
:root[data-theme="high-contrast"] .wa-admin .mud-simple-table,
:root[data-theme="high-contrast"] .wa-admin .mud-paper-outlined { border-color: #ffffff; }

/* Detail pages' tabs (shipment, flight) as one card; the dashboard's header sits in its own spacing. */
.wa-tabs { background: var(--mud-palette-surface); border-radius: 12px !important; box-shadow: var(--wa-shadow); overflow: hidden; }
.wa-tabs .mud-tabs-tabbar { background: var(--wa-head); border-bottom: 1px solid var(--mud-palette-lines-default); }
.wa-tabs .mud-tab { text-transform: none; font-weight: 600; min-height: 44px; }
.dash > .wa-page-head { margin-bottom: 0; }
.bulk-count { font-weight: 700; color: var(--mud-palette-text-primary); }
@media (max-width: 599.98px) {
    .wa-tabs .mud-tabs-panels { padding: 0.5rem !important; }
    .wa-tabs .wa-table.mud-xs-table .mud-table-body .mud-table-row { box-shadow: none; }
    .wa-table.mud-xs-table tr.referral-dnl-row { background: rgba(183, 28, 28, 0.08); border-inline-start: 5px solid #b71c1c; }
    .wa-table.mud-xs-table tr.referral-rfi-row, .wa-table.mud-xs-table tr.referral-rfs-row { background: rgba(230, 81, 0, 0.06); border-inline-start: 5px solid #e65100; }
    .wa-table.mud-xs-table tr.referral-row-overdue { background: rgba(230, 81, 0, 0.08); }
    .live-status .wa-page-actions { width: auto; }
}

/* ---------------------------------------------------------------------------------------------------------------------
   Sign-in look (UI redesign, 2 Nov 2026; user: "compact, remove the scrolls, a transparent background relating to
   customs message filing"). One frosted card over Layout/SignInBackdrop.razor, the language, theme and version in one
   slim line under it; sized so the sign-in page fits a laptop screen without scrolling (a long account page still
   scrolls the whole page, never inside the card).
   ------------------------------------------------------------------------------------------------------------------ */
.account-page {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    justify-items: center;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 10px;
    background:
        radial-gradient(70rem 40rem at 0% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 65%),
        radial-gradient(60rem 36rem at 100% 100%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 65%),
        var(--background);
}

.signin-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; color: var(--brand); pointer-events: none; }
.signin-backdrop .bd-dots { fill: currentColor; opacity: 0.09; }
.signin-backdrop pattern circle { fill: currentColor; }
.signin-backdrop .bd-grid { fill: none; stroke: currentColor; stroke-opacity: 0.11; stroke-width: 1.3; }
.signin-backdrop .bd-route { fill: none; stroke: currentColor; stroke-opacity: 0.4; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 6 10; animation: bd-flow 7s linear infinite; }
.signin-backdrop .bd-route-back { stroke: #2e7d32; stroke-opacity: 0.35; animation-direction: reverse; }
.signin-backdrop .bd-planes { fill: currentColor; opacity: 0.5; }
.signin-backdrop .bd-nodes circle { fill: currentColor; opacity: 0.55; }
.signin-backdrop .bd-nodes text,
.signin-backdrop .bd-docs text { fill: currentColor; font-family: Consolas, "Cascadia Mono", "Courier New", monospace; font-weight: 700; letter-spacing: 0.04em; }
.signin-backdrop .bd-nodes text { font-size: 18px; opacity: 0.6; }
.signin-backdrop .bd-docs rect { fill: var(--surface); fill-opacity: 0.6; stroke: currentColor; stroke-opacity: 0.38; stroke-width: 1.5; }
.signin-backdrop .bd-docs line { stroke: currentColor; stroke-opacity: 0.3; stroke-width: 3; stroke-linecap: round; }
.signin-backdrop .bd-docs text { font-size: 16px; opacity: 0.75; }
.signin-backdrop .bd-doc-ok circle { fill: #2e7d32; opacity: 0.55; }
.signin-backdrop .bd-doc-ok path { fill: none; stroke: #ffffff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.signin-backdrop .bd-customs { fill: none; stroke: currentColor; stroke-opacity: 0.4; stroke-width: 3; stroke-linejoin: round; }
.signin-backdrop .bd-seal path { fill: color-mix(in srgb, #2e7d32 22%, transparent); stroke: #2e7d32; stroke-opacity: 0.6; }
.signin-backdrop .bd-seal .bd-tick { fill: none; stroke-width: 3.5; stroke-linecap: round; }
@keyframes bd-flow { to { stroke-dashoffset: -160; } }

.account-page .account-card {
    width: 100%;
    max-width: 26rem;
    padding: 22px 26px 20px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 18px 48px -12px rgba(16, 24, 40, 0.28);
}

/* The WiseACS logo (Layout/WiseAcsLogo.razor): its own colours in every look, never an airline's. */
.wa-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.wa-logo-mark { width: 52px; height: 52px; flex: none; filter: drop-shadow(0 6px 14px rgba(11, 61, 145, 0.35)); }
.wa-logo-text { display: flex; flex-direction: column; align-items: flex-start; text-align: start; line-height: 1; }
.wa-logo-word { font-size: 2rem; font-weight: 800; letter-spacing: -0.025em; }
.wa-logo-wise { color: #0b2f6b; }
.wa-logo-acs { background: linear-gradient(120deg, #0b3d91, #0fa3b1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wa-logo-sub { margin-top: 6px; padding-inline-start: 2px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
:root[data-theme="dark"] .wa-logo-wise { color: #e8eef8; }
:root[data-theme="dark"] .wa-logo-acs { background-image: linear-gradient(120deg, #7fb2ff, #3dd6c6); }
@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] .wa-logo-wise { color: #e8eef8; }
    :root[data-theme="system"] .wa-logo-acs { background-image: linear-gradient(120deg, #7fb2ff, #3dd6c6); }
}
:root[data-theme="high-contrast"] .wa-logo-mark { filter: none; }
:root[data-theme="high-contrast"] .wa-logo-wise { color: #ffffff; }
:root[data-theme="high-contrast"] .wa-logo-acs { background: none; color: #ffff00; }

/* The card's head: the logo first and biggest, the tagline, the airline on its own address, then whose login it is. */
.account-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 14px; }
.account-logo { text-decoration: none; border-radius: 12px; }
.account-tagline { margin: 10px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.account-airline { margin-top: 12px; padding: 6px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.account-page .airline-logo { display: block; max-height: 30px; max-width: 150px; }
.account-page .airline-name { font-weight: 700; color: var(--brand); font-size: 0.9rem; }

/* "Admin Login" / "Customer Login": centred between two hairlines. */
.account-card h1.login-kind { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); margin: 0 0 4px; }
.account-card h1.login-kind::before, .account-card h1.login-kind::after { content: ""; flex: 1; height: 1px; background: var(--border); }
/* Spaced capitals suit Latin letters only (spacing breaks joined scripts such as Arabic and Hindi). */
html:not([lang|="en"]):not([lang|="fr"]):not([lang|="es"]) .account-card h1.login-kind { letter-spacing: normal; font-size: 0.95rem; }

.account-card h1 { font-size: 1.3rem; margin: 0 0 6px; }
.account-card h1:focus { outline: none; } /* Blazor focuses the heading after a page load; nothing to click there */
.account-card .alert { padding: 0.5rem 0.75rem; margin-bottom: 0.5rem; font-size: 0.9rem; }
.account-card .stack { gap: 0.25rem; }
.account-card .stack label { margin-top: 0.45rem; font-size: 0.85rem; }
.account-card input[type=text], .account-card input[type=email], .account-card input[type=password], .account-card input:not([type]) {
    padding: 0.5rem 0.7rem; border-radius: 8px; background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.account-card input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.account-card input:focus-visible { outline: none; }
.account-card button { border-radius: 8px; padding: 0.55rem 1rem; }
.account-card button.primary { margin-top: 0.85rem; font-weight: 600; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.account-card button.primary:hover { filter: brightness(1.08); }
.account-card button.link { padding: 0; }
.account-card .links { margin: 12px 0 0; font-size: 0.875rem; }
.account-card .or { margin: 0.25rem 0; }

/* The CAPTCHA in two rows: the question with "New picture" beside it, then the picture with the answer beside it. */
.account-card .captcha { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "label label refresh" "pic answer answer"; gap: 0.3rem 0.6rem; align-items: center; margin-top: 0.45rem; }
.account-card .captcha label { grid-area: label; font-size: 0.85rem; }
.account-card .captcha-row { display: contents; }
.account-card .captcha-row img { grid-area: pic; height: 44px; width: auto; border-radius: 8px; }
.account-card .captcha-row button { grid-area: refresh; justify-self: end; font-size: 0.8rem; white-space: nowrap; }
.account-card .captcha input { grid-area: answer; }

.account-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 20px; font-size: 0.78rem; color: var(--muted); }
.account-bottom .pickers { margin: 0; gap: 4px 16px; font-size: inherit; }
.account-bottom .picker-group { gap: 10px; }
.account-bottom .pickers button.link { font-size: inherit; color: var(--muted); text-decoration: none; padding: 0; }
.account-bottom .pickers button.link:hover { color: var(--brand); text-decoration: underline; }
.account-bottom .pickers button[aria-current="true"] { color: var(--brand); }
.account-bottom .footer { padding: 0; gap: 4px 16px; font-size: inherit; }
.account-bottom .picker-group + .picker-group { padding-inline-start: 16px; border-inline-start: 1px solid var(--border); }

@media (max-width: 599.98px) {
    .account-page { padding: 12px 12px 8px; }
    .account-page .account-card { padding: 18px 16px 16px; border-radius: 14px; }
    .signin-backdrop { opacity: 0.7; }
}

/* Short screens (a landscape phone, a small laptop window): a little tighter still. */
@media (max-height: 700px) {
    .account-tagline { display: none; }
    .wa-logo-mark { width: 44px; height: 44px; }
    .wa-logo-word { font-size: 1.7rem; }
    .account-card h1 { font-size: 1.15rem; }
    .account-card .stack label { margin-top: 0.3rem; }
}

:root[data-theme="high-contrast"] .signin-backdrop { display: none; }
:root[data-theme="high-contrast"] .account-page { background: var(--background); }
:root[data-theme="high-contrast"] .account-page .account-card { background: var(--surface); border-color: var(--border); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (prefers-reduced-motion: reduce) { .signin-backdrop .bd-route { animation: none; } }
@media print { .signin-backdrop { display: none; } }

/* Admin, Airlines: the new-airline line (code, name, Create) at one height, the code's note under it. */
.airline-new-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.airline-new-row .airline-new-code { flex: 0 0 14rem; }
.airline-new-row .airline-new-name { flex: 1 1 18rem; max-width: 30rem; }
/* The boxes keep MudBlazor's dense outlined margins (8px above for the floating label, 4px below); the button takes the
   same, so stretched to the line it is exactly as tall as the boxes. */
.airline-new-row .airline-new-create { flex: none; margin: 8px 0 4px; padding-inline: 20px; }
.airline-new-help { display: block; margin-top: 6px; color: var(--mud-palette-text-secondary); }
@media (max-width: 599.98px) {
    .airline-new-row .airline-new-code, .airline-new-row .airline-new-name, .airline-new-row .airline-new-create { flex: 1 1 100%; max-width: none; }
}

/* A box and its button on one line at one height (admin Alert rules' threshold and Save). MudBlazor gives a dense
   outlined box an outer gap (4px above and below, 8px above when it has a floating label); here the gap goes, so the
   button, stretched to the line, is exactly as tall as the box (the selectors outrank MudBlazor's three-class rule).
   A note about the box goes under the line (wa-field-note), never inside the box, which would make it taller. */
.wa-field-row { display: flex; align-items: stretch; gap: 8px; }
.wa-field-row > .mud-input-control.mud-input-control-margin-dense,
.wa-field-row > .mud-input-control.mud-input-control-margin-dense.mud-input-outlined-with-label { margin: 0; }
.wa-field-row > .mud-button-root { flex: none; margin: 0; padding-inline: 16px; }
.wa-field-note { display: block; margin-top: 2px; color: var(--mud-palette-text-secondary); white-space: nowrap; }
.wa-field-row .rules-threshold { flex: 0 0 6.5rem; }

/* ---------------------------------------------------------------------------------------------------------------------
   Menu colours (user, 3 Nov 2026: "make the icons colourful", option B): each menu icon sits on a soft tile of its own
   colour, like the dashboard cards' icons; the open page's tile is solid. Colours by what the page is for: overview
   blues (the start page takes the brand colour, so an airline's own colour shows there), cargo violet and sky, needs
   action red and amber (the colours of their badges and of Rejected / Do Not Load), data in greens, set-up slates,
   alerts orange, operations rose, brown and grey, personal grey. Lighter shades in the dark look; plain icons without
   tiles in high contrast. Items set --navc-l (light) and --navc-d (dark); NavMenu.razor gives each item "navc navc-*".
   ------------------------------------------------------------------------------------------------------------------ */
.navc-brand { --navc-l: var(--mud-palette-primary); --navc-d: var(--mud-palette-primary); }
.navc-teal { --navc-l: #00897b; --navc-d: #4db6ac; }
.navc-indigo { --navc-l: #3949ab; --navc-d: #9fa8da; }
.navc-violet { --navc-l: #7b1fa2; --navc-d: #ce93d8; }
.navc-sky { --navc-l: #0277bd; --navc-d: #4fc3f7; }
.navc-red { --navc-l: #d32f2f; --navc-d: #ef9a9a; }
.navc-amber { --navc-l: #c77700; --navc-d: #ffca28; }
.navc-green { --navc-l: #2e7d32; --navc-d: #81c784; }
.navc-lime { --navc-l: #558b2f; --navc-d: #aed581; }
.navc-cyan { --navc-l: #00838f; --navc-d: #4dd0e1; }
.navc-slate { --navc-l: #455a64; --navc-d: #b0bec5; }
.navc-steel { --navc-l: #1565c0; --navc-d: #90caf9; }
.navc-dusk { --navc-l: #4e5f9e; --navc-d: #a5b4e8; }
.navc-slategrey { --navc-l: #546e7a; --navc-d: #b0bec5; }
.navc-orange { --navc-l: #e65100; --navc-d: #ffb74d; }
.navc-tangerine { --navc-l: #ef6c00; --navc-d: #ffcc80; }
.navc-rose { --navc-l: #c2185b; --navc-d: #f48fb1; }
.navc-brown { --navc-l: #6d4c41; --navc-d: #bcaaa4; }
.navc-grey { --navc-l: #616161; --navc-d: #bdbdbd; }
.navc-neutral { --navc-l: #6b7280; --navc-d: #aeb6c2; }

.navc { --navc: var(--navc-l); }
:root[data-theme="dark"] .navc { --navc: var(--navc-d); }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .navc { --navc: var(--navc-d); } }

/* The tile: the icon itself, padded, on a 14% tint of its colour (the selectors outrank MudBlazor's icon colours). */
.mud-drawer .mud-navmenu .navc .mud-nav-link:not(.mud-nav-link-disabled) .mud-nav-link-icon {
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    padding: 5px;
    border-radius: 8px;
    color: var(--navc);
    background-color: color-mix(in srgb, var(--navc) 14%, transparent);
    transition: background-color 0.15s ease, color 0.15s ease;
}
.mud-drawer .mud-navmenu .navc .mud-nav-link:not(.mud-nav-link-disabled):hover .mud-nav-link-icon {
    background-color: color-mix(in srgb, var(--navc) 24%, transparent);
}
/* The open page: a solid tile with a white icon (dark text on the light shades of the dark look). */
.mud-drawer .mud-navmenu .navc .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon {
    color: #ffffff;
    background-color: var(--navc);
}
:root[data-theme="dark"] .mud-drawer .mud-navmenu .navc .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon { color: #10151c; }
@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] .mud-drawer .mud-navmenu .navc .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon { color: #10151c; }
}
:root[data-theme="high-contrast"] .mud-drawer .mud-navmenu .navc .mud-nav-link .mud-nav-link-icon,
:root[data-theme="high-contrast"] .mud-drawer .mud-navmenu .navc .mud-nav-link.active .mud-nav-link-icon {
    color: inherit;
    background: none;
}
@media (prefers-reduced-motion: reduce) { .mud-drawer .mud-navmenu .navc .mud-nav-link-icon { transition: none; } }

/* ---- Busy indicator (17 Nov 2026: pages looked frozen while loading) ---- */
.wa-busy-bar.mud-progress-linear { position: fixed; top: 0; left: 0; right: 0; z-index: 2001; height: 3px; }
.wa-busy-overlay {
    position: fixed; inset: 0; z-index: 2000; cursor: progress;
    background: rgba(15, 23, 42, 0.12);
    display: flex; align-items: center; justify-content: center;
    animation: wa-busy-in 160ms ease-out;
}
.wa-busy-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem; border-radius: 10px; font-weight: 500; }
@keyframes wa-busy-in { from { opacity: 0; } to { opacity: 1; } }
:root[data-theme="dark"] .wa-busy-overlay { background: rgba(0, 0, 0, 0.35); }
:root[data-theme="high-contrast"] .wa-busy-overlay { background: transparent; }

/* A whole new page loading (page-busy.js): the same bar, drawn by CSS until the next page appears. */
html.wa-unloading body::before {
    content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 40%; z-index: 2001;
    background: var(--mud-palette-primary, #1B4F8A);
    animation: wa-unload-bar 1.1s ease-in-out infinite;
}
@keyframes wa-unload-bar { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
    .wa-busy-overlay { animation: none; }
    html.wa-unloading body::before { animation: none; left: 0; width: 100%; opacity: 0.6; }
}
