@font-face { font-family: "Space Grotesk"; src: url("/fonts/SpaceGrotesk-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/SpaceGrotesk-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/SpaceGrotesk-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/SpaceGrotesk-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #03050c; --panel: #0a1222; --panel-2: #0f1a2e; --line: #22304a; --line-2: #2d3d5a;
  --text: #f4f7ff; --muted: #93a1b8; --accent: #6af6d8; --accent-ink: #07101f; --danger: #ffb6bf; --danger-line: #8c4650;
  --ok: #3fe0b0; --warn: #f6c76a;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.console { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 22px 16px; border-right: 1px solid var(--line); background: var(--panel); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.brand img { border-radius: 7px; }
.nav { display: grid; gap: 4px; }
.nav a { padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: var(--accent-ink); background: var(--accent); }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; font-size: .86rem; }
.account-chip { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); overflow-wrap: anywhere; }
.muted { color: var(--muted); }
a.muted { text-decoration: none; } a.muted:hover { color: var(--text); }
.content { padding: 28px clamp(16px, 4vw, 48px) 60px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
h1 { margin: 0; font-size: 1.9rem; letter-spacing: -.01em; }
h2 { margin: 0 0 8px; font-size: 1.1rem; }
.lede { margin: 6px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 10px; align-items: center; }
input, select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="search"] { min-width: 220px; }
label { display: block; margin: 14px 0 0; color: #cbd5e1; font-size: .88rem; }
label input { display: block; width: 100%; margin-top: 6px; }
button { font: inherit; font-weight: 600; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .55; cursor: wait; }
button.primary, .button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { color: var(--danger); border-color: var(--danger-line); }
button.icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 1.3rem; line-height: 1; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); color: var(--text); text-decoration: none; font-weight: 600; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.notice { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #3e5b70; border-radius: 12px; background: #11263a; color: #d9f8f1; }
.notice.error { border-color: var(--danger-line); background: #381b24; color: #ffd9de; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
table.machines { width: 100%; border-collapse: collapse; font-size: .93rem; }
.machines th { text-align: left; padding: 12px 14px; color: var(--muted); font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.machines td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.machines tbody tr:last-child td { border-bottom: 0; }
.machines tbody tr { cursor: pointer; }
.machines tbody tr:hover { background: var(--panel-2); }
.machine-name { font-weight: 600; }
.machine-sub { display: block; margin-top: 2px; color: var(--muted); font-size: .82rem; }
.addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; color: #dbe4f2; }
.addr small { display: block; color: var(--muted); }
.badge { display: inline-block; margin-right: 6px; padding: 3px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: rgb(106 246 216 / 13%); color: var(--accent); }
.badge.exit { background: rgb(246 199 106 / 14%); color: var(--warn); }
.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.machines td:nth-child(3) { white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #5a6b85; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgb(63 224 176 / 18%); }
.actions-col { width: 56px; }
.menu-button { width: 36px; height: 36px; padding: 0; border-radius: 8px; font-size: 1.2rem; line-height: 1; }
.menu { position: absolute; z-index: 20; min-width: 220px; padding: 6px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); box-shadow: 0 18px 50px rgb(0 0 0 / 50%); }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px; font-weight: 500; }
.menu button:hover { background: var(--panel); }
.menu button.danger { color: var(--danger); }
.empty { padding: 40px 24px; border: 1px dashed var(--line-2); border-radius: 14px; text-align: center; }
.empty p { color: var(--muted); }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.card p { margin: 0; color: var(--muted); line-height: 1.55; }
code.inline { padding: 2px 6px; border-radius: 6px; background: var(--bg); color: var(--accent); font-size: .9em; }
pre { margin: 10px 0; padding: 14px; overflow-x: auto; border-radius: 12px; background: var(--bg); color: var(--accent); font-size: .84rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.drawer { position: fixed; inset: 0; z-index: 30; background: rgb(3 5 12 / 65%); display: flex; justify-content: flex-end; }
.drawer-panel { width: min(100%, 520px); height: 100%; overflow-y: auto; padding: 22px 24px 40px; background: var(--panel); border-left: 1px solid var(--line); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.drawer-body dl { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; margin: 0 0 18px; }
.drawer-body dt { color: var(--muted); font-size: .86rem; }
.drawer-body dd { margin: 0; overflow-wrap: anywhere; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tab { padding: 8px 12px; border-radius: 999px; background: transparent; }
.tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.signed-out { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.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) {
  .console { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; }
  .nav { display: flex; flex-wrap: wrap; }
  .sidebar-foot { margin-top: 0; width: 100%; grid-template-columns: 1fr auto; align-items: center; }
  .head-actions { width: 100%; }
  input[type="search"] { flex: 1; min-width: 0; }
  .drawer-body dl { grid-template-columns: 1fr; }
}
