:root {
  --color-bg: #f7f5f0;
  --color-primary: #1f6f4a;
  --color-primary-dark: #164f34;
  --color-text: #232323;
  --color-border: #d8d3c8;
  --color-danger: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--color-primary-dark);
  color: #fff;
}

.site-header .brand {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
}

.site-header nav a,
.site-header nav .link-button {
  color: #fff;
  margin-left: 1rem;
  text-decoration: none;
}

.inline-form { display: inline; }

.link-button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.site-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.messages { list-style: none; padding: 0; }
.messages li {
  background: #fff3cd;
  border: 1px solid #ffe69c;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.recorder-card, .auth-card, .queue-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.chichewa-text {
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  margin: 1rem 0;
}

.consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
}

.consent-overlay[hidden] {
  display: none;
}

.consent-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 2.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.consent-modal h2 {
  margin: 0 0 0.75rem;
  color: var(--color-primary-dark);
  font-size: 1.4rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.75rem;
}

.consent-lead {
  color: #444;
  margin-bottom: 1.25rem;
}

.consent-section {
  border-top: 1px solid var(--color-border);
  padding-top: 0.9rem;
  margin-top: 0.9rem;
}

.consent-section:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.consent-modal h3 {
  margin: 0 0 0.4rem;
  color: var(--color-primary);
  font-size: 1.05rem;
}

.consent-modal p {
  margin: 0 0 0.6rem;
  line-height: 1.5;
}

.consent-modal p:last-child {
  margin-bottom: 0;
}

.consent-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.consent-checklist li {
  margin-bottom: 0.65rem;
}

.consent-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.4;
  cursor: pointer;
}

.consent-checklist input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

.consent-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.consent-footnote {
  color: #5a5a5a;
  font-size: 0.9rem;
}

.gloss-text {
  text-align: center;
  color: #555;
  margin-top: -0.5rem;
}

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: 0.25rem; font-weight: 600; }
.field select, .field input[type="text"], .field input[type="password"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

button, .btn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  font-size: 1rem;
  cursor: pointer;
}

button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary { background: #6b6455; }
button.danger { background: var(--color-danger); }

.status-line { text-align: center; margin-top: 0.75rem; min-height: 1.25rem; }

audio { width: 100%; margin-top: 0.75rem; }

.review-row {
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
}

.review-row:last-child { border-bottom: none; }

.review-meta { font-size: 0.85rem; color: #555; }

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filters select { padding: 0.4rem; }

.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; }

@media (max-width: 480px) {
  .chichewa-text { font-size: 1.4rem; }
}

.report-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.report-table th, .report-table td { border-bottom: 1px solid #ddd; padding: 0.5rem; text-align: left; }
.report-table td:nth-child(n+2), .report-table th:nth-child(n+2) { text-align: right; }
