:root {
  --void: #0a0b0f;
  --base: #0e1016;
  --surface: #141720;
  --surface-2: #1b1f2a;
  --line: #262b38;
  --ink: #e8eaf0;
  --muted: #9aa1b2;
  --faint: #5d6477;
  --signal: #f2b33d;
  --signal-dim: #3a2e14;
  --live: #3ecf8e;
  --halt: #f0616d;
  --info: #6aa7ff;
  --sans: Inter, ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body, #root { margin: 0; min-height: 100%; background: var(--void); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font-family: inherit; color: inherit; }
a { color: inherit; }
.mono { font-family: var(--mono); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.login-inner { width: 100%; max-width: 24rem; }
.brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.brand-mark { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--signal); }
.brand-mark svg { width: 22px; height: 22px; }
.brand-row h1 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.2; }
.brand-row p { margin: 2px 0 0; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.card-pad { padding: 24px; }
.card h2 { margin: 0 0 20px; font-size: 15px; font-weight: 500; }
.label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin: 0 0 6px; }
.input, .select, .textarea {
  width: 100%; background: var(--void); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font-size: 14px; outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--signal); box-shadow: 0 0 0 3px #f2b33d26; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.hint { margin-top: 20px; text-align: center; font-size: 12px; color: var(--faint); line-height: 1.6; }
.err { color: var(--halt); font-size: 13px; margin: 0 0 12px; }
.ok { color: var(--live); font-size: 13px; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--signal); color: #1a1406; border: 0; border-radius: 8px;
  padding: 9px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary.w-full { width: 100%; padding: 10px 14px; }
.btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 12px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink);
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--halt); border-color: transparent; }
.btn-danger:hover { border-color: #4a2a30; background: #1a1012; }
.btn-sm { padding: 5px 9px; font-size: 12px; }
.top {
  display: flex; align-items: center; gap: 4px; padding: 0 20px; height: 56px;
  border-bottom: 1px solid var(--line); background: rgba(10,11,15,.88); position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
}
.top a.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: 16px; font-weight: 600; font-size: 14px; }
.top nav { display: flex; gap: 2px; flex: 1; }
.navlink {
  background: none; border: 0; color: var(--muted); padding: 6px 11px; border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.navlink.on, .navlink:hover { color: var(--ink); }
.navlink.on { background: var(--surface-2); }
.top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sync { font-size: 12px; color: var(--live); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 22px 80px; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.meta { color: var(--faint); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.addbar { display: grid; grid-template-columns: 1.2fr 1.4fr 160px 120px 140px auto; gap: 8px; align-items: end; margin-bottom: 16px; }
.addbar label { margin: 0 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.chip {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.chip.on { color: var(--ink); border-color: #3a4254; background: var(--surface-2); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--faint); font-size: 11px; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover td { background: rgba(255,255,255,.015); }
.host { font-family: var(--mono); font-size: 12px; }
.badge { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-left: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segb { background: transparent; border: 0; color: var(--muted); padding: 6px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.segb.on { background: var(--signal-dim); color: var(--signal); }
.copy { background: none; border: 0; color: var(--faint); cursor: pointer; padding: 0 4px; }
.copy:hover { color: var(--ink); }
.rowacts { display: flex; gap: 4px; white-space: nowrap; }
.sw { position: relative; width: 36px; height: 20px; display: inline-block; vertical-align: middle; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw i { position: absolute; inset: 0; background: #2a303a; border-radius: 99px; }
.sw i:after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #c5cad3; top: 2px; left: 2px; transition: .15s; }
.sw input:checked + i { background: #2f5a38; }
.sw input:checked + i:after { transform: translateX(16px); background: var(--live); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat .k { color: var(--faint); font-size: 11px; }
.stat .v { font-size: 24px; font-weight: 650; margin-top: 4px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; z-index: 80;
}
.hidden { display: none !important; }
@media (max-width: 960px) {
  .addbar, .cards, .g2, .g3 { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; height: auto; padding: 10px 12px; }
}
