/* Foundation */
:root {
  color-scheme: light;
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg: #f5f5f7;
  --surface: #fff;
  --surface-secondary: #f7f7f9;
  --sidebar: rgb(238 239 242 / 84%);
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --tertiary: #6e6e73;
  --line: rgb(0 0 0 / 7%);
  --track: #eceef2;
  --blue: #006bd6;
  --blue-soft: #e8f2ff;
  --purple: #9752d9;
  --purple-soft: #f2eafa;
  --green: #237b36;
  --green-soft: #e9f6ed;
  --amber: #a85c00;
  --amber-soft: #fff3df;
  --red: #d02f29;
  --red-soft: #fff0ee;
  --shadow: 0 2px 8px rgb(0 0 0 / 2%), 0 0 0 1px rgb(0 0 0 / 3%);
  --elevated-shadow: 0 24px 80px rgb(0 0 0 / 18%), 0 0 0 1px rgb(0 0 0 / 5%);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101113;
  --surface: #1d1e21;
  --surface-secondary: #26272b;
  --sidebar: rgb(23 24 27 / 90%);
  --text: #f5f5f7;
  --secondary: #a5a5ae;
  --tertiary: #92929c;
  --line: rgb(255 255 255 / 8%);
  --track: #34353b;
  --blue: #5aabff;
  --blue-soft: #18314b;
  --purple: #bf8aee;
  --purple-soft: #332840;
  --green: #66cf83;
  --green-soft: #20372a;
  --amber: #f4bc6b;
  --amber-soft: #3e3020;
  --red: #ff8a80;
  --red-soft: #402724;
  --shadow: 0 2px 8px rgb(0 0 0 / 10%), 0 0 0 1px rgb(255 255 255 / 4%);
  --elevated-shadow: 0 24px 80px rgb(0 0 0 / 50%), 0 0 0 1px rgb(255 255 255 / 8%);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body { margin: 0; color: var(--text); background: var(--bg); min-width: 280px; font-size: .875rem; -webkit-font-smoothing: antialiased; }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button, a, select, input[type="checkbox"] { touch-action: manipulation; }
button { border: 0; cursor: pointer; background: none; user-select: none; -webkit-user-select: none; }
button:disabled { cursor: default; opacity: .5; }
button, a { -webkit-user-drag: none; }
button { transition: transform 120ms var(--ease-out), background-color 120ms ease, color 120ms ease; }
button:active:not(:disabled):not(.card-open):not(.event-row) { transform: scale(.97); }
a { color: inherit; text-decoration: none; }
i { font-style: normal; display: inline-flex; align-items: center; }
svg { display: block; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
input:focus, select:focus { outline-offset: 0; }
input, select { accent-color: var(--blue); }
button, h1, h2, h3, p { margin: 0; }
strong, b { font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; padding: 12px 18px; background: var(--surface); border-radius: 12px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.blue { color: var(--blue); }.purple { color: var(--purple); }.green { color: var(--green); }.amber { color: var(--amber); }.neutral { color: #a9acb6; }
.icon-button { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--secondary); flex-shrink: 0; }
.text-button { min-height: 40px; padding: 6px 8px; color: var(--blue); font-weight: 500; }
.danger { color: var(--red); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #a0b9d1, #71869d); color: #fff; font-size: .875rem; font-weight: 600; flex-shrink: 0; }

/* Login */
.boot-screen { min-height: 100dvh; display: grid; place-items: center; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: max(32px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom)); }
.login-card { width: min(100%, 396px); padding: 42px 36px 36px; border-radius: 30px; background: var(--surface); box-shadow: 0 12px 60px rgb(0 0 0 / 5%), var(--shadow); text-align: center; }
.app-icon { display: block; margin: 0 auto 17px; border-radius: 22px; box-shadow: 0 8px 20px rgb(0 122 255 / 14%); }
.login-card h1 { font-size: 2rem; letter-spacing: -.04em; font-weight: 650; line-height: 1.2; }
.login-greeting { color: var(--secondary); margin: 8px 0 32px; font-size: .9375rem; }
.login-fields { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-secondary); }
.field { display: flex; align-items: center; min-height: 56px; gap: 15px; padding: 0 16px; text-align: left; }
.field + .field { border-top: 1px solid var(--line); }
.field > span { color: var(--secondary); flex-shrink: 0; }
.field input { width: 100%; min-width: 0; height: 54px; border: 0; background: transparent; font-size: 1rem; outline: none; }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--blue); }
.password-field { padding-right: 6px; gap: 10px; }
.password-field .icon { width: 18px; }
.remember { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; color: var(--secondary); font-size: .8125rem; cursor: pointer; }
.remember input { width: 16px; height: 16px; }
.form-error { font-size: .8125rem; color: var(--red); line-height: 1.5; }
.form-error:not(:empty) { margin: 6px 0 16px; }
.primary-button { background: #007aff; color: #fff; width: 100%; min-height: 48px; padding: 12px 20px; border-radius: 12px; font-size: 1rem; font-weight: 550; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.primary-button .icon { width: 17px; }
.noscript { position: fixed; bottom: 30px; width: 100%; text-align: center; }

/* Navigation and page layout */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; padding: 38px 18px 22px; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--line); backdrop-filter: blur(20px); z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding-left: 15px; font-size: 1.5rem; font-weight: 650; letter-spacing: -.035em; width: fit-content; }
.brand img { border-radius: 11px; }
.side-navigation { display: grid; gap: 5px; margin-top: 42px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 45px; padding: 10px 15px; border-radius: 10px; text-align: left; font-size: .875rem; font-weight: 500; color: var(--secondary); }
.nav-item.active { color: var(--blue); background: var(--blue-soft); }
.nav-item b { margin-left: auto; font-size: .75rem; font-weight: 500; }
.sidebar-bottom { margin-top: auto; }
.profile { display: flex; align-items: center; gap: 11px; padding: 20px 13px 0; margin-top: 18px; border-top: 1px solid var(--line); font-size: .8125rem; font-weight: 500; }
.main-content { margin-left: 224px; max-width: 1720px; padding: 40px clamp(28px, 3.5vw, 64px) 30px; outline: none; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.today { color: var(--secondary); font-size: .8125rem; margin-bottom: 6px; }
.page-header h1 { font-size: 2.125rem; line-height: 1.2; font-weight: 650; letter-spacing: -.035em; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.connection-button { display: flex; align-items: center; gap: 7px; padding: 8px 12px; min-height: 38px; border-radius: 20px; font-size: .75rem; color: var(--secondary); background: var(--surface); box-shadow: var(--shadow); }
.connection-dot, .small-dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; flex-shrink: 0; }
.connection-dot { color: var(--green); }
.connection-button[data-state="paused"] .connection-dot { color: var(--secondary); }
.connection-button[data-state="error"] .connection-dot { color: var(--amber); }
.connection-error { display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin: -6px 0 20px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); font-size: .8125rem; }
.connection-error .text-button { margin-left: auto; color: inherit; }
.mobile-settings, .mobile-navigation { display: none; }

/* Overview */
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 38px; }
.summary-card { min-width: 0; min-height: 158px; border-radius: 20px; padding: 21px 23px; background: var(--surface); box-shadow: var(--shadow); position: relative; }
.summary-label { display: flex; align-items: center; gap: 7px; color: var(--secondary); font-size: .8125rem; font-weight: 500; }
.summary-label .icon { width: 17px; height: 17px; }
.summary-value { font-size: 2.375rem; font-weight: 600; letter-spacing: -.045em; line-height: 1.2; font-variant-numeric: tabular-nums; margin-top: 16px; white-space: nowrap; }
.summary-value > span, .summary-value small { font-size: 1.125rem; font-weight: 450; color: var(--secondary); letter-spacing: -.02em; margin-left: 3px; }
.summary-track { height: 5px; border-radius: 5px; background: var(--track); margin-top: 17px; overflow: hidden; }
.summary-track i, .meter i { display: block; height: 100%; width: 100%; background: currentColor; transform-origin: left; border-radius: inherit; }
.health-link { display: flex; align-items: center; gap: 4px; font-size: .75rem; padding: 0; margin-top: 10px; text-align: left; }
.health-link .icon { width: 14px; height: 14px; }
.health-ring { position: absolute; width: 52px; height: 52px; top: 54px; right: 20px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; }
.health-ring .ring-track { stroke: var(--track); }
.health-ring path { stroke-width: 3; }
.traffic-value { display: flex; align-items: center; gap: 7px; margin-top: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.traffic-value .icon { width: 15px; height: 15px; color: var(--blue); }
.traffic-value strong { font-size: 1.2rem; letter-spacing: -.035em; font-weight: 550; }
.traffic-value.secondary { margin-top: 7px; color: var(--secondary); }
.traffic-value.secondary strong { font-size: .9375rem; font-weight: 450; }
.traffic-value.secondary .icon { color: var(--purple); }

/* Filters */
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-heading h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -.025em; display: flex; align-items: baseline; gap: 9px; }
.section-heading h2 > span { color: var(--secondary); font-size: .875rem; font-weight: 400; }
.view-controls { display: flex; gap: 10px; align-items: center; }
.segmented { background: var(--track); display: inline-flex; padding: 3px; border-radius: 9px; gap: 2px; }
.segmented button { border-radius: 6px; min-height: 30px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 10px; color: var(--secondary); font-size: .75rem; white-space: nowrap; }
.segmented button.selected { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgb(0 0 0 / 10%); }
.segmented .icon { width: 16px; height: 16px; }
.layout-switch button { padding: 4px 8px; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.group-tabs { display: flex; align-items: center; gap: 5px; }
.group-tabs button { padding: 8px 14px; border-radius: 18px; min-height: 36px; color: var(--secondary); font-size: .8125rem; white-space: nowrap; }
.group-tabs button.selected { background: var(--text); color: var(--surface); font-weight: 500; }
.search-field { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); padding: 0 12px; border-radius: 10px; width: 215px; flex-shrink: 1; min-width: 130px; color: var(--secondary); }
.search-field:focus-within { outline: 2px solid var(--blue); outline-offset: 1px; }
.search-field > i .icon { width: 17px; height: 17px; }
.search-field input { border: none; background: none; width: 100%; min-width: 0; height: 37px; font-size: .8125rem; outline: none; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 13px 0 12px; }
.filter-chip { display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border-radius: 8px; font-size: .75rem; color: var(--secondary); }
.filter-chip.selected { background: var(--amber-soft); color: var(--amber); }
.filter-chip > span:last-child { font-variant-numeric: tabular-nums; }
.sort-control select { border: none; background: transparent; max-width: 160px; padding: 6px 5px; min-height: 32px; font-size: .75rem; color: var(--secondary); cursor: pointer; }
.updated-at { color: var(--tertiary); text-align: center; font-size: .6875rem; padding: 28px 0 0; font-variant-numeric: tabular-nums; }

/* Device cards */
.nodes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.node-card { position: relative; min-width: 0; padding: 22px 22px 0; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.card-open { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; z-index: 1; }
.card-open:focus-visible { outline-offset: 3px; }
.card-open:active { background: rgb(128 128 128 / 5%); }
.node-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.device-icon { width: 39px; height: 39px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex-shrink: 0; }
.device-icon.vm { background: var(--purple-soft); color: var(--purple); }
.device-icon.physical { background: var(--surface-secondary); color: var(--secondary); }
.device-icon .icon { width: 23px; height: 23px; }
.node-title { min-width: 0; flex: 1; }
.node-title h3 { font-size: .9375rem; font-weight: 600; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-title > span { display: block; color: var(--secondary); font-size: .6875rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-button { position: relative; z-index: 2; display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; color: var(--tertiary); margin-right: -6px; }
.favorite-button .icon { width: 17px; height: 17px; }
.favorite-button.selected { color: var(--amber); }
.favorite-button.selected svg { fill: currentColor; stroke-width: 1.5; }
.node-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.node-state > span:last-child:not(.status-badge) { font-size: .6875rem; color: var(--tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--secondary); font-size: .6875rem; font-weight: 500; }
.status-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge.online { color: var(--green); }.status-badge.warning, .status-badge.stale { color: var(--amber); }.status-badge.offline { color: var(--red); }
.node-resources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 21px; }
.resource-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.resource-heading > span { font-size: .6875rem; color: var(--secondary); }
.resource-heading strong { font-weight: 550; font-size: 1.25rem; letter-spacing: -.035em; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.resource-heading small { font-size: .6875rem; font-weight: 400; color: var(--secondary); margin-left: 2px; }
.resource-visual { display: flex; align-items: center; height: 30px; margin-top: 3px; }
.meter { height: 5px; background: var(--track); border-radius: 5px; overflow: hidden; width: 100%; }
.sparkline { height: 30px; width: 100%; overflow: hidden; }
.spark-baseline { stroke: var(--line); stroke-width: 1; }
.node-disk { display: flex; align-items: center; gap: 12px; padding: 10px 0 20px; font-size: .6875rem; color: var(--secondary); }
.node-disk > span { white-space: nowrap; }.node-disk .meter { height: 3px; }.node-disk strong { min-width: 30px; text-align: right; font-size: .6875rem; font-weight: 450; font-variant-numeric: tabular-nums; }
.node-footer { display: flex; gap: 14px; align-items: center; min-height: 45px; border-top: 1px solid var(--line); font-size: .6875rem; color: var(--secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.node-footer > span { display: inline-flex; align-items: center; gap: 4px; }
.node-footer .icon { height: 12px; width: 12px; color: var(--tertiary); }
.node-footer .card-chevron { margin-left: auto; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-icon { width: 58px; height: 58px; background: var(--track); color: var(--secondary); border-radius: 18px; margin: 0 auto 16px; display: grid; place-items: center; }
.empty-icon .icon { width: 25px; height: 25px; }
.empty-state h3 { color: var(--secondary); font-size: .9375rem; font-weight: 500; margin-bottom: 8px; }
.skeleton { min-height: 244px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); }
.skeleton::before { content: ''; display: block; background: var(--track); border-radius: 8px; height: 16px; width: 50%; margin: 28px 22px; }
.skeleton::after { content: ''; display: block; background: var(--surface-secondary); border-radius: 8px; height: 80px; margin: 24px 22px; }
.summary-grid .skeleton { min-height: 158px; }.summary-grid .skeleton::after { height: 32px; }

/* Compact list */
.nodes-grid.list-layout { grid-template-columns: 1fr; gap: 8px; }
.list-layout .node-card { display: grid; grid-template-columns: minmax(190px, 1.3fr) minmax(210px, 1.5fr) minmax(130px, 1fr); column-gap: 28px; padding: 20px 22px; border-radius: 15px; align-items: center; }
.list-layout .node-identity { grid-column: 1; grid-row: 1; }.list-layout .node-state { grid-column: 1; grid-row: 2; margin: 8px 0 0 50px; }
.list-layout .node-state > span:last-child:not(.status-badge) { display: none; }
.list-layout .node-resources { grid-column: 2; grid-row: 1 / 3; margin: 0; }
.list-layout .node-disk { grid-column: 3; grid-row: 1; padding: 0; }
.list-layout .node-footer { grid-column: 3; grid-row: 2; min-height: 28px; padding: 0; border: 0; gap: 8px; flex-wrap: wrap; }
.list-layout .card-chevron { display: none; }

/* Native dialogs */
.sheet { border: none; padding: 0; background: var(--surface); color: var(--text); border-radius: 26px; box-shadow: var(--elevated-shadow); overflow: hidden; max-height: calc(100dvh - 64px); max-width: calc(100vw - 48px); }
.sheet[open] { display: flex; flex-direction: column; }
.sheet::backdrop { background: rgb(20 25 35 / 28%); backdrop-filter: blur(6px); }
.node-sheet { width: 760px; }
.sheet-handle { display: none; }
.detail-header { display: flex; align-items: center; gap: 14px; padding: 28px 30px 20px; flex-shrink: 0; }
.device-icon.large { width: 48px; height: 48px; border-radius: 14px; }
.device-icon.large .icon { width: 28px; height: 28px; }
.detail-title { min-width: 0; flex: 1; }
.detail-title > span { color: var(--secondary); font-size: .75rem; }
.detail-title h2 { font-size: 1.5rem; line-height: 1.3; font-weight: 600; letter-spacing: -.03em; overflow-wrap: anywhere; margin-top: 3px; }
.detail-header .favorite-button { margin: 0; width: 36px; height: 36px; }
.close-button { width: 32px; height: 32px; background: var(--track); color: var(--secondary); }
.close-button .icon { width: 17px; height: 17px; }
.sheet-scroll { padding: 0 30px 30px; overflow-y: auto; overscroll-behavior: contain; }
.detail-status { display: flex; align-items: center; gap: 10px; color: var(--secondary); font-size: .75rem; }
.detail-status .status-badge { font-size: .75rem; }
.detail-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 25px 0 28px; }
.detail-stat { border-right: 1px solid var(--line); min-width: 0; }
.detail-stat:last-child { border-right: 0; }
.detail-stat > span { color: var(--secondary); font-size: .75rem; }
.detail-stat strong { display: block; font-size: 1.375rem; font-weight: 550; font-variant-numeric: tabular-nums; letter-spacing: -.04em; margin-top: 6px; white-space: nowrap; }
.detail-stat strong small { font-size: .8125rem; margin-left: 3px; font-weight: 400; }
.chart-panel { background: var(--surface-secondary); border-radius: 17px; padding: 18px 18px 14px; }
.chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chart-metrics { display: flex; gap: 4px; }.chart-metrics button { min-height: 32px; padding: 4px 8px; font-size: .75rem; color: var(--secondary); border-radius: 6px; white-space: nowrap; }
.chart-metrics button.selected { color: var(--blue); font-weight: 600; background: var(--blue-soft); }
.range-switch button { padding: 3px 8px; min-height: 26px; font-size: .6875rem; }
.chart-wrapper { position: relative; margin-top: 24px; }
.history-chart { height: 216px; width: 100%; touch-action: pan-y; border-radius: 4px; }
.history-chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-dasharray: 3 4; stroke-width: 1; }
.chart-label { fill: var(--secondary); font-size: 10px; font-family: inherit; }
.cursor-line { stroke: var(--secondary); stroke-dasharray: 3 3; }
.chart-legend { display: flex; justify-content: center; align-items: center; gap: 20px; font-size: .6875rem; color: var(--secondary); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.chart-empty { height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--secondary); font-size: .8125rem; }
.chart-tooltip { position: absolute; top: 0; min-width: 152px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 10px; pointer-events: none; font-size: .6875rem; z-index: 2; }
.chart-tooltip time { color: var(--secondary); display: block; margin-bottom: 6px; }.chart-tooltip span { display: flex; align-items: center; gap: 6px; }.chart-tooltip strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.detail-section { margin-top: 28px; }.detail-section > h3 { font-size: .875rem; font-weight: 600; margin-bottom: 14px; }
.volume-list, .info-list { background: var(--surface-secondary); border-radius: 14px; padding: 0 18px; margin: 0; }
.volume { padding: 17px 0; }.volume + .volume { border-top: 1px solid var(--line); }
.volume-label { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.volume-icon { color: var(--secondary); }.volume-label > div { min-width: 0; flex: 1; }.volume-label strong { font-size: .8125rem; font-weight: 500; overflow-wrap: anywhere; }.volume-label > div > span { display: block; color: var(--secondary); font-size: .6875rem; margin-top: 2px; }.volume-label > b { font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; }.volume-label small { font-size: .6875rem; color: var(--secondary); }
.info-row { display: flex; align-items: baseline; justify-content: space-between; gap: 25px; padding: 13px 0; font-size: .75rem; }.info-row + .info-row { border-top: 1px solid var(--line); }.info-row dt { color: var(--secondary); white-space: nowrap; }.info-row dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.muted-row { padding: 20px 0; color: var(--secondary); font-size: .8125rem; }

/* Activity and preferences */
.activity-section { max-width: 900px; }
.event-date { color: var(--secondary); font-size: .8125rem; font-weight: 500; margin: 30px 0 12px 4px; }
.event-date:first-child { margin-top: 5px; }
.event-row { display: flex; width: 100%; gap: 14px; align-items: center; padding: 18px 20px; background: var(--surface); box-shadow: var(--shadow); border-radius: 14px; text-align: left; margin-bottom: 9px; }
.event-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; background: var(--red-soft); color: var(--red); }.event-icon.online { color: var(--green); background: var(--green-soft); }.event-icon.warning { color: var(--amber); background: var(--amber-soft); }
.event-copy { min-width: 0; flex: 1; }.event-copy > strong { display: block; font-size: .875rem; font-weight: 550; overflow-wrap: anywhere; }.event-copy > span { display: block; margin-top: 3px; font-size: .75rem; color: var(--secondary); }.event-row time { color: var(--secondary); font-size: .75rem; white-space: nowrap; font-variant-numeric: tabular-nums; }.event-row > .icon { width: 15px; color: var(--tertiary); }
.settings-sheet { width: 420px; }.settings-header { padding: 27px 28px 20px; display: flex; align-items: center; justify-content: space-between; }.settings-header h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -.025em; }.settings-content { padding: 0 28px 28px; overflow-y: auto; overscroll-behavior: contain; }
.settings-section h3 { font-size: .8125rem; color: var(--secondary); font-weight: 500; margin: 3px 0 14px; }
.appearance-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }.appearance-options > button { padding: 0; border-radius: 10px; font-size: .75rem; color: var(--secondary); }.appearance-options > button.selected { color: var(--blue); font-weight: 550; }.appearance-options > button > span:last-child { display: block; margin: 10px 0; }
.appearance-swatch { display: block; height: 70px; border-radius: 9px; padding: 12px 10px 12px 29px; position: relative; border: 1px solid rgb(0 0 0 / 10%); }.appearance-swatch::before { content: ''; position: absolute; width: 18px; top: 0; left: 0; bottom: 0; border-radius: 8px 0 0 8px; background: rgb(128 128 128 / 15%); }.appearance-swatch i { width: 100%; height: 100%; display: block; border-radius: 5px; }.light-swatch { background: #f5f5f7; }.light-swatch i { background: #fff; box-shadow: 0 1px 3px #0001; }.dark-swatch { background: #18191b; }.dark-swatch i { background: #35363b; }.system-swatch { background: linear-gradient(110deg, #f5f5f7 50%, #18191b 50%); }.system-swatch i { background: linear-gradient(110deg, #fff 50%, #35363b 50%); }.appearance-options button.selected .appearance-swatch { outline: 2px solid var(--blue); outline-offset: 3px; }
.settings-list { margin-top: 22px; border-radius: 13px; background: var(--surface-secondary); padding: 0 14px; }.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; min-height: 56px; padding: 8px 0; font-size: .8125rem; cursor: pointer; text-align: left; }.settings-row + .settings-row { border-top: 1px solid var(--line); }.settings-row > span { display: inline-flex; align-items: center; gap: 9px; }.settings-row > i { color: var(--secondary); }.settings-row > i .icon { width: 14px; }.settings-row > span .icon { width: 17px; }
.switch { appearance: none; -webkit-appearance: none; width: 42px; height: 26px; border-radius: 20px; background: #b1b2b8; position: relative; margin: 0; cursor: pointer; flex-shrink: 0; }.switch::before { content: ''; width: 22px; height: 22px; top: 2px; left: 2px; position: absolute; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px #0002; transition: transform 160ms var(--ease-out); }.switch:checked { background: #34c759; }.switch:checked::before { transform: translateX(16px); }
.settings-account { display: flex; align-items: center; gap: 10px; padding-top: 25px; }.settings-account strong { font-size: .8125rem; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }.settings-account .text-button { margin-left: auto; font-size: .8125rem; white-space: nowrap; }.install-help { font-size: .75rem; color: var(--secondary); line-height: 1.6; padding: 0 0 14px; }
.toast { position: fixed; bottom: calc(28px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); max-width: calc(100vw - 40px); padding: 12px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 28px #0002; font-size: .8125rem; z-index: 100; text-align: center; }

/* Pointer, viewport and accessibility adaptations */
@media (hover: hover) and (pointer: fine) {
  .icon-button:hover, .favorite-button:hover, .nav-item:hover:not(.active) { background: var(--track); color: var(--text); }
  .group-tabs button:hover:not(.selected), .filter-chip:hover:not(.selected), .chart-metrics button:hover:not(.selected) { background: var(--track); }
  .card-open:hover { background: rgb(128 128 128 / 2%); }
  .event-row:hover, .connection-button:hover { background: var(--surface-secondary); }
  .text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 1200px) {
  .sidebar { width: 200px; }.main-content { margin-left: 200px; padding: 34px 30px 25px; }
  .nodes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid { gap: 12px; }.summary-card { padding: 19px 18px; }.health-ring { width: 34px; height: 34px; top: 19px; right: 16px; }.health-card .summary-label { max-width: 70px; }.summary-value { font-size: 2.125rem; }.traffic-value strong { font-size: 1.0625rem; }
  .list-layout .node-card { grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr); gap: 5px 25px; }.list-layout .node-disk, .list-layout .node-footer { display: none; }
}
@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.summary-card { min-height: 145px; }.summary-value { margin-top: 12px; }.health-ring { width: 48px; height: 48px; top: 45px; right: 20px; }
  .filter-bar { align-items: stretch; flex-direction: column-reverse; gap: 14px; }.search-field { width: 100%; }.search-field input { height: 42px; }.group-tabs { justify-content: space-between; }.group-tabs button { flex: 1; padding-inline: 8px; }
  .node-card { padding: 20px 18px 0; }.node-resources { gap: 14px; }.node-title > span { font-size: .625rem; }.favorite-button { width: 28px; }.node-identity { gap: 9px; }
}
@media (max-width: 680px) {
  .sidebar { display: none; }.main-content { margin-left: 0; padding: calc(25px + env(safe-area-inset-top)) 20px calc(105px + env(safe-area-inset-bottom)); }
  .page-header { margin-bottom: 25px; }.page-header h1 { font-size: 1.875rem; }.today { font-size: .75rem; }.header-actions { gap: 7px; }.mobile-settings { display: inline-flex; background: var(--surface); box-shadow: var(--shadow); }.connection-button { min-height: 36px; padding: 7px 10px; font-size: .6875rem; }
  .summary-grid { gap: 10px; margin-bottom: 24px; }.summary-card { min-height: 119px; padding: 15px 18px; border-radius: 18px; }.summary-label { font-size: .75rem; }.summary-value { font-size: 1.875rem; margin-top: 9px; }.summary-track { margin-top: 12px; }.health-ring { width: 28px; height: 28px; top: 13px; right: 14px; }.health-link { font-size: .6875rem; margin-top: 7px; }.traffic-value { margin-top: 12px; }.traffic-value strong { font-size: 1.0625rem; }.traffic-value.secondary { margin-top: 5px; }
  .section-heading { margin-bottom: 15px; }.section-heading h2 { font-size: 1.125rem; }.view-controls { gap: 7px; }.segmented button { min-height: 32px; padding: 4px 8px; }.metric-switch .icon { display: none; }.layout-switch button { padding: 4px 8px; }.filter-bar { gap: 12px; }.search-field { border-radius: 12px; }.search-field input { font-size: 1rem; height: 44px; }.group-tabs button { min-height: 40px; font-size: .8125rem; padding-inline: 8px; }.list-toolbar { padding: 6px 0 9px; }
  .nodes-grid { grid-template-columns: 1fr; gap: 14px; }.node-card { border-radius: 19px; padding: 20px 22px 0; }.node-identity { gap: 12px; }.node-title h3 { font-size: 1rem; }.node-title > span { font-size: .75rem; }.favorite-button { width: 38px; height: 38px; }.favorite-button .icon { width: 18px; height: 18px; }.node-state { margin-top: 16px; }.status-badge, .node-state > span:last-child:not(.status-badge) { font-size: .75rem; }.node-resources { gap: 26px; margin-top: 20px; }.resource-heading > span { font-size: .75rem; }.resource-heading strong { font-size: 1.375rem; }.resource-heading small { font-size: .75rem; }.node-disk { font-size: .75rem; padding-bottom: 17px; }.node-disk strong { font-size: .75rem; }.node-footer { min-height: 46px; font-size: .75rem; gap: 18px; }
  .mobile-navigation { display: flex; position: fixed; z-index: 20; bottom: 14px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(360px, calc(100% - 40px)); border-radius: 25px; padding: 5px; background: var(--sidebar); border: 1px solid var(--line); backdrop-filter: blur(22px) saturate(160%); box-shadow: 0 5px 25px #0001; }.mobile-navigation button { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; border-radius: 20px; font-size: .625rem; color: var(--secondary); }.mobile-navigation button.active { color: var(--blue); background: var(--blue-soft); font-weight: 600; }.mobile-navigation .icon { height: 21px; width: 21px; }
  .list-layout .node-card { padding: 17px 18px; grid-template-columns: minmax(0, 1fr) minmax(130px, 1fr); gap: 5px 15px; }.list-layout .device-icon { display: none; }.list-layout .node-identity { gap: 0; }.list-layout .node-title h3 { font-size: .875rem; }.list-layout .node-title > span { font-size: .625rem; }.list-layout .favorite-button { width: 30px; height: 36px; margin: 0; }.list-layout .node-state { margin: 3px 0 0; }.list-layout .status-badge { font-size: .6875rem; }.list-layout .node-resources { gap: 12px; }.list-layout .resource-heading { display: block; }.list-layout .resource-heading > span { font-size: .625rem; }.list-layout .resource-heading strong { display: block; font-size: 1.0625rem; margin-top: 2px; }.list-layout .resource-heading small { font-size: .625rem; }.list-layout .resource-visual { height: 22px; }.list-layout .sparkline { height: 22px; }
  .sheet { max-width: 100%; width: 100%; max-height: calc(100dvh - max(18px, env(safe-area-inset-top))); margin: auto 0 0; border-radius: 25px 25px 0 0; }.sheet-handle { display: block; width: 34px; height: 5px; border-radius: 5px; background: var(--track); margin: 9px auto 0; flex-shrink: 0; }.detail-header { padding: 18px 20px 17px; gap: 11px; }.detail-title h2 { font-size: 1.25rem; }.detail-title > span { font-size: .6875rem; }.detail-header .device-icon { width: 42px; height: 42px; }.detail-header .favorite-button { width: 32px; height: 36px; }.close-button { width: 32px; height: 32px; }.sheet-scroll { padding: 0 20px calc(28px + env(safe-area-inset-bottom)); }.detail-stats { gap: 12px; margin: 23px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }.detail-stat { border: none; background: var(--surface-secondary); border-radius: 12px; padding: 13px 15px; }.detail-stat strong { font-size: 1.375rem; }.detail-stat > span { font-size: .6875rem; }
  .chart-panel { padding: 14px 12px; }.chart-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }.chart-metrics { justify-content: space-between; }.chart-metrics button { flex: 1; min-height: 36px; }.range-switch { justify-content: space-between; }.range-switch button { flex: 1; min-height: 30px; font-size: .6875rem; }.chart-wrapper { margin-top: 18px; }.history-chart { height: 190px; }.chart-label { font-size: 10px; }.chart-legend { font-size: .6875rem; }.detail-section { margin-top: 24px; }.volume-list, .info-list { padding-inline: 15px; }.info-row { font-size: .75rem; gap: 20px; }
  .event-row { padding: 16px; gap: 11px; }.event-row > .icon { display: none; }.event-copy > strong { font-size: .8125rem; }.event-row time { font-size: .6875rem; }
  .settings-header { padding: 20px 24px; }.settings-content { padding: 0 24px calc(28px + env(safe-area-inset-bottom)); }.settings-sheet { max-height: 90dvh; }.toast { bottom: calc(92px + env(safe-area-inset-bottom)); font-size: .8125rem; }
  .login-card { padding: 36px 28px 28px; }.login-screen { padding-inline: 22px; }
}
@media (max-width: 360px) {
  .main-content { padding-inline: 16px; }.summary-card { padding: 16px; }.summary-value { font-size: 1.875rem; }.summary-value > span { font-size: 1rem; }.traffic-value strong { font-size: .9375rem; }.traffic-value.secondary strong { font-size: .8125rem; }.summary-label { font-size: .6875rem; }.health-ring { width: 27px; right: 12px; }.metric-switch button { padding-inline: 6px; }.layout-switch button { padding-inline: 6px; }.node-card { padding-inline: 18px; }.node-footer { font-size: .6875rem; }.group-tabs button { font-size: .75rem; }.detail-header { gap: 7px; }.detail-header .device-icon { display: none; }.sheet-scroll { padding-inline: 16px; }
}
@media (pointer: coarse) {
  input, select { font-size: 1rem; }.icon-button, .favorite-button { min-width: 44px; min-height: 44px; }.segmented button, .group-tabs button, .chart-metrics button { min-height: 40px; }.connection-button, .filter-chip, .sort-control select { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  button:active:not(:disabled):not(.card-open):not(.event-row) { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .mobile-navigation { background: var(--surface); backdrop-filter: none; }.sheet::backdrop { backdrop-filter: none; background: rgb(0 0 0 / 45%); }
}
@media (prefers-contrast: more) {
  :root { --secondary: #444; --tertiary: #555; --line: #999; }:root[data-theme="dark"] { --secondary: #ddd; --tertiary: #ccc; --line: #888; }.sidebar, .mobile-navigation { background: var(--surface); backdrop-filter: none; }
}
.keyboard-input *, .keyboard-input *::before { transition-duration: 0s !important; }
