.transcoder-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 240px);
  align-items: center;
  gap: 12px 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.transcoder-label { overflow-wrap: anywhere; }
.transcoder-label small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.transcoder-field input:not([type="checkbox"]), .transcoder-field select {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font: inherit;
}
.transcoder-field input[type="checkbox"] { justify-self: end; width: 20px; height: 20px; accent-color: var(--primary); }
.transcoder-field :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.transcoder-field :disabled { opacity: 0.5; }
.transcoder-feedback:empty { display: none; }
.transcoder-label .transcoder-restart-label { color: var(--warning); }
.settings-restart-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-left: 3px solid var(--warning);
  background: rgb(243 189 79 / 0.08);
  overflow-wrap: anywhere;
}
.settings-restart-banner strong { display: block; color: var(--warning); font-size: 14px; }
.settings-restart-copy > span { display: block; margin-top: 4px; color: var(--text); font-size: 13px; }
.restart-now { display: flex; align-items: center; justify-content: center; gap: 6px; width: 124px; min-height: 40px; padding: 8px; border: 1px solid var(--warning); border-radius: 5px; background: transparent; color: var(--warning); font: inherit; font-size: 12px; cursor: pointer; }
.restart-now .ui-icon { width: 16px; height: 16px; }
.restart-now:disabled { opacity: 0.6; cursor: wait; }
.restart-now:focus-visible { outline: 2px solid var(--warning); outline-offset: 3px; }
@media (max-width: 599px) {
  .transcoder-field { grid-template-columns: minmax(0, 1fr) auto; }
  .transcoder-field input:not([type="checkbox"]), .transcoder-field select { grid-column: 1 / -1; }
}
:root {
  color-scheme: dark;
  --background: #100c0e;
  --surface: #231a1e;
  --surface-raised: #302127;
  --border: #3e2b33;
  --text: #f5f0f2;
  --muted: #a9959e;
  --primary: #ee8b9d;
  --primary-soft: #342229;
  --cpu: #ee8b9d;
  --ram: #4bc7b1;
  --download: #79b8ed;
  --upload: #e6bd72;
  --warning: #f3bd4f;
  --danger: #f26666;
  --success: #43d3a2;
  font-family: "Avenir Next", Avenir, "Trebuchet MS", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  --tab-bottom-padding: max(7px, env(safe-area-inset-bottom));
  --tab-bar-height: calc(60px + var(--tab-bottom-padding));
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  background-color: var(--background);
  background-image: linear-gradient(180deg, rgb(238 139 157 / 0.015), transparent 360px);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  height: var(--tab-bar-height);
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px
    max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
  background: rgb(16 12 14 / 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.view-banner {
  min-height: 54px;
  padding-top: calc(10px + env(safe-area-inset-top));
  padding-bottom: 10px;
}

.live-indicator {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px currentColor;
}

.brand,
.header-actions,
.metric-header,
.section-heading {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 10px;
}

.brand-icon {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #241318;
  background: var(--primary);
  font-size: 21px;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 17px;
  line-height: 1.15;
}

.brand p {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-live {
  color: var(--success);
}

.status-degraded,
.status-waiting {
  color: var(--warning);
}

.status-offline {
  color: var(--danger);
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.icon-button:active {
  background: var(--surface-raised);
}

.icon-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.icon-button[disabled] {
  cursor: wait;
  opacity: 0.55;
}

.page-shell {
  width: min(100%, 1180px);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  margin: 0 auto;
  padding: 24px max(16px, env(safe-area-inset-right)) 24px
    max(16px, env(safe-area-inset-left));
}

.bottom-tabs {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--tab-bar-height);
  padding: 7px max(12px, env(safe-area-inset-right)) var(--tab-bottom-padding)
    max(12px, env(safe-area-inset-left));
  border-top: 1px solid rgb(255 255 255 / 0.08);
  background: rgb(16 12 14 / 0.94);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}

.standalone body {
  --tab-bottom-padding: 12px;
}

@media (max-width: 759px) {
  body {
    --tab-bottom-padding: calc(max(7px, env(safe-area-inset-bottom)) + 4px);
  }

  .standalone body {
    --tab-bottom-padding: 16px;
  }
}

.settings-status:empty {
  display: none;
}

@supports (-webkit-touch-callout: none) {
  .standalone body {
    position: relative;
    height: 100vh;
    height: 100lvh;
  }

  .standalone .bottom-tabs {
    position: absolute;
  }
}

.tab-list {
  display: grid;
  width: min(100%, 480px);
  min-height: 52px;
  margin: 0 auto;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tab-button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 3px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tab-button.active {
  color: var(--primary);
}

.settings-section { max-width: 680px; margin-inline: auto; }
.activity-heading { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 12px; margin-bottom: 24px; }
.activity-heading h2 { text-align: center; margin: 0; font-size: 22px; }
#activity-heading:focus { outline: none; }
.icon-history { --icon-source: url("/icons/history.svg"); }
.icon-library { --icon-source: url("/icons/library.svg"); }
.icon-refresh { --icon-source: url("/icons/refresh-cw.svg"); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.library-section { max-width: 900px; margin-inline: auto; }
.library-sources { display: flex; gap: 0; border: 0; margin: 0 0 16px; padding: 0; }
.library-sources label { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-bottom: 2px solid var(--border); cursor: pointer; }
.library-sources label:has(input:checked) { border-color: var(--primary); }
.library-sources input { accent-color: var(--primary); }
.library-query-label { display: block; }
#library-query { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: var(--surface); font: inherit; }
.library-list { list-style: none; margin: 0; padding: 0; }
.library-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.library-copy { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.library-copy strong { font-size: 16px; font-weight: 500; }
.library-row button { flex: 0 0 auto; }
.library-row button:disabled, .dialog-actions button:disabled { opacity: 0.45; cursor: default; }
.library-copy .metric-detail, #replacement-file { text-align: left; }
.library-series-heading { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.library-series-heading h3 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.library-operation-heading { margin-top: 32px; }
.library-operation-heading h3 { font-size: 18px; }
#replacement-dialog { max-width: min(480px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 24px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); overflow-wrap: anywhere; line-height: 1.5; }
#replacement-dialog::backdrop { background: rgb(0 0 0 / 0.65); }
#replacement-dialog h2 { font-size: 22px; margin-top: 0; }
.dialog-actions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-inline: -24px; }
.dialog-actions .settings-command { width: 100%; min-width: 0; margin: 0; padding: 10px 4px; white-space: normal; text-align: center; justify-content: center; }
.dialog-actions button:focus:not(:focus-visible) { outline: none; }
.dialog-actions button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
#replacement-cancel { grid-column: 2 / 4; }
#replacement-confirm { grid-column: 4 / 6; }
#replacement-heading:focus { outline: none; }
#replacement-confirm { color: var(--danger); }
.icon-filter { --icon-source: url("/icons/list-filter.svg"); }
.icon-move-up { --icon-source: url("/icons/arrow-left.svg"); transform: rotate(90deg); }
.icon-move-down { --icon-source: url("/icons/arrow-left.svg"); transform: rotate(-90deg); }
.history-filter { position: relative; }
#activity-filter { width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); }
#activity-filter.filter-active { color: var(--primary); }
#activity-filter-menu { position: absolute; z-index: 5; right: 0; top: 48px; width: 150px; margin: 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
#activity-filter-menu legend { font-size: 12px; color: var(--muted); }
#activity-filter-menu label { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
#activity-filter-menu input { accent-color: var(--primary); }
#playback-history { grid-column: 3; grid-row: 1; justify-self: end; }
#playback-history, #activity-back, #settings-back { width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); }
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-row { padding: 0 0 20px; overflow-wrap: anywhere; }
.activity-row-heading { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 16px; cursor: pointer; list-style: none; }
.activity-row-heading::-webkit-details-marker { display: none; }
.activity-row-heading:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.activity-poster { position: relative; display: grid; place-items: center; width: 48px; height: 72px; background: var(--surface); color: var(--muted); border-radius: 4px; overflow: hidden; }
.activity-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.activity-copy { display: grid; gap: 4px; min-width: 0; }
.activity-title { font-size: 17px; font-weight: 500; line-height: 1.3; }
.activity-subtitle, .activity-user { color: var(--muted); font-size: 14px; line-height: 1.4; }
.activity-detail, .activity-times { color: var(--muted); font-size: 12px; margin: 8px 0 0 64px; line-height: 1.5; }
.activity-section .inline-message:empty { display: none; }
.freshness { color: var(--muted); font-size: 12px; margin: 0 0 16px; overflow-wrap: anywhere; }
.freshness-group { display: flex; flex-wrap: wrap; gap: 0 20px; }
.freshness.is-stale, .stale-data .disk-value { color: var(--warning); }
.resource-section.stale-data .metric-grid, .resource-section.stale-data .disk-list, .node-grid.stale-data, .session-card.stale-data { opacity: 0.55; }
.disk-summary { flex-wrap: wrap; }
.node-card.stale-data .node-stats, .node-card.stale-data .node-resources { opacity: 0.6; }
.network-panel.stale-data .network-values, .network-panel.stale-data .chart-wrap { opacity: 0.6; }
.settings-menu-item { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 20px 4px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font-size: 17px; }
.settings-menu-item > span:last-child { color: var(--muted); font-size: 26px; }
.settings-editor-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.settings-editor-heading h3 { margin: 0; font-size: 18px; }
.settings-command { margin-left: auto; padding: 10px 0 10px 12px; border: 0; background: transparent; color: var(--primary); cursor: pointer; font-size: 13px; }
.settings-fieldset { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
.notification-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.notification-settings button { min-height: 44px; }
.notification-group, .settings-group { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.notification-group:last-child, .settings-group:last-child { padding-bottom: 0; border-bottom: 0; }
.notification-heading, .settings-group-heading { margin: 0; color: var(--text); font-size: 14px; font-weight: 700; }
.notification-group .settings-height { margin: 12px 0 16px 20px; grid-template-columns: minmax(0, 1fr) auto; }
.notification-group .settings-height:has(input:disabled) { opacity: 0.45; }
.notification-group .settings-toggle:last-child, .settings-group .settings-toggle:last-child { border-bottom: 0; }
.settings-group .transcoder-field:last-child, .settings-group .settings-order-row:last-child { border-bottom: 0; }
.settings-group .settings-height { margin-top: 12px; grid-template-columns: minmax(0, 1fr) auto; }
.settings-group .settings-duration { flex-wrap: wrap; }
.settings-group .settings-duration:last-child { margin-bottom: 0; }
.settings-fieldset legend { padding: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.settings-order-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.settings-order-row .icon-button { width: 44px; height: 44px; }
.settings-order-row button:disabled { opacity: 0.25; cursor: default; }
.settings-toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 10px 0; border-bottom: 1px solid rgb(255 255 255 / 0.07); cursor: pointer; }
.settings-toggle span { overflow-wrap: anywhere; }
.settings-child { padding-left: 20px; color: var(--muted); font-size: 14px; }
.settings-toggle input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--primary); cursor: pointer; }
.settings-toggle:has(input:disabled) { opacity: 0.45; }
.settings-height { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 28px; }
.settings-height input { grid-column: 1 / -1; width: 100%; min-height: 32px; accent-color: var(--primary); }
.settings-height output, .settings-status { color: var(--muted); font-size: 12px; }

.settings-duration {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.settings-duration select {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.settings-duration select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.settings-status { min-height: 36px; margin-top: 16px; }
.settings-section button:focus-visible, .settings-section input:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.metric-grid > .disk-panel { grid-column: 1 / -1; margin-bottom: 0; }
.cpu-processes { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.cpu-processes h3 { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
#cpu-process-list { min-height: 66px; color: var(--muted); font-size: 12px; }
.cpu-process-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 12px; min-height: 22px; align-items: center; }
.cpu-process-row span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cpu-process-row span:last-child { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

.tab-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.ui-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: var(--icon-source) center / contain no-repeat;
  mask: var(--icon-source) center / contain no-repeat;
}

.icon-system {
  --icon-source: url("/icons/chart-no-axes-column-increasing.svg");
}

.icon-playing {
  --icon-source: url("/icons/circle-play.svg");
}

.icon-nodes {
  --icon-source: url("/icons/server.svg");
}

.icon-settings {
  --icon-source: url("/icons/settings.svg");
}

.icon-back {
  --icon-source: url("/icons/arrow-left.svg");
}

.tab-icon {
  width: 25px;
  height: 25px;
}

.tab-icon-wrap {
  position: relative;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
}

.tab-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid var(--background);
  border-radius: 10px;
  color: #fff;
  background: #ff453a;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transform: translate(50%, -50%);
}

.resource-section,
.nodes-section,
.sessions-section {
  margin-bottom: 32px;
}

.session-source.source-plex {
  color: #f3bd4f;
  border-color: rgb(243 189 79 / 0.35);
}

.session-source.source-silo {
  color: var(--primary);
  border-color: var(--primary-soft);
}

#session-message {
  margin-bottom: 16px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.section-heading > div:first-child {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  min-width: 0;
  text-align: center;
}

.section-heading > :last-child:not(div) {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

@media (max-width: 599px) {
  .section-heading > div:first-child {
    grid-column: 1 / -1;
  }

  .section-heading > .count-badge:last-child,
  .section-heading > .settings-command:last-child {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.eyebrow {
  margin-bottom: 3px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
}

.range-label,
.count-badge {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.count-badge {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.metric-grid,
.node-grid,
.sessions-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.node-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 13px;
  padding: 15px;
  border: 1px solid rgb(169 149 158 / 0.07);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
}

.node-header,
.node-route,
.node-stat {
  display: flex;
  align-items: center;
}

.node-header {
  justify-content: space-between;
  gap: 12px;
}

.node-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.node-name {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-role,
.node-route-label,
.node-stat-label,
.node-resources {
  color: var(--muted);
  font-size: 10px;
}

.node-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
}

.node-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.node-healthy {
  color: var(--success);
}

.node-unhealthy {
  color: var(--danger);
}

.node-disabled {
  color: var(--muted);
}

.node-route {
  gap: 8px;
}

.node-route-value {
  color: var(--primary);
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.node-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.node-stat {
  min-width: 0;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgb(255 255 255 / 0.055);
  border-radius: 5px;
  background: rgb(255 255 255 / 0.025);
  font-size: 10px;
}

.node-stat strong {
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-resources {
  padding-top: 10px;
  border-top: 1px solid rgb(255 255 255 / 0.06);
  font-variant-numeric: tabular-nums;
}

.metric-panel {
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgb(169 149 158 / 0.07);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
}

.disk-panel {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid rgb(169 149 158 / 0.07);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
}

.disk-heading,
.metric-section-heading {
  margin-bottom: 14px;
}

.disk-heading h3,
.metric-section-heading h3 {
  margin: 0;
  font-size: 15px;
}

.disk-list,
.disk-row {
  display: grid;
  gap: 9px;
}

.disk-list {
  gap: 14px;
}

.disk-row {
  --disk-color: var(--ram);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.disk-summary {
  display: grid;
  min-width: 0;
  gap: 8px;
  font-size: 11px;
}

.disk-free {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.disk-free-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.disk-free-number {
  color: var(--disk-color);
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.disk-free-unit,
.disk-free-label {
  color: var(--muted);
  font-size: 11px;
}

.disk-name {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disk-value,
.disk-empty {
  color: var(--muted);
  font-size: 11px;
}

.disk-value {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.disk-track {
  height: 9px;
  overflow: hidden;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.08);
}

.disk-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--disk-color);
}

.disk-row:has(.disk-warning) {
  --disk-color: var(--warning);
}

.disk-row:has(.disk-danger) {
  --disk-color: var(--danger);
}

.metric-header {
  min-height: 48px;
  justify-content: space-between;
  gap: 14px;
}

.metric-header > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.metric-name {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-header strong {
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cpu-panel .metric-header strong {
  color: var(--cpu);
}

.ram-panel .metric-header strong {
  color: var(--ram);
}

.cpu-panel,
.network-panel,
.ram-panel {
  grid-column: 1 / -1;
}

.network-header {
  align-items: flex-end;
}

.network-values {
  display: flex;
  align-items: flex-end;
  gap: 22px;
}

.network-value {
  display: grid;
  gap: 4px;
}

.network-direction {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.network-value strong {
  font-size: 20px;
}

.network-download strong,
.network-download .network-direction {
  color: var(--download);
}

.network-upload strong,
.network-upload .network-direction {
  color: var(--upload);
}

.metric-detail {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

#server-build {
  text-align: center;
}

.chart-wrap {
  position: relative;
  height: var(--chart-height, 140px);
  margin-top: 14px;
  padding-left: 25px;
}

.chart {
  display: block;
  width: 100%;
  height: var(--chart-height, 140px);
  overflow: visible;
  cursor: crosshair;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.chart-hit-area {
  fill: transparent;
  pointer-events: all;
}

.chart-grid {
  stroke: rgb(215 193 203 / 0.1);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-baseline {
  stroke: rgb(255 255 255 / 0.2);
}

.chart-threshold-warning {
  fill: rgb(243 189 79 / 0.035);
}

.chart-threshold-danger {
  fill: rgb(242 102 102 / 0.05);
}

.chart-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart-provisional {
  opacity: 0.45;
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  vector-effect: non-scaling-stroke;
}

.chart-point {
  stroke: var(--surface);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.chart-crosshair {
  pointer-events: none;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.chart-scrub-point {
  pointer-events: none;
  stroke: none;
}

.chart-scale {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  width: 22px;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chart-footer {
  display: flex;
  justify-content: space-between;
  padding-left: 25px;
  color: var(--muted);
  font-size: 9px;
}

.inline-message {
  margin-top: 10px;
  color: var(--warning);
  font-size: 12px;
}

.session-selectable {
  display: grid;
  grid-template-columns: 0px minmax(0, 1fr);
  min-width: 0;
  transition: grid-template-columns 180ms ease-out;
}
.selection-mode .session-selectable { grid-template-columns: 44px minmax(0, 1fr); }
.session-selection {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  visibility: hidden;
  cursor: pointer;
}
.selection-mode .session-selection { visibility: visible; }
.session-selection input {
  appearance: none;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: var(--background);
  cursor: pointer;
}
.session-selection input:checked { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 5px var(--background); }
.session-selection input:disabled { opacity: 0.35; cursor: default; }
.session-selection input:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.session-selectable .session-card {
  height: 100%;
  min-width: 0;
}
.playback-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
}
#session-count, #node-summary {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  font-size: 12px;
  text-align: center;
}
#node-summary {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  place-items: center;
  min-height: 44px;
}
.playback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  min-width: 0;
}
.playback-actions button {
  max-width: 100%;
  overflow-wrap: anywhere;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
#playback-terminate { background: #9f293b; color: #fff; min-height: 36px; padding: 4px 12px; align-self: center; }
#playback-select {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
}
.icon-select-sessions { --icon-source: url("/icons/x.svg"); }
#playback-select[aria-pressed="true"] .icon-select-sessions { --icon-source: url("/icons/x.svg"); }
#playback-select:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.playback-actions button:disabled { opacity: 0.5; cursor: default; }
.session-stop-status { color: var(--warning); font-size: 11px; }
.session-stop-status:empty { display: none; }
@media (prefers-reduced-motion: reduce) {
  .session-selectable { transition: none; }
}

.session-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  clip-path: inset(0 round 16px);
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 130px;
  gap: 13px;
  padding: 13px;
  border: 1px solid rgb(169 149 158 / 0.07);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
}

.session-card > .session-backdrop {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  border-radius: 15px;
  clip-path: inset(0 round 15px);
  pointer-events: none;
}

.session-backdrop > img {
  position: absolute;
  inset: -35%;
  width: 170%;
  height: 170%;
  object-fit: cover;
  filter: blur(45px) saturate(1.25);
  opacity: 0.75;
  pointer-events: none;
}

.session-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgb(16 12 14 / 0.55), rgb(16 12 14 / 0.72));
  pointer-events: none;
}

.session-card .session-subtitle,
.session-card .session-footer {
  color: #ded4da;
}

.poster {
  position: relative;
  width: 76px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--primary);
  background: var(--background);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 18px;
}

.paused .poster img {
  opacity: 0.45;
}

.pause-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: rgb(0 0 0 / 0.32);
  font-size: 18px;
}

.session-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.session-title,
.session-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-title {
  font-size: 14px;
  font-weight: 800;
}

.session-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.session-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.tag {
  max-width: 145px;
  overflow: hidden;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: rgb(255 255 255 / 0.025);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-method {
  border-color: rgb(67 211 162 / 0.28);
  color: var(--success);
  background: rgb(67 211 162 / 0.08);
}

.silo-session-tags { align-items: center; }
.silo-session-tags .tag {
  line-height: 14px;
  padding-block: 4px 2px;
}
.tag-jellyfin {
  color: #b568cc;
  border-color: rgb(181 104 204 / 0.35);
  background: rgb(181 104 204 / 0.12);
}
.tag-hardware {
  color: #99edf3;
  border-color: rgb(45 172 187 / 0.35);
  background: rgb(45 172 187 / 0.12);
}

.tag-transcode {
  border-color: rgb(243 189 79 / 0.3);
  color: var(--warning);
  background: rgb(243 189 79 / 0.08);
}

.session-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted);
  font-size: 10px;
}

.avatar {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #241318;
  background: var(--primary);
  font-size: 9px;
  font-weight: 900;
}

.session-user {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-time {
  margin-left: auto;
  white-space: nowrap;
}

.progress-track {
  height: 3px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.08);
}

.progress-fill {
  height: 100%;
  background: var(--primary);
}

.empty-state {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 14px;
}

.empty-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
}

@media (min-width: 760px) {
  .topbar {
    padding-right: 28px;
    padding-left: 28px;
  }

  .page-shell {
    padding: 32px 28px;
  }

  .metric-grid,
  .node-grid,
  .sessions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .icon-button:active {
    transform: translateY(1px);
  }
}