:root {
  --bg: #0a0e15;
  --bg-soft: #0e1420;
  --panel: #121a28;
  --panel-2: #172033;
  --panel-3: #1d2840;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --text: #e7ebf3;
  --muted: #8a96ab;
  --accent: #6d8bff;
  --accent-2: #4f6ef7;
  --green: #35d39a;
  --green-soft: rgba(53, 211, 154, 0.12);
  --red: #f47575;
  --red-soft: rgba(244, 117, 117, 0.12);
  --amber: #f5b94a;
  --amber-soft: rgba(245, 185, 74, 0.13);
  --blue-soft: rgba(109, 139, 255, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 9px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  height: 100%;
}

body {
  background: radial-gradient(1200px 700px at 85% -10%, rgba(79, 110, 247, 0.16), transparent 60%),
              radial-gradient(900px 600px at -10% 110%, rgba(53, 211, 154, 0.08), transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 50% 0%, black, transparent 78%);
  z-index: 0;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
code { font-family: var(--mono); }

/* ---------- brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand-large { justify-content: center; margin-bottom: 22px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #dbe4ff;
  background: linear-gradient(145deg, rgba(109, 139, 255, 0.95), rgba(79, 110, 247, 0.62));
  box-shadow: 0 8px 20px rgba(79, 110, 247, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.brand-text { font-size: 18px; }

/* ---------- buttons / fields ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-2);
  transition: background .15s ease, border-color .15s ease, transform .08s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 22px rgba(79, 110, 247, 0.32);
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost {
  background: rgba(148, 163, 184, 0.06);
  border-color: var(--border);
}
.btn-ghost:hover { background: rgba(148, 163, 184, 0.13); border-color: var(--border-strong); }
.btn-danger {
  background: var(--red-soft);
  border-color: rgba(244, 117, 117, 0.32);
  color: #ffb4b4;
}
.btn-danger:hover { background: rgba(244, 117, 117, 0.2); }
.btn-block { width: 100%; padding: 11px 16px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.06);
  color: var(--text);
  font-size: 19px;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: rgba(148, 163, 184, 0.16); border-color: var(--border-strong); }

.link-btn {
  border: 0;
  background: none;
  color: var(--accent);
  padding: 0;
  font-weight: 600;
}
.link-btn:hover { text-decoration: underline; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12.5px; font-weight: 600; color: #b7c0d1; }
.field .hint { font-style: normal; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.field input, .select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input::placeholder { color: #5c687c; }
.field input:focus, .select:focus {
  border-color: rgba(109, 139, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(109, 139, 255, 0.16);
  background: #0c121d;
}
.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--muted);
}
.check-field input { width: 15px; height: 15px; accent-color: var(--accent); }
.form-error {
  margin-top: 14px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--red-soft);
  border: 1px solid rgba(244, 117, 117, 0.28);
  color: #ffb4b4;
  font-size: 12.5px;
}

/* ---------- login ---------- */
.login-view {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 410px;
  background: linear-gradient(180deg, rgba(23, 32, 51, 0.9), rgba(16, 23, 36, 0.94));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 34px 32px 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.login-card h1 { font-size: 21px; margin-bottom: 6px; }
.login-card > .muted { font-size: 13px; margin-bottom: 24px; }
.login-card form { display: flex; flex-direction: column; gap: 16px; }
.login-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 11.5px;
  color: #6d7890;
}

/* ---------- layout ---------- */
.app-view {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  width: 278px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(18, 26, 40, 0.94), rgba(11, 16, 25, 0.94));
  border-right: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.sidebar-head { padding: 20px 18px 12px; }
.sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.server-list {
  flex: 1;
  overflow-y: auto;
  padding: 2px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.server-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 11px;
  padding: 10px 11px;
  color: var(--text);
  transition: background .14s ease, border-color .14s ease;
}
.server-item:hover { background: rgba(148, 163, 184, 0.07); }
.server-item.active {
  background: linear-gradient(100deg, rgba(109, 139, 255, 0.18), rgba(109, 139, 255, 0.05));
  border-color: rgba(109, 139, 255, 0.3);
}
.server-item-main { min-width: 0; flex: 1; }
.server-item-name {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.server-item-sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}
.server-item-count {
  flex: none;
  font-size: 11px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
  border-radius: 20px;
  padding: 2px 7px;
}
.server-edit {
  flex: none;
  opacity: 0;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(10, 14, 21, 0.5);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  transition: opacity .14s ease, background .14s ease;
}
.server-item:hover .server-edit, .server-item.active .server-edit { opacity: 1; }
.server-edit:hover { background: rgba(148, 163, 184, 0.18); color: var(--text); }
.sidebar-empty {
  padding: 12px 18px 24px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
}
.sidebar-foot {
  border-top: 1px solid var(--border);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-chip { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.user-chip div { min-width: 0; }
.user-chip strong {
  display: block;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip small { color: var(--muted); font-size: 11px; }
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(109, 139, 255, 0.35), rgba(53, 211, 154, 0.24));
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 12px;
}

.dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: #5b6678;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.08);
}
.dot.online { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft), 0 0 12px rgba(53, 211, 154, .45); }
.dot.offline { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.dot.loading { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }

/* ---------- main ---------- */
.main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 28px 34px 60px;
}
.empty-state {
  min-height: calc(100vh - 88px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}
.empty-art {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 24px;
  color: var(--accent);
  background: var(--blue-soft);
  border: 1px solid rgba(109, 139, 255, 0.24);
  margin-bottom: 8px;
}
.empty-state h2 { font-size: 20px; }
.empty-state p { max-width: 430px; margin-bottom: 12px; }

.dashboard { max-width: 1180px; margin: 0 auto; }
.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.dash-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.dash-title .dot { width: 12px; height: 12px; margin-top: 4px; }
.title-row { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.title-row h1 { font-size: 24px; letter-spacing: -0.02em; }
.dash-title p { font-family: var(--mono); font-size: 12.5px; margin-top: 3px; }
.dash-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.updated { font-size: 11.5px; color: var(--muted); margin-right: 4px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  border: 1px solid transparent;
}
.badge.running { background: var(--green-soft); color: var(--green); border-color: rgba(53, 211, 154, 0.26); }
.badge.stopped { background: rgba(148, 163, 184, 0.1); color: #a6b0c2; }
.badge.fatal { background: var(--red-soft); color: var(--red); border-color: rgba(244, 117, 117, 0.28); }
.badge.other { background: var(--amber-soft); color: var(--amber); border-color: rgba(245, 185, 74, 0.26); }
.badge.online { background: var(--green-soft); color: var(--green); border-color: rgba(53, 211, 154, 0.26); }
.badge.offline { background: var(--red-soft); color: var(--red); border-color: rgba(244, 117, 117, 0.28); }

.offline-banner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 16px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--red-soft);
  border: 1px solid rgba(244, 117, 117, 0.28);
  color: #ffc0c0;
  font-size: 12.5px;
}
.offline-banner strong { color: #ffd0d0; }

.meta-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}
.meta-item {
  background: var(--panel);
  padding: 11px 15px;
  min-width: 0;
}
.meta-item span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.meta-item strong {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.stat strong { font-size: 26px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-running strong { color: var(--green); }
.stat-stopped strong { color: #b6c0d2; }
.stat-fatal strong { color: var(--red); }

.toolbar {
  display: flex;
  gap: 11px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
}
.search-wrap svg { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.search-wrap input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px 10px 38px;
  outline: none;
  color: var(--text);
}
.search-wrap input:focus {
  border-color: rgba(109, 139, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(109, 139, 255, 0.14);
}
.toolbar .select { width: 150px; flex: none; }

.loading-row, .panel-empty {
  padding: 34px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

/* ---------- process cards ---------- */
.process-list { display: flex; flex-direction: column; gap: 10px; }
.process-card {
  background: linear-gradient(180deg, rgba(23, 32, 51, 0.72), rgba(18, 26, 40, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s ease;
}
.process-card:hover { border-color: var(--border-strong); }
.process-card.is-fatal { border-color: rgba(244, 117, 117, 0.3); }
.proc-main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  flex-wrap: wrap;
}
.proc-ident { display: flex; align-items: center; gap: 11px; min-width: 180px; flex: 1; }
.proc-ident .dot { margin-top: 1px; }
.proc-name { font-weight: 700; font-size: 14.5px; letter-spacing: -0.01em; }
.proc-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.group-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}
.proc-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.proc-sub .spawnerr { color: var(--red); font-family: var(--font); }
.proc-indicators { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.proc-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.action-btn {
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.06);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #c4cddd;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.action-btn:hover { background: rgba(148, 163, 184, 0.15); color: #fff; }
.action-btn.start { color: #8ff0ca; border-color: rgba(53, 211, 154, 0.28); background: var(--green-soft); }
.action-btn.start:hover { background: rgba(53, 211, 154, 0.22); }
.action-btn.stop { color: #ffb4b4; border-color: rgba(244, 117, 117, 0.26); background: var(--red-soft); }
.action-btn.stop:hover { background: rgba(244, 117, 117, 0.2); }
.action-btn:disabled { opacity: .45; cursor: not-allowed; }
.more-wrap { position: relative; }
.more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 190px;
  background: #111a29;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.more-menu button {
  border: 0;
  background: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text);
}
.more-menu button:hover { background: rgba(148, 163, 184, 0.13); }
.more-menu .danger { color: #ffb4b4; }
.more-menu .menu-label { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; padding: 7px 10px 3px; }

.proc-detail {
  border-top: 1px solid var(--border);
  background: rgba(6, 10, 17, 0.4);
  padding: 16px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 18px;
  margin-bottom: 16px;
}
.detail-item { min-width: 0; }
.detail-item span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.detail-item strong, .detail-item code {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.detail-item code { font-family: var(--mono); color: #cbd5e7; }
.config-title { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.config-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.config-table th, .config-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  vertical-align: top;
}
.config-table th { color: var(--muted); font-weight: 600; font-family: var(--mono); white-space: nowrap; width: 32%; }
.config-table td { font-family: var(--mono); color: #c3cde0; overflow-wrap: anywhere; }
.config-table tr:last-child th, .config-table tr:last-child td { border-bottom: 0; }
.config-scroll { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 9px; }
.config-scroll .config-table th { position: sticky; top: 0; background: #101828; }
.config-empty { color: var(--muted); font-size: 12.5px; }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 12, 0.72);
  backdrop-filter: blur(5px);
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  background: linear-gradient(180deg, #151e2f, #101725);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px 24px;
  animation: pop .16s ease;
}
.modal-wide { max-width: 900px; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.modal-head h2 { font-size: 18px; }
.modal-head .muted { font-size: 12px; margin-top: 2px; font-family: var(--mono); }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.field-full { grid-column: 1 / -1; }
.modal-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ---------- logs ---------- */
.logs-actions { display: flex; align-items: center; gap: 9px; }
.path-chip {
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  max-width: 330px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.tab {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.logs .btn { margin-left: auto; }
.log-content {
  margin: 0;
  height: min(56vh, 560px);
  overflow: auto;
  background: #070b12;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: #c6d0e2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.log-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ---------- toasts ---------- */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 360px;
}
.toast {
  background: #14202f;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 12.5px;
  box-shadow: var(--shadow);
  animation: slide-in .18s ease;
}
.toast.ok { border-color: rgba(53, 211, 154, 0.4); }
.toast.err { border-color: rgba(244, 117, 117, 0.45); }
@keyframes slide-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.22); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.34); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .meta-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .app-view { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
  .sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--border); }
  .server-list { flex-direction: row; overflow-x: auto; padding-bottom: 12px; }
  .server-item { flex: none; width: 210px; }
  .sidebar-foot { display: none; }
  .main { overflow: visible; padding: 22px 18px 50px; }
  .login-card { padding: 28px 22px 22px; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-strip { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .proc-main { align-items: flex-start; }
  .proc-actions { width: 100%; }
  .toolbar .select { width: 100%; }
  .path-chip { display: none; }
}
