:root {
  color-scheme: dark;
  --bg: #08162a;
  --bg-2: #0b1c34;
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --ink: #0b1830;
  --muted: #64748b;
  --line: #dbe4ee;
  --accent: #13c5d8;
  --accent-2: #2d78ff;
  --online: #18bf96;
  --offline: #ff6f66;
  --radius: 12px;
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: #eef6ff; }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { height: 76px; padding: 0 clamp(24px, 3.2vw, 48px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(148,163,184,.14); }
.brand { color: #f8fbff; text-decoration: none; font-size: 29px; font-weight: 800; letter-spacing: -.8px; }
.brand span { color: var(--accent); }
.logout { color: #e9f2ff; background: transparent; border: 1px solid #41516a; border-radius: 9px; padding: 10px 20px; font-size: 14px; font-weight: 650; }
.logout:hover, .logout:focus-visible { border-color: var(--accent); outline: none; }
.login-view { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 32px 20px 88px; }
.login-panel { width: min(100%, 540px); padding: 58px 42px 46px; border: 1px solid #bfd0e1; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 70px rgba(0,0,0,.26); }
.lock { display: block; width: 50px; height: 50px; margin: 0 auto 28px; fill: none; stroke: #506782; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.login-panel h1 { margin: 0 0 36px; text-align: center; font-size: clamp(25px, 3vw, 34px); line-height: 1.2; letter-spacing: -1.2px; }
.login-panel label { display: block; margin-bottom: 9px; color: #4e627b; font-size: 13px; font-weight: 750; }
.login-panel input { width: 100%; height: 58px; padding: 0 16px; color: var(--ink); background: #fff; border: 1px solid #b9c9da; border-radius: 9px; font-size: 17px; outline: none; }
.login-panel input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(45,120,255,.15); }
.primary { width: 100%; height: 58px; margin-top: 18px; border: 0; border-radius: 9px; background: var(--accent); color: #061525; font-size: 16px; font-weight: 800; }
.primary:hover { background: #31d1e1; }
.primary:focus-visible { outline: 3px solid rgba(45,120,255,.38); outline-offset: 2px; }
.security-copy { margin: 28px 0 0; text-align: center; color: #687b91; font-size: 13px; line-height: 1.55; }
.error { min-height: 20px; margin: 12px 0 -8px; color: #cf3e37; text-align: center; font-size: 13px; font-weight: 650; }
.dashboard { width: min(100% - 64px, 1420px); margin: 0 auto; padding: 48px 0 72px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.page-head h1 { margin: 0 0 18px; color: #f8fbff; font-size: clamp(40px, 5vw, 58px); line-height: 1; letter-spacing: -2.5px; }
.summary { display: flex; align-items: center; gap: 13px; color: #dce7f5; font-size: 17px; }
.summary span { display: flex; align-items: center; gap: 9px; }
.summary b { font-weight: 760; }
.divider { width: 1px; height: 28px; background: #43536a; margin: 0 7px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.dot.online { background: var(--online); box-shadow: 0 0 0 4px rgba(24,191,150,.1); }
.dot.offline { background: var(--offline); box-shadow: 0 0 0 4px rgba(255,111,102,.1); }
.updated { margin: 0; color: #8fa1b7; font-size: 12px; }
.controls { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 16px; margin: 32px 0 20px; }
.search { height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid #31445f; border-radius: 10px; background: var(--bg-2); }
.search:focus-within { border-color: #5b8de7; box-shadow: 0 0 0 3px rgba(45,120,255,.12); }
.search svg { width: 21px; height: 21px; fill: none; stroke: #a6b6ca; stroke-width: 2; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: #eef6ff; font-size: 14px; }
.search input::placeholder { color: #8fa1b7; }
.filters { display: flex; gap: 10px; }
.filters button { min-width: 108px; padding: 0 19px; border: 1px solid #3a4d68; border-radius: 10px; background: transparent; color: #dce7f5; font-size: 14px; font-weight: 700; }
.filters button:hover, .filters button:focus-visible { border-color: #6f91c4; outline: none; }
.filters button.active { border-color: #3478f6; background: #3478f6; color: #fff; }
.table-shell { overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: 0 16px 55px rgba(0,0,0,.2); }
table { width: 100%; border-collapse: collapse; color: var(--ink); table-layout: fixed; }
th, td { padding: 19px 24px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: #607087; background: var(--surface-2); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
th:first-child { width: 25%; } th:nth-child(2) { width: 15%; } th:nth-child(3) { width: 22%; } th:nth-child(4) { width: 17%; } th:nth-child(5) { width: 21%; }
tbody tr { transition: background 140ms ease; }
tbody tr:hover { background: #f0f7ff; }
tbody tr:last-child td { border-bottom: 0; }
.node-name { font-weight: 800; letter-spacing: -.2px; }
.node-domain { display: block; margin-top: 5px; color: #7a899c; font-size: 11px; font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; }
.status.online { color: #079d79; } .status.offline { color: #e24e46; }
.address { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #2f425b; font-size: 13px; }
.connection { color: #32455e; font-weight: 650; }
.last-seen { color: #56687f; white-space: nowrap; }
.empty { margin: 0; padding: 50px 20px; color: #64748b; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 820px) {
  .topbar { height: 68px; padding-inline: 20px; }
  .brand { font-size: 24px; }
  .dashboard { width: min(100% - 32px, 1420px); padding-top: 34px; }
  .controls { grid-template-columns: 1fr; }
  .filters button { min-width: 0; flex: 1; height: 44px; }
  .filters { width: 100%; }
  .table-shell { overflow: hidden; }
  table, tbody { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { display: grid; grid-template-columns: 1fr 1fr; padding: 18px 20px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; padding: 8px 0; border: 0; font-size: 13px; }
  td::before { content: attr(data-label); flex: 0 0 auto; color: #728298; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
  td:first-child { grid-column: 1 / -1; display: block; padding: 0 0 13px; }
  td:first-child::before { display: none; }
  td:nth-child(odd):not(:first-child) { padding-left: 18px; }
  .node-name { font-size: 15px; }
  .node-domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .status { gap: 7px; }
  .address { font-size: 11px; }
  .connection, .last-seen { text-align: right; }
  .updated { display: none; }
  .login-panel { padding: 44px 24px 34px; }
}
@media (max-width: 430px) {
  .summary { font-size: 15px; }
  .filters { gap: 8px; }
  .filters button { padding-inline: 8px; font-size: 13px; }
  tbody tr { grid-template-columns: 1fr; }
  td:nth-child(odd):not(:first-child) { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

