:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #111827;
  --panel-2: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --line: #263244;
  --accent: #60a5fa;
  --accent-strong: #2563eb;
  --danger: #f87171;
  --danger-bg: #3b1218;
  --ok: #34d399;
  --ok-bg: #083c2c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, #172554 0, transparent 34%), var(--bg);
  font:
    13px/1.35 Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button,
.button {
  border: 0;
  border-radius: 8px;
  background: var(--accent-strong);
  color: #fff;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button.small {
  padding: 5px 8px;
  font-size: 12px;
}

button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.link-button {
  background: transparent;
  color: var(--accent);
  padding: 0;
}

.muted {
  color: var(--muted);
}

.error {
  padding: 10px;
  border-radius: 8px;
  background: var(--danger-bg);
  color: var(--danger);
  margin: 12px 0;
}

.auth-card {
  width: min(380px, calc(100vw - 24px));
  margin: 8vh auto;
  background: rgb(17 24 39 / 94%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 18px 60px rgb(0 0 0 / 35%);
}

.auth-card h1 {
  margin: 0;
}

.auth-card form {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

label {
  font-weight: 700;
  font-size: 12px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: #0b1220;
}

.auth-switch {
  margin-bottom: 0;
}

.topbar {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
  background: rgb(17 24 39 / 94%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.brand {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.future-menu {
  display: flex;
  gap: 14px;
  color: var(--muted);
  flex: 1;
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.layout {
  display: grid;
  grid-template-columns: 15% 1fr;
  gap: 10px;
  padding: 10px;
  min-height: calc(100vh - 48px);
}

.favorites,
.workspace {
  background: rgb(17 24 39 / 92%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.favorites h2 {
  font-size: 13px;
  margin: 0 0 10px;
}

.favorites ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.favorites li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px;
  background: var(--panel-2);
}

.favorites span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h1 {
  margin: 0 0 4px;
}

.section-head p {
  margin: 0;
}

.counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  border-radius: 999px;
  background: #172554;
  color: var(--accent);
  font-weight: 800;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
}

th,
td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #0b1220;
}

tr:hover td {
  background: #162033;
}

tr:last-child td {
  border-bottom: 0;
}

code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 800;
}

.status.online {
  color: var(--ok);
  background: var(--ok-bg);
}

.status.offline {
  color: #cbd5e1;
  background: #263244;
}

.empty-cell,
.empty {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .future-menu {
    display: none;
  }
}
