:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8e9e8;
  background: #101214;
  --surface: #17191c;
  --surface-hover: #1c1f22;
  --border: #303438;
  --text: #e8e9e8;
  --muted: #a0a5a7;
  --quiet: #7c8386;
  --green: #82ba98;
  --red: #c78c86;
  --amber: #c5b17f;
}
* { box-sizing: border-box; }
body { min-width: 280px; min-height: 100vh; margin: 0; background: #101214; }
button { font: inherit; }
.shell { display: flex; flex-direction: column; width: min(100%, 720px); min-height: 100vh; margin: 0 auto; padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom); }
.topbar { display: flex; align-items: center; min-height: 62px; gap: 12px; border-bottom: 1px solid var(--border); }
.identity { display: inline-flex; align-items: center; gap: 9px; color: #e5e7e6; font-size: 10px; font-weight: 700; letter-spacing: .095em; white-space: nowrap; }
.identity-mark { width: 13px; height: 13px; border: 2px solid #a1b7ab; position: relative; }
.identity-mark::after { position: absolute; right: -2px; bottom: -2px; width: 5px; height: 5px; background: #a1b7ab; content: ''; }
.topbar-section { flex: 1; padding-left: 13px; border-left: 1px solid #383c3f; color: var(--muted); font-size: 12px; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #353a3d; border-radius: 4px; background: transparent; color: #b8bec0; cursor: pointer; }
.icon-button:hover, .icon-button:focus-visible { background: #202427; color: white; }
.icon-button:focus-visible, .server-card:focus-visible, .container-card:focus-visible { outline: 2px solid #a1b7ab; outline-offset: 2px; }
.icon-button svg, .chevron { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.back-button { margin-left: -2px; }
.content { flex: 1; padding: 34px 0 40px; }
.eyebrow, .section-kicker, .breadcrumbs { color: var(--quiet); font-size: 10px; font-weight: 650; letter-spacing: .09em; }
h1, h2, p { margin: 0; }
h1 { margin-top: 8px; font-size: clamp(24px, 6vw, 30px); font-weight: 600; letter-spacing: -.035em; line-height: 1.15; overflow-wrap: anywhere; }
.subtitle { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 27px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.summary-item { min-width: 0; min-height: 87px; padding: 15px 16px; }
.summary-item + .summary-item { border-left: 1px solid var(--border); }
.summary-label { display: block; color: var(--quiet); font-size: 9px; font-weight: 700; letter-spacing: .06em; line-height: 1.4; }
.summary-value { display: inline-block; margin-top: 10px; color: #eceeec; font-size: 22px; font-weight: 550; line-height: 1; font-variant-numeric: tabular-nums; }
.summary-total { color: var(--quiet); font-size: 13px; }
.summary-caption { display: inline-block; margin-left: 4px; color: var(--quiet); font-size: 11px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 36px 0 12px; }
.section-heading h2 { margin-top: 6px; font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.section-count { padding-left: 4px; color: var(--quiet); font-size: 12px; font-weight: 450; }
.section-hint { padding-bottom: 1px; color: var(--quiet); font-size: 11px; }
.server-list, .container-list { overflow: hidden; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.server-card, .container-card { display: block; width: 100%; padding: 17px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.server-card + .server-card, .container-card + .container-card { border-top: 1px solid var(--border); }
.server-card:hover, .server-card:active, .container-card:hover, .container-card:active { background: var(--surface-hover); }
.server-head { display: flex; align-items: center; gap: 11px; }
.server-name-wrap, .container-main { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 5px; }
.server-name, .container-name { overflow: hidden; color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.server-role, .container-image { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.status, .container-state { display: inline-flex; flex: none; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; line-height: 1.25; }
.status-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }
.status.online, .container-state.online { color: var(--green); }
.status.offline, .container-state.offline { color: var(--red); }
.status.pending { color: var(--amber); }
.chevron { flex: none; color: #6e7679; }
.load-graphs { display: block; margin-top: 20px; padding-top: 15px; border-top: 1px solid #2b2f32; }
.graphs-heading { display: flex; justify-content: space-between; gap: 8px; color: var(--quiet); font-size: 10px; }
.graphs-heading > span:first-child { font-weight: 650; letter-spacing: .06em; }
.graphs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.load-chart { display: block; min-width: 0; padding: 10px 10px 7px; border: 1px solid #303638; border-radius: 3px; background: #121619; }
.chart-heading { display: flex; justify-content: space-between; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.chart-heading strong { color: #dce0de; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-plot { display: block; width: 100%; height: 54px; margin-top: 8px; overflow: hidden; }
.chart-grid { fill: none; stroke: #2d3736; stroke-width: .75; }
.chart-line { fill: none; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.chart-line.cpu { stroke: #82ba98; }
.chart-line.ram { stroke: #91a9bb; }
.chart-dot.cpu { fill: #82ba98; }
.chart-dot.ram { fill: #91a9bb; }
.graph-caption { display: block; margin-top: 9px; color: var(--quiet); font-size: 11px; line-height: 1.4; }
.server-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.server-metric { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.metric-label { color: var(--quiet); font-size: 11px; }
.metric-value { color: #dce0de; font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric-dim { color: var(--quiet); font-weight: 400; }
.server-foot { display: block; margin-top: 17px; color: var(--muted); font-size: 11px; }
.server-foot strong { color: #d7dcda; font-weight: 600; }
.separator { padding: 0 3px; color: #5d6467; }
.server-message { display: block; margin-top: 13px; color: var(--quiet); font-size: 12px; line-height: 1.4; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
.breadcrumbs span { color: #555d60; }
.detail-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 15px; }
.detail-heading h1 { margin: 0; }
.container-heading { align-items: flex-start; }
.container-heading .container-state { margin-top: 8px; max-width: 45%; text-align: right; }
.container-card { display: block; min-height: 71px; }
.container-head { display: flex; align-items: center; gap: 13px; }
.container-inline-graphs { display: block; margin-top: 15px; padding-top: 2px; border-top: 1px solid #2b2f32; }
.container-no-metrics { display: block; margin-top: 12px; color: var(--quiet); font-size: 11px; }
.server-monitor .load-graphs { margin-top: 0; padding-top: 14px; border-top: 0; }
.container-card .container-state { justify-content: flex-end; max-width: 45%; text-align: right; }
.container-name { font-size: 14px; }
.container-image { font-size: 11px; }
.image-name, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.image-name { overflow-wrap: anywhere; }
.detail-section { margin-top: 28px; border-top: 1px solid var(--border); }
.detail-section-head { display: flex; justify-content: space-between; align-items: center; min-height: 48px; border-bottom: 1px solid var(--border); }
.detail-section-head h2 { font-size: 13px; font-weight: 650; }
.detail-section-head > span { color: var(--quiet); font-size: 11px; }
.detail-row { display: grid; grid-template-columns: minmax(100px, 34%) minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid #292d30; font-size: 12px; line-height: 1.45; }
.detail-label { color: var(--muted); }
.detail-value { color: #dce0de; overflow-wrap: anywhere; }
.detail-value.mono { font-size: 11px; }
.port { display: block; }
.message-box { margin-top: 26px; padding: 17px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.message-title { color: #e2e5e3; font-size: 13px; font-weight: 600; }
.message-box p { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.loading { display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 40vh; color: var(--muted); font-size: 12px; }
.spinner { width: 14px; height: 14px; border: 2px solid #3b4240; border-top-color: #a1b7ab; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.footer { display: flex; justify-content: space-between; gap: 10px; padding: 13px 0 calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); color: var(--quiet); font-size: 10px; }
.footer-label { letter-spacing: .06em; }
.hidden { display: none !important; }
@media (max-width: 380px) {
  .shell { padding-right: 15px; padding-left: 15px; }
  .content { padding-top: 27px; }
  .summary-item { padding: 13px 10px; }
  .summary-label { font-size: 8px; }
  .summary-caption { display: block; margin: 4px 0 0; }
  .server-card, .container-card { padding: 15px 13px; }
  .server-metrics, .graphs-grid { gap: 8px; }
  .load-chart { padding: 9px 7px 6px; }
  .graphs-heading { font-size: 9px; }
  .metric-label { font-size: 10px; }
  .metric-value { font-size: 12px; }
  .status, .container-state { font-size: 10px; }
  .section-hint { font-size: 10px; }
  .identity { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
