:root {
  --bg: #0f1115;
  --card: #171a21;
  --text: #e6e6e6;
  --muted: #8a8f98;
  --accent: #4f7cff;
  --danger: #e5484d;
  --online: #2ecc71;
  --offline: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 32px;
  width: 320px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hidden {
  display: none;
}

h1 {
  margin-top: 0;
  font-size: 20px;
}

input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #2a2e37;
  background: #10131a;
  color: var(--text);
}

button {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

button.danger {
  background: var(--danger);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

button.busy {
  opacity: 0.6;
}

button.link {
  width: auto;
  background: none;
  color: var(--muted);
  font-weight: 400;
  margin-left: auto;
  padding: 0;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--offline);
}

.dot.online {
  background: var(--online);
}

.dot.offline {
  background: var(--offline);
}

.error {
  color: var(--danger);
  font-size: 13px;
  min-height: 16px;
}

details summary {
  cursor: pointer;
  color: var(--muted);
  margin-top: 8px;
}

#rustdesk-box {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

#rustdesk-box code {
  color: var(--text);
  user-select: all;
}
