:root { color-scheme: light; font-family: Inter, system-ui, sans-serif; }
.fc-board-modal .rz-dialog-content { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
/* The page follows Radzen's palette in both themes (admin-theme.css); a fixed light colour here made dark mode a light page. */
body { margin: 0; background: var(--rz-body-background-color); color: var(--rz-text-color); }

.admin-topbar { display: flex; grid-column: 2; grid-row: 1; flex: 0 0 var(--topbar-height); align-items: center; gap: .5rem;
    min-width: 0; height: var(--topbar-height); box-sizing: border-box; padding: 0 1rem; border-bottom: 1px solid var(--adm-line);
    background: var(--rz-header-background-color); color: var(--rz-header-color); z-index: 10; }
.admin-topbar-spacer { flex: 1 1 auto; }
.admin-shell-body { display: contents; }
.admin-layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--adm-rail-open-width);
    grid-template-rows: var(--topbar-height) minmax(0, 1fr); width: 100%; height: 100dvh; overflow: hidden; }
.admin-layout:has(.sidebar-collapsed) { grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr) var(--adm-rail-open-width); }
.admin-layout:has(.adm-rail-mini-state) { grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--adm-rail-mini-width); }
.admin-layout:has(.sidebar-collapsed):has(.adm-rail-mini-state) { grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr) var(--adm-rail-mini-width); }
.admin-shell-body > .sidebar { grid-column: 1; grid-row: 1 / span 2; flex: none; width: var(--sidebar-width); height: 100%; min-height: 0; overflow: hidden; box-sizing: border-box; }
.admin-shell-body > .sidebar.sidebar-collapsed { width: var(--sidebar-collapsed-width); }
.admin-main-content { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; margin: 0 !important; overflow: auto; padding: 1rem 1.25rem; background: var(--content-bg); }
.adm-rail.rz-sidebar { position: relative !important; inset: auto !important; left: auto !important; right: auto !important; top: auto !important;
    grid-column: 3; grid-row: 1 / span 2; width: 100% !important; height: 100% !important; box-sizing: border-box; z-index: 45;
    transform: none !important; border-left: 1px solid var(--adm-line); background: var(--adm-surface-sunken); color: var(--adm-ink); }
.adm-rail.rz-sidebar.adm-rail-mini-state { width: 100% !important; opacity: 1; }
.adm-menu-shell { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; width: 100%; }
.adm-menu-head { display: flex; flex: 0 0 var(--topbar-height); align-items: center; box-sizing: border-box; height: var(--topbar-height); padding: 0 .75rem; border-bottom: 1px solid var(--adm-line); }
.adm-menu-foot { display: flex; flex: 0 0 auto; justify-content: flex-end; padding: .5rem .75rem; border-top: 1px solid var(--adm-line); }
.adm-nav-menu { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: auto; padding: 0 0 .25rem; color: var(--sidebar-text); }
.sidebar-collapsed .adm-menu-head { justify-content: center; padding: 0; }
.sidebar-collapsed .fc-admin-brandbar span, .sidebar-collapsed .fc-admin-brandbar .fc-brand > span { display: none; }
.sidebar-collapsed .adm-menu-foot { justify-content: center; padding-inline: 0; }
.fc-admin-collapsed-mark { width: 1.8rem; height: 1.8rem; }
.admin-menu-button { display: inline-flex !important; flex: 0 0 auto; width: 38px; min-width: 38px; height: 32px; min-height: 32px; justify-content: center; padding: 0; }
.adm-rail-head, .adm-rail-mini-head { flex: 0 0 var(--topbar-height); height: var(--topbar-height); box-sizing: border-box; border-bottom: 1px solid var(--adm-line); }
.adm-rail-head { padding-block: 0 !important; }
.adm-rail-mini-head { display: flex; align-items: center; justify-content: center; }
.adm-rail-mini { flex: 1 1 auto; min-height: 0; padding-top: 0 !important; }

/* The mini state keeps the outlined icon strip visible while Radzen remains expanded and interactive. */
.adm-rail.rz-sidebar.adm-rail-mini-state {
    width: var(--adm-rail-mini-width) !important;
    opacity: 1;
}

.admin-shell-body:has(> .adm-rail:not(.adm-rail-mini-state)) .admin-main-content {
    margin-right: var(--adm-rail-open-width);
}

.admin-shell-body:has(> .adm-rail.adm-rail-mini-state) .admin-main-content {
    margin-right: var(--adm-rail-mini-width);
}

/* Radzen's stylesheet (added at runtime) paints h1-h6 near-black, so RadzenText headings stayed dark in dark mode. A heading
   with no colour class of its own takes the theme's text colour; RadzenText Color="…" (Radzen color classes) still wins. */
.rz-text:is(h1, h2, h3, h4, h5, h6):not([class*="-text"]) { color: inherit; }
/* Primary links use the readable accent: the same teal in light, a light teal in dark (the dark teal read at about 3:1). */
/* !important: Radzen's .rz-primary sets the colour with !important, so without it this rule never applied. */
a.rz-primary { color: var(--fc-accent-strong) !important; }
.fc-admin-brandbar, .fc-admin-drawer-brand { display:flex; align-items:center; gap:.45rem; color:var(--fc-ink); font-size:1rem; font-weight:700; }
.fc-admin-brandbar { margin-left:.75rem; }
.adm-menu-head .fc-admin-brandbar { margin-left: 0; }
.fc-admin-brand-mark-toggle { display:grid; place-items:center; flex:0 0 auto; width:2rem; height:2rem; padding:0; color:var(--sidebar-text); background:transparent; border:0; border-radius:.45rem; cursor:pointer; }
.fc-admin-brand-mark-toggle:hover { background:var(--sidebar-hover); }
.fc-admin-brand-mark-toggle:focus-visible { outline:2px solid var(--rz-primary); outline-offset:1px; }
.fc-admin-brand-mark-toggle .fc-mark { width:1.8rem; height:1.8rem; }
.fc-admin-brand-name { color:var(--sidebar-text); font-size:1rem; font-weight:700; }
.fc-admin-brand-suffix { color:var(--sidebar-section); font-size:.82rem; font-weight:600; }
.fc-admin-brandbar .fc-brand, .fc-admin-drawer-brand .fc-brand { gap:.5rem; }
.fc-admin-brandbar .fc-mark, .fc-admin-drawer-brand .fc-mark { width:1.8rem; height:1.8rem; }
.fc-admin-collapsed-mark { width:2rem; height:2rem; margin:.3rem auto; }
.fin-login-mark { width:3rem; height:3rem; margin-bottom:1rem; }
main { min-height:calc(100vh - 64px); }
pre { max-height:24rem; overflow:auto; white-space:pre-wrap; }

/* A drawer whose footer stays in view: the body scrolls, the actions do not. */
.fc-sticky-drawer { display:flex; flex-direction:column; height:100%; min-height:0; }
.fc-sticky-drawer-body { flex:1 1 auto; min-height:0; overflow:auto; padding:16px; }
.fc-sticky-drawer-footer { flex:0 0 auto; display:flex; justify-content:flex-end; gap:8px; padding:12px 16px; border-top:1px solid var(--adm-line); background:var(--adm-surface); }

/* Two frozen columns in one RadzenDataGrid. Radzen 8.3 pins every StickyLeft column at left:0, so a second frozen
   column slides over the first. The first frozen column takes a fixed width and the second starts where it ends:
   put fc-freeze-a / fc-freeze-b on each column's CellClass and HeaderClass, and set --fc-freeze-a on the grid
   (or its wrapper) when the default width does not fit. */
.rz-data-grid .rz-data-grid-data td.sticky-left.fc-freeze-a { width:var(--fc-freeze-a, 7rem); min-width:var(--fc-freeze-a, 7rem); max-width:var(--fc-freeze-a, 7rem); overflow:hidden; text-overflow:ellipsis; }
.rz-data-grid .rz-data-grid-data td.sticky-left.fc-freeze-b { left:var(--fc-freeze-a, 7rem); }
.adm-grid-scroll { min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
@media (max-width:767.98px) {
    .adm-grid-scroll > .rz-data-grid { min-width:90rem; }
    .adm-table-scroll { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
    .adm-table { width:max-content; min-width:100%; white-space:nowrap; }
}
.fc-admin-resizable-drawer__body { position:relative; display:flex; flex-direction:column; height:100%; min-height:0; }
.fc-admin-resizable-drawer__handle { position:absolute; z-index:3; top:0; bottom:0; left:0; width:7px; cursor:ew-resize; touch-action:none; }
.fc-admin-resizable-drawer__handle:hover { background:color-mix(in srgb,var(--rz-primary) 18%,transparent); }
.fc-admin-resizable-drawer.rz-sidebar { left:auto; right:0; display:flex; flex-direction:column; min-height:0; height:100%; background:var(--adm-surface); color:var(--adm-ink); }
/* T709: on a phone a drawer takes the screen (less a sliver to click away on); a stored or default share of the width (64vw of
   390 px is 250 px) left its fields one word wide. */
@media (max-width:600px) { .fc-admin-resizable-drawer.rz-sidebar { width:calc(100vw - 20px) !important; } }
.fc-admin-drawer-head { display:flex; align-items:center; gap:12px; flex:0 0 auto; padding:14px 18px; border-bottom:1px solid var(--adm-line); }
.fc-admin-drawer-content { flex:1 1 auto; min-height:0; overflow:auto; padding:16px 18px; }
.fc-admin-drawer-foot { display:flex; align-items:center; gap:8px; flex:0 0 auto; padding:12px 18px; border-top:1px solid var(--adm-line); background:var(--adm-surface); }
.fc-order-log { overflow-wrap:anywhere; }
.fc-wrap-text { min-width:0; white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; }
.fc-refresh-box { display:flex; align-items:center; gap:.65rem; white-space:nowrap; }
.fc-refresh-countdown { color:var(--fc-muted); font-size:.78rem; font-variant-numeric:tabular-nums; }
/* The admin stacked cell (T650 A, FinQuest stackCell): up to three rows, each the field's code in muted ink on one shared
   label track, then the value in its tone's ink. A FincopyUiTone class (fc-pill--*) sets --pill; the value reads it, so a
   tone paints without a filled badge. Only gain and loss (Ok / Bad) are bold. The cell is a grid: a plain row spans it,
   and a BUY | SELL pair is a subgrid (label | BUY | value | SELL | value), so every pair in a cell shares its tracks. */
.fc-admin-stack { display:grid; grid-template-columns:minmax(var(--fc-stack-label,3.4rem),max-content) repeat(4,auto); justify-content:start; row-gap:3px; column-gap:.4rem; min-width:0; max-width:100%; line-height:1.3; }
.fc-admin-stack > * { grid-column:1 / -1; min-width:0; }
.fc-admin-stack > .fc-admin-stack-tip { display:grid; grid-template-columns:subgrid; }
.fc-admin-stack-tip > * { grid-column:1 / -1; min-width:0; }
.fc-admin-stack-row { display:flex; align-items:baseline; gap:.4rem; min-width:0; }
.fc-admin-stack-label { flex:0 0 auto; min-width:var(--fc-stack-label,3.4rem); color:var(--rz-text-secondary-color); font-size:.68rem; font-weight:700; letter-spacing:.025em; white-space:nowrap; }
.fc-admin-stack-value { min-width:0; color:var(--pill, currentColor); font-weight:400; white-space:normal; overflow-wrap:anywhere; }
.fc-admin-stack-pair { display:grid; grid-template-columns:minmax(var(--fc-stack-label,3.4rem),max-content) repeat(4,auto); justify-content:start; align-items:baseline; column-gap:.4rem; min-width:0; }
.fc-admin-stack .fc-admin-stack-pair { grid-template-columns:subgrid; }
.fc-admin-stack-pair__side { color:var(--pill, currentColor); font-size:.68rem; font-weight:800; white-space:nowrap; }
.fc-admin-stack-pair__value { min-width:0; color:var(--pill, currentColor); font-weight:400; white-space:nowrap; }
.fc-admin-stack-value:is(.fc-pill--ok, .fc-pill--bad), .fc-admin-stack-pair__value:is(.fc-pill--ok, .fc-pill--bad) { font-weight:700; }
.fc-admin-stack-clip { max-width:18rem; overflow:hidden; text-overflow:ellipsis; }
/* In the frozen first column the cell is a fixed width: rows fill it and a long value ends in an ellipsis, never a hard cut. */
.fc-freeze-a .fc-admin-stack { display:flex; flex-direction:column; gap:3px; }
.fc-freeze-a .fc-admin-stack-value { overflow:hidden; text-overflow:ellipsis; }
/* A long id opened in a grid cell (ADM-B12, LLM usage): grid cells never wrap (admin-theme.css), so a 32-character job id ran
   on under the sticky Actions column. Opened, it is a narrow monospace block that wraps anywhere and reads in full. */
.fc-row-detail--id > div { width:12ch; max-width:none; white-space:normal; overflow-wrap:anywhere; word-break:break-all; font-family:var(--fc-mono); font-size:.8rem; line-height:1.35; }
/* Row actions: small square icon buttons, each with its tooltip; the more menu last. */
.fc-admin-grid-actions { display:flex; align-items:center; gap:2px; white-space:nowrap; }
.fc-admin-grid-actions .rz-button { width:30px; height:30px; padding:5px; border-radius:6px; }

/* Keep the Telegram tab bar above its tab-panel content. */
.fc-telegram-tabs .rz-tabview-nav { position: relative; z-index: 1; }

/* TP478 Q682-Q685: the docked alerts rail (Layout/AdmAlertRail.razor). Theme palette only, so both modes hold.
   Severity is the whole row (Q684-A): critical = error tint + thick bar, warning = warning tint + bar, info = a plain row. */
.adm-rail .rz-sidebar { display:flex; flex-direction:column; min-height:0; }
.adm-rail-mini { display:flex; flex-direction:column; align-items:center; gap:8px; padding:12px 0; }
.adm-rail .rz-button.rz-variant-outlined { background-color:transparent; border-color:currentColor; }
.adm-rail .rz-button.rz-variant-outlined:not(.rz-state-disabled):hover { background-color:var(--adm-hover); }
.adm-rail-mini .rz-button { box-sizing:border-box; width:30px; min-width:30px; max-width:30px; height:30px; min-height:30px; padding:0; border-radius:.55rem; }
.adm-rail-head { display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.55rem .75rem; border-bottom:1px solid var(--adm-line); }
.adm-rail-title { font-size:.78rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--rz-text-secondary-color); }
.adm-rail-tools { display:flex; align-items:center; gap:.1rem; }
.adm-rail-error { margin:.5rem .75rem 0; color:var(--rz-danger); font-size:.8rem; }
.adm-rail-settings { display:grid; gap:.35rem; margin:.6rem .75rem 0; padding:.6rem .7rem; border:1px solid var(--adm-line); border-radius:.6rem; }
.adm-rail-set-row { display:flex; align-items:center; justify-content:space-between; gap:.5rem; font-size:.84rem; }
.adm-rail-set-name { display:inline-flex; align-items:center; gap:.35rem; font-weight:600; }
.adm-rail-set-tools { display:inline-flex; align-items:center; }
.adm-rail-body { display:flex; flex-direction:column; gap:.6rem; flex:1 1 auto; min-height:0; overflow-y:auto; padding:.6rem .75rem .9rem; }
.adm-rail-body.stack .adm-rail-card { flex:1 1 0; min-height:0; }
.adm-rail-body.stack .adm-rail-rows { overflow-y:auto; }
.adm-rail-card { display:flex; flex:0 0 auto; flex-direction:column; min-height:0; overflow:hidden; border:1px solid var(--adm-line); border-radius:.65rem; background:var(--rz-card-background-color); color:var(--rz-text-color); }
.adm-rail-card-head { display:flex; align-items:center; gap:.45rem; padding:.5rem .65rem; color:var(--rz-text-color); text-decoration:none; font-size:.86rem; }
.adm-rail-card-head b { flex:1 1 auto; }
.adm-rail-rows { display:grid; gap:.3rem; min-height:0; padding:0 .45rem .45rem; }
.adm-rail-body:not(.stack) .adm-rail-rows { max-height:min(28vh, 18rem); overflow-y:auto; overscroll-behavior:contain; }
.adm-rail-empty { margin:.2rem .3rem .4rem; color:var(--rz-text-secondary-color); font-size:.8rem; }
.adm-alert-row { display:grid; grid-template-columns:auto 1fr auto; gap:.1rem .45rem; align-items:start; padding:.45rem .55rem; border-left:4px solid transparent; border-radius:.45rem; color:var(--rz-text-color); text-decoration:none; }
.adm-alert-row:hover { background:var(--adm-hover); }
.adm-alert-row.critical { background:color-mix(in srgb, var(--rz-danger) 13%, transparent); border-left-color:var(--rz-danger); }
.adm-alert-row.critical .adm-alert-icon { color:var(--rz-danger); }
.adm-alert-row.warning { background:color-mix(in srgb, var(--rz-warning) 15%, transparent); border-left-color:var(--rz-warning); }
.adm-alert-row.warning .adm-alert-icon { color:var(--rz-warning); }
.adm-alert-row.info .adm-alert-icon, .adm-alert-row.resolved .adm-alert-icon { color:var(--rz-text-secondary-color); }
.adm-alert-row.critical .adm-alert-title, .adm-alert-row.warning .adm-alert-title { font-weight:700; }
.adm-select-field { display:flex; flex-direction:column; gap:.25rem; min-width:0; color:var(--rz-text-color); font-size:.875rem; }
.adm-select-field > span { font-weight:600; }
.adm-select-field select { width:100%; min-width:0; min-height:2.5rem; padding:.45rem .65rem; border:1px solid var(--adm-line); border-radius:var(--rz-border-radius, .35rem); color:var(--rz-text-color); background:var(--rz-card-background-color); }
.adm-select-helper { color:var(--rz-text-secondary-color); font-size:.75rem; }
.adm-alert-title { min-width:0; font-size:.82rem; font-weight:600; overflow-wrap:anywhere; }
.adm-alert-age { color:var(--rz-text-secondary-color); font-size:.72rem; white-space:nowrap; }
.adm-alert-detail { grid-column:2 / 4; color:var(--rz-text-secondary-color); font-size:.76rem; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.adm-alert-row.critical .adm-alert-detail, .adm-alert-row.warning .adm-alert-detail { color:var(--rz-text-color); }

/* T699 F3: long node versions, IPv6 values and rollout identifiers stay inside their cells. */
.fc-node-runtime .rz-text { min-width:0; overflow-wrap:anywhere; word-break:break-word; }
.fc-ea-rollout-table table { width:100%; table-layout:fixed; }
.fc-ea-rollout-table td { min-width:0; overflow-wrap:anywhere; word-break:break-word; }

/* T699 F3: the member action bar wraps at phone widths instead of extending the page. */
.fc-member-detail-head { flex-wrap:wrap; min-width:0; }
.fc-member-detail-head .rz-text { min-width:0; overflow-wrap:anywhere; }

/* T699 F3: filter labels stay above their values; download actions wrap before the sticky Actions column. */
.fc-ea-release-filters { flex-wrap:wrap; align-items:flex-end; gap:.75rem; }
.fc-ea-release-filters .rz-form-field { flex:1 1 14rem; min-width:min(100%, 14rem); }
.fc-ea-release-files { display:flex; flex-wrap:wrap; gap:.35rem; width:100%; min-width:0; }
.fc-ea-release-files .rz-button { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.adm-flex-spacer{flex:1 1 auto}
.adm-menu{position:relative;display:inline-block}.adm-menu summary{cursor:pointer;list-style:none}.adm-menu-items{position:absolute;right:0;z-index:20;min-width:12rem;padding:.35rem;border:1px solid var(--adm-line);border-radius:.5rem;background:var(--adm-surface-raised);color:var(--adm-ink);box-shadow:var(--fc-shadow-menu)}.adm-menu-item{display:block;width:100%;padding:.45rem .7rem;border:0;background:transparent;text-align:left;color:inherit;text-decoration:none;cursor:pointer}.adm-menu-item:hover{background:var(--adm-hover)}.adm-divider{border:0;border-top:1px solid var(--adm-line)}
.adm-badge{position:relative;display:inline-flex}.adm-badge-count{position:absolute;top:-.35rem;right:-.35rem;z-index:1;min-width:1.1rem;height:1.1rem;border-radius:50%;background:var(--rz-danger);color:var(--rz-on-danger);font-size:.7rem;line-height:1.1rem;text-align:center}.adm-badge-count.warning{background:var(--rz-warning);color:var(--rz-base-900)}.adm-accordion{display:grid;gap:.5rem}.adm-expansion{border:1px solid var(--adm-line);border-radius:.35rem;padding:.6rem}.adm-expansion>summary{cursor:pointer;font-weight:600}.adm-dialog-actions{display:flex;justify-content:flex-end;gap:.5rem;margin-top:1rem}
.adm-inline-link{padding:0;border:0;background:none;color:var(--rz-primary);text-decoration:underline;cursor:pointer;font:inherit}
.adm-login-password-label{display:grid;gap:.4rem;margin-bottom:1rem;color:var(--rz-text-color);font-size:.9rem;font-weight:600}
/* A switch or checkbox with its words beside it. A span, not a <label>: a click on a Radzen control inside a label
   toggled it twice (the control, then the label's activation), so the switch never moved. */
.adm-switch-label,.adm-checkbox-label{display:flex;width:fit-content;max-width:100%;align-items:center;gap:.6rem;color:var(--rz-text-color);line-height:1.35}
.adm-switch-label>.rz-switch,.adm-checkbox-label>.rz-chkbox{flex:0 0 auto}
.fc-admin-mode-list{display:flex;flex-wrap:wrap;gap:.45rem .85rem}.fc-admin-mode-list label{display:inline-flex;align-items:center;gap:.35rem;color:var(--rz-text-color);font-size:.82rem}
/* T708: a side's mode meaning, AIBot's waiting switch, a COPY side's note and a box its mode does not use. */
.fc-admin-note{margin-top:.2rem;color:var(--rz-text-secondary-color);font-size:.78rem;line-height:1.35}
.fc-admin-pending{margin-top:.2rem;color:var(--rz-text-color);font-size:.78rem;font-weight:600;line-height:1.35}
.fc-admin-copy{color:var(--rz-text-color);font-size:.82rem}
.fc-admin-na{color:var(--rz-text-secondary-color)}

/* T junction: the full-height side columns share the header's border-box height and line token. */
.admin-layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--adm-rail-open-width); grid-template-rows: var(--topbar-height) minmax(0, 1fr); height: 100dvh; }
.admin-layout:has(.sidebar-collapsed) { grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr) var(--adm-rail-open-width); }
.admin-layout:has(.adm-rail-mini-state) { grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--adm-rail-mini-width); }
.admin-layout:has(.sidebar-collapsed):has(.adm-rail-mini-state) { grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr) var(--adm-rail-mini-width); }
.admin-shell-body { display: contents; }
.admin-topbar { grid-column: 2; grid-row: 1; box-sizing: border-box; }
.admin-shell-body > .sidebar { grid-column: 1; grid-row: 1 / span 2; width: var(--sidebar-width); height: 100%; box-sizing: border-box; }
.admin-shell-body > .sidebar.sidebar-collapsed { width: var(--sidebar-collapsed-width); }
.admin-main-content { grid-column: 2; grid-row: 2; margin: 0 !important; }
.adm-rail.rz-sidebar { position: relative !important; inset: auto !important; left: auto !important; right: auto !important; top: auto !important;
    grid-column: 3; grid-row: 1 / span 2; width: 100% !important; height: 100% !important; box-sizing: border-box; }
.adm-rail.rz-sidebar.adm-rail-mini-state { width: 100% !important; }
.adm-rail-head, .adm-rail-mini-head { flex: 0 0 var(--topbar-height); height: var(--topbar-height); box-sizing: border-box; border-bottom: 1px solid var(--adm-line); }
.adm-rail-head { padding-block: 0 !important; }
.adm-rail-mini-head { display: flex; align-items: center; justify-content: center; }
.adm-rail-mini { flex: 1 1 auto; min-height: 0; padding-top: 0 !important; }

/* T709 (operator 2026-11-16): narrow widths. The brand mark joins the top bar, and both it and the menu button open the
   off-canvas menu; a scrim behind the open menu closes it (MainLayout, which also closes it on ESC or a chosen item). */
.admin-topbar-brand { display: none; color: var(--rz-header-color); }
.admin-topbar-brand:hover { background: var(--adm-hover); }
.admin-menu-scrim { position: fixed; inset: 0; z-index: 55; background: var(--fc-overlay-scrim); }

/* At 960px and below (fc-theme.js menuOverlayWatch holds the same width) the menu takes no column: closed it is hidden, open
   it lies over the page. The page keeps the alerts strip beside it. The grid rules repeat every desktop selector, the
   two-:has() one included: it outranked the narrow rule before, kept a 44px menu column, and left the page 44px wide at 390px. */
@media (max-width: 960px) {
    .admin-layout, .admin-layout:has(.sidebar-collapsed), .admin-layout:has(.adm-rail-mini-state),
    .admin-layout:has(.sidebar-collapsed):has(.adm-rail-mini-state) { grid-template-columns: minmax(0, 1fr) var(--adm-rail-mini-width); }
    .admin-topbar { grid-column: 1; }
    .admin-topbar-brand { display: grid; }
    .admin-menu-button { display: inline-flex !important; }
    .admin-shell-body > .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(var(--sidebar-width), 85vw); height: 100dvh; box-shadow: var(--fc-shadow-menu); }
    .admin-shell-body > .sidebar:not(.sidebar-phone-open) { display: none; }
    .admin-main-content { grid-column: 1; margin: 0 !important; }
    .adm-rail.rz-sidebar { grid-column: 2; grid-row: 1 / span 2; width: 100% !important; }
    .adm-rail.rz-sidebar:not(.adm-rail-mini-state) { position: fixed !important; inset: 0 0 0 auto !important; width: min(var(--adm-rail-open-width), calc(100vw - var(--adm-rail-mini-width))) !important; }
}

/* Below 768px, where the member app's shell is one column (FC.Com fc-mem.css hides its Alerts shelf there), the admin is one
   column too: the alerts strip is hidden and the page takes the full width. */
@media (max-width: 767.98px) {
    .admin-layout, .admin-layout:has(.sidebar-collapsed), .admin-layout:has(.adm-rail-mini-state),
    .admin-layout:has(.sidebar-collapsed):has(.adm-rail-mini-state) { grid-template-columns: minmax(0, 1fr); }
    .adm-rail.rz-sidebar { display: none !important; }
    .admin-topbar { padding: 0 .75rem; }
    .admin-main-content { padding: .75rem; }
}
