:root {
  color-scheme: light dark;
  --accent: #2563eb;
  --danger: #dc2626;
  --ok: #16a34a;
  --border: #d4d4d8;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  line-height: 1.5;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 600; }
.muted { color: #71717a; font-weight: 400; }

nav { display: flex; gap: 1rem; align-items: center; }
nav a { text-decoration: none; color: var(--accent); }
nav a:hover { text-decoration: underline; }

.container { max-width: 720px; margin: 2rem auto; padding: 0 1.25rem; }

form.card, .card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

label { display: block; font-size: 0.9rem; margin-top: 0.9rem; margin-bottom: 0.25rem; font-weight: 500; }
input[type="text"], input[type="password"], textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}
.hint { font-size: 0.8rem; color: #71717a; margin-top: 0.15rem; }

button, .button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1rem;
}
button.secondary { background: #52525b; }
button.danger { background: var(--danger); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.link-button {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font-size: inherit;
}

.inline { display: inline; }

.flash-ok { color: var(--ok); font-weight: 600; }
.flash-error { color: var(--danger); font-weight: 600; }

.checkbox-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.checkbox-row input { width: auto; }

table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }

.rec-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 0.4rem;
}
.rec-dot.live { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.2; } }

audio { width: 100%; margin: 0.4rem 0; }

ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
