:root {
  --bg: #07111d;
  --panel: #0d1d32;
  --panel-2: #10243d;
  --line: #263852;
  --text: #edf4ff;
  --muted: #9fb0c7;
  --gold: #e0b43f;
  --green: #27d39a;
  --blue: #1688ff;
  --red: #f0647d;
  --shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #091624;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(224, 180, 63, .6);
  background: linear-gradient(135deg, rgba(224, 180, 63, .22), rgba(74, 163, 255, .12));
}

.brand-mark img { width: 31px; height: 31px; }
.brand small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav a {
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 750;
}

.side-nav a:hover,
.side-nav a.active {
  color: var(--text);
  background: rgba(224, 180, 63, .12);
  border: 1px solid rgba(224, 180, 63, .4);
}

.side-card {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.label {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  margin-bottom: 6px;
}

.side-card small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.main {
  padding: 28px;
  background:
    radial-gradient(circle at 78% 12%, rgba(74, 163, 255, .12), transparent 28%),
    radial-gradient(circle at 18% 90%, rgba(224, 180, 63, .09), transparent 30%),
    var(--bg);
}

.top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.top h1 {
  margin: 4px 0 6px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.top p { color: var(--muted); margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #86ffd1;
  border: 1px solid rgba(39, 211, 154, .28);
  background: rgba(39, 211, 154, .08);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
}

.session {
  min-width: 420px;
}

.login,
.signed-in {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.signed-in {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.signed-in span {
  color: #86ffd1;
  font-size: 13px;
  font-weight: 850;
}

.signed-in i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 4px;
}

.hide { display: none !important; }

input {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #071320;
  color: var(--text);
  padding: 0 12px;
}

.btn {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(224, 180, 63, .44);
  background: rgba(224, 180, 63, .13);
  color: var(--text);
  padding: 0 15px;
  font-weight: 850;
  cursor: pointer;
}

.btn.primary { background: var(--gold); color: #06101d; }
.btn.ghost { border-color: var(--line); background: rgba(255,255,255,.03); }
.btn:disabled {
  cursor: not-allowed;
  opacity: .45;
  filter: grayscale(.4);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card,
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 850;
}

.stat-card strong {
  display: block;
  font-size: 28px;
  margin: 10px 0 4px;
}

.stat-card small { color: var(--muted); }

.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head h2 { margin: 0; }
.panel-head p { color: var(--muted); margin: 4px 0 0; }

.tools {
  display: flex;
  gap: 8px;
}

.host-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.host-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #071320;
}

.host-top {
  min-height: 126px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
}

.host-top img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin-bottom: 6px;
}

.host-top strong {
  display: block;
  font-size: 16px;
}

.host-top span { color: var(--muted); font-size: 13px; }

.linux .host-top { background: #123159; }
.rpi .host-top { background: #29143f; }
.windows .host-top { background: #3b140c; }
.wakeos .host-top { background: #113b1e; }

.host-bottom {
  padding: 12px;
}

.host-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.host-meta small {
  color: var(--muted);
}

.status {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 850;
}

.online { background: rgba(39, 211, 154, .12); color: #86ffd1; }
.offline { background: rgba(240, 100, 125, .13); color: #ff9cac; }

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

.host-actions .btn {
  flex: 1;
  min-height: 36px;
  padding: 0 10px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.data-list {
  display: grid;
  gap: 12px;
}

.data-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding-bottom: 10px;
}

.data-list span,
.steps {
  color: var(--muted);
}

.good { color: #86ffd1; }

.steps {
  margin: 0;
  padding-left: 22px;
}

.steps li { margin: 9px 0; }

.download-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.download-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #071320;
}

.download-card img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.download-card span { color: var(--muted); }

dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(0,0,0,.62);
}

.dialog-card {
  width: min(520px, calc(100vw - 30px));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111927;
  color: var(--text);
  padding: 24px;
  box-shadow: var(--shadow);
}

.dialog-card p { color: var(--muted); }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 1080px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .side-card { margin-top: 0; }
  .top, .panel-head { flex-direction: column; align-items: stretch; }
  .session { min-width: 0; }
  .login, .signed-in { justify-content: flex-start; flex-wrap: wrap; }
  .stats, .host-grid, .grid-2, .download-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .main { padding: 18px; }
  .stats, .host-grid, .grid-2, .download-row { grid-template-columns: 1fr; }
}
