/* Helferaufrufmanager — base styles (vanilla CSS, no build step) */

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1f2421;
  --ink-soft: #5b635d;
  --line: #e3ded3;
  --brand: #2f6f4f;       /* warm community green */
  --brand-ink: #1c4a34;
  --accent: #c9622e;      /* terracotta accent */
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31, 36, 33, .06), 0 8px 24px rgba(31, 36, 33, .05);
  --maxw: 64rem;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  color: var(--brand-ink);
  text-decoration: none;
}
.brand span { color: var(--accent); }

.site-nav { display: flex; gap: 1.25rem; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--brand); }

/* Main */
.main { flex: 1; padding-block: 2.5rem; }

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  max-width: 44rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 .5rem;
}
.hero h1 {
  margin: 0 0 .75rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--brand-ink);
}
.lead { font-size: 1.1rem; margin: 0 0 1rem; }
.muted { color: var(--ink-soft); margin: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
  color: var(--ink-soft);
  font-size: .85rem;
}

/* ---- Admin: layout bits ---- */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-head h1 {
  margin: .15rem 0 0;
  font-size: 1.7rem;
  color: var(--brand-ink);
  letter-spacing: -.02em;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.head-actions { display: flex; gap: .5rem; align-items: center; }
.section-title { margin: 2rem 0 1rem; color: var(--brand-ink); }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.card h3 { margin: 0 0 .25rem; color: var(--brand-ink); }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: .5rem .9rem;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn-danger { border-color: #d9b3ab; color: #a23b27; background: #fff; }
.btn-danger:hover { background: #a23b27; border-color: #a23b27; color: #fff; }
.btn-sm { padding: .3rem .6rem; font-size: .82rem; }
.btn-link-danger {
  border: 0; background: none; color: #a23b27; cursor: pointer;
  font-size: .85rem; padding: 0; text-decoration: underline;
}
.btn-link {
  border: 0; background: none; color: var(--brand); cursor: pointer;
  font-size: .85rem; padding: 0; text-decoration: underline;
}
.vol-row__actions { display: flex; align-items: center; gap: .5rem; }

/* ---- Banners / flash ---- */
.banner {
  border-radius: 8px;
  padding: .7rem 1rem;
  margin-bottom: 1rem;
  font-size: .92rem;
  border: 1px solid transparent;
}
.banner-ok  { background: #e7f3ec; border-color: #bcdcc8; color: #1c4a34; }
.banner-err { background: #fbeae6; border-color: #eac4ba; color: #a23b27; }

/* ---- Tables ---- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td {
  text-align: left;
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.table th { color: var(--ink-soft); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.table a { color: var(--brand-ink); font-weight: 500; }
.table-slots { margin: 1rem 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap .table th:first-child, .table-wrap .table td:first-child { padding-left: 1rem; }
.cell-actions { text-align: right; }
.count-full { color: #a23b27; font-weight: 600; }

/* ---- Tags ---- */
.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: .12rem .5rem;
  border-radius: 99px;
  background: #efeae0;
  color: var(--ink-soft);
  margin-left: .35rem;
  vertical-align: middle;
}
.tag-green { background: #d8ecdf; color: #1c4a34; }

/* ---- Forms ---- */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field > span { font-size: .85rem; font-weight: 500; color: var(--ink-soft); }
.field input, .field textarea {
  font: inherit;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: -1px;
  border-color: var(--brand);
}
.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 12rem; }
.field-narrow { max-width: 10rem; }
.field-check { display: flex; align-items: center; gap: .5rem; font-size: .92rem; }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; }
.form-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.form-inline .field { gap: .25rem; }
.form-inline .field input,
.form-inline .field select { padding: .45rem .55rem; }
.form-inline select {
  font: inherit; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.hint { font-size: .82rem; margin: .5rem 0 0; }

/* ---- Task block ---- */
.task-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.task-head h3 { margin-bottom: .15rem; display: inline; }
.task-schedule { flex: 1 1 auto; min-width: 0; }
.task-schedule > summary {
  cursor: pointer;
  list-style: none;
  width: max-content;
  max-width: 100%;
}
.task-schedule > summary::-webkit-details-marker { display: none; }
.task-schedule > summary h3::before {
  content: "\25B8"; /* right-pointing triangle */
  display: inline-block;
  margin-right: .4rem;
  color: var(--brand);
  transition: transform .15s ease;
}
.task-schedule[open] > summary h3::before { transform: rotate(90deg); }
.task-schedule > summary:hover h3 { color: var(--brand); }
.task-schedule[open] > summary { margin-bottom: .75rem; }
.inline-add { margin-top: .75rem; }
.inline-add summary {
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  color: var(--brand);
  width: max-content;
}
.inline-add[open] summary { margin-bottom: .75rem; }

/* ---- Public: choice groups (task / slot radios) ---- */
.choice-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .75rem 1rem 1rem;
  margin: 0;
}
.choice-group legend {
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0 .35rem;
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .55rem .5rem;
  border-radius: 8px;
  cursor: pointer;
}
.choice:hover { background: #f4f1ea; }
.choice input { margin-top: .25rem; }
#slot-picker:not(:empty) { margin-top: .25rem; }

/* honeypot — hidden from humans */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.hero-public { max-width: 48rem; }

/* ---- Event cards (home) ---- */
.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}
.event-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .12s ease, transform .12s ease;
}
.event-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.event-card h3 { color: var(--brand-ink); }
.event-card__cta { color: var(--brand); font-weight: 600; font-size: .9rem; }

/* ---- Overview ---- */
.card-attention { border-color: #e3c08a; background: #fdf8ee; }
.ov-slot { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.ov-slot:last-of-type { border-bottom: 0; }
.ov-slot__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.count-open { color: #a26a27; font-weight: 600; font-size: .9rem; }
.count-done { color: var(--brand); font-weight: 600; font-size: .9rem; }
.vol-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.vol-list li { padding: .25rem 0; font-size: .92rem; }
.vol-list-tight li { padding: .1rem 0; }
.vol-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ov-flexible { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.ov-flexible h4 { margin: 0 0 .5rem; color: var(--ink-soft); }
.assign-form { display: flex; gap: .4rem; align-items: center; }
.assign-form select {
  font: inherit; padding: .35rem .5rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; max-width: 18rem;
}

/* ---- Empty state ---- */
.empty {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  color: var(--ink-soft);
}
.empty .btn { margin-top: 1rem; }
