:root {
  color-scheme: light dark;
  --accent: #4f7cff;
  --border: #d8dde5;
  --bg-card: #ffffff;
  --bg-page: #f4f6f9;
  --text: #1b1f27;
  --muted: #6b7280;
}

* { box-sizing: border-box; }

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

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

header h1 { margin: 0; font-size: 1.25rem; }

.station { display: flex; align-items: center; gap: 0.5rem; }
.station label { font-size: 0.85rem; color: var(--muted); }

main {
  max-width: 900px;
  margin: 1.5rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.card h2 { margin-top: 0; }

.field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-size: 0.85rem; color: var(--muted); }

input[type="text"] {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
}

#questions { list-style: decimal; padding-left: 1.2rem; }
#questions li { margin-bottom: 1rem; }
.q-text { font-weight: 600; margin-bottom: 0.4rem; }
.option { display: block; padding: 0.15rem 0; cursor: pointer; }

.actions { display: flex; align-items: center; gap: 0.75rem; margin: 0.5rem 0 1rem; flex-wrap: wrap; }

button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
button:hover { opacity: 0.9; }
button:disabled { opacity: 0.6; cursor: not-allowed; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

.msg { font-size: 0.85rem; color: var(--muted); }

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

.status-ok { color: #1a9e5f; }
.status-pending { color: #b8860b; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg-card: #1c1f26;
    --bg-page: #12141a;
    --border: #2b2f38;
    --text: #e7e9ee;
    --muted: #9aa1ad;
  }
}
