:root {
  color-scheme: light dark;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --border: #e2e2e6;
  --text: #1a1a1e;
  --text-secondary: #6b6b74;
  --accent: #208aef;
  --danger: #d64545;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.center-page {
  max-width: 360px;
  margin: 80px auto;
  padding: 0 16px;
}

h1 {
  font-size: 22px;
  margin: 0 0 4px;
}

h2 {
  font-size: 16px;
  margin: 32px 0 8px;
}

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

a:hover {
  text-decoration: underline;
}

.subtitle {
  color: var(--text-secondary);
  margin: 0 0 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

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

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--border);
}

.badge-ok {
  background: #d9f2d9;
  color: #216b21;
}

.badge-off {
  background: #f2d9d9;
  color: #8a2323;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  margin-bottom: 10px;
  background: var(--surface);
  color: var(--text);
}

button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

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

button.link-button {
  background: none;
  color: var(--accent);
  padding: 0;
  font-weight: 500;
}

.error {
  color: var(--danger);
  font-size: 14px;
  margin-bottom: 12px;
}

.muted {
  color: var(--text-secondary);
  font-size: 13px;
}

.empty {
  color: var(--text-secondary);
  font-style: italic;
  padding: 16px 0;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

form.inline {
  display: inline;
}
