:root {
  --bg: #0f1420;
  --surface: #171e2e;
  --surface-2: #1f2739;
  --border: #2a3346;
  --text: #e6e9f0;
  --muted: #8b93a7;
  --primary: #4f7cff;
  --primary-hover: #3d68f0;
  --up: #2ecc71;
  --down: #ff4d4f;
  --pending: #f5a623;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.9em; }

.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}
.login-card { width: 320px; text-align: center; }
.login-card h1 { font-size: 1.3em; margin-bottom: 4px; }

input, select {
  width: 100%;
  padding: 10px 12px;
  margin: 6px 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95em;
}
label { display: block; margin-top: 10px; font-size: 0.85em; color: var(--muted); }

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.95em;
  font-weight: 500;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--down); color: white; }

.error-msg { color: var(--down); margin-top: 8px; font-size: 0.9em; min-height: 1.2em; }
.success-msg { color: var(--up); margin-left: 10px; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}
.topbar h1 { font-size: 1.2em; margin: 0 0 8px 0; }
.topbar nav { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.tab-btn {
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
}
.tab-btn.active { background: var(--surface-2); color: var(--text); }

main { padding: 24px; max-width: 1000px; margin: 0 auto; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-header h2 { margin: 0; }

.server-list, .statuspage-list { display: flex; flex-direction: column; gap: 10px; }
.server-row, .statuspage-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.status-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.status-dot.up { background: var(--up); box-shadow: 0 0 8px var(--up); }
.status-dot.down { background: var(--down); box-shadow: 0 0 8px var(--down); }
.status-dot.pending { background: var(--pending); }

.server-info { flex: 1; min-width: 0; }
.server-info .name { font-weight: 600; }
.server-info .target { color: var(--muted); font-size: 0.85em; }
.server-stats { display: flex; gap: 16px; font-size: 0.85em; color: var(--muted); }
.server-actions { display: flex; gap: 6px; }
.server-actions button { padding: 6px 10px; font-size: 0.85em; }

.checkbox-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  margin-top: 6px;
}
.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  margin: 4px 0;
}
.checkbox-list input { width: auto; margin: 0; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  width: 400px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-content.wide { width: 640px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
