/* Base layout and typography */
:root {
  --bg: #1a1b26;
  --surface: #24283b;
  --text: #c0caf5;
  --text-muted: #565f89;
  --accent: #7aa2f7;
  --accent-hover: #89b4fa;
  --border: #3b4261;
  --success: #9ece6a;
  --error: #f7768e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
}

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

.site-header a:hover {
  color: var(--accent-hover);
}

.site-main {
  width: 100%;
  padding: 1.5rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.empty-state {
  color: var(--text-muted);
}

.empty-state a {
  color: var(--accent);
}

.btn {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--border);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

.dashboard-intro {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sync-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.live-update-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.sync-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.host-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}

.host-table th,
.host-table td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.host-table th {
  font-weight: 600;
  color: var(--text-muted);
}

.host-table tbody tr:hover {
  background: rgba(122, 162, 247, 0.08);
}

.host-table tbody tr:last-child td {
  border-bottom: none;
}

/* Smooth live refresh: subtle opacity transition when content updates */
.live-refresh {
  transition: opacity 0.2s ease;
}

.live-refresh.is-refreshing {
  opacity: 0.92;
}
