html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    overflow: hidden;     /* PulseLayout handles its own scroll inside .pulse-canvas */
    margin: 0;
}

/* Viewport lock — anchored at .page so Blazor wrapper divs are irrelevant.
   100vh is absolute so it doesn't need a height: 100% chain above it.
   This only affects pages that use MainLayout (.page exists).
   Login / EmptyLayout pages are unaffected. */
.page {
    display: flex;
    flex-direction: row;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

article.content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

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

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

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

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

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

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

/* ── Shared editor shell + menubar ─────────────────────────────────────────── */
.ici-shell {
    background: var(--mud-palette-drawer-background, #FAFAFA);
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ici-sticky-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--mud-palette-drawer-background, #FAFAFA);
}
.ici-content {
    flex: 1;
    min-height: 0;
    overflow: auto;
}
.ici-grid-search { background: var(--mud-palette-background, #FFFFFF) !important; }
/* MudDataGrid cell font size — matches BR editor grid (0.78rem body, 0.75rem header) */
.ici-shell .mud-table-cell { font-size: 0.78rem !important; }
.ici-shell .mud-table-head .mud-table-cell { font-size: 0.75rem !important; }
.ici-title-row {
    background: var(--mud-palette-drawer-background, #FAFAFA);
    color: var(--mud-palette-drawer-text, #0E0E0E);
}
.ici-title-row .mud-secondary-text,
.ici-title-row .mud-typography-overline {
    color: var(--mud-palette-drawer-text, #0E0E0E) !important;
}
.ici-title { font-weight: 400 !important; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 0.45rem; }
.ici-title .mud-icon-root { color: #86BC25; font-size: 1.4rem !important; }
.ici-menubar {
    border-top: 1px solid var(--mud-palette-lines-default, #E0E0E0);
    border-bottom: 1px solid var(--mud-palette-lines-default, #E0E0E0);
    background: var(--mud-palette-surface, #FFFFFF);
    /* a little vertical breathing room so the bar doesn't crowd the title above
       or the content below — applies to every page that uses this menubar. */
    padding: 6px 0.25rem;
    margin: 6px 0;
}
.ici-dd-bar {
    display: flex; align-items: stretch;
    height: 100%; width: 100%;
}
.ici-dd { position: relative; display: flex; align-items: stretch; }
.ici-dd-btn {
    background: none; border: none; padding: 0 12px;
    cursor: pointer; font-size: 0.8125rem; font-weight: 400;
    color: var(--mud-palette-text-primary, #0E0E0E);
    white-space: nowrap; display: flex; align-items: center;
}
.ici-dd-btn:hover,
.ici-dd:focus-within .ici-dd-btn { background: rgba(0,0,0,0.06); }
/* File / Config / menu buttons are not bold. Higher specificity than the
   stale per-page `.ici-dd-btn { font-weight:600 }` copies, so it wins
   everywhere without touching 15 component <style> blocks. */
.ici-dd-bar .ici-dd-btn { font-weight: 400; }
.ici-dd-panel {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    z-index: 2000;
    background: var(--mud-palette-surface, #fff);
    border: 1px solid var(--mud-palette-lines-default, #E0E0E0);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 160px;
    padding: 8px 0;
}
.ici-dd:focus-within .ici-dd-panel,
.ici-dd:hover .ici-dd-panel { display: block; }
.ici-dd-item {
    display: block; width: 100%;
    background: none; border: none;
    padding: 10px 16px; text-align: left;
    cursor: pointer; font-size: 0.875rem;
    color: var(--mud-palette-text-primary, #0E0E0E);
    white-space: nowrap;
}
.ici-dd-item:hover:not(:disabled) { background: rgba(0,0,0,0.06); }
.ici-dd-item:disabled { opacity: 0.45; cursor: default; }
.ici-dd-soon {
    display: block; padding: 10px 16px;
    font-size: 0.875rem; font-style: italic;
    color: var(--mud-palette-text-secondary, #666);
}
.ici-dd-sep { border: none; border-top: 1px solid var(--mud-palette-lines-default, #E0E0E0); margin: 4px 0; }

/* ── Dashboard workstream sidebar ──────────────────────────────────────────── */
.ws-layout {
    display: flex;
    gap: 0;
    background: var(--mud-palette-background, #fff);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    overflow: hidden;
    min-height: 420px;
}
.ws-sidebar {
    width: 172px;
    min-width: 172px;
    background: var(--mud-palette-background-grey, #f8f9fb);
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    padding: 4px 0 8px;
    flex-shrink: 0;
}
.ws-sidebar-group {
    font-size: 0.61rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: #aaa;
    padding: 10px 14px 4px;
}
.ws-sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    font-size: 0.8rem;
    color: #444;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
    gap: 6px;
    box-sizing: border-box;
}
.ws-sidebar-item:hover { background: #eef0f4; color: #052767; }
.ws-sidebar-active {
    background: #e8eef8;
    color: #052767;
    font-weight: 600;
    border-left-color: #86BC25;
}
.ws-sidebar-soon { opacity: 0.42; cursor: default; }
.ws-sidebar-soon:hover { background: none !important; color: #444 !important; }
.ws-sidebar-label { flex: 1; }
.ws-sidebar-badge {
    font-size: 0.68rem;
    font-weight: 700;
    background: #e8eef8;
    color: #2a5aad;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.ws-sidebar-active .ws-sidebar-badge { background: #052767; color: #fff; }
.ws-soon-chip {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #e5e7eb;
    color: #9ca3af;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
}
.ws-sidebar-divider { border-top: 1px solid #e4e6ea; margin: 6px 0; }
.ws-content {
    flex: 1;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}
.form-splitter {
    height: 5px;
    background: #e4e6ea;
    cursor: ns-resize;
    flex-shrink: 0;
}
.form-splitter:hover, .form-splitter.active {
    background: #86bc25;
}
.project-readonly-banner {
    background: #fff3cd;
    color: #856404;
    border-bottom: 1px solid #ffc107;
    padding: 6px 20px;
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

/* Selected-row highlight, shared across every grid editor. */
.ici-row-selected { background-color: rgba(134,188,37,.15) !important; }
.ici-row-selected td { background-color: rgba(134,188,37,.15) !important; }

/* ── Theme-aware native form controls ─────────────────────────────────────── */
/* Native <input>, <select>, <textarea> default to browser white regardless of
   the active theme. These rules pull them into the palette so tinted themes
   (Granite, Ocean, Forest, Desert, Moab) look consistent throughout.         */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"])
    :not([type="color"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
select,
textarea {
    background-color: var(--mud-palette-background, #FFFFFF);
    color: var(--mud-palette-text-primary, #0E0E0E);
}

/* Override component-local hardcoded whites for lists and dialog selects */
.pc-listbox,
.dlg-field-select {
    background: var(--mud-palette-background, #FFFFFF) !important;
    color: var(--mud-palette-text-primary, #0E0E0E) !important;
}

/* Workstream content pane */
.ws-content {
    background: var(--mud-palette-background, #FFFFFF);
}


/* ── Dashboard advanced widget CSS ──────────────────────────────────────────── */

/* Sparkline */
.db-w-sparkline {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px 10px 6px;
    overflow: hidden;
    color: var(--mud-palette-text-primary);
}
.db-w-sparkline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
}
.db-w-sparkline-title  { font-size: 0.78rem; font-weight: 700; color: #555; }
.db-w-sparkline-trend  { font-size: 0.78rem; font-weight: 600; }
.db-w-sparkline-sublabel { font-size: 0.68rem; color: #aaa; margin-bottom: 4px; }
.db-w-sparkline-footer   { font-size: 0.65rem; color: #bbb; margin-top: 4px; }
.db-w-sparkline-nodata   { font-size: 0.75rem; color: #ccc; text-align: center; padding: 12px 0; }

/* Gauge */
.db-w-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 6px;
    color: var(--mud-palette-text-primary);
}
.db-w-gauge-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

/* Variance meter */
.db-w-variance {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 8px 12px;
    color: var(--mud-palette-text-primary);
}
.db-w-variance-title   { font-size: 0.75rem; font-weight: 700; color: #555; margin-bottom: 2px; }
.db-w-variance-display { font-size: 1rem; font-weight: 700; color: #333; margin-bottom: 4px; }
.db-w-variance-sub     { font-size: 0.68rem; color: #aaa; margin-top: 4px; }

/* Radar */
.db-w-radar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 4px 6px;
    color: var(--mud-palette-text-primary);
    overflow: hidden;
}
.db-w-radar svg { max-height: 100%; max-width: 100%; }
.db-w-radar-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 4px 0;
    flex-shrink: 0;
}
.db-w-radar-nodata  { font-size: 0.75rem; color: #ccc; padding: 20px; text-align: center; }
/* Scale toggle pill at the bottom of the radar widget. */
.db-w-radar-scale {
    display: flex; align-items: center; gap: 2px;
    align-self: center;
    padding: 2px 4px;
    margin-top: 4px;
    background: #FAFAFA;
    border: 1px solid #ECEFF1;
    border-radius: 12px;
    font-size: 0.62rem;
}
.db-w-radar-scale-lbl {
    color: #888; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 0 6px 0 4px;
}
.db-w-radar-scale button {
    background: transparent; border: none;
    padding: 2px 8px; border-radius: 10px;
    font-size: 0.66rem; font-weight: 700;
    color: #607D8B; cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.db-w-radar-scale button:hover { background: #E0E0E0; color: #1a1a1a; }
.db-w-radar-scale button.on   { background: #1976D2; color: #fff; }

/* Heatmap */
.db-w-heatmap {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px 10px;
    overflow: hidden;
    color: var(--mud-palette-text-primary);
}
.db-w-heatmap-title   { font-size: 0.75rem; font-weight: 700; color: #555; margin-bottom: 6px; }
.db-w-heatmap-scroll  { overflow-x: auto; flex: 1; }
.db-w-heatmap-nodata  { font-size: 0.75rem; color: #ccc; padding: 12px 0; }
.db-w-heatmap-table   { border-collapse: collapse; width: 100%; font-size: 0.72rem; }
.db-w-hm-rowlabel {
    text-align: left;
    padding: 3px 6px 3px 0;
    white-space: nowrap;
    font-weight: 600;
    color: #555;
    min-width: 60px;
}
.db-w-hm-collabel {
    text-align: center;
    padding: 2px 4px;
    font-size: 0.66rem;
    color: #888;
    font-weight: 600;
    white-space: nowrap;
    min-width: 32px;
}
.db-w-hm-cell {
    text-align: center;
    padding: 4px 6px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    min-width: 28px;
}

/* Risk Pulse */
.db-w-risk {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px 10px;
    color: var(--mud-palette-text-primary);
}
.db-w-risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.db-w-risk-title { font-size: 0.75rem; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.06em; }
.db-w-risk-rag   { font-size: 1.4rem; line-height: 1; }
.db-w-risk-rows  { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow: hidden; }
.db-w-risk-row   { display: grid; grid-template-columns: 20px 1fr auto 14px; align-items: center; gap: 4px; font-size: 0.75rem; }
.db-w-risk-icon  { font-size: 0.85rem; }
.db-w-risk-lbl   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #444; }
.db-w-risk-count { font-weight: 700; color: #333; }
.db-w-risk-dot   { font-size: 0.75rem; }

/* Go-Live Countdown */
.db-w-golive {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 8px 12px;
    text-align: center;
    color: var(--mud-palette-text-primary);
}
.db-w-golive-title     { font-size: 0.72rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.db-w-golive-count     { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.db-w-golive-label     { font-size: 0.75rem; font-weight: 600; margin-top: 2px; }
.db-w-golive-date      { font-size: 0.7rem; color: #888; margin-top: 4px; }
.db-w-golive-conf-label { font-size: 0.68rem; color: #888; margin-top: 8px; }
.db-w-golive-conf-bar-bg {
    width: 80%;
    height: 6px;
    background: #e8ecf0;
    border-radius: 3px;
    overflow: hidden;
    margin: 4px auto 0;
}
.db-w-golive-conf-bar { height: 100%; border-radius: 3px; min-width: 3px; }
.db-w-golive-conf-pct { font-size: 0.72rem; font-weight: 700; margin-top: 3px; }

/* Milestone Timeline */
.db-w-milestone {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px 10px;
    overflow: hidden;
    color: var(--mud-palette-text-primary);
}
.db-w-milestone-title { font-size: 0.75rem; font-weight: 700; color: #555; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.db-w-milestone-list  { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow: hidden; }
.db-w-milestone-row {
    display: grid;
    grid-template-columns: 16px 1fr auto;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    border-left: 3px solid #9E9E9E;
    padding: 3px 4px 3px 6px;
    border-radius: 2px;
    background: #fafafa;
}
.db-w-ms-icon  { font-size: 0.8rem; flex-shrink: 0; }
.db-w-ms-name  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #333; }
.db-w-ms-date  { font-size: 0.68rem; color: #888; white-space: nowrap; flex-shrink: 0; }
.db-w-milestone-empty { font-size: 0.75rem; color: #ccc; padding: 12px 0; }

/* Defect Age */
.db-w-defect-age {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px 12px;
    overflow: hidden;
    color: var(--mud-palette-text-primary);
}
.db-w-da-title  { font-size: 0.75rem; font-weight: 700; color: #555; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.db-w-da-list   { display: flex; flex-direction: column; gap: 5px; flex: 1; overflow: hidden; }
.db-w-da-row    { display: grid; grid-template-columns: 70px 1fr 32px; align-items: center; gap: 6px; font-size: 0.75rem; }
.db-w-da-label  { font-size: 0.72rem; color: #555; white-space: nowrap; }
.db-w-da-bar-bg { background: #f0f0f0; border-radius: 4px; height: 8px; overflow: hidden; }
.db-w-da-bar    { height: 100%; border-radius: 4px; min-width: 3px; }
.db-w-da-count  { font-weight: 700; text-align: right; font-size: 0.78rem; }
.db-w-da-footer { font-size: 0.65rem; color: #bbb; margin-top: 6px; }
.db-w-da-empty  { font-size: 0.75rem; color: #ccc; padding: 12px 0; }

/* ── Widget tooltip (? icon in top-right corner) ─────────────────────────── */
.db-widget-tip-anchor {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
}
.db-widget-tip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,0.08);
    color: #777;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: default;
    line-height: 1;
    user-select: none;
    transition: background 0.15s;
}
.db-widget-tip-anchor:hover .db-widget-tip-icon {
    background: rgba(0,0,0,0.18);
    color: #333;
}
.db-widget-tip-panel {
    display: none;
    position: absolute;
    top: 24px;
    right: 0;
    width: 260px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.14);
    padding: 10px 13px;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #333;
    z-index: 999;
    pointer-events: none;
}
.db-widget-tip-anchor:hover .db-widget-tip-panel {
    display: block;
}
/* keep the widget itself position:relative so the anchor sits inside */
.db-widget { position: relative; }

/* Zoom control — used by both the Dashboards builder and the Home dashboards.
   Sits inline in a toolbar; bind value to a 0.5–2.0 zoom field. */
.db-zoom {
    display: flex; align-items: center; gap: 4px;
    padding: 0 10px;
    flex-shrink: 0;
}
.db-zoom input[type="range"] {
    width: 110px;
    accent-color: #86BC25;
    cursor: pointer;
}
.db-zoom-btn, .db-zoom-pct {
    height: 22px; min-width: 22px;
    padding: 0 6px;
    background: #fff; border: 1px solid #CFD8DC; border-radius: 4px;
    font-size: 0.78rem; font-weight: 700; line-height: 1;
    color: #555; cursor: pointer;
}
.db-zoom-btn:hover, .db-zoom-pct:hover { background: #ECEFF1; color: #1a1a1a; }
.db-zoom-pct { font-family: 'JetBrains Mono', Consolas, monospace; min-width: 46px; text-align: center; }

/* Health indicator dot — sits directly below the ? icon in the top right corner. */
.db-widget-health {
    position: absolute;
    top: 30px;                    /* 6px (top) + 18px (? icon) + 6px gap */
    right: 10px;                  /* aligns with ? icon center (6 + 18/2 - 5) */
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #BDBDBD;
    box-shadow: 0 0 0 2px #fff;   /* tiny halo so it reads cleanly on any tile bg */
    z-index: 10;
    pointer-events: none;
}
.db-widget-health.g { background: #86BC25; }   /* green  */
.db-widget-health.a { background: #FB8C00; }   /* amber  */
.db-widget-health.r { background: #E53935; }   /* red    */
.db-widget-health.n { background: #BDBDBD; }   /* neutral / not started */

/* ── Home page analytical widget row ─────────────────────────────────────── */
.ph-widget-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    /* Vertical spacing between panels is owned by .ph-shell { gap }; the old
       margin:12px 0 doubled the gap above/below this row, making the
       Health-at-a-Glance -> cards gap larger than every other gap. */
    margin: 0;
}
.ph-widget-card {
    background: var(--mud-palette-surface, #fff);
    border: 1px solid var(--mud-palette-lines-default, #e0e0e0);
    border-radius: 10px;
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    min-height: 160px;
    overflow: hidden;
}
.ph-widget-card--md  { flex: 1 1 200px; max-width: 260px; }
.ph-widget-card--lg  { flex: 2 1 300px; max-width: 420px; }
.ph-widget-card-title {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* Hide the floating help "?" button when the user has opted out (toggled
   from the Config menu; persisted in localStorage via window.backpackHelp). */
body.help-hidden .help-fab { display: none !important; }

/* Section header inside the menubar dropdowns (Admin/Config menus). */
.ici-dd-head { padding: 6px 16px 2px; font-size: 0.64rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em; color: #9e9e9e; cursor: default; }

/* Flyout submenus inside the menubar dropdowns (Admin menu groups). */
.ici-dd-sub { position: relative; }
.ici-dd-subhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ici-dd-arrow { color: #b0b0b0; font-size: 0.7rem; line-height: 1; }
.ici-dd-subpanel { display: none; position: absolute; top: -5px; left: 100%; background: #fff;
    border: 1px solid #E0E0E0; border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,.14);
    min-width: 180px; padding: 4px 0; z-index: 2001; }
.ici-dd-sub:hover > .ici-dd-subpanel,
.ici-dd-sub:focus-within > .ici-dd-subpanel { display: block; }
.ici-dd-sub:hover > .ici-dd-subhead { background: rgba(0,0,0,.06); }
