:root {
  color-scheme: light;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #1b2c27;
  background: #f3f6f4;
  --text: #1b2c27;
  --muted: #53655d;
  --line: #dbe4de;
  --paper: #fff;
  --primary: #17654f;
  --primary-hover: #0e503e;
  --focus: #0b7658;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: #bee6d4; color: #123a2e; }
[hidden] { display: none !important; }

.frame { width: min(100% - 4rem, 76rem); margin-inline: auto; }
.topbar { color: #f4fbf7; background: #19352c; }
.topbar-inner { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; white-space: nowrap; }
.brand strong { font-size: 1.15rem; letter-spacing: -.02em; }
.brand-description { font-size: .88rem; color: #cbddd3; }
.brand-divider { width: 1px; height: 1.1rem; background: #56776a; margin-inline: .15rem; }
.brand-mark { width: 1.25rem; height: 1.25rem; display: inline-grid; place-items: center; flex: none; background: #3e9d7d; border-radius: .25rem; }
.brand-mark::after { content: ""; width: .48rem; height: .48rem; border: 1.5px solid #f4fbf7; transform: rotate(45deg); }
.quiet { background: transparent; border: 1px solid transparent; border-radius: .45rem; padding: .5rem .65rem; color: inherit; }
.topbar-action { color: #daebe2; min-height: 2.5rem; font-size: .88rem; }
.topbar-action:hover { background: #29473d; }
.topbar-action:focus-visible { outline-color: #8cd7b8; }

.workspace { padding-block: 2.6rem 3rem; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.5rem; }
h1, h2, p { margin: 0; }
h1 { font-size: 2.15rem; line-height: 1.2; letter-spacing: -.033em; font-weight: 720; }
.page-heading p, .login-panel > p { color: var(--muted); margin-top: .7rem; font-size: .9rem; line-height: 1.5; }
.button { min-height: 2.6rem; border: 1px solid transparent; border-radius: .5rem; padding: .55rem 1rem; white-space: nowrap; font-weight: 640; font-size: .9rem; transition: background-color .16s; }
.primary { color: white; background: var(--primary); }
.primary:not(:disabled):hover { background: var(--primary-hover); }
.primary:not(:disabled):active { background: #0c4234; }

.summary { margin: 0 0 1.4rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: .8rem; background: var(--paper); }
.summary > div { padding: .95rem 1.25rem; display: flex; align-items: baseline; justify-content: space-between; gap: .55rem; }
.summary > div + div { border-left: 1px solid var(--line); }
.summary dt { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.summary dd { margin: 0; font-size: 1.33rem; font-weight: 690; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary dd.attention { color: #9a4231; }
.notice { margin: -.15rem 0 1.25rem; padding: .75rem 1rem; color: #744b16; background: #fff5df; border: 1px solid #ead7b5; border-radius: .55rem; font-size: .9rem; line-height: 1.55; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.filters { display: inline-flex; padding: .22rem; gap: .16rem; border-radius: .55rem; background: #e5ede8; }
.filters button { border: 1px solid transparent; border-radius: .4rem; background: transparent; padding: .44rem .85rem; color: #42594f; font-weight: 620; font-size: .875rem; min-height: 2.15rem; white-space: nowrap; }
.filters button:hover { color: var(--text); background: #d9e6dd; }
.filters button[aria-pressed="true"] { background: var(--paper); color: #135844; border-color: #cedbd3; }
.search { position: relative; display: block; width: min(21rem, 42%); }
.search input, .login-panel input { color: var(--text); background: var(--paper); border: 1px solid #c9d7ce; border-radius: .5rem; padding: .6rem .75rem; min-height: 2.68rem; width: 100%; caret-color: var(--focus); }
.search input { padding-left: 2.4rem; font-size: .9rem; }
input::placeholder { color: #617268; opacity: 1; }
.search-symbol { color: #60736a; position: absolute; left: .85rem; top: .83rem; width: .72rem; height: .72rem; border: 1.5px solid currentColor; border-radius: 50%; pointer-events: none; }
.search-symbol::after { content: ""; height: 1.5px; width: .32rem; background: currentColor; position: absolute; left: .49rem; top: .54rem; transform: rotate(45deg); transform-origin: left; }

.hosts { display: grid; gap: 1.2rem; }
.host { background: var(--paper); border: 1px solid var(--line); border-radius: .88rem; overflow: hidden; }
.host-header { display: flex; justify-content: space-between; align-items: center; gap: .85rem; padding: 1rem 1.2rem; }
.host-title { display: flex; align-items: baseline; gap: .72rem; flex-wrap: wrap; }
.host h2 { font-size: 1.04rem; font-weight: 690; line-height: 1.35; }
.address { font: .82rem var(--mono); color: var(--muted); }
.host-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .48rem .8rem; color: var(--muted); font-size: .8rem; }
.host-info time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: .38rem; border-radius: .35rem; font-size: .83rem; font-weight: 620; line-height: 1.2; white-space: nowrap; padding: .27rem .42rem; background: #edf1ee; color: #4e6157; }
.pill::before { content: ""; width: .37rem; height: .37rem; flex: none; border-radius: 50%; background: currentColor; }
.pill.good { color: #17634d; background: #e1f1e9; }
.pill.alert { color: #a13227; background: #fae8e5; }
.pill.warn { color: #7c5516; background: #fff0d5; }
.pill.muted { color: #55675d; background: #edf1ee; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; table-layout: fixed; }
.table th { background: #f5f8f6; color: #50665a; text-align: left; font-weight: 620; font-size: .84rem; border-block: 1px solid #e3ebe6; }
.table th, .table td { padding: .65rem 1.2rem; vertical-align: middle; }
.table th:nth-child(1) { width: 48%; }
.table th:nth-child(2) { width: 17%; }
.table th:nth-child(3) { width: 22%; }
.table th:last-child, .table td:last-child { text-align: right; }
.table td { border-bottom: 1px solid #edf1ee; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f7faf8; }
.container-name { font-family: var(--mono); font-size: .87rem; color: #293a32; overflow-wrap: anywhere; }
.restart { font-variant-numeric: tabular-nums; color: #5b6b62; font-weight: 600; }
.restart.nonzero { color: #925718; }
.empty { border-top: 1px solid #e3ebe6; padding: 1.2rem; color: var(--muted); font-size: .9rem; line-height: 1.5; }

.login-layout { width: min(100% - 2rem, 27rem); margin: clamp(2rem, 11vh, 7rem) auto; }
.login-panel { padding: 2rem; background: var(--paper); border: 1px solid var(--line); border-radius: .95rem; }
.login-panel h1 { font-size: 1.85rem; }
.login-panel form { display: grid; gap: .55rem; margin-top: 1.6rem; }
.login-panel label { font-size: .9rem; font-weight: 640; }
.login-panel label:not(:first-child) { margin-top: .5rem; }
.login-panel .button { margin-top: .85rem; }
.form-message { color: #a13227; line-height: 1.45; font-size: .88rem; }

@media (min-width: 1120px) {
  .hosts:has(> .host + .host) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .hosts:has(> .host + .host) .table th,
  .hosts:has(> .host + .host) .table td { padding-inline: .73rem; }
  .hosts:has(> .host + .host) .table th:nth-child(1) { width: 45%; }
  .hosts:has(> .host + .host) .table th:nth-child(2) { width: 19%; }
  .hosts:has(> .host + .host) .host-header { padding-inline: .85rem; }
}
@media (max-width: 850px) {
  .frame { width: min(100% - 2.5rem, 76rem); }
  .summary > div { flex-direction: column; gap: .28rem; }
}
@media (max-width: 620px) {
  .frame { width: calc(100% - 1.7rem); }
  .topbar-inner { min-height: 3.7rem; }
  .brand { gap: .48rem; }
  .brand-description, .topbar-action { font-size: .8rem; }
  .brand-divider { margin-inline: .05rem; }
  .workspace { padding-block: 1.7rem 2rem; }
  h1 { font-size: 1.7rem; }
  .page-heading { align-items: flex-start; gap: .55rem; }
  .page-heading p { font-size: .82rem; }
  .button { padding-inline: .7rem; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary > div { flex-direction: row; padding: .7rem .8rem; align-items: baseline; }
  .summary > div:nth-child(3) { border-left: 0; }
  .summary > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .summary dd { font-size: 1.12rem; }
  .summary dt { font-size: .78rem; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filters button { flex: 1; padding-inline: .4rem; }
  .search { width: 100%; }
  .search input, .login-panel input { font-size: 1rem; }
  .host-header { align-items: flex-start; flex-direction: column; gap: .48rem; padding: .82rem .85rem; }
  .host-info { justify-content: flex-start; }
  .table, .table tbody { display: block; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table tbody tr { display: grid; grid-template-columns: .9fr 1.32fr .72fr; gap: .52rem .35rem; border-top: 1px solid #e8eee9; padding: .7rem .85rem; }
  .table td { border: 0; padding: 0; display: block; }
  .table td:first-child { grid-column: 1 / -1; padding-bottom: .14rem; }
  .table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .74rem; margin-bottom: .28rem; }
  .table td:last-child { text-align: left; }
  .table .pill { font-size: .77rem; }
  .login-panel { padding: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
