/* NEXXVU DESIGN TOKENS — hard-coded visual values belong in this section only. */
:root {
  /* R12.8: map container colours (the same values the map's frames use) */ --container-2563eb: #2563eb; --container-16a34a: #16a34a; --container-d97706: #d97706; --container-dc2626: #dc2626; --container-7c3aed: #7c3aed; --container-0891b2: #0891b2; --container-db2777: #db2777; --container-4b5563: #4b5563;
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --white: #fff; --slate-25: #f8fafc; --slate-50: #f1f5f9; --slate-200: #cbd5e1; --slate-500: #64748b; --slate-700: #334155; --slate-900: #0f172a; --slate-950: #07101f;
  --teal-300: #5eead4; --teal-500: #0d9488; --teal-700: #0f766e; --teal-800: #115e59; --blue-400: #60a5fa; --blue-600: #2563eb; --blue-700: #1d4ed8; --violet-400: #a78bfa; --violet-600: #7c3aed; --violet-700: #6d28d9; --amber-300: #fcd34d; --amber-500: #f59e0b; --amber-700: #b45309; --rose-400: #fb7185; --rose-600: #e11d48; --rose-700: #be123c;
  --green-100: #dcfce7; --green-800: #166534; --amber-100: #fef3c7; --amber-800: #92400e; --red-100: #fee2e2; --red-800: #991b1b; --transparent: transparent;
  --background: var(--slate-25); --surface: var(--white); --panel: var(--white); --surface-subtle: var(--slate-50); --border: var(--slate-200); --border-strong: var(--slate-500);
  --text-primary: var(--slate-900); --text-muted: var(--slate-500); --text-on-primary: var(--white);
  --success: var(--green-800); --success-surface: var(--green-100); --warning: var(--amber-800); --warning-surface: var(--amber-100); --danger: var(--red-800); --danger-surface: var(--red-100); --danger-foreground: var(--red-800); --neutral: var(--slate-700); --neutral-surface: var(--slate-50);
  --accent-teal-background: var(--teal-700); --accent-teal-hover: var(--teal-800); --accent-teal-foreground: var(--white); --accent-teal-focus: var(--teal-700); --accent-teal-focus-dark: var(--teal-300);
  --accent-blue-background: var(--blue-600); --accent-blue-hover: var(--blue-700); --accent-blue-foreground: var(--white); --accent-blue-focus: var(--blue-600); --accent-blue-focus-dark: var(--blue-400);
  --accent-violet-background: var(--violet-600); --accent-violet-hover: var(--violet-700); --accent-violet-foreground: var(--white); --accent-violet-focus: var(--violet-600); --accent-violet-focus-dark: var(--violet-400);
  --accent-amber-background: var(--amber-700); --accent-amber-hover: var(--amber-800); --accent-amber-foreground: var(--white); --accent-amber-focus: var(--amber-700); --accent-amber-focus-dark: var(--amber-300);
  --accent-rose-background: var(--rose-600); --accent-rose-hover: var(--rose-700); --accent-rose-foreground: var(--white); --accent-rose-focus: var(--rose-600); --accent-rose-focus-dark: var(--rose-400);
  --primary: var(--accent-teal-background); --primary-hover: var(--accent-teal-hover); --primary-foreground: var(--accent-teal-foreground); --accent: var(--accent-teal-background); --focus-ring: var(--accent-teal-focus);
  --space-0: 0; --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --font-xs: .75rem; --font-sm: .875rem; --font-md: 1rem; --font-lg: 1.125rem; --font-xl: 1.25rem; --font-2xl: 1.5rem; --font-3xl: 2rem; --line-tight: 1.2; --line-normal: 1.55; --weight-medium: 600; --weight-bold: 700;
  --radius-sm: .375rem; --radius-md: .625rem; --radius-lg: .875rem; --radius-round: 999rem;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .08); --shadow-md: 0 8px 24px rgb(15 23 42 / .12);
  --border-width: 1px; --focus-width: 3px; --content-width: 75rem; --auth-width: 28rem; --dialog-width: 36rem; --inventory-tree-width: 18rem; --side-menu-width: 20rem; --control-height: 2.75rem; --icon-size: 1.25rem; --state-icon-size: 2.5rem; --spinner-size: 1.25rem; --spinner-width: .1875rem; --transition-fast: 140ms ease;
}
:root[data-accent="teal"] { --primary: var(--accent-teal-background); --primary-hover: var(--accent-teal-hover); --primary-foreground: var(--accent-teal-foreground); --accent: var(--accent-teal-background); --focus-ring: var(--accent-teal-focus); }
:root[data-accent="blue"] { --primary: var(--accent-blue-background); --primary-hover: var(--accent-blue-hover); --primary-foreground: var(--accent-blue-foreground); --accent: var(--accent-blue-background); --focus-ring: var(--accent-blue-focus); }
:root[data-accent="violet"] { --primary: var(--accent-violet-background); --primary-hover: var(--accent-violet-hover); --primary-foreground: var(--accent-violet-foreground); --accent: var(--accent-violet-background); --focus-ring: var(--accent-violet-focus); }
:root[data-accent="amber"] { --primary: var(--accent-amber-background); --primary-hover: var(--accent-amber-hover); --primary-foreground: var(--accent-amber-foreground); --accent: var(--accent-amber-background); --focus-ring: var(--accent-amber-focus); }
:root[data-accent="rose"] { --primary: var(--accent-rose-background); --primary-hover: var(--accent-rose-hover); --primary-foreground: var(--accent-rose-foreground); --accent: var(--accent-rose-background); --focus-ring: var(--accent-rose-focus); }
:root[data-theme="dark"] {
  color-scheme: dark; --background: var(--slate-950); --surface: var(--slate-900); --panel: var(--slate-900); --surface-subtle: var(--slate-700); --border: var(--slate-700); --border-strong: var(--slate-500); --text-primary: var(--slate-50); --text-muted: var(--slate-200); --success: var(--green-100); --success-surface: var(--green-800); --warning: var(--amber-100); --warning-surface: var(--amber-800); --danger: var(--red-100); --danger-surface: var(--red-800); --danger-foreground: var(--red-100); --neutral: var(--slate-50); --neutral-surface: var(--slate-700); --focus-ring: var(--accent-teal-focus-dark); --shadow-sm: 0 1px 2px rgb(0 0 0 / .35); --shadow-md: 0 8px 24px rgb(0 0 0 / .45);
}
:root[data-theme="dark"][data-accent="teal"] { --focus-ring: var(--accent-teal-focus-dark); }
:root[data-theme="dark"][data-accent="blue"] { --focus-ring: var(--accent-blue-focus-dark); }
:root[data-theme="dark"][data-accent="violet"] { --focus-ring: var(--accent-violet-focus-dark); }
:root[data-theme="dark"][data-accent="amber"] { --focus-ring: var(--accent-amber-focus-dark); }
:root[data-theme="dark"][data-accent="rose"] { --focus-ring: var(--accent-rose-focus-dark); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { color-scheme: dark; --background: var(--slate-950); --surface: var(--slate-900); --panel: var(--slate-900); --surface-subtle: var(--slate-700); --border: var(--slate-700); --border-strong: var(--slate-500); --text-primary: var(--slate-50); --text-muted: var(--slate-200); --success: var(--green-100); --success-surface: var(--green-800); --warning: var(--amber-100); --warning-surface: var(--amber-800); --danger: var(--red-100); --danger-surface: var(--red-800); --danger-foreground: var(--red-100); --neutral: var(--slate-50); --neutral-surface: var(--slate-700); --focus-ring: var(--accent-teal-focus-dark); --shadow-sm: 0 1px 2px rgb(0 0 0 / .35); --shadow-md: 0 8px 24px rgb(0 0 0 / .45); }
  :root:not([data-theme])[data-accent="teal"] { --focus-ring: var(--accent-teal-focus-dark); }
  :root:not([data-theme])[data-accent="blue"] { --focus-ring: var(--accent-blue-focus-dark); }
  :root:not([data-theme])[data-accent="violet"] { --focus-ring: var(--accent-violet-focus-dark); }
  :root:not([data-theme])[data-accent="amber"] { --focus-ring: var(--accent-amber-focus-dark); }
  :root:not([data-theme])[data-accent="rose"] { --focus-ring: var(--accent-rose-focus-dark); }
}
/* Network map health (Hani #1 2026-10-17): status colours readable on light and dark surfaces */
:root { --map-ok: #1f8a4c; --map-warn: #f5b800; --map-traffic: #e8710a; --map-down: #d92a42; --map-focus: #2563eb; --logo-dark-preview: #0f172a; --picture-tile: #ffffff; --type-mikrotik: #2563eb; --type-proxmox: #e57000; --type-ubuntu: #77216f; --type-windows: #1877d2; --type-vmware: #0091da; --type-other: #94a3b8; --overlay: rgb(0 0 0 / .45); --series-0: #2563eb; --series-1: #e8710a; --series-2: #1f8a4c; --series-3: #77216f; --series-4: #0091da; --series-5: #d92a42; --series-6: #c99700; --series-7: #64748b; }
/* END DESIGN TOKENS */

* { box-sizing: border-box; }
html { background: var(--background); color: var(--text-primary); }
body { margin: var(--space-0); min-height: 100vh; background: var(--background); color: var(--text-primary); font-size: var(--font-md); line-height: var(--line-normal); }
a { color: var(--primary); }
h1, h2, h3, p { margin-top: var(--space-0); }
h1 { margin-bottom: var(--space-2); font-size: var(--font-3xl); line-height: var(--line-tight); }
h2 { margin-bottom: var(--space-4); font-size: var(--font-2xl); line-height: var(--line-tight); }
h3 { margin-bottom: var(--space-2); font-size: var(--font-lg); line-height: var(--line-tight); }
p { margin-bottom: var(--space-3); }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
.roots[hidden] { display: none; }
.skip-link { position: fixed; z-index: 10; top: var(--space-2); left: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--primary); color: var(--primary-foreground); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.app-header { position: sticky; z-index: 5; top: var(--space-0); border-bottom: var(--border-width) solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.app-nav { display: flex; max-width: var(--content-width); min-height: var(--control-height); margin: auto; padding: var(--space-3) var(--space-6); align-items: center; justify-content: space-between; gap: var(--space-4); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--text-primary); font-weight: var(--weight-bold); text-decoration: none; }
.brand-mark { display: grid; width: var(--control-height); height: var(--control-height); border-radius: var(--radius-md); place-items: center; background: var(--primary); color: var(--primary-foreground); }
.to-site { display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin-left: var(--space-2); border-radius: 50%; color: var(--text-muted); }
.to-site svg { width: 1.15rem; height: 1.15rem; } /* R76.12 (Hani #1 2026-11-14): back to the main website, same tab */
.to-site:hover, .to-site:focus-visible { color: var(--primary); background: var(--neutral-surface); }
.nav-actions { display: flex; align-items: center; gap: var(--space-3); }
.nav-actions form { margin: var(--space-0); }
.account-name { color: var(--text-muted); font-size: var(--font-sm); }
.icon-button { display: grid; width: var(--control-height); height: var(--control-height); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); place-items: center; background: var(--surface); color: var(--text-primary); transition: border-color var(--transition-fast), color var(--transition-fast); }
.icon-button:hover { border-color: var(--primary); color: var(--primary); }
.icon-button svg { width: var(--icon-size); height: var(--icon-size); fill: currentColor; }
.notification-menu { position: relative; }
.notification-menu > summary { list-style: none; cursor: pointer; }
.notification-menu > summary::-webkit-details-marker { display: none; }
.notification-button { position: relative; }
.notification-badge { position: absolute; top: calc(var(--space-1) * -1); right: calc(var(--space-1) * -1); display: grid; min-width: var(--space-5); height: var(--space-5); padding: 0 var(--space-1); border: 2px solid var(--surface); border-radius: 999px; place-items: center; background: var(--danger); color: var(--danger-foreground); font-size: var(--font-xs); font-weight: var(--weight-bold); }
.notification-panel { position: absolute; z-index: 8; top: calc(100% + var(--space-2)); right: 0; width: min(26rem, calc(100vw - var(--space-6))); padding: var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-lg); }
.notification-panel-heading { display: flex; margin-bottom: var(--space-3); align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.notification-panel-heading span, .notification-panel small { color: var(--text-muted); font-size: var(--font-xs); }
.notification-panel ul { display: grid; margin: 0; padding: 0; gap: var(--space-2); list-style: none; }
.notification-panel li a { display: flex; padding: var(--space-3); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); align-items: start; justify-content: space-between; gap: var(--space-3); color: inherit; text-decoration: none; }
.notification-panel li a:hover { border-color: var(--primary); }
.notification-panel li a > span:first-child { display: grid; min-width: 0; gap: var(--space-1); }
.notification-panel li strong, .notification-panel li small { overflow-wrap: anywhere; }
.notification-more { display: inline-block; margin-top: var(--space-3); }
.notification-empty { margin: 0; color: var(--text-muted); }
.page-container { width: 100%; max-width: var(--content-width); margin: auto; padding: var(--space-8) var(--space-6) var(--space-12); }
.page-heading { display: flex; margin-bottom: var(--space-8); align-items: end; justify-content: space-between; gap: var(--space-4); }
.page-section { margin-top: var(--space-10); }
.section-heading, .card-heading { display: flex; min-width: var(--space-0); flex-wrap: wrap; align-items: start; justify-content: space-between; gap: var(--space-3); }
.section-heading > *, .card-heading > *, .capability-identity { min-width: var(--space-0); }
.section-heading { margin-bottom: var(--space-4); align-items: center; }
.section-heading h2, .card-heading h3 { margin-bottom: var(--space-0); }
.eyebrow { margin-bottom: var(--space-2); color: var(--primary); font-size: var(--font-xs); font-weight: var(--weight-bold); letter-spacing: var(--space-1); text-transform: uppercase; }
.muted, .metadata, .field-help { color: var(--text-muted); }
.metadata { margin: var(--space-2) var(--space-0) var(--space-0); font-size: var(--font-sm); }
.stack-sm > * { margin-bottom: var(--space-2); }
.panel, .card, .chart-frame { border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-sm); }
.panel { padding: var(--space-6); }
.panel-heading { margin-bottom: var(--space-6); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--space-4); }
.card { padding: var(--space-5); color: inherit; text-decoration: none; }
.card-interactive { transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast); }
.card-interactive:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(calc(var(--space-1) * -1)); }
.check-card.is-stale { border-color: var(--warning); }
.grid-span { grid-column: 1 / -1; }
.root-cause-grid { display: grid; gap: var(--space-3); }
.root-cause-card { padding: var(--space-4); border: var(--border-width) solid var(--border); border-left: var(--space-1) solid var(--warning); border-radius: var(--radius-md); background: var(--panel); }
.root-cause-card[data-classification="operational_fault"] { border-left-color: var(--danger); }
.root-cause-heading { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: var(--space-3); }
.root-cause-heading h3 { margin: 0; }
.root-cause-facts { display: flex; flex-wrap: wrap; margin-top: var(--space-2); gap: var(--space-2) var(--space-4); color: var(--text-muted); font-size: var(--font-sm); }
.root-cause-action { margin: var(--space-3) 0 0; }
.root-cause-technical { margin-top: var(--space-3); }
.button { display: inline-flex; min-height: var(--control-height); padding: var(--space-2) var(--space-4); border: var(--border-width) solid var(--transparent); border-radius: var(--radius-md); align-items: center; justify-content: center; gap: var(--space-2); cursor: pointer; font-weight: var(--weight-medium); text-decoration: none; transition: background var(--transition-fast), border-color var(--transition-fast); }
.button-primary { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-sm); font-weight: var(--weight-bold); }
.button-primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); box-shadow: var(--shadow-md); }
.button:disabled, .button[aria-disabled="true"] { cursor: not-allowed; opacity: .5; }
.button-secondary { border-color: var(--border); background: var(--surface); color: var(--text-primary); }
.button-secondary:hover { border-color: var(--primary); }
.button-compact { min-height: auto; padding: var(--space-2) var(--space-3); font-size: var(--font-sm); }
.form-stack { display: grid; gap: var(--space-4); }
.form-stack > label, .form-stack fieldset { display: grid; margin: var(--space-0); gap: var(--space-2); font-weight: var(--weight-medium); }
.form-stack fieldset { padding: var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(var(--space-0), 1fr)); gap: var(--space-4); }
/* Choice labels must override the stacked text-field label layout. */
.check-row, .form-stack > label.check-row { display: flex; align-items: flex-start; gap: var(--space-2); font-weight: normal; }
.check-row > input:is([type="radio"], [type="checkbox"]) { flex: 0 0 auto; margin: .25em 0 0; }
.check-row > span { min-width: 0; overflow-wrap: anywhere; }
.onboarding-page { margin-top: var(--space-0); }
.onboarding-heading { margin-bottom: var(--space-5); }
.onboarding-layout { display: grid; min-width: var(--space-0); grid-template-columns: minmax(13rem, 17rem) minmax(var(--space-0), 1fr); align-items: start; gap: var(--space-8); }
.onboarding-sidebar { position: sticky; top: calc(var(--control-height) + var(--space-8)); min-width: var(--space-0); }
.onboarding-workspace { min-width: var(--space-0); }
.wizard-steps { display: grid; margin: var(--space-0); padding: var(--space-2); border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-sm); gap: var(--space-1); list-style: none; }
.wizard-steps li { border-left: var(--focus-width) solid var(--transparent); border-radius: var(--radius-md); color: var(--text-muted); font-size: var(--font-sm); }
.wizard-steps li.is-current { border-left-color: var(--primary); background: var(--surface-subtle); color: var(--primary); font-weight: var(--weight-bold); }
.wizard-steps li.is-complete { border-left-color: var(--success); color: var(--success); }
.wizard-steps form { margin: var(--space-0); }
.wizard-step-label, .wizard-step-button { display: flex; width: 100%; padding: var(--space-3); border: var(--space-0); align-items: center; background: transparent; color: inherit; gap: var(--space-3); text-align: left; font: inherit; }
.wizard-step-button { cursor: pointer; font-weight: var(--weight-bold); }
.wizard-step-button:hover, .wizard-step-button:focus-visible { background: var(--surface-subtle); text-decoration: none; }
.wizard-step-label[aria-disabled="true"] { opacity: .65; }
.wizard-step-number { display: grid; width: var(--state-icon-size); height: var(--state-icon-size); flex: 0 0 auto; border: var(--border-width) solid currentColor; border-radius: var(--radius-round); place-items: center; font-weight: var(--weight-bold); }
.onboarding-draft-note { margin-top: var(--space-4); padding: var(--space-3); color: var(--text-muted); font-size: var(--font-sm); }
.optional-section { border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.optional-section > summary, .context-help > summary { padding: var(--space-3) var(--space-4); cursor: pointer; font-weight: var(--weight-bold); }
.optional-section-body, .context-help-body { padding: var(--space-0) var(--space-4) var(--space-4); }
.compact-textarea { min-height: calc(var(--control-height) * 2); }
.category-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(var(--space-0), 1fr)); gap: var(--space-3); }
.category-choice-grid .check-row { padding: var(--space-3); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.category-choice-grid small { display: block; color: var(--text-muted); }
.relationship-group { display: grid; padding: var(--space-4) var(--space-0); grid-template-columns: minmax(9rem, 1fr) minmax(14rem, 2fr); border-bottom: var(--border-width) solid var(--border); gap: var(--space-5); }
.relationship-group h3 { margin-bottom: var(--space-0); }
.relationship-group .eyebrow { margin-bottom: var(--space-1); }
.relationship-picker { padding: var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.relationship-picker-heading h3, .advanced-relationship h3 { margin-bottom: var(--space-1); }
.relationship-picker-heading .eyebrow { margin-bottom: var(--space-1); }
.selected-assets { display: flex; flex-wrap: wrap; margin: var(--space-3) var(--space-0); gap: var(--space-2); }
.selected-asset { display: inline-flex; padding: var(--space-2) var(--space-3); border: var(--border-width) solid var(--success); border-radius: var(--radius-round); align-items: center; gap: var(--space-2); background: var(--success-surface); color: var(--success); }
.selected-asset small { color: inherit; }
.empty-selection { color: var(--text-muted); font-size: var(--font-sm); }
.asset-picker { margin-top: var(--space-3); }
.asset-picker > summary { width: fit-content; color: var(--primary); cursor: pointer; font-weight: var(--weight-bold); }
.asset-picker-panel { display: grid; max-height: calc(var(--control-height) * 8); margin-top: var(--space-3); padding: var(--space-4); overflow-y: auto; border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface); gap: var(--space-2); }
.asset-candidate { display: flex; padding: var(--space-3); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); align-items: flex-start; gap: var(--space-2); cursor: pointer; }
.asset-candidate:has(input:checked) { border-color: var(--primary); background: var(--surface-subtle); }
.asset-candidate span, .asset-candidate small { display: block; }
.asset-candidate small { color: var(--text-muted); }
.connection-result { display: flex; padding: var(--space-4); border: var(--border-width) solid currentColor; border-radius: var(--radius-md); flex-direction: column; gap: var(--space-1); }
.connection-result-success { background: var(--success-surface); color: var(--success); }
.provisioning-plan { padding: var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.fingerprint { overflow-wrap: anywhere; font-family: var(--font-mono); font-size: var(--font-sm); }
.session-warning { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.session-warning p { margin-bottom: var(--space-0); }
.session-warning.is-urgent { background: var(--danger-surface); color: var(--danger); }
.choice-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.back-form { margin-top: var(--space-4); }
.form-error { margin-bottom: var(--space-4); padding: var(--space-4); border: var(--border-width) solid var(--danger); border-radius: var(--radius-md); background: var(--danger-surface); color: var(--danger); }
.detail-list { display: grid; margin: var(--space-0) var(--space-0) var(--space-5); gap: var(--space-0); }
.detail-list div { display: grid; padding: var(--space-3) var(--space-0); grid-template-columns: minmax(10rem, 1fr) 2fr; border-bottom: var(--border-width) solid var(--border); gap: var(--space-4); }
.detail-list dt { font-weight: var(--weight-bold); }
.detail-list dd { margin: var(--space-0); }
.confirmation-row { margin-bottom: var(--space-4); padding: var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.page-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); justify-content: flex-end; }
.new-record-fields { display: grid; gap: var(--space-4); }
.new-record-fields[hidden] { display: none; }
.new-record-fields > label { display: grid; gap: var(--space-2); }
.wizard-step-button:disabled { opacity: .5; cursor: not-allowed; }
.narrow-section { max-width: var(--dialog-width); margin-right: auto; margin-left: auto; }
.field { display: grid; gap: var(--space-2); font-weight: var(--weight-medium); }
input:not([type="radio"]):not([type="checkbox"]), select, textarea { width: 100%; min-height: var(--control-height); padding: var(--space-2) var(--space-3); border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--text-primary); }
textarea { min-height: calc(var(--control-height) * 3); resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--space-1); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"], .field-error input { border-color: var(--danger); }
.validation-message { color: var(--danger); font-size: var(--font-sm); }
.form-group { margin: var(--space-0); padding: var(--space-0); border: var(--space-0); }
.form-divider { margin: var(--space-8) var(--space-0); border-top: var(--border-width) solid var(--border); }
.form-group legend { padding: var(--space-0); font-size: var(--font-xl); font-weight: var(--weight-bold); }
.field-help { margin: var(--space-2) var(--space-0) var(--space-4); font-size: var(--font-sm); }
.form-actions { display: flex; margin-top: var(--space-8); padding-top: var(--space-5); border-top: var(--border-width) solid var(--border); gap: var(--space-3); }
.inline-review-action { margin-top: var(--space-2); }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.choice-card, .accent-choice { display: flex; padding: var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); align-items: center; gap: var(--space-3); cursor: pointer; background: var(--surface-subtle); }
.choice-card:has(input:checked), .accent-choice:has(input:checked) { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 calc(var(--border-width) * 2) var(--primary); font-weight: var(--weight-bold); }
.choice-card small { display: block; margin-top: var(--space-1); color: var(--text-muted); }
.accent-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-3); }
.accent-choice { justify-content: flex-start; text-align: left; }
.accent-swatch { width: var(--state-icon-size); height: var(--state-icon-size); border-radius: var(--radius-round); background: var(--choice-accent); }
.accent-teal { --choice-accent: var(--accent-teal-background); } .accent-blue { --choice-accent: var(--accent-blue-background); } .accent-violet { --choice-accent: var(--accent-violet-background); } .accent-amber { --choice-accent: var(--accent-amber-background); } .accent-rose { --choice-accent: var(--accent-rose-background); }
.status-badge { display: inline-flex; max-width: 100%; padding: var(--space-1) var(--space-2); border-radius: var(--radius-round); align-items: center; justify-content: center; overflow-wrap: break-word; word-break: normal; hyphens: none; font-size: var(--font-xs); font-weight: var(--weight-bold); text-align: center; white-space: normal; }
.status-neutral { background: var(--neutral-surface); color: var(--neutral); } .status-success { background: var(--success-surface); color: var(--success); } .status-warning { background: var(--warning-surface); color: var(--warning); } .status-danger { background: var(--danger-surface); color: var(--danger); }
.alert { margin-bottom: var(--space-5); padding: var(--space-4); border: var(--border-width) solid currentColor; border-radius: var(--radius-md); }
.alert h2 { font-size: var(--font-lg); }
.alert-success { background: var(--success-surface); color: var(--success); } .alert-warning { background: var(--warning-surface); color: var(--warning); } .alert-danger { background: var(--danger-surface); color: var(--danger); } .alert-info { background: var(--neutral-surface); color: var(--neutral); }
.table-container { overflow-x: auto; border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: var(--space-3) var(--space-4); border-bottom: var(--border-width) solid var(--border); text-align: left; }
th { background: var(--surface-subtle); color: var(--text-muted); font-size: var(--font-sm); }
tr:last-child td { border-bottom: var(--space-0); }
.dialog-backdrop { position: fixed; z-index: 20; inset: var(--space-0); display: grid; padding: var(--space-4); place-items: center; background: color-mix(in srgb, var(--slate-950) 70%, var(--transparent)); }
.dialog { width: min(100%, var(--dialog-width)); padding: var(--space-6); border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); }
.chart-frame { min-height: calc(var(--control-height) * 6); padding: var(--space-5); }
.empty-state, .error-state, .loading-state { display: grid; padding: var(--space-8); place-items: center; text-align: center; color: var(--text-muted); }
.empty-state { border: var(--border-width) dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.empty-state p { margin-bottom: var(--space-0); }
.state-icon { display: grid; width: var(--state-icon-size); height: var(--state-icon-size); margin-bottom: var(--space-3); border-radius: var(--radius-round); place-items: center; background: var(--surface-subtle); color: var(--primary); font-weight: var(--weight-bold); }
.error-state { color: var(--danger); } .error-state span { color: var(--danger-foreground); }
.poll-error { display: none; margin-top: var(--space-4); padding: var(--space-4); border: var(--border-width) solid var(--danger); border-radius: var(--radius-md); background: var(--danger-surface); }
.poll-error.is-visible { display: grid; }
.loading-state { min-height: calc(var(--control-height) * 4); gap: var(--space-3); }
.spinner { width: var(--spinner-size); height: var(--spinner-size); border: var(--spinner-width) solid var(--border); border-top-color: var(--primary); border-radius: var(--radius-round); animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.auth-layout { display: grid; min-height: calc(100vh - (var(--control-height) + var(--space-6))); padding: var(--space-8) var(--space-0); place-items: start center; }
.auth-panel { width: min(100%, var(--auth-width)); margin-top: var(--space-10); }
.settings-form { max-width: var(--content-width); }
.settings-workspace { display: grid; min-width: var(--space-0); grid-template-columns: var(--side-menu-width) minmax(var(--space-0), 1fr); align-items: start; gap: var(--space-8); }
.settings-sidebar { position: sticky; top: calc(var(--control-height) + var(--space-8)); min-width: var(--space-0); }
.settings-navigation { display: grid; padding: var(--space-2); border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-sm); gap: var(--space-1); }
.settings-navigation a { display: flex; min-width: var(--space-0); padding: var(--space-3); align-items: center; border-left: var(--focus-width) solid var(--transparent); border-radius: var(--radius-md); color: var(--text-primary); gap: var(--space-3); overflow-wrap: anywhere; text-decoration: none; }
.settings-navigation a:hover, .settings-navigation a.is-selected { border-left-color: var(--primary); background: var(--surface-subtle); color: var(--primary); }
.settings-navigation a.is-selected { font-weight: var(--weight-bold); }
.settings-main { min-width: var(--space-0); }
.settings-category-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.settings-category-card { display: flex; min-width: var(--space-0); align-items: center; gap: var(--space-4); }
.settings-category-card > span:last-child { min-width: var(--space-0); }
.settings-category-card strong, .settings-category-card small { display: block; }
.settings-category-card small { margin-top: var(--space-1); color: var(--text-muted); }
.settings-category-icon { display: grid; width: var(--state-icon-size); height: var(--state-icon-size); flex: 0 0 auto; border-radius: var(--radius-md); place-items: center; background: var(--primary); color: var(--primary-foreground); font-weight: var(--weight-bold); }
.dashboard-composition-list { display: grid; margin: var(--space-0); padding: var(--space-0); gap: var(--space-3); list-style: none; }
.dashboard-composition-row { display: grid; min-width: var(--space-0); padding: var(--space-4); grid-template-columns: auto minmax(12rem, 1fr) minmax(9rem, auto) auto; align-items: center; border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); gap: var(--space-3) var(--space-4); }
.dashboard-composition-row.is-dragging { border-color: var(--primary); box-shadow: var(--shadow-md); opacity: .7; }
.dashboard-drag-handle { display: grid; width: var(--control-height); height: var(--control-height); padding: var(--space-0); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); place-items: center; background: var(--surface); color: var(--text-muted); cursor: grab; }
.dashboard-drag-handle:active { cursor: grabbing; }
.dashboard-section-identity { min-width: var(--space-0); }
.dashboard-section-identity strong { overflow-wrap: anywhere; }
.dashboard-section-identity p { margin: var(--space-1) var(--space-0) var(--space-0); color: var(--text-muted); font-size: var(--font-sm); overflow-wrap: anywhere; }
.dashboard-visibility, .dashboard-visibility-policy { align-self: center; justify-self: start; }
.dashboard-visibility { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--weight-medium); }
.dashboard-move-controls { display: flex; flex-wrap: wrap; justify-content: end; gap: var(--space-2); }
.dashboard-move-controls .button:disabled { cursor: not-allowed; opacity: .5; }
.inventory-layout { display: grid; min-width: var(--space-0); grid-template-columns: var(--side-menu-width) minmax(var(--space-0), 1fr); gap: var(--space-8); }
.inventory-sidebar, .inventory-workspace { min-width: var(--space-0); }
.asset-tabs { display: flex; margin-bottom: var(--space-5); padding: var(--space-1); overflow-x: auto; border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--panel); gap: var(--space-1); }
.asset-tabs a { flex: 0 0 auto; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); color: var(--text-primary); text-decoration: none; }
.asset-tabs a:hover, .asset-tabs a.is-selected { background: var(--surface-subtle); color: var(--primary); }
.asset-tabs a.is-selected { box-shadow: inset 0 calc(var(--border-width) * -2) 0 var(--primary); font-weight: var(--weight-bold); }
.monitoring-toolbar { display: flex; margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4); align-items: center; gap: var(--space-4); }
.monitoring-toolbar form { margin: var(--space-0); }
.auto-refresh-control { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--weight-medium); }
.monitoring-freshness { display: grid; justify-items: end; gap: var(--space-1); }
.monitoring-graph-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: var(--space-4); }
.telemetry-graph { min-width: var(--space-0); }
.telemetry-series + .telemetry-series { margin-top: var(--space-4); padding-top: var(--space-3); border-top: var(--border-width) solid var(--border); }
.telemetry-series-heading { display: flex; align-items: start; justify-content: space-between; gap: var(--space-3); font-size: var(--font-sm); }
.telemetry-series-heading span { color: var(--text-muted); text-align: right; }
.telemetry-series svg { width: 100%; height: 5rem; margin-top: var(--space-2); border-bottom: var(--border-width) solid var(--border); background: var(--surface-subtle); }
.telemetry-series polyline { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.inventory-tree-disclosure { display: none; }
.inventory-tree-panel { position: sticky; top: calc(var(--control-height) + var(--space-8)); max-height: calc(100vh - (var(--control-height) + var(--space-12))); padding: var(--space-4); overflow-x: hidden; overflow-y: auto; border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-sm); }
.inventory-tree-section, .inventory-tree-node { display: grid; padding: var(--space-2) var(--space-3); border-left: var(--focus-width) solid var(--transparent); border-radius: var(--radius-sm); color: var(--text-primary); text-decoration: none; }
.inventory-tree-section { font-weight: var(--weight-bold); }
.inventory-tree-node:hover, .inventory-tree-section:hover { background: var(--surface-subtle); color: var(--primary); }
.inventory-tree-node.is-selected, .inventory-tree-section.is-selected { border-left-color: var(--primary); background: var(--surface-subtle); color: var(--primary); font-weight: var(--weight-bold); }
.inventory-tree-heading { margin: var(--space-5) var(--space-0) var(--space-2); color: var(--text-muted); font-size: var(--font-xs); letter-spacing: var(--space-1); text-transform: uppercase; }
.inventory-tree-heading .inventory-tree-section { margin: calc(var(--space-2) * -1) var(--space-0); color: inherit; }
.inventory-tree-list { margin: var(--space-0); padding-left: var(--space-3); list-style: none; }
.inventory-tree-panel > .inventory-tree-list { padding-left: var(--space-0); }
/* Hani #1 2026-10-18: the open/close arrow sits on the same line as the device name, left of it. */
.inventory-tree-branch > summary { cursor: pointer; color: var(--primary); display: flex; align-items: flex-start; list-style: none; }
.inventory-tree-branch > summary::-webkit-details-marker { display: none; }
.inventory-tree-branch > summary::before { content: "▸"; flex: none; width: 1rem; padding-top: 3px; font-size: 1rem; line-height: 1.2; text-align: center; transition: transform var(--transition-fast); }
.inventory-tree-branch[open] > summary::before { transform: rotate(90deg); }
.inventory-tree-branch > summary > .inventory-tree-node { flex: 1 1 auto; min-width: 0; }
.inventory-tree-list > li > .inventory-tree-node { margin-left: 1rem; }
.inventory-tree-meta, .inventory-tree-empty { color: var(--text-muted); font-size: var(--font-xs); font-weight: normal; }
.inventory-tree-count { display: inline-block; min-width: 1.5em; padding: 0 6px; margin-left: 4px; border: 1px solid var(--border); border-radius: 999px; font-size: var(--font-xs); font-weight: 600; text-align: center; color: var(--text-muted); }
.inventory-tree-empty { margin: var(--space-2) var(--space-3); }
.monitoring-region .empty-state { min-height: calc(var(--control-height) * 3); }
.monitoring-region { grid-column: 1 / -1; min-width: var(--space-0); }
.summary-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.monitoring-capability-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr)); align-items: start; }
.device-monitoring-dashboard { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); align-items: start; }
.monitoring-capability, .normalized-widget { min-width: var(--space-0); }
.monitoring-capability { max-width: 100%; padding: var(--space-4); overflow: hidden; }
.monitoring-capability:has(> .capability-complete[open]) { grid-column: 1 / -1; }
.capability-summary-heading { align-items: start; }
.capability-summary-heading .metric-context { margin: var(--space-1) var(--space-0) var(--space-0); }
.capability-primary-reading { display: grid; min-height: calc(var(--control-height) * 1.5); margin: var(--space-3) var(--space-0); align-content: center; }
.capability-primary-reading > span > strong { font-size: var(--font-xl); }
.capability-primary-reading .metric-reading { justify-items: start; text-align: left; }
.capability-primary-reading .metric-reading .status-badge { justify-self: start; }
.capability-history { margin-top: var(--space-3); }
.capability-history .telemetry-series svg { height: 4.5rem; }
.capability-secondary-context { margin-top: var(--space-3); }
.capability-complete { margin-top: var(--space-4); }
.capability-complete-body { min-width: var(--space-0); padding: var(--space-4); overflow: hidden; }
.capability-complete-body > :first-child { margin-top: var(--space-0); }
.capability-complete-body > :last-child { margin-bottom: var(--space-0); }
.capability-history-stats { margin-bottom: var(--space-4); }
.capability-history-stats small { display: block; margin-top: var(--space-1); color: var(--text-muted); }
.capability-technical-details { margin-top: var(--space-4); }
.monitoring-section-heading .field-help { margin-bottom: var(--space-0); }
.capability-state-summary { display: flex; margin-bottom: var(--space-3); flex-wrap: wrap; gap: var(--space-2); }
.capability-state-summary span { padding: var(--space-2) var(--space-3); border: var(--border-width) solid var(--border); border-radius: var(--radius-round); background: var(--surface-subtle); font-size: var(--font-sm); }
.context-help, .data-disclosure { min-width: var(--space-0); margin: var(--space-3) var(--space-0); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.context-help > summary, .data-disclosure > summary { padding: var(--space-3) var(--space-4); color: var(--primary); cursor: pointer; font-weight: var(--weight-medium); overflow-wrap: anywhere; }
.context-help-body { padding: var(--space-0) var(--space-4) var(--space-4); color: var(--text-muted); font-size: var(--font-sm); }
.context-help-body > :last-child { margin-bottom: var(--space-0); }
.state-help-list { display: grid; margin-bottom: var(--space-0); gap: var(--space-2); }
.state-help-list div { display: grid; grid-template-columns: minmax(calc(var(--control-height) * 3), auto) minmax(var(--space-0), 1fr); gap: var(--space-3); }
.state-help-list dt { font-weight: var(--weight-bold); }
.state-help-list dd { margin: var(--space-0); }
.binding-list, .unavailable-capability-list { display: grid; margin: var(--space-0); padding: var(--space-0); gap: var(--space-2); list-style: none; }
.binding-list li { min-width: var(--space-0); padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-subtle); }
.identifier, .metric-identity, .metric-value { min-width: var(--space-0); overflow-wrap: anywhere; word-break: break-word; }
.normalized-widget { margin-top: var(--space-4); padding: var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.monitoring-capability .normalized-widget { margin-top: var(--space-3); padding: var(--space-3); }
.monitoring-capability .metric-list li { grid-template-columns: minmax(var(--space-0), 1fr) minmax(var(--space-0), 1fr); }
.monitoring-capability .metric-identity strong { overflow-wrap: break-word; word-break: normal; }
.metric-reading { display: grid; justify-items: end; gap: var(--space-1); }
.metric-reading > strong { color: var(--text-primary); font-size: var(--font-lg); }
.metric-reading .status-badge { justify-self: end; }
.capability-binding-disclosure .binding-list { padding: var(--space-3); }
.widget-heading { display: flex; min-width: var(--space-0); flex-wrap: wrap; align-items: start; justify-content: space-between; gap: var(--space-3); }
.widget-heading h4 { margin: var(--space-0); font-size: var(--font-lg); }
.widget-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(var(--control-height) * 3)), 1fr)); gap: var(--space-2); }
.widget-stat-grid div { min-width: var(--space-0); padding: var(--space-3); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.widget-stat-grid strong, .widget-stat-grid span { display: block; }
.widget-stat-grid strong { font-size: var(--font-xl); }
.widget-stat-grid span { color: var(--text-muted); font-size: var(--font-xs); }
.data-disclosure[open] > summary { border-bottom: var(--border-width) solid var(--border); }
.data-disclosure > .metric-list, .data-disclosure > .table-container { margin: var(--space-4); }
.interface-table-container { width: 100%; max-width: 100%; margin-right: var(--space-0) !important; margin-left: var(--space-0) !important; overflow: hidden; }
.interface-counter-table { width: 100%; table-layout: fixed; }
.interface-counter-table th, .interface-counter-table td { vertical-align: top; overflow-wrap: anywhere; }
.monitoring-assignment { margin-top: var(--space-5); }
.unavailable-capabilities { margin-top: var(--space-5); }
.unavailable-capability-list { padding: var(--space-4); }
.unavailable-capability-list li { display: grid; min-width: var(--space-0); grid-template-columns: minmax(var(--space-0), 1fr) auto; padding: var(--space-3); border-bottom: var(--border-width) solid var(--border); gap: var(--space-2) var(--space-4); }
.unavailable-capability-list li:last-child { border-bottom: var(--space-0); }
.unavailable-capability-list p { grid-column: 1 / -1; margin-bottom: var(--space-0); }
.operations-group-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--inventory-tree-width)), 1fr)); }
.operations-check-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.operations-check-disclosure > summary small { display: block; color: var(--text-muted); font-weight: normal; }
.checks-detail-grid { padding: var(--space-4); }
.coverage-card-copy { margin-top: var(--space-3); }
.coverage-root-list { display: grid; margin-top: var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.coverage-root { display: flex; min-width: var(--space-0); padding: var(--space-3) var(--space-4); align-items: center; justify-content: space-between; border-bottom: var(--border-width) solid var(--border); color: var(--text-primary); gap: var(--space-4); text-decoration: none; }
.coverage-root:last-child { border-bottom: var(--space-0); }
.coverage-root:hover { background: var(--surface-subtle); }
.coverage-root span:first-child { min-width: var(--space-0); overflow-wrap: anywhere; }
.coverage-root small { display: block; color: var(--text-muted); }
.topology-branch-grid { grid-template-columns: 1fr; }
.topology-branch-card { min-width: var(--space-0); }
.resource-grid { display: grid; margin-top: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--space-3); }
.resource-group { min-width: var(--space-0); padding: var(--space-3); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.resource-group:has(> .topology-resource-disclosure[open]) { grid-column: 1 / -1; }
.resource-group h4 { margin: var(--space-0); font-size: var(--font-sm); }
.resource-summary-heading, .resource-asset-heading { display: flex; min-width: var(--space-0); align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.resource-summary-heading h4, .resource-asset-heading a { min-width: var(--space-0); overflow-wrap: anywhere; }
.resource-summary-value { margin: var(--space-3) var(--space-0) var(--space-1); font-size: var(--font-sm); }
.topology-resource-disclosure { margin-top: var(--space-3); background: var(--surface); }
.topology-resource-detail { min-width: var(--space-0); padding: var(--space-4); }
.topology-resource-detail .normalized-widget { margin-top: var(--space-3); }
.topology-resource-detail .resource-asset { min-width: var(--space-0); }
.topology-resource-detail .metric-list li { grid-template-columns: minmax(12rem, 1fr) minmax(9rem, max-content); }
.topology-resource-detail .metric-context, .topology-resource-detail .metric-age { overflow-wrap: anywhere; }
.topology-unavailable-disclosure { margin-top: var(--space-4); }
.unavailable-resource-list { display: grid; margin: var(--space-0); padding: var(--space-4); gap: var(--space-3); list-style: none; }
.unavailable-resource-list li { display: grid; grid-template-columns: minmax(var(--space-0), 1fr) minmax(var(--space-0), 2fr); gap: var(--space-3); font-size: var(--font-sm); }
.unavailable-resource-list span { color: var(--text-muted); overflow-wrap: anywhere; }
.resource-asset + .resource-asset { margin-top: var(--space-3); padding-top: var(--space-3); border-top: var(--border-width) solid var(--border); }
.resource-asset > .metric-context { margin-bottom: var(--space-2); }
.resource-group .metric-list li { display: grid; }
.resource-group .metric-value { text-align: left; }
.resource-group .metric-value .status-badge { margin-left: var(--space-0); }
.metric-list { display: grid; margin: var(--space-0); padding: var(--space-0); gap: var(--space-2); list-style: none; }
.metric-list li { display: grid; min-width: var(--space-0); grid-template-columns: minmax(var(--space-0), 1fr) minmax(7rem, auto); align-items: start; justify-content: space-between; gap: var(--space-3); font-size: var(--font-sm); }
.metric-list li > span { min-width: var(--space-0); }
.metric-context, .metric-age { display: block; color: var(--text-muted); font-size: var(--font-xs); }
.metric-value { text-align: right; font-weight: var(--weight-medium); }
.metric-value .status-badge { display: flex; width: fit-content; margin-top: var(--space-1); margin-left: auto; }
.badge-row { display: flex; flex-wrap: wrap; justify-content: end; gap: var(--space-2); }
.state-counts { justify-content: start; }
.not-collected { margin-bottom: var(--space-0); color: var(--text-muted); font-size: var(--font-sm); }
@media (max-width: 720px) {
  .app-nav, .page-container { padding-right: var(--space-4); padding-left: var(--space-4); }
  .account-name, .brand span:last-child { display: none; }
  .page-heading { margin-bottom: var(--space-6); }
  .choice-grid { grid-template-columns: 1fr; }
  .accent-grid { grid-template-columns: repeat(2, 1fr); }
  .form-actions { flex-direction: column; }
  .button { width: 100%; }
  .onboarding-layout { grid-template-columns: 1fr; gap: var(--space-5); }
  .onboarding-sidebar { position: static; }
  .relationship-group { grid-template-columns: 1fr; gap: var(--space-3); }
  .category-choice-grid { grid-template-columns: 1fr; }
  .session-warning { align-items: stretch; flex-direction: column; }
  .settings-workspace { grid-template-columns: 1fr; gap: var(--space-5); }
  .settings-sidebar { position: static; }
  .settings-navigation { grid-template-columns: repeat(2, minmax(var(--space-0), 1fr)); }
  .settings-navigation a { justify-content: center; }
  .dashboard-composition-row { grid-template-columns: auto minmax(var(--space-0), 1fr); }
  .dashboard-visibility, .dashboard-visibility-policy, .dashboard-move-controls { grid-column: 1 / -1; }
  .dashboard-move-controls { display: grid; grid-template-columns: repeat(2, minmax(var(--space-0), 1fr)); }
  .inventory-layout { grid-template-columns: 1fr; gap: var(--space-5); }
  .monitoring-toolbar { align-items: stretch; flex-direction: column; }
  .monitoring-freshness { justify-items: start; }
  .inventory-tree-desktop { display: none; }
  .inventory-tree-disclosure { display: block; }
  .inventory-tree-toggle { padding: var(--space-3) var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--panel); color: var(--text-primary); cursor: pointer; font-weight: var(--weight-bold); }
  .inventory-tree-mobile { position: static; max-height: none; margin-top: var(--space-2); }
  .metric-list li, .monitoring-capability .metric-list li, .topology-resource-detail .metric-list li, .state-help-list div, .unavailable-capability-list li, .unavailable-resource-list li { grid-template-columns: 1fr; }
  .device-monitoring-dashboard { grid-template-columns: 1fr; }
  .capability-complete-body { padding-right: var(--space-2); padding-left: var(--space-2); }
  .interface-counter-table thead, .interface-counter-table .interface-secondary, .interface-counter-table .interface-technical { display: none; }
  .interface-counter-table, .interface-counter-table tbody, .interface-counter-table tr, .interface-counter-table th, .interface-counter-table td { display: block; width: 100%; }
  .interface-counter-table tr { padding: var(--space-3); border-bottom: var(--border-width) solid var(--border); }
  .interface-counter-table th, .interface-counter-table td { display: grid; grid-template-columns: minmax(var(--space-0), 1fr) minmax(var(--space-0), 1fr); padding: var(--space-1) var(--space-0); gap: var(--space-2); font-size: var(--font-sm); }
  .interface-counter-table th { font-size: var(--font-md); }
  .interface-counter-table td::before { content: attr(data-label); color: var(--text-muted); font-size: var(--font-xs); font-weight: var(--weight-medium); }
  .unavailable-capability-list p { grid-column: auto; }
  .metric-value { text-align: left; }
  .metric-value .status-badge { margin-left: var(--space-0); }
  .coverage-root, .operations-check-disclosure > summary { align-items: start; flex-direction: column; }
  .form-grid, .detail-list div { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* Creation forms need room for labels and nested relationship selectors. */
.infrastructure-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); align-items: start; }

.update-notes { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }

/* Read-only device integration (Inventory -> Devices). */
.device-family-choice { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.device-add-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--space-5); align-items: start; }
.command-block { white-space: pre-wrap; overflow-wrap: anywhere; padding: var(--space-3); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--panel); font-family: var(--font-mono); font-size: var(--font-sm); }
.guidance-steps, .validation-steps { display: grid; gap: var(--space-3); padding-left: var(--space-5); }
.validation-step p, .integration-error p { margin: var(--space-1) var(--space-0); }

/* Onboarding actions the Portal's policy does not allow (C483): shown, explained, not interactive. */
.link-disabled { color: var(--text-muted); cursor: not-allowed; text-decoration: line-through; }
/* Compact Updates page: current state and next action first; history and full notes on demand. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.update-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--space-4); margin-bottom: var(--space-6); align-items: start; }
.update-card { padding: var(--space-4) var(--space-5); min-width: 0; }
.update-card .detail-list div { grid-template-columns: minmax(0, auto) minmax(0, 1fr); }
.update-card .detail-list dd { overflow-wrap: anywhere; min-width: 0; }
.update-card > * + * { margin-top: var(--space-2); }
.update-card h2 { margin: 0; font-size: 1.125rem; }
.update-version { margin: 0; font-size: 1.375rem; }
.update-health.is-ok { color: var(--success); font-weight: var(--weight-medium); }
.update-health.is-blocked { color: var(--danger); font-weight: var(--weight-medium); }
.update-next { border-left: var(--space-1) solid var(--primary); }
.update-next.is-current { border-left-color: var(--success); }
.update-next.is-blocked, .update-next.is-stop, .update-next.is-unavailable { border-left-color: var(--danger); }
.update-next.is-progress, .update-next.is-authorize { border-left-color: var(--warning); }
.update-section { margin-top: var(--space-6); }
.update-section h2 { margin-bottom: var(--space-3); font-size: 1.125rem; }
.update-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.update-search { display: flex; gap: var(--space-2); align-items: center; }
.update-search input { min-width: 14rem; }
.update-progress { margin: var(--space-2) 0; }
.update-progress progress { width: 100%; height: var(--space-3); accent-color: var(--primary); }
.update-progress[data-state="done"] progress { accent-color: var(--success); }
.update-progress[data-state="failed"] progress { accent-color: var(--danger); }
.update-progress-label { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-1) 0 0; font-weight: var(--weight-medium); }
.update-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--panel); }
.update-row + .update-row { margin-top: var(--space-2); }
.update-row h3 { display: inline; margin: 0; font-size: 1rem; }
.update-row-main { min-width: 0; }
.update-summary { margin: var(--space-1) 0 0; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
.update-eligible { margin: var(--space-1) 0 0; color: var(--success); font-size: var(--font-xs); }
.update-date { margin-left: var(--space-2); font-size: var(--font-xs); white-space: nowrap; }
.update-list { margin: var(--space-3) 0 0; padding: 0; list-style: none; }
.update-group { margin-top: var(--space-2); padding: var(--space-3) var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--surface-subtle); }
.update-group > summary { cursor: pointer; font-weight: var(--weight-medium); }
.update-group-label { margin-right: var(--space-2); }
.update-history { width: 100%; border-collapse: collapse; }
.update-history th, .update-history td { padding: var(--space-2) var(--space-3); border-bottom: var(--border-width) solid var(--border); text-align: left; vertical-align: middle; }
.update-history td:last-child { text-align: right; }
.badge { display: inline-block; padding: 0 var(--space-2); border-radius: 999px; background: var(--neutral-surface); color: var(--neutral); font-size: var(--font-xs); font-weight: var(--weight-medium); line-height: 1.6; }
.badge-warning { background: var(--warning-surface); color: var(--warning); }
.badge-success { background: var(--success-surface); color: var(--success); }
.badge-danger { background: var(--danger-surface); color: var(--danger); }
.badge-info, .badge-neutral { background: var(--neutral-surface); color: var(--neutral); }
.update-technical { margin-top: var(--space-2); }
.update-technical > summary { cursor: pointer; color: var(--text-muted); }
.update-timeline { margin: var(--space-2) 0; padding-left: var(--space-5); font-size: var(--font-xs); }
.update-dialog { width: min(48rem, calc(100vw - var(--space-6))); max-height: min(80vh, 48rem); padding: 0; border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--panel); color: var(--text-primary); box-shadow: var(--shadow-md); }
.update-dialog[open] { display: flex; flex-direction: column; }
.update-dialog > form { padding: var(--space-5); gap: var(--space-4); }
.update-health.is-pending { color: var(--text-muted); }
.update-dialog::backdrop { background: color-mix(in srgb, var(--slate-950) 70%, var(--transparent)); }
.update-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: var(--border-width) solid var(--border); }
.update-dialog-head h2 { margin: 0; font-size: 1.125rem; }
.update-dialog-tools { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5); border-bottom: var(--border-width) solid var(--border); }
.update-dialog-tools input { flex: 1; }
.update-dialog-body { overflow: auto; padding: var(--space-4) var(--space-5); user-select: text; }
.update-dialog-body h3 { margin: var(--space-3) 0 var(--space-2); font-size: 1rem; }
.update-dialog-body mark { background: var(--warning-surface); color: var(--warning); }
@media (max-width: 40rem) { .update-row { flex-direction: column; align-items: flex-start; } .update-summary { white-space: normal; } .update-search input { min-width: 0; } }

/* C486: update notification on the navigation button */
.nav-updates { position: relative; display: inline-flex; align-items: center; gap: var(--space-1); }
.nav-updates .update-dot { width: var(--space-2); height: var(--space-2); border-radius: 50%; background: var(--danger); display: inline-block; }
.nav-updates .update-badge-text { font-size: 0.85em; color: var(--danger); font-weight: 600; }

/* C486: inventory workflow explanation */
.inventory-howto { margin-block: var(--space-4); }
.inventory-howto summary { cursor: pointer; font-weight: 600; }

/* C486: destructive actions (delete ecosystem) */
.danger-zone { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border: var(--border-width) solid var(--danger); border-radius: var(--radius-lg); }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 600; }
.button-danger { background: var(--danger-surface); border-color: var(--danger); color: var(--danger); }

/* C486: Settings → Access layout */
.grant-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); margin-top: var(--space-4); }
.grant-row .field { flex: 1 1 12rem; margin: 0; }
.grant-row .button { flex: 0 0 auto; }
.danger-form .button { width: auto; }
.danger-zone .field-help, .danger-zone p { margin-block: var(--space-2); }
.row-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-start; justify-content: flex-end; }
.row-confirm summary { list-style: none; cursor: pointer; }
.row-confirm summary::-webkit-details-marker { display: none; }
.row-confirm[open] form { margin-top: var(--space-2); }
.roles-help { margin-block: var(--space-4); }
.roles-help summary { cursor: pointer; }
.invite-form { margin-bottom: var(--space-4); }

/* C486 Settings → Email: a disabled mail mode reads as unavailable, the pending approval stands out. */
.choice-card.is-disabled { opacity: .55; cursor: not-allowed; }
.choice-card.is-disabled * { cursor: not-allowed; }
.panel.panel-attention { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

/* Hani #1 2026-10-15: thin-stroke gear with an update dot; Inventory menu with the three wizard entries. */
.settings-button { position: relative; }
.settings-button .update-dot, .settings-navigation .update-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--surface); }
.settings-navigation .update-dot { position: static; display: inline-block; margin-left: 4px; vertical-align: middle; }
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu .menu-caret { font-size: 0.75em; margin-left: 2px; }
.nav-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px; padding: 6px; display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.nav-menu-panel a, .nav-menu-panel button { display: grid; gap: 1px; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-primary); font: inherit; cursor: pointer; text-decoration: none; }
.nav-menu-panel small { color: var(--text-muted); font-size: 0.8em; }
.nav-menu-panel a:hover, .nav-menu-panel button:hover, .nav-menu-panel a:focus-visible, .nav-menu-panel button:focus-visible { background: var(--surface-subtle); }
.nav-menu-panel form { margin: 0; }
.icon-button svg.icon-stroke { fill: none; stroke: currentColor; }
/* Hani #1 2026-10-15: device page = status summary + tabs (Overview, Validation, Credentials, Settings). */
.device-summary { margin-bottom: var(--space-3); }
.device-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); margin: 0; }
.device-summary-grid dt { color: var(--text-muted); font-size: 0.8em; text-transform: uppercase; letter-spacing: .04em; }
.device-summary-grid dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.device-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.device-tabs .tab { padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: var(--text-muted); text-decoration: none; font-weight: 600; margin-bottom: -1px; }
.device-tabs .tab:hover { color: var(--text-primary); }
.device-tabs .tab.is-selected { color: var(--primary); background: var(--surface); border-color: var(--border); }
.danger-zone { border-color: var(--danger); }
/* Hani #1 2026-10-15: unfinished device setups in the device list */
.draft-row { background: var(--warning-surface); }
.draft-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: flex-start; }
.draft-delete > summary { list-style: none; cursor: pointer; }
.draft-delete > summary::-webkit-details-marker { display: none; }
.draft-delete[open] form { margin-top: 6px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
/* Hani #1 2026-10-15: Review feature matrix with switches */
.feature-matrix { margin: var(--space-3) 0; }
.feature-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); }
.feature-group { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); margin: 0; }
.feature-group legend { font-weight: 700; padding: 0 4px; }
.switch-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row .switch { flex: none; width: 36px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; }
.switch-row .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.switch-row input:checked + .switch { background: var(--primary); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
/* Hani #1 2026-10-15: Review & Add in tabs (no script: anchors + :target; Device is shown first) */
.review-tabs .tab-panel { display: none; padding-top: var(--space-2); }
.review-tabs:not(:has(.tab-panel:target)) .tab-panel.is-default, .review-tabs .tab-panel:target { display: block; }
.review-tabs .device-tabs .tab { cursor: pointer; }
.review-confirm { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.review-tabs:not(:has(.tab-panel:target)) .device-tabs a[href="#review-device"],
.review-tabs:has(#review-device:target) .device-tabs a[href="#review-device"],
.review-tabs:has(#review-infrastructure:target) .device-tabs a[href="#review-infrastructure"],
.review-tabs:has(#review-router:target) .device-tabs a[href="#review-router"],
.review-tabs:has(#review-features:target) .device-tabs a[href="#review-features"] { color: var(--primary); background: var(--surface); border-color: var(--border); }

/* G4 (Hani #1 2026-10-16): the exact device changes shown before and after they are applied */
pre.code-block { margin: 8px 0 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }

/* G4 (Hani #1 2026-10-16): live verification progress */
.job-progress { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.job-progress h3 { margin: 0 0 8px; font-size: 16px; }
.job-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.job-step .job-state { display: inline-block; width: 1.4em; text-align: center; font-weight: 700; }
.job-step.is-ok .job-state { color: var(--success); }
.job-step.is-failed .job-state { color: var(--danger); }
.job-step.is-running .job-state { color: var(--warning); }
.job-step .field-help { margin: 2px 0 0 1.8em; overflow-wrap: anywhere; }

.device-type-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.device-type-line p { margin: 0; }
.device-type-line .field-help { flex-basis: 100%; }

/* Draft actions on their own full-width line (Hani #1 2026-10-17: the delete confirmation was squeezed into Status) */
.draft-row:has(+ .draft-actions-row) td { border-bottom: 0; }
.draft-actions-row td { padding-top: 0; }
.draft-actions { align-items: center; gap: var(--space-3, 12px); }
.draft-delete { display: contents; }
.draft-delete-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 14px; border: 1px solid var(--danger-surface); border-radius: 10px; background: var(--surface); }
.draft-delete-form .check-row { margin: 0; }
.draft-delete-form .field { display: flex; align-items: center; gap: 8px; margin: 0; }
.draft-delete-form .field input { width: 14rem; }
.draft-delete-form .field-help { flex-basis: 100%; margin: 0; }

/* Busy indicator for slow wizard steps (Hani #1 2026-10-17) */
.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -0.15em; animation: nexxvu-spin .8s linear infinite; }
button.is-busy { opacity: .85; cursor: progress; }
.busy-line { display: flex; align-items: center; gap: .5rem; }
@keyframes nexxvu-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.relationship-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }

/* Network map (Hani #1 2026-10-17, feedback item 6) */
.network-map-canvas { overflow-x: auto; padding: 8px; }
.network-map-canvas svg { display: block; max-width: none; }
.map-node rect { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.2; }
.map-node.is-focus rect { fill: var(--surface-subtle); }
.map-node:hover rect { stroke: var(--map-focus); }
.map-name { font-weight: 600; font-size: 13px; fill: var(--text-primary); }
.map-role { font-size: 11px; fill: var(--text-muted); }
.map-line { fill: none; stroke: var(--border-strong); stroke-width: 1.6; }
.map-line.map-hosted { stroke-dasharray: 6 4; }
.map-line.map-belongs { stroke-dasharray: 2 4; }
/* Hani #1 2026-10-18: a VM's VLAN to the router is dashed; the line to the box above (host, parent, cable) is solid. */
.map-line.map-vlan { stroke-dasharray: 7 5; }
.map-line.map-placed, .map-line.map-connected { stroke-dasharray: none; }
.map-line.is-side { opacity: .6; }
.map-line.is-focus { stroke: var(--map-focus); opacity: 1; }
.map-label { font-size: 11px; fill: var(--text-muted); paint-order: stroke; stroke: var(--background); stroke-width: 4px; }
.network-map-legend { display: flex; gap: 18px; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.network-map-legend span::before { content: ""; display: inline-block; width: 26px; margin-right: 6px; vertical-align: middle; border-top: 2px solid var(--border-strong); }
.network-map-legend .legend-hosted::before { border-top-style: dashed; }
.network-map-legend .legend-vlan::before { border-top-style: dashed; }
.network-map-legend .legend-belongs::before { border-top-style: dotted; }

/* Widgets (Hani #1 2026-10-17): Add widget, per-widget interval, Live 30 s */
.add-widget { margin-bottom: var(--space-4, 16px); }
.add-widget > summary { list-style: none; display: inline-flex; width: auto; }
.add-widget > summary::-webkit-details-marker { display: none; }
.add-widget[open] > summary { margin-bottom: 12px; }
.widget-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.widget-interval select { width: auto; min-width: 9rem; padding: 4px 8px; }
.live-view { margin-bottom: var(--space-4, 16px); border-color: var(--primary); }
.live-view-heading { display: flex; align-items: center; gap: 12px; }
.live-view-heading h3 { margin: 0; }
.live-view-heading .metadata { flex: 1; }
.live-values { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 10px; }
.live-value { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.live-value strong { font-size: 1.15rem; }

/* Network map follow-up (Hani #1 2026-10-17): fit to page, pictograms, health, link widths, enlarge */
.network-map-canvas svg.map-fit { width: 100%; height: auto; max-height: 72vh; }
.map-node rect { stroke-width: 1.6; }
.map-node.health-ok rect { stroke: var(--map-ok); }
.map-node.health-warn rect { stroke: var(--map-warn); fill: color-mix(in srgb, var(--map-warn) 10%, var(--surface)); }
.map-node.health-traffic rect { stroke: var(--map-traffic); fill: color-mix(in srgb, var(--map-traffic) 10%, var(--surface)); }
.map-node.health-down rect { stroke: var(--map-down); fill: color-mix(in srgb, var(--map-down) 10%, var(--surface)); }
.map-node.is-focus rect { stroke-width: 3; filter: drop-shadow(0 0 5px var(--map-focus)); }
.map-health { stroke: var(--surface); stroke-width: 1.5; fill: var(--border-strong); }
.health-ok .map-health { fill: var(--map-ok); } .health-warn .map-health { fill: var(--map-warn); }
.health-traffic .map-health { fill: var(--map-traffic); } .health-down .map-health { fill: var(--map-down); }
.map-icon circle, .map-icon rect, .map-icon path { fill: none; stroke: var(--text-muted); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.map-icon .fill { fill: var(--text-muted); }
.map-name, .map-role { text-anchor: start; }
.map-hit { fill: none; stroke: transparent; stroke-width: 14px; }
.map-link:hover .map-line { stroke: var(--map-focus); }
.map-toggle circle { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.4; }
.map-toggle text { font-size: 15px; font-weight: 700; fill: var(--text-primary); }
.map-toggle:hover circle { stroke: var(--map-focus); }
.map-hidden-count { font-size: 11px; fill: var(--text-muted); }
.legend-health i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; background: var(--border-strong); }
.legend-health::before { display: none !important; }
.legend-health.health-ok i { background: var(--map-ok); } .legend-health.health-warn i { background: var(--map-warn); }
.legend-health.health-traffic i { background: var(--map-traffic); } .legend-health.health-down i { background: var(--map-down); }
.network-map-legend { flex-wrap: wrap; }
.map-dialog { width: min(96vw, 1800px); max-height: 92vh; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--background); }
.map-dialog::backdrop { background: var(--overlay); }
.map-dialog-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; }
.map-dialog-body { overflow: auto; max-height: calc(92vh - 56px); padding: 12px; }

/* Monitoring widgets (Hani #1 2026-10-17/18): one compact card per row, each with its own tabs, so readings never
   crowd each other. */
.device-monitoring-dashboard { grid-template-columns: 1fr !important; gap: var(--space-3); }
.device-monitoring-dashboard .monitoring-capability { padding: var(--space-3); }
.device-monitoring-dashboard .capability-identity h3 { font-size: 0.95rem; margin: 0; }
.device-monitoring-dashboard .metric-context { font-size: 0.75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0 0; }
.device-monitoring-dashboard .widget-tabs .tab-bar { margin: 6px 0 8px; gap: 2px; }
.device-monitoring-dashboard .widget-tabs .tab-bar label { padding: 4px 8px; font-size: 0.75rem; }
.device-monitoring-dashboard .capability-primary-reading { font-size: 0.9rem; }
.device-monitoring-dashboard .capability-history svg { max-height: 3.5rem; }
.device-monitoring-dashboard .status-badge { font-size: 0.7rem; padding: 1px 6px; }
.source-badge { display: inline-block; padding: 0 5px; border-radius: 4px; font-size: 0.65rem; font-weight: 700; letter-spacing: .03em; vertical-align: middle; background: var(--neutral-surface); color: var(--neutral); }
.source-badge.source-snmp { background: var(--warning-surface); color: var(--warning); }
.source-badge.source-ssh { background: var(--success-surface); color: var(--success); }
/* compact widget chooser */
.add-widget .feature-groups { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--space-2); }
.add-widget .feature-group { padding: var(--space-1) var(--space-2); }
.add-widget .switch-row { padding: 3px 0; gap: 8px; font-size: 0.85rem; }
.add-widget .switch-row .switch { width: 30px; height: 16px; }
.add-widget .switch-row .switch::after { width: 12px; height: 12px; }
.add-widget .switch-row input:checked + .switch::after { transform: translateX(14px); }
.widget-tabs { position: relative; }
.widget-tabs .tab-radio { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.widget-tabs .tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 10px 0 12px; overflow-x: auto; }
.widget-tabs .tab-bar label { padding: 7px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; cursor: pointer; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.widget-tabs .tab-bar label:hover { color: var(--text-primary); }
.widget-tabs .tab-panel { display: none; }
.widget-tabs [data-tab="overview"]:checked ~ .panel-overview, .widget-tabs [data-tab="history"]:checked ~ .panel-history,
.widget-tabs [data-tab="details"]:checked ~ .panel-details, .widget-tabs [data-tab="technical"]:checked ~ .panel-technical { display: block; }
.widget-tabs [data-tab="overview"]:checked ~ .tab-bar [data-for="overview"], .widget-tabs [data-tab="history"]:checked ~ .tab-bar [data-for="history"],
.widget-tabs [data-tab="details"]:checked ~ .tab-bar [data-for="details"], .widget-tabs [data-tab="technical"]:checked ~ .tab-bar [data-for="technical"] { color: var(--primary); border-color: var(--border); background: var(--surface); margin-bottom: -1px; }
.widget-tabs .tab-radio:focus-visible + * { outline: 2px solid var(--focus-ring); }
.capability-technical-details { font-size: .92rem; }

.map-line.speed-100m { stroke-width: 1.2px; } .map-line.speed-1g { stroke-width: 2px; } .map-line.speed-2g5 { stroke-width: 2.6px; }
.map-line.speed-10g { stroke-width: 3.4px; } .map-line.speed-25g { stroke-width: 4.2px; } .map-line.speed-40g { stroke-width: 5px; }
.map-line.speed-100g { stroke-width: 6px; }

/* Branding and footer (Hani #1 2026-10-17) */
.brand-logo { display: block; max-height: 40px; max-width: 180px; width: auto; height: auto; object-fit: contain; }
.logo-preview { padding: 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-subtle); }
.logo-preview img { display: block; max-height: 80px; max-width: 100%; object-fit: contain; }
.app-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; padding: 24px 16px 32px; color: var(--text-muted); font-size: .85rem; text-align: center; border-top: 1px solid var(--border); margin-top: 32px; }

/* The device you are on: a blue glow, never red (red means offline) */
.map-node.kind-portal rect { stroke: var(--map-ok); stroke-width: 3; }
.network-map-legend .legend-focus i { display: inline-block; width: 14px; height: 10px; margin-right: 5px; border: 2px solid var(--map-focus); border-radius: 3px; vertical-align: -1px; }
.network-map-legend .legend-focus::before { display: none !important; }

/* Live 30 s gauges (Hani #1 2026-10-17) */
.live-values { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.live-gauge { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.live-gauge svg { width: 140px; height: 82px; }
.gauge-track { fill: none; stroke: var(--surface-subtle); stroke-width: 10; stroke-linecap: round; }
.gauge-value { fill: none; stroke: var(--map-ok); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset .8s ease, stroke .4s; }
.live-gauge[data-level="raised"] .gauge-value { stroke: var(--map-warn); }
.live-gauge[data-level="high"] .gauge-value { stroke: var(--map-traffic); }
.live-gauge strong { font-size: 1.2rem; margin-top: -6px; }
.gauge-label { font-weight: 600; text-transform: capitalize; }
.gauge-label.is-plain { text-transform: none; }

/* Light and dark logos (Hani #1 2026-10-17): the one matching the theme is shown */
.brand-logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .brand-logo-light { display: none; }
  :root:not([data-theme]) .brand-logo-dark { display: block; }
}
.logo-variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 16px; }
.logo-variant h3 { margin: 0; }
.logo-preview-dark { background: var(--logo-dark-preview); }

/* Device actions (Hani #1 2026-10-17) */
.device-action > summary { display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.device-action .action-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.device-action[open] > summary { margin-bottom: 14px; }

/* Text size (Hani #1 2026-10-17): the stylesheet is rem-based, so text, spacing and controls scale together */
:root[data-text-size="compact"] { font-size: 87.5%; }
:root[data-text-size="large"] { font-size: 112.5%; }
/* Page width (Hani #1 2026-10-18): full width is the default; standard keeps the centred column. */
:root[data-page-width="full"] { --content-width: 100%; }

/* Inventory search and a denser, Proxmox-like tree (Hani #1 2026-10-17) */
.inventory-tree-search { margin-bottom: var(--space-3); }
.inventory-tree-search input { width: 100%; padding: 6px 10px; font-size: var(--font-sm); }
.inventory-tree-search .inventory-tree-empty { margin: 6px 0 0; }
.inventory-tree-panel .inventory-tree-node { padding-top: 4px; padding-bottom: 4px; font-size: var(--font-sm); }
.inventory-tree-panel .inventory-tree-meta { font-size: var(--font-xs); }
.address-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.address-line p { margin: 0; }

/* Devices list (Hani #1 2026-10-18): search, rows per page, pages. */
.device-search { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-3) 0; }
.device-search input[type="search"] { flex: 1 1 22rem; min-width: 0; }
.device-per { display: inline-flex; align-items: center; gap: var(--space-1); }
.device-pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); margin-top: var(--space-3); }
.device-model { font-size: 0.85em; }

/* Product catalogue (Hani #1 2026-10-18): the device's product picture and the details the operator chose. */
.product-card { display: flex; gap: var(--space-4); align-items: flex-start; flex-wrap: wrap; }
.product-picture { width: 9rem; height: 6rem; object-fit: contain; border-radius: var(--radius-md); background: var(--surface); }
.product-facts { flex: 1 1 16rem; min-width: 0; }
.product-name { margin: 0; font-size: 1.1rem; }
.product-specs dl { max-height: 20rem; overflow: auto; }
/* Tiny product pictures (Hani #1 2026-10-18): see at a glance what kind of device it is. */
.device-thumb { width: 2rem; height: 1.5rem; object-fit: contain; vertical-align: middle; margin-right: var(--space-2); }
.tree-thumb { width: 1.25rem; height: 1rem; object-fit: contain; vertical-align: -0.15rem; margin-right: var(--space-1); }
.product-picture { width: 6rem; height: 4rem; }
/* Device pictures and platform logos sit on a light tile so dark artwork stays visible in dark mode. */
.map-picture-tile { fill: var(--picture-tile); stroke: var(--border); }
.device-thumb, .tree-thumb { background: var(--picture-tile); border-radius: 3px; padding: 1px; }
/* Hardware read over SNMP (SNMP stage 3, Hani #1 2026-10-18). */
.hardware-interfaces .table-container { max-height: 24rem; overflow: auto; }
/* SNMP readiness check (Hani #1 2026-10-18): every requirement with what to do when it is not right. */
.readiness-check { margin: var(--space-3) 0; }
.readiness-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.readiness-list li { display: flex; gap: var(--space-2); align-items: flex-start; }
.readiness-mark { flex: none; width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; }
.readiness-ok .readiness-mark { background: var(--success-surface); color: var(--success); }
.readiness-warn .readiness-mark { background: var(--warning-surface); color: var(--warning); }
.readiness-fail .readiness-mark { background: var(--danger-surface); color: var(--danger); }
.readiness-later .readiness-mark { background: var(--neutral-surface); color: var(--neutral); }
.readiness-fix { font-size: 0.85rem; }
/* Widget menu (Hani #1 2026-10-18): a small ☰ button next to Refresh now; the panel lists every monitoring option by
   source (SSH, API, SNMP) as checkboxes. */
.monitoring-toolbar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.widget-menu { position: relative; margin-left: auto; }
.widget-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; }
.widget-menu > summary::-webkit-details-marker { display: none; }
.widget-menu-count { font-size: var(--font-xs); font-weight: 700; color: var(--text-muted); }
.widget-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(22rem, 90vw); max-height: 70vh; overflow: auto; padding: var(--space-3); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--panel); box-shadow: var(--shadow-sm); }
.widget-menu-tabs .tab-radio { position: absolute; opacity: 0; pointer-events: none; }
.widget-menu-tabbar { display: flex; gap: 2px; border-bottom: var(--border-width) solid var(--border); margin-bottom: var(--space-2); }
.widget-menu-tabbar label { padding: 4px 10px; border: var(--border-width) solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; cursor: pointer; font-size: var(--font-sm); font-weight: 600; color: var(--text-muted); }
.widget-menu-tabbar small { font-weight: 400; }
.widget-menu-list { display: none; }
.widget-menu-tabs .tab-radio[data-tab="ssh"]:checked ~ [data-panel="ssh"], .widget-menu-tabs .tab-radio[data-tab="snmp"]:checked ~ [data-panel="snmp"],
.widget-menu-tabs .tab-radio[data-tab="api"]:checked ~ [data-panel="api"] { display: grid; gap: 2px; }
.widget-menu-tabs .tab-radio[data-tab="ssh"]:checked ~ .widget-menu-tabbar [data-for="ssh"], .widget-menu-tabs .tab-radio[data-tab="snmp"]:checked ~ .widget-menu-tabbar [data-for="snmp"],
.widget-menu-tabs .tab-radio[data-tab="api"]:checked ~ .widget-menu-tabbar [data-for="api"] { color: var(--primary); border-color: var(--border); background: var(--surface); margin-bottom: -1px; }
.widget-menu-item { display: flex; align-items: center; gap: var(--space-2); padding: 3px 2px; font-size: var(--font-sm); cursor: pointer; }
.widget-menu-item.is-unavailable { opacity: .55; cursor: not-allowed; }
.widget-menu-actions { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-3); padding-top: var(--space-2); border-top: var(--border-width) solid var(--border); }
.widget-menu-note { margin: var(--space-2) 0 0; }
/* Homepage (Hani #1 2026-10-18): minimalist overview - donuts, the network map, the locations. */
.home-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--space-3); margin-bottom: var(--space-6); }
.home-chart { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-4); text-align: center; }
.home-chart h2 { margin: 0; font-size: 1rem; }
.donut { width: 8.5rem; height: 8.5rem; }
.donut-ring, .donut-segment { fill: none; stroke-width: 5; }
.donut-ring { stroke: var(--neutral-surface); }
.donut-total { font-size: 0.55rem; font-weight: 700; fill: var(--text-primary); text-anchor: middle; dominant-baseline: central; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: var(--font-sm); text-align: left; }
.donut-legend i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.seg-mikrotik { stroke: var(--type-mikrotik); background: var(--type-mikrotik); }
.seg-proxmox { stroke: var(--type-proxmox); background: var(--type-proxmox); }
.seg-ubuntu { stroke: var(--type-ubuntu); background: var(--type-ubuntu); }
.seg-vmware { stroke: var(--type-vmware); background: var(--type-vmware); }
.seg-windows { stroke: var(--type-windows); background: var(--type-windows); }
.seg-other, .seg-unknown { stroke: var(--type-other); background: var(--type-other); }
.seg-online { stroke: var(--map-ok); background: var(--map-ok); }
.seg-attention { stroke: var(--map-warn); background: var(--map-warn); }
.seg-offline { stroke: var(--map-down); background: var(--map-down); }
.home-offline { color: var(--danger); }
.home-ecosystem { display: inline-flex; gap: var(--space-2); align-items: center; }
.home-map .network-map-canvas { overflow: hidden; }
.home-sites { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--space-3); }
.home-site { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); }
.site-dot { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--picture-tile); font-weight: 700; font-size: 0.85rem; }
.site-dot.state-online { background: var(--map-ok); } .site-dot.state-attention { background: var(--map-warn); }
.site-dot.state-offline { background: var(--map-down); } .site-dot.state-unknown { background: var(--type-other); }
.home-map .network-map-canvas svg.map-fit { max-height: 65vh; }
.home-map-hint { margin: 0 0 var(--space-2); }
/* Homepage map of the locations (Google Maps). */
.home-geo-map { height: min(60vh, 32rem); padding: 0; overflow: hidden; margin-bottom: var(--space-3); }
.home-geo-loading { padding: var(--space-4); }
/* Identity > Location and rack (Hani #1 2026-10-18). */
.placement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: var(--space-2) var(--space-3); }
.placement-wide { grid-column: span 2; }
.placement-form h3 { margin: 0; }

/* Monitoring view (Hani #1 2026-10-18): 1 to 5 widgets per row and the graph type, all widgets or one. */
.device-monitoring-dashboard[data-per-row="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.device-monitoring-dashboard[data-per-row="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.device-monitoring-dashboard[data-per-row="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.device-monitoring-dashboard[data-per-row="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
@media (max-width: 64rem) { .device-monitoring-dashboard[data-per-row="4"], .device-monitoring-dashboard[data-per-row="5"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 48rem) { .device-monitoring-dashboard[data-per-row] { grid-template-columns: 1fr !important; } }
.capability-heading-tools { display: inline-flex; align-items: center; gap: var(--space-1); flex: none; }
.chart-menu { position: relative; }
.chart-menu > summary { list-style: none; cursor: pointer; }
.chart-menu > summary::-webkit-details-marker { display: none; }
.chart-menu-button { padding: 2px 4px; }
.chart-menu-panel { position: absolute; right: 0; top: 100%; z-index: 20; display: grid; gap: 2px; min-width: 11rem; padding: var(--space-2); background: var(--panel); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.chart-menu-panel .metadata { margin: 0 0 var(--space-1); }
.chart-choice { text-align: left; background: none; border: 0; border-radius: var(--radius-sm); padding: 4px 8px; color: var(--text-primary); cursor: pointer; font: inherit; font-size: var(--font-sm); }
.chart-choice:hover, .chart-choice:focus-visible { background: var(--surface-subtle); }
.chart-choice.is-selected { font-weight: 700; color: var(--primary); }
.widget-view-form { margin-top: var(--space-3); padding-top: var(--space-2); border-top: var(--border-width) solid var(--border); display: grid; gap: var(--space-2); }
.widget-menu-heading { margin: 0; font-weight: 700; font-size: var(--font-sm); }
.per-row-choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.per-row-choice legend { font-size: var(--font-sm); margin-bottom: var(--space-1); width: 100%; }
.per-row-choice label { display: inline-flex; }
.per-row-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.per-row-choice span { min-width: 2rem; text-align: center; padding: 3px 0; border: var(--border-width) solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.per-row-choice input:checked + span { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.per-row-choice input:focus-visible + span { outline: var(--focus-width) solid var(--focus-ring); }
.chart-area { fill: var(--primary); opacity: 0.18; stroke: none; }
.chart-bar { fill: var(--primary); opacity: 0.75; }
.chart-pie-wrap { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.pie-chart { width: 6.5rem; height: 6.5rem; flex: none; }
.capability-history.chart-pie .pie-slice, .capability-history.chart-pie .donut-ring { fill: none; stroke-width: 21; }
.capability-history.chart-donut .pie-slice, .capability-history.chart-donut .donut-ring { fill: none; stroke-width: 5; }
.pie-chart .donut-ring { stroke: var(--neutral-surface); }
.pie-slice.series-0 { stroke: var(--series-0); } .donut-legend i.series-0 { background: var(--series-0); }
.pie-slice.series-1 { stroke: var(--series-1); } .donut-legend i.series-1 { background: var(--series-1); }
.pie-slice.series-2 { stroke: var(--series-2); } .donut-legend i.series-2 { background: var(--series-2); }
.pie-slice.series-3 { stroke: var(--series-3); } .donut-legend i.series-3 { background: var(--series-3); }
.pie-slice.series-4 { stroke: var(--series-4); } .donut-legend i.series-4 { background: var(--series-4); }
.pie-slice.series-5 { stroke: var(--series-5); } .donut-legend i.series-5 { background: var(--series-5); }
.pie-slice.series-6 { stroke: var(--series-6); } .donut-legend i.series-6 { background: var(--series-6); }
.pie-slice.series-7 { stroke: var(--series-7); } .donut-legend i.series-7 { background: var(--series-7); }

/* One device block (Hani #1 2026-10-18): a big product picture with the product, hardware and connection details;
   the long explanations live in the (i) tip. */
.device-block { display: flex; gap: var(--space-5); align-items: flex-start; flex-wrap: wrap; }
.device-block-picture { flex: 0 0 18rem; max-width: 100%; display: flex; align-items: center; justify-content: center; min-height: 12rem; background: var(--picture-tile); border-radius: var(--radius-md); padding: var(--space-3); }
.device-block-picture img { width: 100%; max-height: 14rem; object-fit: contain; }
.device-block-picture img.is-logo { width: 7rem; }
.device-block-body { flex: 1 1 20rem; min-width: 0; }
.device-block-title { display: flex; align-items: center; gap: var(--space-2); }
.device-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--space-2) var(--space-4); margin: var(--space-3) 0; }
.device-facts div { min-width: 0; }
.device-facts dt { font-size: var(--font-sm); color: var(--text-muted); }
.device-facts dd { margin: 0; overflow-wrap: anywhere; }
.device-block-links { margin: 0; font-size: var(--font-sm); }
.device-block-error { color: var(--danger); }
.info-tip { position: relative; display: inline-flex; cursor: help; color: var(--text-muted); }
.info-tip-panel { display: none; position: absolute; left: 0; top: 130%; z-index: 30; width: min(24rem, 80vw); padding: var(--space-3); background: var(--panel); color: var(--text-primary); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); font-size: var(--font-sm); font-weight: 400; }
.info-tip:hover .info-tip-panel, .info-tip:focus .info-tip-panel, .info-tip:focus-within .info-tip-panel { display: block; }
.sub-tabs { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-3) 0; border-bottom: var(--border-width) solid var(--border); }
.sub-tabs a { padding: var(--space-2) var(--space-3); text-decoration: none; color: var(--text-muted); border-bottom: 2px solid transparent; }
.sub-tabs a.is-selected { color: var(--text-primary); border-bottom-color: var(--primary); font-weight: 600; }

/* Homepage charts lead to the devices behind them (Hani #1 2026-10-18). */
.donut-link { cursor: pointer; }
.donut-link:hover .donut-segment, .donut-link:focus .donut-segment { stroke-width: 7; }
.donut-legend a { color: inherit; text-decoration: none; }
.donut-legend a:hover, .donut-legend a:focus-visible { text-decoration: underline; }
.donut-legend a.legend-alert { font-weight: 600; }
.home-device-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: var(--space-2); }
.home-device { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.home-device-main { display: flex; align-items: center; gap: var(--space-3); color: inherit; text-decoration: none; min-width: 0; }
.home-device-main .site-dot { width: 0.9rem; height: 0.9rem; }
.home-device.state-attention { border-left: 4px solid var(--map-warn); }
.home-device.state-offline { border-left: 4px solid var(--map-down); }
.badge-action { cursor: pointer; }
.badge-action:hover { text-decoration: underline; }
.alert-fix { margin: var(--space-2) 0; }
/* Access log (Hani #1 2026-10-18). */
.access-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.access-stat p { margin: 0 0 var(--space-1); }
.access-actions { display: flex; gap: var(--space-1); flex-wrap: wrap; align-items: center; }
.access-actions form { display: inline; }
.access-list { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.access-list li { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.access-list form { display: inline; }
tr.access-failed td:nth-child(2) { color: var(--danger); font-weight: 600; }
.router-firewall { margin-bottom: var(--space-3); }
.router-firewall h3 { margin-top: 0; }
.plan-changes { white-space: pre-wrap; font-size: var(--font-sm); background: var(--surface-subtle); padding: var(--space-3); border-radius: var(--radius-md); overflow-x: auto; }
/* Setup milestones after onboarding (Hani #1 2026-10-18). */
.milestone-steps { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.milestone-steps li { flex: 1 1 10rem; }
.milestone-skipped .wizard-step-number { opacity: 0.6; }
.milestone-panel { margin-top: var(--space-3); }
.suggestion-list { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
/* Homepage device map (Hani #1 2026-10-19): one dot per device, with search and filters. */
.map-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-2); }
.map-toolbar input[type="search"] { flex: 1 1 18rem; min-width: 0; }
.map-filter { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--font-sm); }
.map-filter select { max-width: 12rem; }
.map-count { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); margin: 0 0 var(--space-2); }
.map-legend { display: inline-flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); align-items: center; }
.map-legend .dot { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.dot.state-online, .map-state.state-online::before { background: var(--map-ok); }
.dot.state-attention, .map-state.state-attention::before { background: var(--map-warn); }
.dot.state-offline, .map-state.state-offline::before { background: var(--map-down); }
.dot.state-unknown, .map-state.state-unknown::before { background: var(--type-other); }
.map-with-panel { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: var(--space-3); align-items: stretch; }
.map-with-panel .home-geo-map { height: min(70vh, 40rem); margin: 0; }
.map-panel { padding: var(--space-3); font-size: var(--font-sm); overflow: auto; max-height: min(70vh, 40rem); }
.map-panel h3 { margin: 0 0 var(--space-1); }
.map-state::before { content: ""; display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
@media (max-width: 48rem) { .map-with-panel { grid-template-columns: 1fr; } }
/* Widget menu: View is its own tab beside SSH / API / SNMP (Hani #1 2026-10-19), with its own Apply button. */
.widget-menu-tabs .tab-radio[data-tab="view"]:checked ~ [data-panel="view"] { display: grid; gap: var(--space-2); }
.widget-menu-tabs .tab-radio[data-tab="view"]:checked ~ .widget-menu-tabbar [data-for="view"] { color: var(--primary); border-color: var(--border); background: var(--surface); margin-bottom: -1px; }
.widget-menu-tabs .tab-radio[data-tab="view"]:checked ~ .widget-features-footer { display: none; }
.widget-view-panel .widget-menu-actions { margin-top: var(--space-1); }
/* Inventory menu (Hani #1 2026-10-19): full height, ☰ to hide it, ecosystems and Add device at the bottom. */
.inventory-sidebar { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.tree-toggle { align-self: flex-start; padding: 6px 8px; }
.inventory-tree-panel.inventory-tree-desktop { display: flex; flex-direction: column; height: calc(100vh - (var(--control-height) + var(--space-12) + 2.5rem)); max-height: none; }
/* 2026-11-02 browser review: the rule above outranked the small-screen one (`.inventory-tree-desktop { display: none }`),
   so on a phone the whole inventory menu came first and the Overview's charts started ~1300 px down. Below 720 px the
   menu is the compact "Inventory" button above the content again. */
@media (max-width: 720px) { .inventory-tree-panel.inventory-tree-desktop { display: none; } }
.tree-footer { margin-top: auto; padding-top: var(--space-3); border-top: var(--border-width) solid var(--border); display: grid; gap: var(--space-2); position: sticky; bottom: calc(var(--space-4) * -1); background: var(--panel); padding-bottom: var(--space-1); }
.tree-ecosystems > summary { cursor: pointer; display: flex; justify-content: space-between; gap: var(--space-2); font-size: var(--font-sm); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tree-ecosystems > summary strong { color: var(--text-primary); text-transform: none; letter-spacing: 0; }
.tree-eco-list { display: grid; gap: 2px; margin-top: var(--space-2); }
.tree-eco { display: flex; justify-content: space-between; gap: var(--space-2); text-align: left; background: none; border: 0; border-left: var(--focus-width) solid transparent; border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); color: var(--text-primary); font: inherit; cursor: pointer; }
.tree-eco:hover { background: var(--surface-subtle); }
.tree-eco[aria-pressed="true"] { border-left-color: var(--primary); background: var(--surface-subtle); color: var(--primary); font-weight: 600; }
.tree-eco small { color: var(--text-muted); }
.tree-add-button { width: 100%; justify-content: center; }
.tree-add-where { font-weight: 400; }
[data-eco-hidden] { display: none; }
.inventory-layout.tree-collapsed { grid-template-columns: auto minmax(var(--space-0), 1fr); }
.inventory-layout.tree-collapsed .inventory-tree-disclosure { display: none; }
/* F10 (Hani #1 2026-10-24): ☰ lives inside the menu; collapsed, only its head (☰ and the view modes) stays. */
.tree-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); margin-bottom: var(--space-2); }
.view-modes { display: flex; flex-wrap: wrap; gap: 2px; }
.view-mode { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 0 var(--space-1); text-decoration: none; min-width: 2rem; height: 2rem; border: var(--border-width) solid var(--border); background: var(--surface); border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; font: inherit; line-height: 1; }
.view-mode:hover { color: var(--primary); }
.view-mode svg { display: block; flex: none; }   /* Hani #1 2026-10-25: the Settings gear centred like the other views */
.view-mode[aria-pressed="true"] { color: var(--primary); border-color: var(--primary); background: var(--surface-subtle); font-weight: 700; }
.inventory-layout.tree-collapsed .inventory-tree-desktop { height: auto; width: max-content; }
.inventory-layout.tree-collapsed .inventory-tree-desktop > :not(.tree-head) { display: none; }
.inventory-layout.tree-collapsed .tree-head { flex-direction: column; margin: 0; }
.inventory-layout.tree-collapsed .view-modes { flex-direction: column; }
/* Address lookup (Hani #1 2026-10-19): Google's suggestions under the street address. */
.address-lookup { position: relative; }
.address-suggestions { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; list-style: none; margin: 2px 0 0; padding: var(--space-1); background: var(--panel); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.address-suggestions li { padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); cursor: pointer; }
.address-suggestions li:hover, .address-suggestions li.is-active { background: var(--surface-subtle); color: var(--primary); }

/* Resources gallery and a device's picture (Hani #1 2026-10-19). */
.resource-upload { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.drop-zone { display: grid; justify-items: center; gap: var(--space-1); padding: var(--space-5); border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); cursor: pointer; text-align: center; }
.drop-zone.is-over { border-color: var(--primary); background: var(--surface-subtle); }
.drop-zone input[type="file"] { max-width: 100%; }
.resource-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--space-3); }
.resource { padding: var(--space-3); display: grid; gap: var(--space-1); align-content: start; }
.resource-picture { height: 9rem; display: flex; align-items: center; justify-content: center; background: var(--picture-tile); border-radius: var(--radius-md); }
.resource-picture img { max-width: 100%; max-height: 8.5rem; object-fit: contain; }
.resource-name, .resource .metadata { margin: 0; overflow-wrap: anywhere; }
.resource-edit summary { cursor: pointer; font-size: var(--font-sm); color: var(--primary); }
.resource-edit form { margin-top: var(--space-2); }
.device-picture-card { margin-bottom: var(--space-4); }
.picture-choices { display: flex; flex-wrap: wrap; gap: var(--space-2); max-height: 22rem; overflow: auto; }
.picture-choice { display: grid; justify-items: center; gap: 2px; width: 7.5rem; cursor: pointer; font-size: var(--font-sm); text-align: center; }
.picture-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.picture-tile { width: 7rem; height: 5rem; display: flex; align-items: center; justify-content: center; background: var(--picture-tile); border: 2px solid var(--border); border-radius: var(--radius-md); }
.picture-tile img { max-width: 6.5rem; max-height: 4.5rem; object-fit: contain; }
.picture-choice input:checked + .picture-tile { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.picture-choice input:focus-visible + .picture-tile { outline: var(--focus-width) solid var(--focus-ring); }
.picture-choice small { overflow-wrap: anywhere; }

/* Settings > Google (Hani #1 2026-10-19). */
.guidance-steps { margin: var(--space-2) 0; padding-left: 1.25rem; display: grid; gap: var(--space-1); }
.google-test { margin-top: var(--space-3); }
.google-test-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.google-test-map { height: 10rem; margin-top: var(--space-2); border-radius: var(--radius-md); }
/* Address lookup: the explanation shows only while the field is in use, so the row stays aligned. */
.address-lookup [data-address-status] { position: absolute; left: 0; right: 0; top: 100%; z-index: 35; margin: 2px 0 0; padding: var(--space-2); background: var(--panel); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); display: none; }
.address-lookup:focus-within [data-address-status]:not(:empty) { display: block; }
.address-lookup:focus-within .address-suggestions:not([hidden]) ~ [data-address-status] { display: none; }
.address-confirmed-mark { margin-left: var(--space-1); }

/* Integration records and Claude handoffs (Hani #1 2026-10-19). */
.integration-record, .claude-handoff { margin-top: var(--space-3); }
.integration-record > summary, .claude-handoff > summary { cursor: pointer; font-weight: 600; }
.handoff-text { width: 100%; font-family: var(--font-mono, monospace); font-size: var(--font-sm); }

/* Inventory overview device list (Hani #1 2026-10-19): where the homepage cards lead. */
.type-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-2); }
.type-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: var(--border-width) solid var(--border); border-radius: 999px; text-decoration: none; color: var(--text-primary); font-size: var(--font-sm); }
.type-chips a.is-selected { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.type-chips i { width: 0.65rem; height: 0.65rem; border-radius: 50%; display: inline-block; }
.inventory-devices .site-dot.dot { width: 0.65rem; height: 0.65rem; display: inline-block; vertical-align: -1px; }

.home-chart { position: relative; }
.home-chart-link { color: inherit; text-decoration: none; }
.home-chart-link::after { content: ""; position: absolute; inset: 0; z-index: 0; }     /* the whole card opens it */
.home-chart .donut, .home-chart .donut-legend { position: relative; z-index: 1; }      /* slices and legend keep their own links */
.home-chart-link:hover, .home-chart-link:focus-visible { color: var(--primary); }

/* The + at the bottom of the inventory menu (Hani #1 2026-10-19): Add device nearest, then ecosystem, infrastructure. */
.tree-add { position: relative; }
.tree-add > summary { list-style: none; cursor: pointer; font-size: 1.5rem; line-height: 1; width: 100%; justify-content: center; }
.tree-add > summary::-webkit-details-marker { display: none; }
.tree-add-panel { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 30; display: grid; gap: 2px; padding: var(--space-2); background: var(--panel); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.tree-add-panel button { display: grid; width: 100%; text-align: left; background: none; border: 0; border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); color: var(--text-primary); font: inherit; cursor: pointer; }
.tree-add-panel button:hover, .tree-add-panel button:focus-visible { background: var(--surface-subtle); color: var(--primary); }
.tree-add-panel button.is-primary span { font-weight: 700; }
.tree-add-panel small { color: var(--text-muted); }
[data-type-hidden] { display: none; }
/* Device setup steps (Hani #1 2026-10-19). */
.setup-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: var(--space-4); align-items: start; }
@media (max-width: 48rem) { .setup-layout { grid-template-columns: 1fr; } }
.setup-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--space-1) var(--space-3); }
.setup-map { max-height: 26rem; overflow: auto; margin-bottom: var(--space-3); }
.setup-cancel { margin-top: var(--space-4); }
.setup-cancel > summary { cursor: pointer; color: var(--danger); font-weight: 600; }

/* Inventory overview > Drafts (Hani #1 2026-10-19). */
.inventory-drafts .draft-actions { display: flex; gap: var(--space-1); flex-wrap: wrap; align-items: flex-start; }
.inventory-drafts .draft-delete { position: relative; }
.inventory-drafts .draft-delete > summary { list-style: none; }
.inventory-drafts .draft-delete-form { position: absolute; right: 0; z-index: 20; min-width: 18rem; padding: var(--space-3); background: var(--panel); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
/* Portal Host gauges in the header (Hani #1 2026-10-20). */
.host-gauges { position: relative; }
.host-gauges > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; padding: 2px 6px; border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--panel); }
.host-gauges > summary::-webkit-details-marker { display: none; }
.gauge-mini { position: relative; width: 2rem; height: 2rem; display: inline-block; }
.gauge-mini svg { width: 100%; height: 100%; }
.gauge-ring { fill: none; stroke: var(--neutral-surface); stroke-width: 4; }
.gauge-value { fill: none; stroke: var(--map-ok); stroke-width: 4; }
.gauge-value.is-warning { stroke: var(--map-warn); }
.gauge-value.is-critical { stroke: var(--map-down); }
.gauge-mini small { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 0.55rem; line-height: 1; font-weight: 700; color: var(--text-primary); }
.gauge-mini small i { font-style: normal; font-weight: 400; font-size: 0.42rem; color: var(--text-muted); }
.host-gauges-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: min(27rem, 92vw); padding: var(--space-3); background: var(--panel); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.host-gauges-title { margin: 0 0 var(--space-2); }
.host-gauges-list { display: grid; gap: var(--space-2); margin: 0 0 var(--space-2); }
.host-gauges-list dt { font-size: var(--font-sm); color: var(--text-muted); }
.host-gauges-list dd { margin: 0; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.host-gauges-list meter { width: 9rem; height: 0.7rem; }
.gauge-tag { font-size: 0.55rem; font-weight: 700; letter-spacing: 0.04em; color: var(--text-muted); padding: 0 2px; }   /* A2.2: the data server's gauges */

/* Address check troubleshooting (Hani #1 2026-10-20). */
.troubleshooting { margin: var(--space-2) 0 var(--space-3); padding: var(--space-3); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--panel); }
.troubleshooting > summary { cursor: pointer; font-weight: 600; }
.choice-card.is-included { border-color: var(--success); }

/* Settings menu on every Settings page, with ☰ to hide or show it (Hani #1 2026-10-21, roadmap R1) */
.settings-sidebar { display: grid; gap: var(--space-3); }
.settings-workspace.menu-collapsed { grid-template-columns: auto minmax(var(--space-0), 1fr); }
.settings-workspace.menu-collapsed .settings-navigation > a { display: none; }
/* the ☰ sits inside the menu card (Hani #1 2026-10-21) */
.settings-menu-toggle { justify-self: start; padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-md); background: var(--transparent); color: var(--text-primary); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.settings-menu-toggle:hover { background: var(--surface-subtle); }

/* Getting started (Hani #1 2026-10-21, roadmap R3) */
.getting-started { display: grid; gap: var(--space-6); grid-template-columns: minmax(16rem, 1fr) minmax(var(--space-0), 2fr); align-items: start; }
@media (max-width: 960px) { .getting-started { grid-template-columns: 1fr; } }
.gs-list, .gs-step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.gs-item { display: grid; grid-template-columns: 1.6rem 1fr; gap: var(--space-3); align-items: start; }
.gs-mark { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: var(--border-width) solid var(--border); font-weight: var(--weight-bold); font-size: 0.85rem; }
.gs-item.is-done .gs-mark, .gs-step.is-done .gs-mark { background: var(--success-surface); color: var(--success); border-color: transparent; }
.gs-item.is-action .gs-mark, .gs-item.is-running .gs-mark { background: var(--warning-surface); color: var(--warning); border-color: transparent; }
.gs-steps-head, .gs-step-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.gs-steps-head h2 { margin: 0; }
.gs-step-head h3 { margin: 0; flex: 1; }
.gs-progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 3px; background: var(--border); overflow: hidden; margin: var(--space-3) 0 var(--space-5); accent-color: var(--accent); appearance: none; }
.gs-progress::-webkit-progress-bar { background: var(--border); }
.gs-progress::-webkit-progress-value { background: var(--accent); }
.gs-progress::-moz-progress-bar { background: var(--accent); }
.gs-step { border: var(--border-width) solid var(--border); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); background: var(--panel); }
.gs-step.is-next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.gs-step.is-done { opacity: 0.85; }
.gs-step .form-actions { margin-top: var(--space-3); }
.gs-dismiss { margin-top: var(--space-5); }
.getting-started-link { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 0.85rem; white-space: nowrap; }
.home-getting-started { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap; border-left: 4px solid var(--accent); }

/* Access log: where sign-ins come from (Hani #1 2026-10-21, roadmap R4) */
.access-countries { display: grid; gap: var(--space-5); grid-template-columns: minmax(var(--space-0), 3fr) minmax(16rem, 2fr); align-items: start; margin-bottom: var(--space-5); }
@media (max-width: 960px) { .access-countries { grid-template-columns: 1fr; } }
.access-map { min-height: 320px; border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--surface-subtle); }
.access-unexpected td { background: var(--warning-surface); }
.whois-lookup { display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap; }
.whois-lookup .field { flex: 1; min-width: 14rem; }
.link-button { border: 0; background: var(--transparent); color: var(--primary); cursor: pointer; padding: 0 var(--space-1); font-size: 0.8rem; text-decoration: underline; }

/* Capacity (Hani #1 2026-10-21, roadmap R5) */
.capacity-summary { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-bottom: var(--space-5); }
.capacity-card meter { width: 100%; }
.capacity-figure { font-size: 1.6rem; font-weight: var(--weight-bold); margin: var(--space-1) 0; }
.capacity-forecast.is-soon { border-color: var(--danger); }
[data-capacity-kinds] meter { width: 6rem; vertical-align: middle; }
[data-capacity-history] meter { width: 5rem; vertical-align: middle; }

/* Portal Host box folds to one line with small gauges; Capacity is a tab (Hani #1 2026-10-21) */
details.portal-host > summary.portal-host-summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); cursor: pointer; list-style: none; }
details.portal-host > summary::-webkit-details-marker { display: none; }
.portal-host-title { font-weight: var(--weight-bold); font-size: 1.05rem; }
.portal-host-title::before { content: "▸ "; color: var(--text-muted); }
details.portal-host[open] .portal-host-title::before { content: "▾ "; }
.portal-host-mini { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 0.85rem; }
.portal-host-mini meter { width: 4rem; }
.portal-host-forecast.is-soon strong { color: var(--danger); }
.portal-host-badge { margin-left: auto; }
details.portal-host[open] > summary { margin-bottom: var(--space-3); }
.asset-capacity { margin-top: var(--space-4); }
.capacity-retention { display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap; }
[data-retention-projection] tr.is-current td { font-weight: var(--weight-bold); }
.capacity-compact { display: grid; gap: var(--space-2); }
.process-tables { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr)); }
.process-tables caption { text-align: left; font-weight: var(--weight-bold); padding-bottom: var(--space-2); }
/* Device files (R6): picture tiles, the logs' year / month / day tree, a remove confirmation inside a table row */
.device-pictures { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); margin-bottom: var(--space-3); }
.device-pictures figure { margin: 0; }
.device-pictures img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); background: var(--picture-tile); }
.device-pictures figcaption { margin-top: var(--space-1); }
.files-year, .files-month, .files-day { margin: var(--space-1) 0 var(--space-1) var(--space-3); }
.files-year { margin-left: 0; }
.inline-confirm { display: inline-block; }
.inline-confirm > summary { list-style: none; }
.inline-confirm > summary::-webkit-details-marker { display: none; }
.inline-confirm form { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-1); }
.data-server-overview { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); margin-bottom: var(--space-3); }
.data-server-overview .card { display: flex; flex-direction: column; gap: var(--space-1); }
/* F5: Tools as sub-tabs, each with a status dot */
.tool-tabs a { display: inline-flex; align-items: center; gap: var(--space-1); }
.tool-dot { width: 0.6rem; height: 0.6rem; border-radius: var(--radius-round); background: var(--neutral-surface); flex: none; }
.tool-dot-ok { background: var(--map-ok); }
.tool-dot-attention { background: var(--map-warn); }
.tool-dot-critical { background: var(--map-down); }
/* Logs in three levels and the Security tab (R7.2-R7.3) */
.log-levels-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem 1rem; }
.log-levels-grid .field select, .rule-form .log-levels-grid .field input { width: 100%; box-sizing: border-box; }
.log-origin { display: block; margin-top: .2rem; }
.log-origin-device, .log-origin-ecosystem { color: var(--warning); }
.button-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.plain-list { list-style: none; padding: 0; margin: .25rem 0; display: grid; gap: .25rem; }
.text-danger { color: var(--danger); }
tr.row-warning td { background: var(--warning-surface); }
.security-overview { margin: .75rem 0 1rem; }
/* Log viewer (R7.4) */
.log-filters { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; margin-bottom: .75rem; }
.log-filters .field { margin: 0; }
.log-search input { min-width: 16rem; }
.log-toolbar { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-bottom: .5rem; }
.log-live { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--success); }
.log-live .live-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--success); }
.log-live.is-paused, .log-live.is-paused .live-dot { color: var(--warning); background: transparent; }
.log-live.is-paused .live-dot { background: var(--warning); }
.log-live.is-error .live-dot { background: var(--danger); }
.log-table { font-size: .85rem; }
.log-table td { vertical-align: top; }
.log-row { cursor: pointer; }
.log-row .log-message { max-width: 48rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row.is-open .log-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.log-row.is-new td { background: var(--surface-subtle); }
.log-emergency .log-level, .log-alert .log-level, .log-critical .log-level, .log-error .log-level { color: var(--danger); font-weight: 600; }
.log-warning .log-level { color: var(--warning); font-weight: 600; }
.log-debug td { color: var(--text-muted); }
/* Log viewer: the table scrolls in its own box, the header stays (Hani #1 2026-10-24); From / To fields (R7.5) */
.log-table-wrap { max-height: 70vh; overflow: auto; border: 1px solid var(--border); border-radius: .5rem; }
.log-table thead th { position: sticky; top: 0; background: var(--surface-subtle); z-index: 1; }
.log-end { white-space: nowrap; font-size: .8rem; }
.log-short { width: 11rem; }
/* Address page (R8.1) */
.address-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-start; }
.address-actions .inline-confirm > summary { list-style: none; display: inline-flex; }
.address-link { margin-left: .25rem; text-decoration: none; }
/* Dashboard board (F10, Hani #1 2026-10-24): network map on top with the counts on its right, the geo map below. */
.dashboard-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(13rem, 16rem); grid-template-areas: "net counts" "geo geo"; gap: var(--space-3); margin-bottom: var(--space-6); }
.board-network { grid-area: net; padding: var(--space-3); min-width: 0; }
.board-counts { grid-area: counts; min-width: 0; }
.board-geo { grid-area: geo; min-width: 0; }
.board-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-2); }
.board-head h2 { margin: 0; font-size: 1.05rem; }
.board-fullscreen { margin-left: auto; padding: 6px; }
.home-charts-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin: 0; }
.home-charts-compact .home-chart { padding: var(--space-2); gap: var(--space-1); }
.home-charts-compact .home-chart h2 { font-size: var(--font-sm); }
.home-charts-compact .donut { width: 4.25rem; height: 4.25rem; }
.home-charts-compact .donut-legend { font-size: 0.72rem; }
.home-charts-compact .metadata { font-size: 0.7rem; }
.board-geo .home-device-map { margin: 0; }
@media (max-width: 64rem) { .dashboard-board { grid-template-columns: 1fr; grid-template-areas: "net" "counts" "geo"; } .home-charts-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Full screen: the network map fills the screen; counts and geo map float as small resizable panels. */
.dashboard-board.is-full { position: fixed; inset: 0; z-index: 60; margin: 0; display: block; background: var(--background); padding: var(--space-3); overflow: hidden; }
.dashboard-board.is-full .board-network { height: 100%; display: flex; flex-direction: column; }
.dashboard-board.is-full .network-map-canvas { flex: 1; overflow: auto; }
.dashboard-board.is-full .network-map-canvas svg.map-fit { max-height: none; height: 100%; }
.dashboard-board.is-full .board-counts, .dashboard-board.is-full .board-geo { position: absolute; z-index: 2; resize: both; overflow: auto; background: var(--panel); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: var(--space-2); min-width: 10rem; min-height: 6rem; }
.dashboard-board.is-full .board-counts { top: 4.5rem; right: 1.5rem; width: 20vw; height: 34vh; }
.dashboard-board.is-full .board-geo { bottom: 1.5rem; right: 1.5rem; width: 22vw; height: 26vh; }
.dashboard-board.is-full .board-geo .section-heading, .dashboard-board.is-full .board-geo .map-toolbar, .dashboard-board.is-full .board-geo .map-count, .dashboard-board.is-full .board-geo .map-panel { display: none; }
.dashboard-board.is-full .board-geo .home-device-map, .dashboard-board.is-full .board-geo .map-with-panel { height: 100%; display: block; }
.dashboard-board.is-full .board-geo .home-geo-map { height: 100%; }
.dashboard-board.is-full .home-charts-compact { grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); }
.settings-back { font-weight: 600; border-bottom: var(--border-width) solid var(--border); margin-bottom: var(--space-1); padding-bottom: var(--space-2); }
/* Inventory overview views (F10): heat map of the ecosystem's health */
.overview-modes { margin-bottom: var(--space-6); }
.heat-summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6); padding: var(--space-4); margin-bottom: var(--space-4); }
.heat-score { display: grid; justify-items: center; }
.heat-score strong { font-size: 2.25rem; line-height: 1; }
.heat-score.heat-ok strong { color: var(--success); }
.heat-score.heat-warn strong { color: var(--warning); }
.heat-score.heat-bad strong { color: var(--danger); }
.heat-counts { display: flex; flex-wrap: wrap; gap: var(--space-4); list-style: none; margin: 0; padding: 0; }
.heat-group { margin: var(--space-4) 0 var(--space-2); font-size: 1rem; }
.heat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: var(--space-2); }
.heat-tile { display: grid; gap: 2px; padding: var(--space-3); border-radius: var(--radius-md); text-decoration: none; color: var(--text-primary); border: var(--border-width) solid var(--border); background: var(--surface); border-left-width: 6px; }
.heat-tile small { color: var(--text-muted); font-size: 0.72rem; }
.heat-tile.state-online { border-left-color: var(--success); background: var(--success-surface); }
.heat-tile.state-attention { border-left-color: var(--warning); background: var(--warning-surface); }
.heat-tile.state-offline { border-left-color: var(--danger); background: var(--danger-surface); }
.heat-tile.state-unknown { border-left-color: var(--border-strong); }
.heat-tile:hover, .heat-tile:focus-visible { box-shadow: var(--shadow-md); }
/* Log rules (R8.2) */
.rule-form fieldset { display: grid; gap: var(--space-2); }
.rule-count { margin-top: var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); align-items: end; }
.rule-count .field select { width: auto; }
.rule-form .log-levels-grid { align-items: start; }
.rule-form .field { align-content: start; }
.rule-form .field > span { display: inline-flex; align-items: center; gap: var(--space-1); }
.rule-form fieldset > .field select { max-width: 40rem; }
.rule-preview { margin-top: var(--space-4); }
.rule-pending { border-left: 4px solid var(--warning); margin-bottom: var(--space-4); }
.rule-new { position: relative; }
.rule-new .plain-list { position: absolute; right: 0; z-index: 10; background: var(--panel); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); padding: var(--space-3); min-width: 18rem; box-shadow: var(--shadow-md); }
/* Update page (F13.1-F13.2) */
.maintenance-body { background: var(--background); }
.maintenance { max-width: 52rem; margin: 0 auto; padding: var(--space-8) var(--space-4); display: grid; gap: var(--space-4); }
.maintenance-card { background: var(--panel); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); padding: var(--space-6); }
.maintenance-card h1 { margin: var(--space-1) 0 var(--space-2); }
.maintenance-progress progress { width: 100%; height: 1rem; }
.maintenance-games { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem); gap: var(--space-4); align-items: start; }
.worm-game canvas { width: 100%; max-width: 360px; height: auto; border: var(--border-width) solid var(--border); border-radius: var(--radius-sm); touch-action: none; cursor: pointer; }
.runaway-area { position: relative; height: 15rem; border: var(--border-width) dashed var(--border); border-radius: var(--radius-md); overflow: hidden; }
.runaway { position: absolute; left: 30%; top: 40%; transition: left .15s ease, top .15s ease; white-space: nowrap; }
@media (max-width: 40rem) { .maintenance-games { grid-template-columns: 1fr; } }

/* F13.3: scheduled updates */
.update-schedule { margin-top: .75rem; }
.update-schedule summary { cursor: pointer; }
.update-schedule .choice-list { border: 0; padding: 0; margin: .25rem 0; display: grid; gap: .4rem; }
.update-scheduled { margin-top: .75rem; padding: .6rem .8rem; border-radius: 8px; border: 1px solid var(--border); }
.update-scheduled.is-skipped { border-color: var(--warning); }
.update-soon-banner { margin: 0 0 1rem; padding: .6rem .9rem; border-radius: 8px; background: var(--warning-surface); border: 1px solid var(--warning); }

/* F12: update server heartbeat */
.update-servers .dot { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.update-origin { margin: .5rem 0 0; padding-left: 1.1rem; }

/* R9: Tools > Updates */
.update-packages-wrap { max-height: 28rem; overflow: auto; border: 1px solid var(--border); border-radius: 8px; margin-top: .75rem; }
.update-packages { width: 100%; }
.update-packages td.identifier { font-size: .85em; }

/* R10: Settings > Security events */
.events-filter { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: end; }
.events-day { margin: 1.25rem 0 .25rem; font-size: 1rem; }
.events-table { max-height: 32rem; overflow: auto; }
.events-request code { word-break: break-all; font-size: .85em; }
.events-agent { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85em; }
.inline-form { display: inline; }

/* Donut charts (Hani #1 2026-10-24): the header gauges' ring, larger, for CPU, memory and disk. */
.donut { margin: 0; display: flex; align-items: center; gap: .75rem; min-width: 0; }
.donut-ring { position: relative; flex: none; width: 4.5rem; height: 4.5rem; }
.donut-sm .donut-ring { width: 3rem; height: 3rem; }
.donut-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-ring .gauge-ring { stroke-width: 3.5; }
.donut-value { fill: none; stroke: var(--map-ok); stroke-width: 3.5; stroke-linecap: round; }
.donut-value.is-warning { stroke: var(--map-warn); }
.donut-value.is-critical { stroke: var(--map-down); }
.donut-figure { position: absolute; inset: 0; display: grid; place-content: center; font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.donut-sm .donut-figure { font-size: .8rem; }
.donut-figure small { font-size: .6em; font-weight: 400; }
.donut figcaption { display: grid; gap: .1rem; min-width: 0; }
.donut figcaption small { color: var(--text-muted); font-size: .8rem; }
.capacity-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .75rem 1.25rem; align-items: center;
  padding: .9rem 1.1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: .75rem; }
.capacity-summary .capacity-forecast p { margin: .1rem 0; }
.capacity-summary .capacity-figure { font-size: 1.25rem; font-weight: 700; }
.capacity-tabs { margin: .5rem 0 .75rem; }
.portal-host-donuts { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: .5rem 0; }
.portal-host-summary .donut { gap: .4rem; }
.portal-host-summary .donut figcaption strong { font-size: .8rem; font-weight: 600; }

/* R13.1: device update jobs */
.update-steps { margin: .4rem 0 .2rem; padding-left: 1.2rem; font-size: .9rem; }
/* R36.4: Windows Update progress (one update at a time: real steps) */
.update-progress { display: flex; align-items: center; gap: .6rem; margin: .5rem 0 .25rem; font-variant-numeric: tabular-nums; }
.update-progress progress { flex: 1; height: .7rem; border: 0; border-radius: 999px; overflow: hidden; background: var(--surface-subtle); accent-color: var(--primary); }
.update-progress progress::-webkit-progress-bar { background: var(--surface-subtle); border-radius: 999px; }
.update-progress progress::-webkit-progress-value { background: var(--primary); border-radius: 999px; transition: width .6s ease; }
.update-progress progress::-moz-progress-bar { background: var(--primary); border-radius: 999px; }
/* Hani #1 2026-10-28: eye button on password fields */
.password-field { position: relative; display: block; }
.password-field > input { width: 100%; padding-right: 2.6rem; }
.password-eye { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 0; border-radius: .4rem; background: transparent; color: var(--text-muted); cursor: pointer; }
.password-eye:hover { color: var(--text-primary); background: var(--surface-subtle); }
.password-eye:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 1px; }
.password-eye[aria-pressed="true"] { color: var(--primary); }
.update-steps time { color: var(--text-muted); font-variant-numeric: tabular-nums; margin-right: .35rem; }
.update-step-by-step { margin: .75rem 0; }
.update-history-title { margin-top: 1.5rem; }

/* F16 (Hani #1 2026-10-25): update page - figures, steps, one game at a time picked from thumbnails, speed */
.maintenance-figures { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.maintenance-percent { font-size: 2rem; line-height: 1.1; }
.maintenance-steps { margin-top: var(--space-2); }
.maintenance-steps ol { margin: var(--space-2) 0; padding-left: 1.4rem; columns: 2; font-size: .9rem; }
.maintenance-steps li { color: var(--text-muted); }
.maintenance-steps li.is-done { color: var(--success); }
.maintenance-steps li.is-done::marker { content: "✓  "; }
.maintenance-steps li.is-current { color: var(--text-primary); font-weight: 700; }
.play-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.play-speed { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; }
.game-thumbs { display: flex; gap: var(--space-2); margin: var(--space-3) 0; flex-wrap: wrap; }
.game-thumb { display: grid; justify-items: center; gap: .25rem; padding: .4rem .6rem; border: var(--border-width) solid var(--border);
  border-radius: var(--radius-md); background: var(--surface); cursor: pointer; font-size: .8rem; color: var(--text-primary); }
.game-thumb svg { width: 3.5rem; height: 2.3rem; fill: var(--success); }
.game-thumb svg .g-head { fill: var(--primary); } .game-thumb svg .g-food { fill: var(--danger); }
.game-thumb svg .g-line { fill: none; stroke: var(--text-muted); stroke-width: 2; }
.game-thumb.is-selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.game-stage canvas { width: 100%; max-width: 36rem; height: auto; border-radius: var(--radius-md); touch-action: none; }
.game-stage .runaway-area { min-height: 15rem; }
.form-row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--space-3); }
.update-one-click { padding: var(--space-4); margin: var(--space-3) 0; }
.update-one-click h3 { margin: 0; }

/* Hani #1 2026-10-25: Updates tab - Check for updates / Update…, the account and reason asked in a popup */
.update-toolbar { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.update-toolbar .field-help { margin: 0; flex: none; }   /* a column since alpha.254: a basis would become height */
.update-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.update-actions form { margin: 0; }
.form-dialog { width: min(36rem, calc(100vw - 2rem)); border: var(--border-width) solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-6); background: var(--panel); color: var(--text-primary); }
.form-dialog::backdrop { background: var(--overlay); }
.form-dialog.dialog-wide { width: min(64rem, calc(100vw - 2rem)); max-height: calc(100vh - 4rem); overflow: auto; }
.bulk-bar .bulk-bar-gap { width: 1px; align-self: stretch; margin: 0 var(--space-1); background: var(--border); }
.dialog-form { display: grid; gap: var(--space-5); }
.dialog-form h2 { margin: 0; }
.dialog-form .field { display: grid; gap: var(--space-1); }
.dialog-form .field-label { font-weight: 600; }
.dialog-form .field small.field-help { margin: 0; }

/* R14B.2: device list status columns */
.device-list td { vertical-align: middle; }
.device-list .device-version { font-size: .85rem; color: var(--text-muted); white-space: nowrap; }
.device-list a.status-badge { text-decoration: none; white-space: nowrap; }

/* R14B.3: selection and actions on the device list */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: var(--space-3) 0; }
.bulk-bar input[type=search] { flex: 1 1 16rem; width: auto; max-width: 28rem; }
.bulk-bar select { width: auto; }
.bulk-bar .check-row { margin: 0; white-space: nowrap; }
.bulk-col { width: 2rem; }
.row-action { font-size: .85rem; }
.bulk-run { padding: var(--space-3) var(--space-4); margin: var(--space-3) 0; }
.bulk-run.is-running { border-color: var(--warning); }
.bulk-run.is-finished { display: flex; flex-direction: row-reverse; gap: var(--space-3); align-items: flex-start; }
.bulk-run.is-finished details { flex: 1; min-width: 0; }
.bulk-run.is-finished summary { cursor: pointer; }
.bulk-items { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: grid; gap: .3rem; font-size: .9rem; }
.bulk-account { border: var(--border-width) solid var(--border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); display: grid; gap: var(--space-4); }
.bulk-account legend { font-weight: 600; padding: 0 .3rem; }

/* R13.4 Settings > Update plans */
.plan-days { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.plan-delete { margin-top: var(--space-6); }
.plan-run { margin-bottom: var(--space-3); }
.plan-run > summary { cursor: pointer; }
.update-account-facts { margin: var(--space-2) 0 var(--space-3); padding-left: var(--space-5); }
.update-account-facts li { margin-bottom: var(--space-1); }
.ping-panel { margin-bottom: var(--space-4); }
.ping-availability { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: var(--space-3) 0; }
svg[data-map-editable] g.map-node[data-parent] { cursor: grab; }
svg[data-map-editable] g.map-node.is-dragging { cursor: grabbing; opacity: .85; }
.map-edit-help { margin-top: var(--space-2); }
.ipam-depth-1 td:first-child { padding-left: calc(var(--space-3) + 1 * var(--space-5)); }
.ipam-depth-2 td:first-child { padding-left: calc(var(--space-3) + 2 * var(--space-5)); }
.ipam-depth-3 td:first-child { padding-left: calc(var(--space-3) + 3 * var(--space-5)); }
.ipam-depth-4 td:first-child { padding-left: calc(var(--space-3) + 4 * var(--space-5)); }
.ipam-depth-5 td:first-child { padding-left: calc(var(--space-3) + 5 * var(--space-5)); }
.ipam-depth-6 td:first-child { padding-left: calc(var(--space-3) + 6 * var(--space-5)); }
.ipam-actions { display: flex; flex-direction: column; gap: var(--space-3); }
.ipam-edit td { background: var(--surface-subtle); }
.ipam-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); }
.ipam-row .field { flex: 1 1 10rem; margin: 0; }
.ipam-row .field:first-of-type { flex-basis: 16rem; }
.ipam-row button, .ipam-row .button { flex: none; }
.ipam-table .status-badge, .ipam-table code { white-space: nowrap; }
.map-with-waiting { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: var(--space-3); align-items: start; }
@media (max-width: 720px) { .map-with-waiting { grid-template-columns: 1fr; } }
.map-waiting { position: static; max-width: none; background: var(--surface); border: var(--border-width) solid var(--amber-500); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); box-shadow: var(--shadow-md); z-index: 2; }
.map-waiting ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.map-waiting-title { margin: 0 0 var(--space-2); }
.map-waiting-device { display: grid; grid-template-columns: auto 1fr; gap: 0 var(--space-2); align-items: center; padding: var(--space-2); border: var(--border-width) solid var(--border); border-radius: var(--radius-sm); background: var(--surface-subtle); }
.map-waiting-device > small, .map-waiting-device > details, .map-waiting-device > form { grid-column: 2; }
.map-waiting-device[tabindex] { cursor: grab; touch-action: none; }
.map-waiting-device.is-dragging { opacity: .6; }
.map-waiting-device.is-focus { border-color: var(--primary); }
.map-badge { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 999px; background: var(--amber-500); color: var(--slate-950, var(--text-primary)); font-weight: 700; font-size: .8rem; }
.map-advice summary { cursor: pointer; font-size: .8rem; color: var(--warning-text, var(--text-muted)); }
.map-advice p { font-size: .8rem; margin: var(--space-1) 0 0; }
svg g.map-node.is-drop-target rect:first-of-type { stroke: var(--primary); stroke-width: 3; }
.map-line.is-manual { stroke-dasharray: 2 4; opacity: .8; }
.map-drag-ghost { position: fixed; pointer-events: none; z-index: 1000; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); background: var(--surface); border: var(--border-width) solid var(--amber-500); box-shadow: var(--shadow-md); font-weight: 600; }
.map-waiting-device[tabindex] { user-select: none; }
.update-changes > li { margin-bottom: var(--space-3); }
.update-change-where, .update-change-test { margin: var(--space-1) 0 0; font-size: .9rem; color: var(--text-muted); }
/* Hani #1 2026-10-25: everything in the game box centred - the heading and speed, the thumbnails, the game and its text */
.maintenance-play { text-align: center; }
.maintenance-play .play-head { justify-content: center; flex-direction: column; }
.maintenance-play .game-thumbs { justify-content: center; }
.maintenance-play .game-stage { display: flex; flex-direction: column; align-items: center; }
.maintenance-play .game-stage canvas { display: block; margin: 0 auto; }
.maintenance-play .game-stage .runaway-area { width: 100%; max-width: 36rem; margin: 0 auto; }
.maintenance-play .game-stage .metadata { max-width: 36rem; margin-left: auto; margin-right: auto; }
.map-cloud path { fill: var(--amber-300); fill-opacity: .55; stroke: var(--amber-500); stroke-width: 1; }
.map-cloud.kind-public path { fill: var(--slate-200, var(--border)); stroke: var(--slate-500, var(--text-muted)); }
.map-cloud.has-color path { fill-opacity: .6; }
.map-clouds { cursor: pointer; }
.map-clouds:hover path, .map-clouds:focus path { fill-opacity: .85; stroke-width: 1.5; }
.map-cloud-count { font-size: 9px; font-weight: 700; fill: var(--text-muted); }
g.map-link[data-link-ref] .map-hit { cursor: pointer; }
.map-summary { margin-top: var(--space-3); }
.map-summary h3 { margin: 0 0 var(--space-2); }
.map-summary table { width: 100%; }
.map-summary .map-summary-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--space-3); }
.ipam-toggle { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; margin-right: var(--space-1); border: var(--border-width) solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-primary); cursor: pointer; font-size: .75rem; line-height: 1; }
.ipam-toggle:hover { border-color: var(--primary); }
.ipam-toggle-space { display: inline-block; width: 1.4rem; margin-right: var(--space-1); }
.ipam-tree-help { margin-bottom: var(--space-2); }
.map-summary-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.map-summary-blocks, .map-summary-links { margin: 0; padding-left: var(--space-4); }
.map-summary-assign { margin-top: var(--space-3); }
.map-info-bar { display: flex; justify-content: flex-end; margin-top: var(--space-2); }
.map-summary-actions { display: flex; gap: var(--space-2); }
.map-picker { margin-top: var(--space-4); border-top: var(--border-width) solid var(--border); padding-top: var(--space-3); }
.map-picker-results { list-style: none; margin: 0; padding: 0; max-height: 16rem; overflow-y: auto; border: var(--border-width) solid var(--border); border-radius: var(--radius-sm); }
.map-picker-results li { padding: var(--space-1) var(--space-2); border-bottom: var(--border-width) solid var(--border); }
.map-picker-results li:last-child { border-bottom: 0; }
.map-picker-results code { margin-right: var(--space-2); }
.map-picker-selected { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin: var(--space-3) 0; }
.map-picker-chip { display: inline-flex; align-items: center; gap: var(--space-1); padding: 0 var(--space-2); border: var(--border-width) solid var(--primary); border-radius: var(--radius-round); font-family: var(--font-mono, monospace); font-size: .85rem; }
.map-block-edit { font-size: .85rem; }
.map-token { fill: var(--primary); opacity: .85; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .map-token { display: none; } }
svg[data-map-editable] .map-grip { fill: var(--surface); stroke: var(--primary); stroke-width: 2; cursor: grab; opacity: .55; }
svg[data-map-editable] .map-grip:hover { opacity: 1; }
.map-pull { stroke: var(--primary); stroke-width: 2; stroke-dasharray: 5 4; pointer-events: none; }
.ipam-whois { border-top: var(--border-width) solid var(--border); padding-top: var(--space-2); }
.ipam-registries { margin-top: var(--space-5); }
.ipam-registries summary { cursor: pointer; }
/* IP addresses: add through popups (Hani #1 2026-10-25) */
.ipam-toolbar { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.registry-choices { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.registry-choices legend { font-weight: 600; margin-bottom: var(--space-2); }
.registry-custom summary { cursor: pointer; }
.form-dialog textarea { font-family: var(--font-mono); }
.router-sync { border-left: 3px solid var(--success); padding-left: var(--space-3); margin-bottom: var(--space-3); }
.router-sync.is-failing { border-left-color: var(--danger); }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-2) 0; }
.row-actions { white-space: nowrap; }
.row-actions .inline-form { display: inline; }
.log-dialog { width: min(72rem, calc(100vw - 2rem)); }
.page-heading-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-start; }
.address-summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-2) 0 0; }
.breadcrumb { margin-bottom: var(--space-2); }
.bulk-bar input { width: auto; flex: 0 1 18rem; }
/* The account pictogram (Hani #1 2026-10-26) with the number of people signed in now */
.account-menu { position: relative; }
.account-menu > summary { list-style: none; cursor: pointer; position: relative; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-badge { position: absolute; top: calc(var(--space-1) * -1); right: calc(var(--space-1) * -1); display: grid; min-width: var(--space-5); height: var(--space-5); padding: 0 var(--space-1); border: 2px solid var(--surface); border-radius: 999px; place-items: center; background: var(--success-surface); color: var(--success); font-size: var(--font-xs); font-weight: var(--weight-bold); }
.account-panel { position: absolute; z-index: 8; top: calc(100% + var(--space-2)); right: 0; width: min(18rem, calc(100vw - var(--space-6))); padding: var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-lg); display: grid; gap: var(--space-2); }
.account-panel-name { margin: 0; }
.camera-capture { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.camera-dialog { width: min(48rem, calc(100vw - 2rem)); }
.camera-video { width: 100%; max-height: 70vh; background: var(--neutral-surface); border-radius: var(--radius-md); }
.check-list { list-style: none; padding: 0; margin: var(--space-3) 0; display: grid; gap: var(--space-2); }
.connection-check .trace summary { cursor: pointer; font-weight: var(--weight-bold); }
/* Repair the connection: the steps in order (Hani #1 2026-10-26) */
.repair { border-left: 4px solid var(--danger); }
.repair-steps { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: grid; gap: var(--space-3); }
.repair-step { display: grid; grid-template-columns: 2rem 1fr; gap: var(--space-3); align-items: start; }
.repair-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; border: 2px solid var(--border); font-weight: var(--weight-bold); }
.repair-step.is-done .repair-mark { background: var(--success-surface); color: var(--success); border-color: var(--success); }
.repair-step.is-current .repair-mark { background: var(--danger-surface); color: var(--danger); border-color: var(--danger); }
.repair-step.is-later { color: var(--text-muted); }
.portal-host-mini.is-attention strong { color: var(--warning); }
/* Settings grouped by category (Hani #1 2026-10-26) */
.settings-nav-group { margin: var(--space-3) var(--space-3) var(--space-1); color: var(--text-muted); font-size: 0.72rem; font-weight: var(--weight-bold); letter-spacing: 0.08em; text-transform: uppercase; }
.settings-workspace.menu-collapsed .settings-nav-group { display: none; }
.settings-group { margin-bottom: var(--space-6); }
.settings-group > h3 { margin: 0 0 var(--space-1); }
.settings-group > .field-help { margin: 0 0 var(--space-3); }
.settings-nav-group { grid-column: 1 / -1; }
.manual-steps > summary { cursor: pointer; font-weight: var(--weight-bold); }
/* New / Bug fix tags, 24 hours after this Portal installed the release (Hani #1 2026-10-26) */
.fresh-tag { display: inline-block; margin-left: var(--space-1); padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.68rem; font-weight: var(--weight-bold); letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; line-height: 1.5; }
.fresh-tag.is-new { background: var(--primary); color: var(--primary-foreground); }
.fresh-tag.is-fix { background: var(--success-surface); color: var(--success); }
/* Report an issue (R30, Hani #1 2026-10-26) */
.report-issue { display: grid; gap: var(--space-5); max-width: 52rem; }
.report-kinds { display: flex; flex-wrap: wrap; gap: var(--space-2); border: 0; padding: 0; margin: 0; }
.report-kinds legend { font-weight: var(--weight-bold); margin-bottom: var(--space-2); }
.choice-pill { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: var(--border-width) solid var(--border); border-radius: 999px; cursor: pointer; }
.report-shot-preview { margin: 0 0 var(--space-3); display: grid; gap: var(--space-2); }
.report-shot-preview img { max-width: 100%; max-height: 22rem; object-fit: contain; border: var(--border-width) solid var(--border); border-radius: var(--radius-md); }
.report-menu-wrap { position: relative; }
.report-menu { position: absolute; right: 0; top: calc(100% + var(--space-2)); z-index: 30; display: grid; gap: var(--space-2); min-width: 16rem; padding: var(--space-3); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-md); }
.report-form fieldset.report-kinds { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* Networks on a link (Hani #1 2026-10-26): search, smaller part, combine, connected or routed */
.net-picker .net-chosen-table { width: 100%; border-collapse: collapse; }
.net-picker .net-chosen-table td { padding: var(--space-1) var(--space-2); border-bottom: var(--border-width) solid var(--border); vertical-align: middle; }
.net-picker .net-chosen-table select { min-width: 12rem; }
.net-picker .net-results, .net-picker .net-parts { list-style: none; margin: 0; padding: 0; max-height: 22rem; overflow-y: auto; border: var(--border-width) solid var(--border); border-radius: var(--radius-sm); }
.net-picker .net-results > li { padding: var(--space-1) var(--space-2); border-bottom: var(--border-width) solid var(--border); }
.net-picker .net-results > li:last-child { border-bottom: 0; }
.net-picker .net-results .check-row { display: inline-flex; gap: var(--space-2); align-items: baseline; }
.net-picker .net-smaller { margin: var(--space-2) 0 var(--space-2) var(--space-5); padding: var(--space-3); display: grid; gap: var(--space-2); }
.net-picker .net-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--space-1) var(--space-3); padding: var(--space-2); max-height: 20rem; }
.net-picker .net-parts li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.net-picker .net-parts .check-row { display: inline-flex; align-items: center; gap: var(--space-2); }
.net-picker .net-part:not(.state-available) code { color: var(--text-muted); }
.net-picker .net-finder summary { cursor: pointer; padding: var(--space-2) 0; }
.net-picker .net-finder[open] { display: grid; gap: var(--space-2); }
/* Hani #1 2026-10-27: the one "Add the selected" stays in view while long lists scroll */
.net-picker .net-bar { position: sticky; top: calc(var(--control-height) + var(--space-6)); z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); background: var(--surface); border: var(--border-width) solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.net-picker .net-bar .check-row { margin: 0; }
/* Hani #1 2026-10-27: the device menu reads like the device tabs (larger, bolder), and the + to add a device stays
   on the folded rail; its menu opens beside the rail */
.inventory-tree-panel .inventory-tree-node { font-size: var(--font-md); font-weight: var(--weight-medium); padding-top: 6px; padding-bottom: 6px; }
.inventory-tree-panel .inventory-tree-node.is-selected { font-weight: var(--weight-bold); }
.inventory-tree-panel .inventory-tree-section { font-size: var(--font-md); }
.inventory-tree-panel .inventory-tree-meta { font-size: var(--font-sm); font-weight: normal; }
.inventory-layout.tree-collapsed .inventory-tree-desktop > .tree-footer { display: grid; position: static; margin-top: var(--space-2); padding: 0; border-top: 0; background: none; }
.inventory-layout.tree-collapsed .tree-footer .tree-ecosystems { display: none; }
.inventory-layout.tree-collapsed .tree-add > summary { width: 2.25rem; height: 2.25rem; padding: 0; font-size: 1.25rem; }
.inventory-layout.tree-collapsed .tree-add-panel { left: calc(100% + 8px); right: auto; top: 0; bottom: auto; width: 17rem; }
/* the folded rail scrolls nothing, so its + menu may show outside it (it was clipped inside the rail, 2026-10-27) */
.inventory-layout.tree-collapsed .inventory-tree-desktop { overflow: visible; max-height: none; }
.inventory-layout.tree-collapsed .tree-add[open] { z-index: 40; }
/* Hani #1 2026-10-27: the chosen device and everything related stand out; the rest fades */
svg.is-dimmed g.map-node, svg.is-dimmed g.map-link, svg.is-dimmed g.map-clouds { transition: opacity .15s; }
svg.is-dimmed g.map-node:not(.is-related), svg.is-dimmed g.map-link:not(.is-related), svg.is-dimmed g.map-clouds:not(.is-related) { opacity: .28; }
svg.is-dimmed g.map-link.is-related .map-line { opacity: 1; filter: drop-shadow(0 0 2px var(--map-focus)); }
svg.is-dimmed g.map-node.is-related rect { stroke-width: 2.2; }
/* Hani #1 2026-10-28: the relationship editor as a popup in the add-device setup */
.editor-dialog { width: min(52rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; }
.editor-dialog [data-relationship-step] { border: 0; padding: 0; box-shadow: none; }
/* Hani #1 2026-10-28: the installed version (with its changes) in the header's server panel; the panel is wider */
.host-gauges-release dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; }
.host-gauges-release small { flex-basis: 100%; }
.link-button { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--primary); text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--primary-hover); }
/* Hani #1 2026-10-28: the Settings menu uses the dashboard menu's toolbar; folded, the same narrow icon column */
.settings-navigation > .settings-head { margin-bottom: var(--space-1); }
.settings-workspace.menu-collapsed .settings-navigation { width: max-content; }
.settings-workspace.menu-collapsed .settings-head { flex-direction: column; margin: 0; }
.settings-workspace.menu-collapsed .settings-head .view-modes { flex-direction: column; }
/* R37 (Hani #1 2026-10-28): device order - drag within the same parent's list; the list shows the order and nesting */
[data-order-asset][draggable="true"] { cursor: grab; }
[data-order-asset].is-dragging { opacity: .45; }
li.drop-before > :first-child, tr.drop-before > td { box-shadow: inset 0 3px 0 var(--primary); }
li.drop-after > :first-child, tr.drop-after > td { box-shadow: inset 0 -3px 0 var(--primary); }
.drag-handle { display: inline-block; margin-right: .35rem; color: var(--text-muted); cursor: grab; letter-spacing: -2px; }
.order-indent[data-depth="1"] { padding-left: 1.6rem; } .order-indent[data-depth="2"] { padding-left: 2.8rem; }
.order-indent[data-depth="3"] { padding-left: 4rem; } .order-indent[data-depth="4"], .order-indent[data-depth="5"], .order-indent[data-depth="6"] { padding-left: 5rem; }
.device-order { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sort-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: var(--space-2); font-size: .85rem; color: var(--text-muted); }
.sort-switch .view-mode { width: auto; padding: 0 .55rem; font-size: .8rem; }
.sort-switch .view-mode.is-on { color: var(--primary); border-color: var(--primary); background: var(--surface-subtle); font-weight: 700; }
.device-order-card .order-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2); }
.order-input { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; } .order-input input { width: 5rem; flex: none; }
/* R12.8 (Hani #1 2026-10-27/28): containers on the network map - a soft frame in the container's colour, behind the
   devices; a stripe in the colour on each member; the map toolbar (top left) */
.map-container rect { fill-opacity: .07; stroke-opacity: .55; stroke-width: 1.5; stroke-dasharray: 6 4; }
.map-container text { font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.map-stripe { pointer-events: none; }
.map-toolbar { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-2); }
.container-colors { display: flex; flex-wrap: wrap; gap: .4rem; }
.container-colors label { display: inline-flex; align-items: center; gap: .25rem; cursor: pointer; }
.container-swatch { display: inline-block; width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.container-members { max-height: 14rem; overflow: auto; display: grid; gap: .2rem; padding: .4rem; border: var(--border-width) solid var(--border); border-radius: var(--radius-md); }
.container-list { display: grid; gap: .4rem; margin: 0 0 var(--space-2); padding: 0; list-style: none; }
.container-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.swatch-2563eb { background: var(--container-2563eb); }
.swatch-16a34a { background: var(--container-16a34a); }
.swatch-d97706 { background: var(--container-d97706); }
.swatch-dc2626 { background: var(--container-dc2626); }
.swatch-7c3aed { background: var(--container-7c3aed); }
.swatch-0891b2 { background: var(--container-0891b2); }
.swatch-db2777 { background: var(--container-db2777); }
.swatch-4b5563 { background: var(--container-4b5563); }

/* R33.2 NEXXKEY: the one-time recovery key and the authenticator secret, large and easy to copy by hand */
.recovery-key code { display: inline-block; font-size: 1.15rem; letter-spacing: .08em; padding: .6rem .8rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); user-select: all; word-break: break-all; }
.nexxkey-card .form-actions { flex-wrap: wrap; }

/* R41: the public certificate's days left in the header, beside the gauges */
.certificate-badge { display: inline-flex; align-items: center; gap: .2rem; padding: .15rem .4rem; border: var(--border-width) solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); text-decoration: none; line-height: 1; }
.certificate-badge small { display: grid; text-align: center; font-size: .6rem; font-weight: 700; }
.certificate-badge small i { font-style: normal; font-weight: 400; font-size: .42rem; color: var(--text-muted); }
.certificate-badge.is-warning { border-color: var(--warning); background: var(--warning-surface); }
.certificate-badge.is-critical { border-color: var(--danger); background: var(--danger-surface); }
.certificate-badge:hover, .certificate-badge:focus-visible { border-color: var(--border-strong); }

/* Hani #1 2026-10-29: the side menus (devices and Settings) share one width, wider by default and adjustable by
   dragging their right edge (side-menu-width.js; remembered in this browser, double-click resets). */
.settings-sidebar .settings-navigation { position: relative; }
.side-menu-resizer { position: absolute; top: var(--space-0); right: calc(-1 * var(--space-2)); bottom: var(--space-0); width: var(--space-2); cursor: col-resize; touch-action: none; }
.side-menu-resizer::after { content: ""; position: absolute; top: 25%; bottom: 25%; left: 50%; width: 2px; border-radius: var(--radius-round); background: var(--transparent); transition: background var(--transition-fast); }
.side-menu-resizer:hover::after, .side-menu-resizer.is-dragging::after, .side-menu-resizer:focus-visible::after { background: var(--border-strong); }
.side-menu-resizer:focus-visible { outline: none; }
.settings-workspace.menu-collapsed .side-menu-resizer, .inventory-layout.tree-collapsed .side-menu-resizer { display: none; }
.view-home { order: -1; }
@media (max-width: 64rem) { .side-menu-resizer { display: none; } }

/* R22.1 (Hani #1 2026-10-29): the repair panel as one line (timer, Refresh), expandable; quiet while it usually clears. */
.repair > summary.repair-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); cursor: pointer; list-style: none; }
.repair > summary.repair-bar::-webkit-details-marker { display: none; }
.repair-short { flex: 1 1 18rem; min-width: var(--space-0); color: var(--text-muted); }
.repair-timer { font-variant-numeric: tabular-nums; white-space: nowrap; }
.repair-dot { width: .7rem; height: .7rem; border-radius: var(--radius-round); background: var(--danger); flex: none; }
.repair-dot.is-waiting { background: var(--warning); }
.repair.is-quiet { padding-block: var(--space-2); }
.repair[open] > summary.repair-bar { margin-bottom: var(--space-3); padding-bottom: var(--space-3); border-bottom: var(--border-width) solid var(--border); }
.repair-bar-only > summary.repair-bar { cursor: default; }
.repair.is-quiet { border-left-color: var(--warning); }
/* Hani #1 2026-10-31: long lists scroll inside a box of limited height, the header stays visible */
.scroll-box { max-height: min(60vh, 32rem); overflow: auto; }
.scroll-box thead th { position: sticky; top: 0; z-index: 1; background: var(--panel); }
/* Hani #1 2026-10-31: + New rule on the left, where the eye starts; its menu opens to the right */
.rule-new-left .plain-list { right: auto; left: 0; }
/* Settings search (Hani #1 2026-10-31) */
.settings-search { display: block; margin: var(--space-2) 0; }
.settings-search input { width: 100%; }
.settings-search-results a small { display: block; }
.settings-search-page { max-width: 32rem; margin-bottom: var(--space-4); }
/* 2026-11-02 browser review: a folded Settings menu on a phone is the ☰ row above the page, not a column beside it. */
@media (max-width: 720px) { .settings-workspace.menu-collapsed { grid-template-columns: 1fr; } .settings-workspace.menu-collapsed .settings-head, .settings-workspace.menu-collapsed .settings-head .view-modes { flex-direction: row; flex-wrap: wrap; } }

/* R59.2: log classes */
.log-classes { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin-bottom: 0.75rem; }
.log-class-count { text-decoration: none; color: inherit; }
.log-class-count.is-selected { font-weight: 600; }
/* alpha.306 (browser review 2026-11-04): the Class badge broke inside the word ("Unkno/wn") at about 1300 px. */
.log-table .status-badge, .log-classes .status-badge { white-space: nowrap; overflow-wrap: normal; }
.log-normal-sample { white-space: pre-wrap; word-break: break-word; max-height: 8rem; overflow: auto; }
.log-normal-rules { margin-top: 1rem; }

/* alpha.298: Prepare progress */
.update-prep-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 0.5rem; }
.update-prep-progress progress { width: min(320px, 100%); height: 0.6rem; }
/* alpha.306 (browser review 2026-11-04): at 390 px the header (gauges, DB/LOG, certificate, bell, account, Sign out) ran off
   the right edge and the whole page scrolled sideways. On narrow screens it wraps under the brand, buttons keep their
   own width, and a gauge panel opens across the screen instead of past its edge. */
@media (max-width: 720px) {
  .app-nav { flex-wrap: wrap; row-gap: var(--space-2); }
  .nav-actions { flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); min-width: 0; max-width: 100%; }
  .nav-actions .button { width: auto; }
  .gauge-mini { width: 1.6rem; height: 1.6rem; }
  .host-gauges-panel { position: fixed; top: 4.5rem; right: var(--space-4); left: var(--space-4); width: auto; max-height: 75vh; overflow: auto; }
  /* the Settings menu turns into two columns here: the search box, the way back and the head take the whole row */
  .settings-navigation > .settings-search, .settings-navigation > .settings-back, .settings-navigation > .settings-head,
  .settings-navigation > .settings-search-results { grid-column: 1 / -1; min-width: 0; }
  .settings-search input { width: 100%; min-width: 0; box-sizing: border-box; }
}
/* alpha.307 (browser review 2026-11-05): a long organisation name wrapped to two lines in the header at 900-1050 px. */
@media (min-width: 721px) { .brand span:last-child { display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28ch; vertical-align: middle; } }

/* R59.7 (alpha.314): Blocked addresses - filters, sorting, groups, one Actions menu; fits 1024 px, cards on a phone */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: flex-end; margin: var(--space-3) 0; }
.filter-bar .field { margin: 0; min-width: 9rem; flex: 0 1 auto; }
.filter-bar .field input[type=search] { min-width: 14rem; }
.filter-bar .form-actions { margin: 0; }
/* R62.3: Group by - one heading row per group (list-filter.js) */
tr.list-group-head > th { background: var(--surface-subtle); color: var(--text-muted); font-weight: 600; text-align: left; border-top: var(--border-width) solid var(--border-strong); }
.filter-bar [data-filter-count] { align-self: center; }
.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover, .sort-link.is-sorted { text-decoration: underline; }
.blocked-group { margin: var(--space-4) 0 var(--space-2); font-size: var(--font-md); }
.row-menu { position: relative; }
.row-menu[open] .row-menu-items { position: absolute; right: 0; z-index: 40; display: flex; flex-direction: column; gap: var(--space-1); min-width: 9rem; padding: var(--space-2); background: var(--surface); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.row-menu-items .button, .row-menu-items form, .row-menu-items .inline-form { width: 100%; margin: 0; }
.blocked-table td { vertical-align: top; }
@media (max-width: 720px) {
  .blocked-table thead { display: none; }
  .blocked-table, .blocked-table tbody, .blocked-table tr, .blocked-table td { display: block; width: 100%; }
  .blocked-table tr { padding: var(--space-3); border-bottom: var(--border-width) solid var(--border); }
  .blocked-table td { padding: var(--space-1) 0; border: 0; }
  .blocked-table td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; color: var(--text-muted); font-size: var(--font-xs); font-weight: var(--weight-medium); }
  .row-menu[open] .row-menu-items { position: static; box-shadow: none; }
  .filter-bar .field, .filter-bar .field input[type=search] { min-width: 0; flex: 1 1 100%; }
}
/* alpha.315 (review 2026-11-08: Blocked addresses still scrolled at 1024 px): long addresses and names wrap, and below
   1280 px "Sent to" moves under Blocked */
/* alpha.316 (review 2026-11-08: "cPane/l", an address over three lines): words break only between words; an address
   keeps one line up to IPv4 length, a long IPv6 breaks at its colons; Target shows two lines, the rest on hover */
.blocked-table td { overflow-wrap: break-word; }
.blocked-table td:nth-child(2) { min-width: 8.5rem; }
.blocked-table code { overflow-wrap: anywhere; }
.blocked-table .target-cell { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blocked-table .sort-link { white-space: normal; }
.sent-inline { display: none; }
@media (max-width: 1280px) {
  .blocked-table .col-sent { display: none; }
  .sent-inline { display: inline; }
}
/* R62.1: every list sorts by its column headings */
th.is-sortable { cursor: pointer; user-select: none; }
th.is-sortable:hover, th.is-sortable:focus-visible { text-decoration: underline; }
th[aria-sort] { color: var(--text-primary); }
/* alpha.316 (review 2026-11-08): a dialog never wider or taller than the screen - its own scroll instead, rows wrap */
.form-dialog { max-height: calc(100vh - 2rem); overflow: auto; }
.form-dialog .form-inline { flex-wrap: wrap; }
.form-dialog h2 code { overflow-wrap: anywhere; }
/* alpha.316 (review 2026-11-08: the Updates panels and the filter row wrapped differently on two Portals at the same
   width): fixed field widths, and the Updates panels go from one column to three at one width of their own area */
.filter-bar .field { flex: 0 0 10.5rem; min-width: 0; }
.filter-bar .field select { width: 100%; }
.filter-bar .field:has(input[type=search]) { flex-basis: 15rem; }
.update-overview-area { container-type: inline-size; }
.update-overview-area .update-overview { grid-template-columns: 1fr; }
@container (min-width: 46rem) { .update-overview-area .update-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* F21 (Hani #1 2026-11-08): a folded side menu shows a magnifier the size of the other buttons instead of the search box;
   the box shows only when the menu is unfolded, and the magnifier unfolds it with the cursor in the box */
.view-search { display: none; }
.settings-workspace.menu-collapsed .view-search, .inventory-layout.tree-collapsed .view-search { display: inline-flex; }
.settings-workspace.menu-collapsed .settings-search, .settings-workspace.menu-collapsed [data-settings-results="menu"],
.settings-workspace.menu-collapsed [data-settings-none="menu"] { display: none; }
/* alpha.316: below 1100 px Target moves under Attack (like Sent to under Blocked), so whole words still fit at 1024 px
   with the side menu open */
.target-inline { display: none; }
.blocked-table th:first-child, .blocked-table td:first-child { width: 1%; padding-inline: var(--space-2); }
@media (max-width: 1100px) {
  .blocked-table .col-target { display: none; }
  .target-inline { display: inline; overflow-wrap: anywhere; }
}
/* R59.4: lines per day */
.per-day-chart { width: 100%; height: 6rem; display: block; margin: var(--space-2) 0; }
.per-day-attack { fill: var(--danger); background: var(--danger); }
.per-day-unknown { fill: var(--neutral); background: var(--neutral); }
.per-day-device { fill: var(--warning); background: var(--warning); }
.per-day-expected { fill: var(--success); background: var(--success); }
.per-day-earlier { fill: var(--border); background: var(--border); }
.per-day-block { fill: var(--text-primary); background: var(--text-primary); }
.per-day-pending { fill: none; stroke: var(--border); stroke-dasharray: 2 1; }
.per-day-key { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: var(--radius-sm); vertical-align: middle; }
.per-day-table { font-size: var(--font-sm); }
/* alpha.317 (review of 316: the filter row wrapped differently on two Portals whose side menus had different widths):
   the filters sit in fixed columns - 2, 4 from 44rem, 5 from 60rem of their own area - whatever the menu width */
.blocked-filters-area { container-type: inline-size; }
.blocked-filters-area .filter-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.blocked-filters-area .filter-bar .field, .blocked-filters-area .filter-bar .field:has(input[type=search]) { flex: none; min-width: 0; }
.blocked-filters-area .filter-bar .field input, .blocked-filters-area .filter-bar .field select { width: 100%; }
@container (min-width: 44rem) { .blocked-filters-area .filter-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (min-width: 60rem) { .blocked-filters-area .filter-bar { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* alpha.319 (review of 317: the Delete lines dialog scrolled sideways at narrow widths): a confirmation inside a dialog
   is stacked, so its text wraps */
.form-dialog .inline-confirm { display: block; max-width: 100%; }
.form-dialog .inline-confirm form { flex-direction: column; align-items: stretch; flex-wrap: wrap; }
.form-dialog .inline-confirm .field-help { white-space: normal; overflow-wrap: anywhere; }

/* R59.10 Review before block */
.block-review { display: grid; gap: var(--space-3); min-width: 0; }
.review-routers { display: grid; gap: var(--space-1); }
.review-router { margin: 0; }
.review-router.is-full strong, .review-router.is-unread strong { color: var(--text-primary); }
.review-table td.review-target { max-width: 18rem; overflow-wrap: anywhere; }
.block-review .form-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-end; }
/* R62.3 review 323: a list filter with one value stays in the bar, visibly greyed */
.list-filter select:disabled { opacity: .6; cursor: not-allowed; background: var(--surface-subtle); color: var(--text-muted); }

/* R71 (Hani #1 2026-11-10): guided repair - the cause above the steps, console lines that wrap, the popup's width */
.repair-cause { margin: 0 0 var(--space-3); }
.repair-console pre { white-space: pre-wrap; word-break: break-all; padding: var(--space-2); background: var(--surface-muted, var(--surface)); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); }
.repair-dialog { width: min(52rem, calc(100vw - 2rem)); }
.repair-dialog .repair-steps { margin: var(--space-3) 0; }
/* R72.4 (alpha.341, review of 338 2026-11-11: tables scrolled sideways on a phone, Security events pushed the page wider
   than the screen, device tabs were cut off). A table box holds everything inside it (a hidden label once escaped it and
   widened the page to 1301 px at 1024 px); a list that does not fit its box shows each row as a card, labelled with the
   column headings (table-fit.js sets .as-cards and each cell's data-label); device tabs wrap onto a second line. */
.table-container { position: relative; }
table.as-cards thead { display: none; }
table.as-cards, table.as-cards tbody, table.as-cards tr, table.as-cards td, table.as-cards th[scope="row"] { display: block; width: 100%; }
table.as-cards tr { padding: var(--space-3); border-bottom: var(--border-width) solid var(--border); }
table.as-cards tr[data-group-head] { padding: var(--space-2) var(--space-3); background: var(--surface-subtle); }
table.as-cards td, table.as-cards th[scope="row"] { padding: var(--space-1) 0; border: 0; text-align: left; overflow-wrap: anywhere; }
table.as-cards td[data-label]:not([data-label=""])::before, table.as-cards th[scope="row"][data-label]:not([data-label=""])::before { content: attr(data-label); display: block; color: var(--text-muted); font-size: var(--font-xs); font-weight: var(--weight-medium); }
table.as-cards td:empty { display: none; }
table.as-cards .row-menu[open] .row-menu-items { position: static; box-shadow: none; }
.asset-tabs { flex-wrap: wrap; overflow-x: visible; }
/* alpha.342 (review of 341, 2026-11-11: Logs stayed as cards at 1920 px on wirelessnetware): a long message no longer
   sets the table's width - the message column takes the room that is left and ends with "…" (a row opens in full), so
   the log table fits on a desktop and becomes cards only when its other columns do not fit. */
.log-row .log-message { max-width: 0; width: 100%; }
table.as-cards .log-row .log-message { max-width: none; width: auto; white-space: normal; overflow-wrap: anywhere; }

/* R54.13 (Hani #1 2026-11-11): NEXXVU AI on top of the homepage, and the AI gauge in the header */
.ai-board { margin-bottom: var(--space-4); }
.ai-board-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin-bottom: var(--space-2); }
.ai-board-head h2 { margin: 0; font-size: var(--font-md); }
.ai-board-head .link-button { margin-left: auto; }
.ai-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--space-2); }
.ai-card { display: grid; align-content: start; gap: var(--space-1); padding: var(--space-3); min-width: 0; }
.ai-card h3 { display: flex; align-items: center; gap: var(--space-1); margin: 0; font-size: var(--font-sm); }
.ai-card svg { width: 100%; height: 3.5rem; display: block; }
.ai-card svg.ai-strip { height: 0.5rem; background: var(--success-surface); border-radius: var(--radius-sm); }
.ai-card polyline { fill: none; stroke: var(--primary); stroke-width: 2; }
.ai-card .metadata { margin: 0; }
.ai-figure { margin: 0; font-size: var(--font-sm); color: var(--text-muted); }
.ai-figure strong { font-size: var(--font-xl); color: var(--text-primary); }
.ai-dot { width: 0.6rem; height: 0.6rem; border-radius: var(--radius-round); background: var(--neutral); display: inline-block; }
.ai-dot.is-up { background: var(--success); }
.ai-dot.is-down { background: var(--danger); }
.ai-down { fill: var(--danger-surface); }
.ai-strip .ai-down { fill: var(--danger); }
.ai-limit { stroke: var(--warning); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.ai-bar.is-answered, .ai-key.is-answered { fill: var(--primary); background: var(--primary); }
.ai-bar.is-refused, .ai-key.is-refused { fill: var(--warning); background: var(--warning); }
.ai-bar.is-failed, .ai-key.is-failed { fill: var(--danger); background: var(--danger); }
.ai-key { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: var(--radius-sm); margin-right: 0.2rem; vertical-align: baseline; }
.ai-state { margin: 0 0 var(--space-2); font-weight: var(--weight-medium); }
.ai-state.is-ok { color: var(--success); }
.ai-state.is-down, .ai-state.is-llm_down { color: var(--danger); }
.ai-advice { margin: 0 0 var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--warning-surface); }
.ai-advice.is-lower { background: var(--danger-surface); }
.ai-advice a { font-weight: var(--weight-medium); }
/* review of 344 on a phone: a long fingerprint or key in a detail list wraps instead of widening the page */
.detail-list dd code { overflow-wrap: anywhere; word-break: break-all; }

/* R76.9 Settings › Support: one panel per report, NEXXVU's replies indented under it */
.support-list { display: grid; gap: var(--space-3); }
.support-item { display: grid; gap: var(--space-2); }
.support-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.support-head h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.support-replies { display: grid; gap: var(--space-2); border-left: var(--focus-width) solid var(--accent); padding-left: var(--space-3); }
.support-reply p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* R76.6 the terms shown with the access request */
.terms-box { border: var(--border-width) solid var(--border); border-radius: var(--radius-md); padding: var(--space-3); background: var(--surface-subtle); max-height: 14rem; overflow-y: auto; }
.terms-box p { margin: 0 0 var(--space-2); font-size: .9rem; }
/* R82: SMS used this month (Settings › SMS alerts). */
.usage-bar { width: 100%; max-width: 28rem; height: .6rem; border: 0; border-radius: 999px; overflow: hidden; background: var(--surface-subtle); accent-color: var(--primary); }
/* R82.5: the exact RouterOS lines NEXXVU applies (Tools › LTE notification). */
.config-preview { overflow-x: auto; max-width: 100%; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md, 8px); background: var(--surface-subtle); font-size: .82rem; line-height: 1.5; white-space: pre; }

/* R82.10 LTE notification page: settings folded, watch list from the ecosystem, test SMS in one row */
.lte-settings > summary { cursor: pointer; margin-top: var(--space-4); }
.lte-settings > summary h4 { display: inline; }
.lte-watch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--space-1) var(--space-4); max-height: 16rem; overflow-y: auto; margin-bottom: var(--space-3); }
.lte-test { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; }
/* R82.9 LTE signal card (Monitoring tab of the LTE notification device) */
.lte-status .section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.lte-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: var(--space-3); margin: var(--space-3) 0; }
.lte-tile { display: grid; gap: var(--space-1); justify-items: start; padding: var(--space-3); border: var(--border-width) solid var(--border); border-radius: var(--radius-md, 8px); background: var(--surface-subtle); }
.lte-tile-label { font-size: var(--font-xs); font-weight: var(--weight-bold); color: var(--text-muted); }
.lte-tile-value { font-size: 1.5rem; line-height: 1.1; }
.lte-tile-value small { font-size: var(--font-xs); font-weight: normal; color: var(--text-muted); }
.lte-advice { margin: 0 0 var(--space-3); padding-left: 1.2rem; }
.lte-read { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.lte-read .metadata { margin: 0; }

/* nexxvu-design-details (Claude in Chrome review 2026-11-16): page buttons never wrap ("All settings" broke into two
   lines on Update plans even at 1920 px); status pills in a table stay on one line; a choice inside a table keeps a
   readable width (Notification rules' Channel showed "E-m" on a phone), so the table turns into cards instead;
   a popup near the bottom of the window opens upwards. */
.page-heading > .button, .page-heading > a.button, .page-heading-actions .button, .section-heading .button { white-space: nowrap; flex-shrink: 0; }
.table-container td .status-badge { white-space: nowrap; overflow-wrap: normal; }
.table-container td select { min-width: 9rem; }
.info-tip-panel.info-tip-up { top: auto; bottom: 130%; }
.rule-why .rule-why-label { text-decoration: underline dotted; text-underline-offset: 2px; font-size: var(--font-sm); color: var(--text-muted); }
.page-heading > :first-child { flex: 1 1 0; min-width: 0; overflow-wrap: break-word; }
@media (max-width: 640px) { .page-heading { flex-wrap: wrap; align-items: flex-start; } .page-heading > :first-child { flex-basis: 100%; } }
/* alpha.372 (Hani 2026-11-17): Updates in tabs; update1/update2 inside the Installed card */
.update-servers-mini { margin-top: .75rem; padding-top: .75rem; border-top: var(--border-width) solid var(--border); }
.update-server-list { list-style: none; margin: .25rem 0; padding: 0; display: grid; gap: .25rem; }
.update-server-list li { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.update-servers-mini .update-servers { margin-top: .5rem; }
/* R84.4a (Hani 2026-11-17): the Analyse pictogram beside the attack type - one click, no menu */
.ai-refresh-form { display: inline; }
.ai-refresh { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; padding: 0; border: var(--border-width) solid var(--border); border-radius: var(--radius-round); background: var(--surface); color: var(--primary); font-size: var(--font-sm); line-height: 1; cursor: pointer; vertical-align: middle; }
.ai-refresh:hover:not(:disabled), .ai-refresh:focus-visible { background: var(--surface-subtle); border-color: var(--primary); }
.ai-refresh:disabled { color: var(--text-muted); cursor: not-allowed; opacity: .6; }
/* R84.4c: the Rule column stays narrow (the table must fit at 1440 px): long rule names end with … (full name on hover) */
.rule-where { display: inline-block; max-width: 7.5rem; white-space: normal; }
.rule-name { display: inline-block; max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
/* R84.4d: the AI defence line on Settings › Rules */
.ai-defence { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.ai-defence p { margin: 0; margin-right: auto; }
.draft-edit { margin: var(--space-2) 0; }
/* R84.5: Settings › Rules › By network - the devices nested like the network map, each with its own rules */
.rules-network { display: grid; gap: var(--space-3); }
.rule-tree { list-style: none; margin: 0; padding-left: var(--space-5); border-left: var(--border-width) solid var(--border); }
.rule-tree > li { margin: var(--space-2) 0; }
.rule-eco > .rule-tree { padding-left: var(--space-2); border-left: 0; }
.rule-eco summary { cursor: pointer; padding: var(--space-2) 0; }
.rule-node { display: grid; gap: var(--space-1); }
.rule-node-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1); }
.rule-node-head .metadata { margin: 0; }
.rule-node-top { padding-bottom: var(--space-2); border-bottom: var(--border-width) solid var(--border); }
.rule-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.rule-chip { display: inline-block; padding: var(--space-1) var(--space-2); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); font-size: .875rem; text-decoration: none; }
.rule-chip-firewall { border-color: var(--danger); }
.rule-chip-notification, .rule-chip-alert { border-color: var(--primary); }



.auto-analysis { display: grid; gap: var(--space-2); margin: var(--space-3) 0; padding-top: var(--space-3); border-top: var(--border-width) solid var(--border); }
.check-row-with-tip { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
/* R87.2b: the Network campaigns rule lists every caught network inside its dialog */
.attack-kinds summary { cursor: pointer; white-space: nowrap; }
.attack-kinds ul { margin: var(--space-1) 0 0; }
/* 2026-11-19: Blocked addresses shows 100 rows at a time */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-2) 0; }
/* 2026-11-19: WHOIS cell - registered country and holder, underlined, ownership in a popup */
.whois-cell { display: inline-flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.whois-tip .whois-label { text-decoration: underline dotted; text-underline-offset: 2px; font-size: var(--font-sm); color: var(--text-muted); cursor: help; }
/* R87.2d: the Report abuse popup shows the e-mail and its attachments before sending */
.abuse-preview { max-height: 16rem; overflow: auto; white-space: pre-wrap; font-size: var(--font-sm); background: var(--surface-muted, var(--surface)); padding: var(--space-2); border-radius: var(--radius-md); }
/* R87.6: the router check under a kept-up-to-date router */
.router-check { margin-top: var(--space-2); }
/* Review 2026-11-21 (alpha.404 at 1280 px: Settings and Sign out pushed past the right edge on a Portal with a long
   organisation name and the AI gauges): the name gives way first (ellipsis), then the header buttons wrap to a second
   line instead of leaving the screen. */
.app-nav { flex-wrap: wrap; row-gap: var(--space-2); }
.brand { min-width: 0; flex: 0 1 auto; }
.nav-actions { flex-wrap: wrap; justify-content: flex-end; min-width: 0; margin-left: auto; }
@media (min-width: 721px) and (max-width: 1440px) { .brand span:last-child { max-width: min(28ch, 16vw); } }
/* R82.11 (Hani #1 2026-11-21): the LTE router's watch list as chips with a remove cross, a device search, "Other…" */
.chip-list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: var(--space-2) 0; }
.chip { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-2) var(--space-1) var(--space-3); border: var(--border-width) solid var(--border); border-radius: 999px; background: var(--surface-subtle); }
.chip-remove { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; padding: 0 var(--space-1); font-size: var(--font-sm, .9rem); line-height: 1; }
.chip-remove:hover, .chip-remove:focus-visible { color: var(--danger); }
.lte-watch-results { list-style: none; padding: 0; margin: var(--space-1) 0 var(--space-3); max-height: 16rem; overflow: auto; }
.lte-watch-results li { padding: var(--space-1) 0; }
.lte-watcher { border: 0; padding: 0; margin: var(--space-3) 0; }
.lte-inventory .kv { margin: var(--space-2) 0; }
/* Hani #1 2026-11-22: a backup run followed live, one device per row */
.backup-job-items { list-style: none; padding: 0; margin: var(--space-2) 0; display: grid; gap: var(--space-1); }
.backup-job-item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-1) 0; border-bottom: var(--border-width) solid var(--border); }
.backup-job-item:last-child { border-bottom: 0; }
.backup-job-mark { width: 1.25rem; text-align: center; font-weight: 700; }
.backup-job-item[data-state="done"] .backup-job-mark { color: var(--success); }
.backup-job-item[data-state="failed"] .backup-job-mark { color: var(--danger); }
.backup-job-message { flex-basis: 100%; padding-left: calc(1.25rem + var(--space-2)); min-width: 0; overflow-wrap: anywhere; }
.backup-job-message:empty { display: none; }

/* alpha.423 (Hani #1 2026-11-24, node12 screenshots): a Proxmox node's VM list as cards is one short line per VM
   (number, name, type, state, Actions) instead of a label above every value - 21 VMs no longer fill several screens */
table.as-cards[data-backup-guests] tr { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); padding: var(--space-2) var(--space-3); }
table.as-cards[data-backup-guests] td { width: auto; padding: 0; }
table.as-cards[data-backup-guests] td[data-label]::before { display: none; }
table.as-cards[data-backup-guests] td[data-label="Name"] { flex: 1 1 9rem; font-weight: var(--weight-medium); }
table.as-cards[data-backup-guests] td[data-label="Type"] { color: var(--text-muted); font-size: var(--font-xs); }
table.as-cards[data-backup-guests] td[data-label="Actions"] { margin-left: auto; }

/* R90.8 part 4 (alpha.425): a VM in the left tree has its own small ▾ button beside its name (it opens a popup) */
.tree-vm-row { display: flex; align-items: center; gap: var(--space-1); }
.tree-vm-row > .inventory-tree-node { flex: 1 1 auto; min-width: 0; }
.tree-vm-row > .vm-menu-button { flex: 0 0 auto; padding: 0 var(--space-2); min-height: 1.6rem; }
.vm-act-buttons { flex-wrap: wrap; }
.inventory-tree-list > li > .tree-vm-row { margin-left: 1rem; }
