/* homeVPN panel. Visual system shared with ip.xqly.me (paper, ink green, hairlines). */

@font-face {
  font-family: "Manrope Variable";
  src: url("vendor/manrope/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f7f8f5;
  --surface: #ffffff;
  --sunk: #f1f4f0;
  --ink: #192c27;
  --muted: #5b6b65;
  --faint: #8a9892;
  --line: #dce3dd;
  --line-strong: #c5d0c8;
  --brand: #1f5e4b;
  --brand-hover: #174b3b;
  --brand-tint: #e7f0eb;
  --positive: #286047;
  --positive-tint: #e8f2ec;
  --warning: #925413;
  --warning-tint: #f8efe2;
  --danger: #b53c3c;
  --danger-tint: #f9eceb;
  --info: #355f85;
  --info-tint: #eaf1f7;

  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --num: "Manrope Variable", var(--sans);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --r-badge: 4px;
  --r-button: 6px;
  --r-group: 8px;
  --r-field: 9px;
  --r-report: 12px;

  --rail: 304px;
  --fade: 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #b7c4bc transparent;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.65 var(--sans);
  caret-color: var(--brand);
}

::selection {
  background: #cde2d6;
  color: var(--ink);
}

* {
  scrollbar-width: thin;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--brand);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--brand-hover);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.num {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.boot {
  padding: 40px;
  color: var(--muted);
}

/* ---------- icons, status ---------- */

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon.is-spinning {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}

.status--ok {
  color: var(--positive);
}
.status--ok::before {
  background: var(--positive);
}
.status--warn {
  color: var(--warning);
}
.status--warn::before {
  background: var(--warning);
}
.status--bad {
  color: var(--danger);
}
.status--bad::before {
  background: var(--danger);
}
.status--idle {
  color: var(--muted);
}
.status--busy {
  color: var(--info);
}
.status--busy::before {
  background: var(--info);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: var(--r-badge);
  background: var(--sunk);
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  line-height: 20px;
  white-space: nowrap;
}

.chip--ok {
  background: var(--positive-tint);
  color: var(--positive);
}
.chip--warn {
  background: var(--warning-tint);
  color: var(--warning);
}
.chip--bad {
  background: var(--danger-tint);
  color: var(--danger);
}
.chip--brand {
  background: var(--brand-tint);
  color: var(--brand);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-button);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--fade), border-color var(--fade), color var(--fade);
}

.btn:hover {
  border-color: var(--muted);
}

.btn[aria-pressed="true"]:not(.btn-primary) {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
}

a.btn {
  text-decoration: none;
}

a.btn:hover {
  color: var(--ink);
}

.btn-primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
}

.btn-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  border-color: #962f2f;
  background: #962f2f;
}

.btn-text {
  min-height: 30px;
  padding: 4px 6px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn-text:hover {
  border-color: transparent;
  color: var(--ink);
  background: var(--sunk);
}

.btn-text.is-danger {
  color: var(--danger);
}

.btn-small {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.is-busy {
  opacity: 0.75;
  cursor: progress;
}

/* ---------- login ---------- */

.login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(380px, 100%);
  padding: 32px 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-report);
  background: var(--surface);
}

.login-panel h1 {
  margin: 22px 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-panel p {
  color: var(--muted);
  font-size: 14px;
}

.login-panel form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

/* ---------- shell ---------- */

.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
}

.brand-mark .icon {
  width: 18px;
  height: 18px;
}

.brand-name {
  font-family: var(--num);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  color: var(--muted);
  font-size: 12px;
}

.brand .btn-text {
  margin-left: auto;
}

.rail-section {
  padding: 16px 20px 18px;
  border-bottom: 1px solid var(--line);
}

.rail-section h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}

/* current exit */

.now-name {
  margin-top: 10px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.now-ip {
  margin-top: 2px;
  font-family: var(--num);
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.now-ip.is-empty {
  color: var(--muted);
}

.now-place {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.now-ip-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.now-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.now-identity dt {
  color: var(--muted);
}

.now-identity dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.callout {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #ecd9bf;
  border-radius: var(--r-group);
  background: var(--warning-tint);
  color: var(--warning);
  font-size: 13px;
}

.now-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-group);
}

.metric {
  padding: 9px 12px 10px;
}

.metric + .metric {
  border-left: 1px solid var(--line);
}

.metric dt {
  color: var(--muted);
  font-size: 11px;
}

.metric dd {
  margin: 2px 0 0;
  font-family: var(--num);
  font-size: 17px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.metric dd small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.metric dd.is-ok {
  color: var(--positive);
}
.metric dd.is-warn {
  color: var(--warning);
}
.metric dd.is-bad {
  color: var(--danger);
}
.metric dd.is-empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.chain .icon {
  width: 12px;
  height: 12px;
  color: var(--faint);
}

.chain b {
  color: var(--ink);
  font-weight: 550;
}

.chain .hop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.now-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.now-age {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.now-empty {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

/* quick switch */

.rail-switch {
  display: flex;
  min-height: 190px;
  flex: 1 1 auto;
  flex-direction: column;
}

.switcher {
  position: relative;
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  gap: 2px;
  margin: 0 -8px;
  padding: 2px;
  overflow-y: auto;
  list-style: none;
}

.switcher.has-more {
  mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
}

.switch-more {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.switch-kill {
  margin: 8px -8px 0;
  padding: 8px 2px 0;
  border-top: 1px solid var(--line);
}

.switch-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: var(--r-button);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--fade);
}

.switch-item:hover {
  background: var(--sunk);
}

.switch-item.is-active {
  background: var(--brand-tint);
  cursor: default;
}

.radio {
  display: grid;
  width: 16px;
  height: 16px;
  flex: none;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.is-active > .radio,
.radio.is-on {
  border-color: var(--brand);
}

.is-active > .radio::after,
.radio.is-on::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.switch-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switch-meta {
  color: var(--muted);
  font-family: var(--num);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.switch-meta.is-bad {
  color: var(--danger);
  font-family: var(--sans);
}

.switch-item.is-kill .switch-name {
  color: var(--muted);
}

.switch-item.is-kill .icon {
  color: var(--muted);
}

.confirm {
  display: grid;
  gap: 10px;
  margin: 4px 0 8px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-group);
  background: var(--paper);
  font-size: 13px;
}

.confirm.is-danger {
  border-color: #e3bcbb;
  background: var(--danger-tint);
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rail-foot {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 16px 20px 18px;
  color: var(--muted);
  font-size: 12px;
}

.rail-foot .status {
  font-size: 12px;
  font-weight: 500;
}

/* ---------- workspace ---------- */

.workspace {
  min-width: 0;
  padding: 26px 40px 64px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  padding: 8px 14px 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  color: var(--ink);
}

.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.tab .count {
  margin-left: 6px;
  color: var(--muted);
  font-family: var(--num);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.notices {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #ecd9bf;
  border-radius: var(--r-group);
  background: var(--warning-tint);
  color: var(--warning);
  font-size: 14px;
}

.notice .icon {
  margin-top: 3px;
}

.notice--bad {
  border-color: #e7c3c2;
  background: var(--danger-tint);
  color: var(--danger);
}

.notice--info {
  border-color: #cfdcea;
  background: var(--info-tint);
  color: var(--info);
}

.notice p + p,
.notice ul {
  margin-top: 4px;
}

.notice ul {
  padding-left: 18px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 14px;
}

.section-head h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.section-head p {
  color: var(--muted);
  font-size: 14px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- list table ---------- */

.table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-group);
  background: var(--surface);
}

.table > * + * {
  border-top: 1px solid var(--line);
}

.t-row {
  display: grid;
  grid-template-columns: 34px minmax(140px, 1.3fr) minmax(150px, 1.25fr) minmax(84px, 0.7fr) 76px minmax(140px, 1.2fr) 92px 40px;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  font-size: 14px;
}

.t-head {
  padding-top: 9px;
  padding-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.t-row.is-active {
  background: #f3f8f5;
}

.t-row.is-open {
  background: var(--paper);
}

.t-name {
  min-width: 0;
}

.t-name strong {
  display: block;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t-name small,
.t-sub {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t-cell {
  min-width: 0;
}

.t-cell .mono {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t-lat {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
}

.t-lat.is-bad {
  color: var(--danger);
  font-family: var(--sans);
  font-size: 13px;
}

.t-lat.is-empty,
.t-empty {
  color: var(--muted);
}

.t-pick {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.t-pick:hover .radio {
  border-color: var(--brand);
}

.t-pick[disabled] {
  cursor: default;
}

.t-toggle {
  justify-self: end;
}

.t-kill-item {
  display: none;
}

.t-toggle .icon {
  transition: transform var(--fade);
}

.is-open .t-toggle .icon {
  transform: rotate(180deg);
}

.detail {
  padding: 16px 20px 20px 60px;
  border-top: 1px dashed var(--line);
  background: var(--paper);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 28px;
  margin: 0;
}

.detail-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-grid dd {
  margin: 2px 0 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.detail-grid .chain {
  margin-top: 2px;
  font-size: 13px;
}

.inline-hint {
  color: var(--muted);
  font-size: 12px;
}

.quality {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-group);
  background: var(--surface);
  font-size: 13px;
}

.quality-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.quality ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.empty {
  padding: 40px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-group);
  background: var(--surface);
  text-align: center;
}

.empty h2 {
  font-size: 17px;
  font-weight: 600;
}

.empty p {
  max-width: 52ch;
  margin: 6px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.empty code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
}

.empty .toolbar {
  justify-content: center;
  margin-top: 18px;
}

/* ---------- forms ---------- */

.panel {
  min-width: 0;
  margin-bottom: 18px;
  padding: 20px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-group);
  background: var(--surface);
}

.panel h2 {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 600;
}

.panel > p {
  color: var(--muted);
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 16px;
}

.span-2 {
  grid-column: span 2;
}
.span-3 {
  grid-column: span 3;
}
.span-4 {
  grid-column: span 4;
}
.span-6 {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 5px;
  align-content: start;
}

.field > span {
  font-size: 13px;
  font-weight: 550;
}

.field .hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-field);
  background: var(--surface);
  font-size: 14px;
  transition: border-color var(--fade);
}

.textarea {
  min-height: 150px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: #7d8a84;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--muted);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  border-color: var(--brand);
  outline: 2px solid #b9d5c6;
  outline-offset: 0;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--brand);
}

.check small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.seg {
  display: inline-flex;
  justify-self: start;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-field);
  background: var(--sunk);
}

.seg button {
  padding: 5px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px -1px rgba(25, 44, 39, 0.35);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.form-actions .hint {
  color: var(--muted);
  font-size: 12px;
}

.errorbox {
  margin-top: 16px;
  padding: 11px 14px;
  border: 1px solid #e7c3c2;
  border-radius: var(--r-group);
  background: var(--danger-tint);
  color: var(--danger);
  font-size: 13px;
}

.errorbox ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.errorbox code {
  font-family: var(--mono);
}

/* ---------- client & settings ---------- */

.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.stack > .panel {
  margin-bottom: 0;
}

.copyline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: var(--paper);
}

.copyline code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}

.label-row:first-of-type {
  margin-top: 14px;
}

.label-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.steps {
  margin: 12px 0 0;
  padding-left: 20px;
  font-size: 14px;
}

.steps li + li {
  margin-top: 4px;
}

.steps b {
  font-weight: 600;
}

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

.split p {
  font-size: 13px;
}

.list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-group);
  background: var(--surface);
}

.list > * + * {
  border-top: 1px solid var(--line);
}

.list-row {
  padding: 18px 20px;
}

.list-row .section-head {
  margin-bottom: 0;
}

.list-row h2 {
  font-size: 16px;
  font-weight: 600;
}

.list-row form h2 {
  margin-bottom: 4px;
}

.prehop-nodes {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-group);
  background: var(--surface);
  font-size: 13px;
}

.node-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 104px;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
}

.node-row:first-child {
  border-top: 0;
}

.node-row.is-now {
  background: #f3f8f5;
}

.node-row .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- toasts ---------- */

.toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: grid;
  width: min(420px, calc(100vw - 32px));
  gap: 10px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-group);
  background: var(--surface);
  box-shadow: 0 8px 24px -6px #263c3b4d;
  font-size: 14px;
  animation: toast-in var(--fade);
}

.toast > .icon {
  margin-top: 3px;
}

.toast--ok > .icon {
  color: var(--positive);
}

.toast--bad > .icon {
  color: var(--danger);
}

.toast-body {
  min-width: 0;
  flex: 1;
}

.toast-body p + p,
.toast-body ul {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.toast-body ul {
  padding-left: 18px;
}

@keyframes toast-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .t-row {
    grid-template-columns: 34px minmax(130px, 1.3fr) minmax(130px, 1fr) 76px minmax(130px, 1.1fr) 40px;
  }
  .t-row .c-via,
  .t-row .c-quality {
    display: none;
  }
}

@media (max-width: 1000px) {
  :root {
    --rail: 268px;
  }
  .workspace {
    padding: 22px 24px 56px;
  }
}

@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .rail {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rail-foot,
  .rail-switch {
    display: none;
  }
  .t-kill-item {
    display: block;
  }
  .workspace {
    padding: 18px 16px 48px;
  }
  .t-head {
    display: none;
  }
  .t-row {
    grid-template-columns: 34px minmax(0, 1fr) auto 32px;
    grid-template-areas:
      "pick name lat toggle"
      "pick addr ip ip";
    gap: 2px 10px;
  }
  .t-row .c-pick {
    grid-area: pick;
  }
  .t-row .c-name {
    grid-area: name;
  }
  .t-row .c-addr {
    grid-area: addr;
    color: var(--muted);
  }
  .t-row .c-lat {
    grid-area: lat;
    text-align: right;
  }
  .t-row .c-ip {
    grid-area: ip;
    text-align: right;
  }
  .t-row .c-toggle {
    grid-area: toggle;
  }
  .t-row .c-ip .t-sub {
    display: none;
  }
  .detail {
    padding: 14px 16px 18px;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .span-2,
  .span-3,
  .span-4 {
    grid-column: 1 / -1;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .section-head h1 {
    font-size: 20px;
  }
  .toasts {
    right: 16px;
    bottom: 16px;
  }
}
