/* MAX2 operations — shared with the authentication screen: navy identity,
   neutral work surfaces and blue actions. Navigation / title / tools / data
   remain distinct. System fonts, stable DOM and no decorative UI runtime. */
* { box-sizing:border-box; }
:root { --sidebar-width:240px; --header-height:68px; }
html { scroll-padding-top:calc(var(--header-height) + var(--dashboard-update-height) + 16px); }
body { margin:0; font-family:system-ui,sans-serif; font-size:14px; line-height:1.6; color:var(--text); background:var(--bg); }
[hidden] { display:none!important; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:38px; padding:7px 14px; border:1px solid transparent; border-radius:7px; font-weight:500; line-height:1.55; cursor:pointer; color:var(--text); background:transparent; transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease; }
button:disabled { cursor:not-allowed; color:var(--disabled-text); background:var(--disabled-bg); border-color:var(--row-line); }
button:focus-visible,a:focus-visible,summary:focus-visible,svg [tabindex]:focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
a { color:var(--blue); text-decoration:none; }
a:hover { text-decoration:underline; }
a.secondary,a.quiet { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:38px; padding:7px 14px; border:1px solid transparent; border-radius:7px; font-weight:500; line-height:1.55; }
input,select,textarea { width:100%; min-height:40px; padding:8px 12px; color:var(--text); background:var(--input-bg); border:1px solid var(--control-border); border-radius:7px; caret-color:var(--caret); transition:border-color .16s ease,box-shadow .16s ease; }
.workspace-body button,.workspace-body input,.workspace-body select,.workspace-body textarea { scroll-margin-top:80px; scroll-margin-bottom:16px; }
input:hover,select:hover,textarea:hover { border-color:var(--blue); }
input:focus,select:focus,textarea:focus { outline:0; border-color:var(--focus); box-shadow:0 0 0 3px var(--focus-ring); }
input[readonly] { background:var(--soft-bg); }
input:disabled,select:disabled,textarea:disabled { color:var(--disabled-text); background:var(--disabled-bg); cursor:not-allowed; border-color:var(--row-line); }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:1; }
input[type=checkbox] { width:16px; height:16px; min-height:0; padding:0; margin:0; flex-shrink:0; accent-color:var(--primary-bg); }
input[type=checkbox]:focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
input[type=file] { padding:6px; font-size:14px; }
textarea { resize:vertical; }
label { display:block; min-width:0; font-size:14px; font-weight:500; color:var(--label); }
label input,label select,label textarea { margin-top:6px; }
h1,h2,h3,p { margin:0; }
h1 { font-size:28px; font-weight:650; line-height:1.4; letter-spacing:-.5px; }
h2 { font-size:18px; font-weight:600; line-height:1.6; }
h3 { font-size:14px; font-weight:600; }
p { margin-top:8px; word-break:keep-all; overflow-wrap:anywhere; }
strong { font-weight:600; }
.ui-icon { width:18px; height:18px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
.primary { color:var(--on-primary); background:var(--primary-bg); border-color:var(--primary-bg); box-shadow:0 1px 2px #10203914; }
.primary:hover:not(:disabled) { color:var(--on-primary); background:var(--primary-hover); border-color:var(--primary-hover); }
.secondary,a.secondary { color:var(--text); background:var(--paper); border-color:var(--control-border); }
.secondary:hover:not(:disabled),a.secondary:hover { color:var(--blue); background:var(--paper); border-color:var(--blue); text-decoration:none; }
.quiet { color:var(--blue); }
.quiet:hover:not(:disabled),a.quiet:hover { color:var(--blue); background:var(--hover-bg); text-decoration:none; }
.danger { color:var(--red); background:var(--paper); border-color:var(--danger-line); }
.danger:hover:not(:disabled) { color:var(--red); background:var(--danger-bg); border-color:var(--red); }
.icon-button { width:36px; padding:7px; flex-shrink:0; }
.muted { color:var(--muted); }
.small { font-size:12px; }
.eyebrow { display:block; font-size:12px; font-weight:500; letter-spacing:.4px; color:var(--muted); }
.error { color:var(--red); font-size:14px; min-height:0; overflow-wrap:anywhere; }
.error:empty { display:none; }
.wordmark { font-family:system-ui,sans-serif; font-size:26px; font-weight:650; line-height:1; letter-spacing:-.8px; color:var(--text); }
.brand-dot { display:none; }
.brand-symbol { display:inline-grid; place-items:center; width:32px; height:32px; border-radius:6px; background:var(--brand-bg); color:var(--brand-ink); flex-shrink:0; }
.brand-symbol svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.boot { min-height:60vh; display:grid; place-items:center; padding:32px; color:var(--muted); }

/* Stable application shell. Only the working content changes on navigation. */
.app { display:grid; grid-template-columns:var(--sidebar-width) minmax(0,1fr); min-height:100vh; }
.sidebar { --text:var(--sidebar-text); --label:var(--sidebar-text); --muted:var(--sidebar-muted); --line:var(--sidebar-line); --row-line:var(--sidebar-line); --blue:var(--sidebar-focus); --focus:var(--sidebar-focus); --hover-bg:var(--sidebar-hover); --nav-text:var(--sidebar-text); --nav-active:var(--sidebar-active); --nav-active-text:var(--sidebar-text); position:fixed; inset:0 auto 0 0; width:var(--sidebar-width); display:flex; flex-direction:column; padding:0 16px 20px; color:var(--text); background:var(--sidebar); border-right:1px solid var(--sidebar-line); box-shadow:var(--shadow-shell); z-index:30; overflow:hidden; }
.brand { display:flex; flex-shrink:0; align-items:center; gap:10px; min-height:112px; padding:26px 12px; margin:0 0 28px; border-bottom:1px solid var(--line); color:var(--text); }
.brand:hover { text-decoration:none; }
.brand-copy { display:flex; flex-direction:column; gap:9px; }
.brand-copy .wordmark { font-size:36px; font-weight:750; letter-spacing:-1.6px; }
.brand-copy>span:last-child { color:var(--muted); font-size:12px; font-weight:400; letter-spacing:.4px; }
.sidebar nav { display:flex; flex:1; min-height:0; flex-direction:column; gap:24px; overflow-y:auto; scrollbar-width:thin; scrollbar-color:var(--sidebar-line) transparent; }
.nav-group { display:flex; flex-direction:column; gap:4px; }
.nav-caption { padding:0 12px 7px; font-size:12px; color:var(--muted); font-weight:500; letter-spacing:.3px; }
.sidebar nav button { position:relative; justify-content:flex-start; width:100%; min-height:42px; padding:9px 12px; gap:11px; text-align:left; font-size:14px; font-weight:400; color:var(--nav-text); border:0; border-radius:7px; }
.sidebar nav button:hover { background:var(--hover-bg); color:var(--text); }
.sidebar nav button.selected,.sidebar nav button.selected:hover { background:var(--nav-active); color:var(--nav-active-text); font-weight:600; }
.sidebar nav button.selected::after { content:''; position:absolute; left:0; top:12px; bottom:12px; width:3px; border-radius:2px; background:var(--sidebar-focus); }
.sidebar-bottom { flex-shrink:0; margin-top:auto; padding-top:24px; }
.server-context { display:flex; gap:8px; align-items:flex-start; padding:14px 10px; border-top:1px solid var(--line); }
.server-context>div { min-width:0; display:flex; flex-direction:column; gap:4px; }
.context-dot { margin-top:7px; width:6px; height:6px; border-radius:50%; background:var(--blue); flex-shrink:0; }
.endpoint,#server-version { font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
.account-row { display:flex; gap:10px; align-items:center; padding:12px 6px 0; border-top:1px solid var(--row-line); }
.account-avatar { display:grid; place-items:center; flex-shrink:0; width:32px; height:32px; border-radius:7px; background:var(--sidebar-active); color:var(--sidebar-text); border:1px solid var(--sidebar-line); font-size:14px; font-weight:600; }
.account-copy { display:flex; flex-direction:column; flex:1; min-width:0; }
.account-copy strong { font-size:14px; overflow-wrap:anywhere; }
.account-copy>span { font-size:12px; color:var(--muted); }
#own-password { justify-content:flex-start; min-height:36px; padding:6px 10px; font-size:14px; }
.workspace { grid-column:2; min-width:0; }
.workspace-header { position:sticky; top:var(--dashboard-update-height); z-index:20; display:flex; justify-content:space-between; gap:20px; align-items:center; min-height:var(--header-height); padding:14px 32px; background:var(--paper); border-bottom:1px solid var(--line); box-shadow:0 2px 6px #10203906; }
.breadcrumbs { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:14px; min-width:0; flex-wrap:wrap; }
.breadcrumbs>span:first-child { color:var(--text); font-weight:500; }
.breadcrumbs .breadcrumb-current { color:var(--text); }
.top-actions { display:flex; gap:16px; justify-content:flex-end; align-items:center; flex-shrink:0; }
#freshness { font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap; }
.theme-control { display:inline-flex; align-items:center; gap:8px; color:var(--label); font-size:14px; font-weight:400; white-space:nowrap; }
.theme-control select { width:88px; min-height:32px; padding:4px 8px; margin:0; font-size:14px; }
#refresh { min-height:32px; padding:4px 10px; font-size:14px; }
#refresh .ui-icon { width:16px; height:16px; }
.chart-scroll-hint { display:none; }
.workspace-body { max-width:1920px; margin:auto; padding:32px; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:2px 0 28px; }
.topbar .eyebrow { display:block; margin-bottom:8px; color:var(--blue); font-size:12px; font-weight:600; letter-spacing:1.5px; }
.page-description { margin-top:8px; color:var(--muted); font-size:14px; line-height:1.8; }
.auth-setup { width:min(760px,calc(100% - 32px)); margin:32px auto; padding:24px; border:1px solid var(--line); border-radius:8px; background:var(--paper); }
.auth-setup h1 { margin:8px 0 12px; }
.auth-setup form { display:grid; gap:20px; max-width:700px; padding:24px 0; }
.section #smtp-settings-form { display:grid; gap:20px; max-width:800px; padding:24px; }
#smtp-settings-form .split-fields { grid-template-columns:2fr 1fr; }
.auth-setup form>p,.section #smtp-settings-form>p { margin:0; }

/* Shared filter toolbar, data table and Ant-style descriptions. */
.filters { display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px; padding:20px 24px; margin-bottom:28px; border:1px solid var(--line); border-radius:9px; background:var(--paper); box-shadow:var(--shadow-surface); }
.filter-label { display:flex; gap:8px; align-items:center; align-self:center; color:var(--text); font-size:14px; font-weight:500; margin-right:4px; }
.filter-label .ui-icon { width:16px; height:16px; color:var(--muted); }
.filters label { min-width:128px; font-size:14px; }
.filters .version-filter { min-width:192px; }
.filters select,.filters input:not([type=checkbox]) { min-height:40px; font-size:14px; }
.filters .checkbox { display:flex; gap:8px; align-items:center; min-width:0; min-height:36px; margin-left:auto; font-weight:400; white-space:nowrap; }
.checkbox { display:flex; align-items:center; gap:8px; font-weight:400; }
.checkbox input { margin:0; }
.filters>.quiet { min-height:36px; padding:6px 8px; }
.notice { padding:12px 16px; margin-bottom:20px; border:1px solid var(--nav-active-line); border-radius:6px; color:var(--blue); background:var(--light-blue); font-size:14px; overflow-wrap:anywhere; }
.notice.warning { color:var(--amber); background:var(--warning-bg); border-color:var(--warning-line); }
.notice.error { color:var(--red); background:var(--danger-bg); border-color:var(--danger-line); }
.section { min-width:0; margin-bottom:28px; overflow:hidden; border:1px solid var(--line); border-radius:10px; background:var(--paper); box-shadow:var(--shadow-surface); }
.section-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; min-height:84px; padding:20px 24px; margin-bottom:22px; background:var(--section-head); border-bottom:1px solid var(--row-line); }
.section-heading>div:first-child { min-width:0; }
.section-title { display:flex; align-items:center; gap:10px; }
.section-title>.ui-icon { display:block; width:19px; height:19px; color:var(--blue); }
.section-heading p { font-size:12px; color:var(--muted); margin-top:6px; line-height:1.75; }
.section-heading .actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; align-items:center; }
.section-heading .actions>button,.section-heading .actions>a { min-height:32px; padding:4px 12px; font-size:14px; }
.section-body { min-width:0; }
.section-body>.table-scroll { margin:0 24px 24px; border:1px solid var(--row-line); border-radius:6px; }
.section-body>.inline-filters { margin:0 24px 22px; border:1px solid var(--line); border-radius:7px; background:var(--soft-bg); box-shadow:var(--shadow-inset); }
.section-body>.pagination { margin:0 24px 20px; padding:12px 0 0; }
.section-footnote { margin:0 24px; padding:14px 0 20px; border-top:1px solid var(--row-line); color:var(--muted); font-size:12px; line-height:1.7; }
.table-scroll { position:relative; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:var(--control-border) var(--soft-bg); }
table { width:100%; min-width:800px; border-collapse:separate; border-spacing:0; text-align:left; font-size:14px; }
th { position:relative; padding:13px 16px; color:var(--label); background:var(--table-head); border-bottom:1px solid var(--line); font-size:13px; font-weight:600; white-space:nowrap; }
th:not(:last-child)::after { content:''; position:absolute; right:0; top:25%; bottom:25%; width:1px; background:var(--row-line); }
td { padding:14px 16px; border-bottom:1px solid var(--row-line); vertical-align:middle; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover>td { background:var(--hover-bg); }
table:has(.row-actions) tr>:last-child { position:sticky; right:0; background:var(--paper); border-left:1px solid var(--row-line); z-index:1; }
table:has(.row-actions) tr>th:last-child { background:var(--table-head); }
table:has(.row-actions) tbody tr:hover>td:last-child { background:var(--hover-bg); }
.numeric { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.nowrap { white-space:nowrap; }
.mono { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:13px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
td .mono,td.mono,table .quiet.mono { white-space:nowrap; }
table .quiet.mono { font-size:13px; font-weight:500; padding-inline:0; }
.badge { display:inline-flex; gap:5px; align-items:center; padding:1px 7px; border:1px solid var(--badge-line); border-radius:4px; color:var(--muted); background:var(--badge-bg); font-size:12px; font-weight:400; line-height:1.8; white-space:nowrap; }
.badge.good { color:var(--green); background:var(--good-bg); border-color:var(--good-line); }
.badge.bad { color:var(--red); background:var(--danger-bg); border-color:var(--danger-line); }
.badge.warn { color:var(--amber); background:var(--warning-bg); border-color:var(--warning-line); }
.badge.blue { color:var(--blue); background:var(--light-blue); border-color:var(--nav-active-line); }
.badge+.badge { margin-left:4px; }
.row-title { font-size:14px; font-weight:500; }
.row-title.mono { font-size:13px; }
.row-sub { margin-top:4px; color:var(--muted); font-size:12px; font-weight:400; line-height:1.65; }
.row-actions { display:flex; gap:4px; flex-wrap:wrap; align-items:center; min-width:156px; max-width:224px; }
.row-actions>button,.row-actions>a { min-height:32px; padding:4px 10px; font-size:14px; }
td>button+button { margin-left:8px; }
.empty { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:200px; padding:32px 24px; color:var(--muted); text-align:center; }
.empty-icon { display:grid; place-items:center; width:40px; height:40px; margin-bottom:12px; color:var(--muted); }
.empty-icon .ui-icon { width:32px; height:32px; }
.empty h3 { font-weight:500; color:var(--text); }
.empty p { max-width:480px; font-size:14px; }
.inline-filters { display:flex; flex-wrap:wrap; gap:12px; align-items:center; padding:20px; border-bottom:1px solid var(--line); background:var(--paper); }
.inline-filters input { min-width:200px; max-width:420px; flex:1; }
.inline-filters select { width:auto; min-width:160px; max-width:240px; }
.inline-filters input,.inline-filters select,.inline-filters>button { min-height:36px; font-size:14px; }
.asset-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.asset-filters input,.asset-filters select { width:100%; min-width:0; max-width:none; }
.asset-filters>[data-action=asset-search] { justify-self:start; }
.pagination { display:flex; gap:16px; align-items:center; justify-content:space-between; padding:16px 20px; border-top:1px solid var(--line); color:var(--muted); background:var(--paper); font-size:12px; }
.pagination>div { display:flex; gap:8px; }
.pagination button { min-height:32px; padding:4px 10px; font-size:14px; }
.list-summary { display:flex; gap:24px; flex-wrap:wrap; align-items:center; padding:0 24px 20px; color:var(--muted); font-size:14px; }
.list-summary strong { color:var(--text); font-size:16px; margin-right:6px; font-variant-numeric:tabular-nums; }
.list-summary .summary-primary { color:var(--blue); }
.firmware-policy { display:flex; gap:10px; align-items:flex-start; margin:0 24px 20px; color:var(--muted); font-size:12px; line-height:1.7; }
.firmware-policy .ui-icon { width:16px; height:16px; color:var(--blue); margin-top:2px; }
.artifact-title { display:flex; align-items:center; gap:12px; }
.artifact-title>.ui-icon { width:22px; height:22px; color:var(--muted); }

/* One analysis area, secondary release context, no floating stat cards. */
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:26px 0; margin-bottom:28px; background:var(--paper); border:1px solid var(--line); border-radius:10px; box-shadow:var(--shadow-surface); }
.metric { min-width:0; padding:0 24px; border-left:1px solid var(--row-line); }
.metric:first-child { border-left:0; }
.metric-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.metric-label { color:var(--muted); font-size:14px; font-weight:400; }
.metric-icon { display:none; }
.metric-value { margin-top:8px; font-size:30px; font-weight:600; letter-spacing:-.6px; line-height:1.35; font-variant-numeric:tabular-nums; white-space:nowrap; }
.metric-value .unit { margin-left:6px; font-size:14px; font-weight:400; color:var(--muted); letter-spacing:0; }
.metric-note { margin-top:8px; color:var(--muted); font-size:12px; line-height:1.6; }
.overview-workspace { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr); gap:24px; align-items:stretch; }
.overview-workspace>.section { height:calc(100% - 28px); }
.chart { position:relative; padding:24px 20px 12px; overflow-x:auto; overscroll-behavior-x:contain; }
.chart svg { display:block; width:100%; min-width:620px; height:auto; overflow:visible; }
.chart:focus-visible { outline:2px solid var(--focus); outline-offset:-3px; }
.chart text { font-family:system-ui,sans-serif; font-size:14px; fill:var(--muted); }
.chart .grid-line { stroke:var(--grid); stroke-width:1; stroke-dasharray:3 4; }
.chart .axis-line { stroke:var(--control-border); stroke-width:1; }
.chart .download-bar { fill:var(--download); }
.chart .upload-bar { fill:var(--upload); }
.chart .install-bar { fill:var(--install); }
.chart .speed-line { fill:none; stroke:var(--speed); stroke-width:2; pointer-events:none; }
.chart .speed-dot { fill:var(--speed); pointer-events:none; }
.chart .unknown-bar { fill:var(--unknown); }
.chart .chart-tooltip { position:absolute; left:20px; bottom:24px; z-index:2; max-width:320px; padding:10px 12px; border:1px solid var(--tooltip-line); border-radius:6px; background:var(--tooltip-bg); color:var(--tooltip-text); box-shadow:var(--shadow-popup); pointer-events:none; font-size:12px; }
.legend { display:flex; flex-wrap:wrap; gap:20px; align-items:center; padding:0 20px 20px; color:var(--muted); font-size:12px; }
.legend span { display:flex; gap:7px; align-items:center; }
.swatch { display:inline-block; width:9px; height:9px; border-radius:2px; background:var(--download); }
.swatch.upload { background:var(--upload); }
.swatch.install { background:var(--install); }
.swatch.speed { background:var(--speed); }
.release-current { padding:20px; }
.release-current .release-version { margin-top:12px; font-size:21px; font-weight:600; letter-spacing:-.3px; overflow-wrap:anywhere; }
.release-current .release-file { margin-top:6px; color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.release-facts { display:grid; grid-template-columns:auto minmax(0,1fr); gap:12px; margin:20px 0 0; padding:16px 0; border-top:1px solid var(--row-line); font-size:12px; }
.release-facts dt { color:var(--muted); }
.release-facts dd { margin:0; text-align:right; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.release-current>.primary { width:100%; margin-top:8px; font-size:14px; }
.release-current>.quiet { width:100%; margin-top:8px; font-size:14px; }
.result-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:16px 20px; border-top:1px solid var(--row-line); background:var(--soft-bg); }
.result-summary>div { display:flex; flex-direction:column; gap:4px; }
.result-summary span { color:var(--muted); font-size:12px; }
.result-summary strong { font-size:18px; font-weight:500; font-variant-numeric:tabular-nums; }
.comparison-section .chart { max-width:840px; margin:auto; }
.reading-guide { margin-bottom:24px; color:var(--muted); border-top:1px solid var(--line); }
.reading-guide>summary { display:flex; gap:8px; align-items:center; padding:16px 0; color:var(--blue); font-size:14px; cursor:pointer; }
.reading-guide>summary .ui-icon { width:16px; height:16px; }
.definition-list { padding:0 20px 20px; font-size:12px; color:var(--muted); line-height:1.8; }
.definition-list p { margin-top:8px; }
.reading-guide .definition-list { padding-left:0; }
.reading-guide .guide-meta { display:block; margin-top:12px; font-size:12px; }

/* Collapsible activity and customer hierarchy retain their open state. */
.activity-groups { padding:0 24px 24px; }
.activity-group { margin-bottom:12px; border:1px solid var(--line); border-radius:7px; overflow:hidden; }
.activity-group:last-child { margin-bottom:0; }
.activity-group.expanded { border-color:var(--nav-active-line); }
.activity-group-toggle { display:flex; gap:16px; align-items:center; justify-content:flex-start; width:100%; min-height:88px; padding:16px 20px; border:0; border-radius:0; text-align:left; color:var(--text); background:var(--paper); font-weight:400; }
.activity-group-toggle:hover { color:var(--text); background:var(--hover-bg); }
.activity-group.expanded>.activity-group-toggle { box-shadow:inset 3px 0 var(--blue); }
.activity-chevron { display:grid; place-items:center; width:20px; height:24px; flex-shrink:0; color:var(--muted); font-size:14px; }
.activity-identity { min-width:0; flex:1; overflow-wrap:anywhere; }
.activity-identity .mono { font-size:14px; font-weight:600; }
.activity-identity>span,.activity-summary>.row-sub { display:block; }
.activity-count { min-width:56px; color:var(--muted); text-align:right; font-size:14px; font-variant-numeric:tabular-nums; }
.activity-group-body { padding:0 20px 20px 56px; }
.activity-group-body .table-scroll { border:1px solid var(--line); border-radius:6px; }
.location-filters { align-items:flex-end; gap:12px; }
.location-filters label { min-width:0; flex:1; font-size:12px; }
.location-filters label.location-search-field { flex:2; }
.location-filters input,.location-filters select { width:100%; min-width:0; max-width:none; margin-top:6px; }
.location-explorer { display:grid; grid-template-columns:280px minmax(0,1fr); gap:24px; margin:0 24px 24px; align-items:start; }
.location-navigation { min-width:0; background:var(--soft-bg); border:1px solid var(--line); border-radius:7px; box-shadow:var(--shadow-inset); }
.location-navigation-heading { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:16px; border-bottom:1px solid var(--line); background:var(--section-head); border-radius:7px 7px 0 0; }
.location-navigation-heading h3 { font-size:14px; }
.location-navigation-heading>span { white-space:nowrap; font-size:12px; color:var(--muted); }
.location-tree { max-height:580px; overflow-y:auto; padding:12px 8px 16px; }
.location-customer { margin-bottom:8px; }
.location-customer:last-child { margin-bottom:0; }
.location-customer>summary { display:flex; align-items:center; list-style:none; cursor:pointer; border-radius:5px; }
.location-customer>summary::-webkit-details-marker { display:none; }
.location-chevron { display:grid; place-items:center; width:20px; flex-shrink:0; color:var(--muted); font-size:20px; line-height:1; transition:transform .14s ease; }
.location-customer[open]>summary>.location-chevron { transform:rotate(90deg); }
.location-node { width:100%; min-width:0; justify-content:flex-start; gap:8px; padding:10px 8px; border:1px solid transparent; text-align:left; border-radius:5px; font-size:14px; font-weight:400; }
.location-node .ui-icon { color:var(--muted); width:18px; height:18px; }
.location-node:hover { background:var(--hover-bg); }
.location-node.selected,.location-node.selected:hover { color:var(--nav-active-text); background:var(--nav-active); border-color:var(--nav-active-line); box-shadow:inset 3px 0 var(--blue); }
.location-node.selected .ui-icon { color:var(--nav-active-text); }
.location-node-copy { display:flex; flex:1; min-width:0; flex-direction:column; gap:3px; overflow-wrap:anywhere; }
.location-node-copy strong { font-size:14px; font-weight:600; }
.location-node-copy small { color:var(--muted); font-size:12px; }
.location-node-count { flex-shrink:0; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.location-projects { margin:4px 0 12px 29px; padding:0 0 0 14px; border-left:1px solid var(--control-border); }
.location-project { position:relative; margin:4px 0; }
.location-project::before { content:''; position:absolute; width:12px; left:-15px; top:50%; border-top:1px solid var(--control-border); }
.location-tree-empty { margin:0; padding:12px; font-size:12px; color:var(--muted); }
.location-context { min-width:0; scroll-margin-top:calc(var(--header-height) + var(--dashboard-update-height) + 24px); }
.location-path { display:flex; gap:10px; align-items:center; margin-bottom:16px; min-height:24px; flex-wrap:wrap; color:var(--muted); font-size:12px; }
.location-path>.quiet { min-height:24px; padding:0; font-size:12px; }
.location-path>span[aria-current] { color:var(--text); }
.location-context-heading { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; flex-wrap:wrap; padding:0 0 24px; }
.location-context-title { display:flex; gap:12px; align-items:flex-start; min-width:0; }
.location-context-title>div { min-width:0; }
.location-context-icon { display:grid; place-items:center; width:44px; height:44px; flex-shrink:0; border:1px solid var(--line); border-radius:8px; background:var(--paper); box-shadow:var(--shadow-surface); }
.location-context-icon .ui-icon { width:24px; height:24px; color:var(--blue); }
.location-level { color:var(--muted); font-size:12px; }
.location-context-title h3 { margin:2px 0 0; font-size:22px; font-weight:600; line-height:1.4; overflow-wrap:anywhere; }
.location-context-title p { margin:6px 0 0; font-size:12px; color:var(--muted); }
.location-content { border:1px solid var(--line); border-radius:7px; overflow:hidden; }
.location-content-heading { display:flex; gap:12px; align-items:center; justify-content:space-between; padding:16px 20px; background:var(--section-head); border-bottom:1px solid var(--line); }
.location-content-heading h4 { margin:0; font-size:16px; font-weight:600; }
.location-content-heading>span { color:var(--muted); font-size:12px; }
.location-content table { min-width:620px; }
.location-site-name { display:flex; gap:8px; align-items:center; min-width:130px; }
.location-site-name .ui-icon { color:var(--muted); width:16px; height:16px; }
.location-site-name strong { font-weight:500; }
.location-project-link { text-align:left; padding-left:0; }
.location-tools { display:flex; gap:4px; flex-wrap:wrap; align-items:center; justify-content:flex-end; }
.location-tools>button,.location-tools>a { min-height:32px; padding:4px 8px; font-size:14px; white-space:nowrap; }
.location-site-table td:last-child { min-width:220px; }

/* Descriptions, dialogs, account forms and print output. */
.system-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.key-values { display:grid; grid-template-columns:minmax(136px,.7fr) minmax(0,1.3fr); margin:20px; padding:0; border:1px solid var(--line); border-radius:6px; overflow:hidden; font-size:14px; }
.key-values dt,.key-values dd { margin:0; padding:12px 16px; border-bottom:1px solid var(--row-line); overflow-wrap:anywhere; }
.key-values dt { color:var(--muted); background:var(--soft-bg); font-size:12px; font-weight:500; }
.key-values dd { color:var(--text); border-left:1px solid var(--row-line); font-variant-numeric:tabular-nums; }
.key-values dt:last-of-type,.key-values dd:last-of-type { border-bottom:0; }
.alerts { padding:20px; }
.alert-item { padding:12px 16px; margin-top:12px; border:1px solid var(--warning-line); border-radius:6px; background:var(--warning-bg); color:var(--amber); font-size:14px; }
.alert-item:first-child { margin-top:0; }
.alert-item.error { border-color:var(--danger-line); background:var(--danger-bg); color:var(--red); }
.footer { padding:0 0 12px; color:var(--muted); font-size:12px; line-height:1.8; }
.toast { position:fixed; top:calc(var(--dashboard-update-height) + 80px); left:50%; transform:translateX(-50%); z-index:80; max-width:90vw; padding:10px 16px; border:1px solid var(--line); border-radius:6px; color:var(--text); background:var(--paper); box-shadow:var(--shadow-popup); font-size:14px; }
dialog { width:min(600px,calc(100vw - 32px)); max-height:calc(100dvh - 48px); padding:28px; overflow:auto; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--text); box-shadow:var(--shadow-popup); }
dialog::backdrop { background:var(--backdrop); }
dialog h2 { margin-top:0; font-size:22px; font-weight:650; letter-spacing:-.4px; }
dialog>form>p.muted,dialog form>p.small { font-size:12px; line-height:1.75; }
dialog label { margin-top:18px; }
dialog .eyebrow { display:none; }
.dialog-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:24px; padding-top:16px; border-top:1px solid var(--line); }
.split-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.detail-dialog { width:min(840px,calc(100vw - 32px)); }
.detail-heading { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; gap:16px; align-items:center; padding-bottom:20px; margin-bottom:22px; border-bottom:1px solid var(--line); background:var(--paper); }
.detail-heading h2 { margin:0; }
.detail-dialog .key-values { padding:0; margin:0; }
.detail-dialog h3 { margin-top:20px; margin-bottom:8px; }
.detail-dialog .key-values dd { font-size:14px; }
.detail-dialog pre,.snapshot-json { padding:16px; border:1px solid var(--line); border-radius:6px; color:var(--text); background:var(--soft-bg); font-family:ui-monospace,monospace; font-size:13px; white-space:pre-wrap; overflow:auto; overflow-wrap:anywhere; }
.snapshot-json { max-height:420px; }
.release-notes { color:var(--text); white-space:pre-wrap; font-size:14px; line-height:1.8; }
progress { width:100%; height:8px; margin-top:20px; accent-color:var(--primary-bg); }
.loading-content { display:grid; place-items:center; min-height:220px; color:var(--muted); font-size:14px; }
.assignment-current { margin-top:20px; padding:16px; border:1px solid var(--nav-active-line); border-radius:6px; background:var(--light-blue); }
.assignment-current p { margin-top:4px; font-size:14px; overflow-wrap:anywhere; }
.assignment-manage { margin-top:8px; padding-left:0; font-size:14px; text-align:left; }
.history-entry { margin-bottom:20px; padding-bottom:20px; border-bottom:1px solid var(--line); }
.qr-label { max-width:350px; margin:auto; padding:20px; text-align:center; background:white; color:#111; }
.qr-label img { max-width:100%; height:auto; image-rendering:pixelated; }
.qr-brand { font-size:30px; font-weight:700; }

/* Compact utility copy; the sign-in composition lives in login.css. */
.footnote { margin-top:20px; padding-top:16px; border-top:1px solid var(--row-line); color:var(--muted); font-size:12px; line-height:1.8; }

@media(prefers-reduced-motion:no-preference) {
  .sidebar nav button .ui-icon { transition:transform .16s ease; }
  .sidebar nav button:hover .ui-icon { transform:translateX(2px); }
  dialog[open] { animation:dialog-in .14s ease-out; }
  .activity-group.expanded .activity-group-body { animation:group-in .14s ease-out; }
  @keyframes dialog-in { from { transform:translateY(6px); } to { transform:translateY(0); } }
  @keyframes group-in { from { transform:translateY(-3px); } to { transform:translateY(0); } }
}
@media(min-width:1700px) { .workspace-body { padding:32px; } }
@media(max-width:1240px) {
  :root { --sidebar-width:220px; }
  .workspace-body { padding:20px; }
  .workspace-header { padding:12px 20px; }
  .breadcrumbs>span:not(:last-child) { display:none; }
  .filters { gap:12px; }
  .filter-label { display:none; }
  .filters .checkbox { margin-left:0; }
  .metric { padding:0 18px; }
  .metric-value { font-size:28px; }
  .overview-workspace { grid-template-columns:1fr; gap:0; }
  .overview-workspace>.section { height:auto; }
  .release-current { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px 24px; }
  .release-current .release-facts { grid-column:2; grid-row:1/4; align-content:center; margin:0; border-top:0; }
  .release-current>.primary,.release-current>.quiet { grid-column:1; margin-top:0; }
  .system-grid { grid-template-columns:1fr; gap:0; }
}
@media(max-width:1000px) {
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0; }
  .metric { padding:20px; }
  .metric:nth-child(3) { border-left:0; }
  .metric:nth-child(n+3) { border-top:1px solid var(--row-line); }
  .asset-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .top-actions { gap:12px; }
  .breadcrumbs { font-size:12px; }
  .section-heading { flex-wrap:wrap; }
  .location-explorer { grid-template-columns:minmax(0,1fr); gap:24px; }
  .location-tree { max-height:240px; }
}
@media(max-width:740px) {
  :root { --sidebar-width:0px; }
  html { scroll-padding-top:calc(var(--dashboard-update-height) + 144px); }
  .app { display:block; }
  .sidebar { position:sticky; inset:auto; top:var(--dashboard-update-height); width:100%; padding:12px 16px 0; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; border-right:0; border-bottom:1px solid var(--line); overflow:visible; }
  .brand { min-height:32px; padding:0; margin:0; gap:10px; border:0; }
  .brand-copy { flex-direction:row; align-items:baseline; gap:10px; }
  .brand-copy .wordmark { font-size:24px; }
  .brand-copy>span:last-child { font-size:12px; }
  .sidebar nav { grid-column:1/3; flex-direction:row; gap:4px; margin:0 -16px; padding:0 16px 10px; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; }
  .nav-group { display:contents; }
  .nav-caption { display:none; }
  .sidebar nav button { width:auto; flex-shrink:0; min-height:40px; padding:8px 12px; gap:8px; font-size:14px; white-space:nowrap; }
  .sidebar nav button>.ui-icon { width:16px; height:16px; }
  .sidebar nav button.selected::after { display:none; }
  .sidebar-bottom { display:flex; align-items:center; gap:4px; grid-column:2; grid-row:1; margin:0; padding:0; }
  #own-password { width:36px; min-height:36px; padding:8px; }
  #own-password>span { display:none; }
  .server-context,.account-avatar,.account-copy { display:none; }
  .account-row { padding:0; border:0; }
  #logout { width:36px; min-height:36px; }
  .workspace-header { position:static; min-height:56px; padding:12px 16px; justify-content:flex-end; }
  .breadcrumbs { display:none; }
  .top-actions { width:100%; gap:12px; justify-content:flex-end; }
  #freshness { margin-right:auto; font-size:12px; }
  .theme-control { gap:6px; font-size:12px; }
  .theme-control select { width:76px; min-height:36px; font-size:14px; }
  #refresh { min-height:36px; padding:6px 10px; }
  .workspace-body { padding:20px 16px; }
  .topbar { margin-bottom:20px; }
  h1 { font-size:22px; }
  .page-description { font-size:14px; }
  .filters { padding:16px; gap:12px; margin-bottom:20px; }
  .filters label { min-width:112px; flex:1; }
  .filters .version-filter { min-width:0; flex-basis:100%; }
  .filters .checkbox { min-width:0; flex-basis:100%; font-size:14px; }
  .filters>.quiet { margin-left:auto; }
  .metrics { margin-bottom:20px; }
  .metric { padding:16px; }
  .metric-label { font-size:14px; }
  .metric-value { font-size:26px; }
  .metric-value .unit { font-size:12px; margin-left:4px; }
  .metric-note { font-size:12px; }
  .section { margin-bottom:20px; }
  .section-heading { padding:20px 16px; gap:16px; min-height:0; }
  .section-heading .actions { justify-content:flex-start; }
  .section-heading .actions>button,.section-heading .actions>a { min-height:36px; }
  .section-body>.table-scroll { margin:0 16px 16px; }
  .section-body>.inline-filters { margin:0 16px 20px; }
  .section-body>.pagination { margin:0 16px 16px; }
  .section-footnote { margin:0 16px; padding:12px 0 16px; }
  .chart { padding:20px 16px 12px; }
  .legend { padding:0 16px 20px; gap:12px; }
  .chart-scroll-hint { display:block; padding:0 16px 16px; color:var(--muted); font-size:12px; }
  .release-current { display:block; padding:16px; }
  .release-current .release-facts { margin-top:16px; border-top:1px solid var(--row-line); }
  .release-current>.primary,.release-current>.quiet { margin-top:12px; }
  .result-summary { padding:16px; }
  .inline-filters { padding:16px; }
  .inline-filters select { min-width:112px; max-width:none; flex:1; }
  .inline-filters input { min-width:100%; max-width:none; width:100%; }
  .asset-filters input { min-width:0; }
  #asset-location,#asset-query { grid-column:1/3; }
  .asset-filters select { min-width:0; }
  .pagination { padding:12px 16px; gap:8px; font-size:12px; flex-wrap:wrap; }
  table:has(.row-actions) tr>:last-child { position:static; }
  .activity-group-toggle { display:grid; grid-template-columns:20px minmax(0,1fr) auto; gap:8px; padding:16px; }
  .activity-summary { grid-column:2/4; grid-row:2; }
  .activity-count { grid-column:3; grid-row:1; min-width:40px; }
  .activity-groups { padding:0 16px 16px; }
  .activity-group-body { padding:0 12px 16px; }
  .location-explorer { margin:0 16px 20px; gap:24px; }
  .location-filters label { flex-basis:calc(50% - 6px); }
  .location-filters label.location-search-field { flex-basis:100%; }
  .location-filters input,.location-filters select { min-width:0; }
  .location-tree { padding:8px; }
  .location-context { scroll-margin-top:calc(var(--dashboard-update-height) + 144px); }
  .location-context-heading { gap:16px; padding-bottom:20px; }
  .location-context-title h3 { font-size:20px; }
  .location-content-heading { padding:16px; }
  .location-tools { width:100%; justify-content:flex-start; }
  .location-tools>button,.location-tools>a { min-height:36px; }
  .key-values { grid-template-columns:minmax(108px,.75fr) minmax(0,1.25fr); margin:16px; }
  .key-values dt,.key-values dd { padding:12px; font-size:14px; }
  .alerts { padding:16px; }
  .list-summary { padding:0 16px 20px; gap:12px; }
  .firmware-policy { margin:0 16px 20px; }
  .definition-list { padding-inline:16px; }
  .detail-dialog .key-values { grid-template-columns:minmax(100px,.75fr) minmax(0,1.25fr); }
  dialog { padding:20px; }
  .split-fields { gap:8px; }
  .split-fields input { padding:6px 8px; }
  .auth-setup { padding:20px; margin:20px auto; }
  .section #smtp-settings-form { padding:20px; }
  #smtp-settings-form .split-fields { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }
@media(max-width:380px) { #refresh>span { display:none; } .metric { padding:16px 12px; } }
@media print {
  body.printing-label .app,body.printing-label #toast,body.printing-label .boot,body.printing-label #dashboard-update { display:none!important; }
  body.printing-label dialog { position:static; display:block; width:100%; max-width:none; max-height:none; margin:0; border:0; border-radius:0; padding:0; box-shadow:none; }
  body.printing-label #detail-dialog .detail-heading,body.printing-label #detail-dialog .dialog-actions { display:none; }
  body.printing-label dialog:not(#detail-dialog) { display:none; }
  body.printing-label #detail-dialog::backdrop { background:transparent; }
  .qr-label { break-inside:avoid; }
}
