:root {
  color-scheme: light dark;
  --border: #d8d8d8;
  --muted: #666;
  --accent: #2a6f4b;
}

* { box-sizing: border-box; }

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

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

.topbar .brand {
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.topbar nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--accent);
}

.topbar nav .who {
  margin-left: 1rem;
  color: var(--muted);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem;
}

.flashes {
  list-style: none;
  margin: 0.5rem 1.25rem;
  padding: 0.5rem 0.75rem;
  background: #fff3cd;
  color: #664d03;
  border-radius: 4px;
  max-width: 900px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.flag-overdue { color: #b3261e; font-weight: 600; }
.flag-today { color: #b06d00; font-weight: 600; }
.flag-upcoming { color: var(--accent); }

form.inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: inherit;
  background-color: rgba(127, 127, 127, 0.08);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6"><path d="M1 1l4 4 4-4" stroke="%23888888" stroke-width="1.6" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  min-width: 8rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

select:hover { border-color: var(--accent); }

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(42, 111, 75, 0.25);
}

.field-row { margin-bottom: 0.75rem; }
.field-row label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field-row input, .field-row textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
}

.field-row select {
  width: 100%;
  max-width: 420px;
}

.actions { margin-top: 1rem; }

button, .btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  display: inline-block;
}

button.secondary, .btn.secondary {
  background: transparent;
  color: var(--accent);
}

.filters {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

pre.report {
  white-space: pre-wrap;
  font-family: inherit;
  background: rgba(127,127,127,0.08);
  padding: 1rem;
  border-radius: 6px;
}

.report-tabs a {
  margin-right: 1rem;
}

.hero {
  padding: 3rem 0;
  text-align: center;
}

.hero h1 { margin-bottom: 0.5rem; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto 1.5rem; }
