/* Kinderreanimation – Stylesheet. Farben zentral in :root anpassen. */
:root {
  --brand: #0e4a7b;
  --brand-dark: #0a3558;
  --accent: #e0523a;
  --accent-soft: #fdeeea;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d2733;
  --muted: #5d6b7a;
  --line: #e3e1da;
  --green: #1f7a4d; --green-bg: #e5f4ec;
  --amber: #8a5a00; --amber-bg: #fdf1d8;
  --red: #b3261e; --red-bg: #fbe7e5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 30, 40, .06), 0 4px 16px rgba(20, 30, 40, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.25; color: var(--brand-dark); }
h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin: .2em 0 .6em; letter-spacing: -.01em; }
h2, .h2 { font-size: 1.45rem; margin: 1.6em 0 .6em; }
h3, .h3 { font-size: 1.15rem; margin: 1.2em 0 .4em; }
code { background: #f1efe9; padding: .1em .35em; border-radius: 4px; font-size: .9em; }
pre { white-space: pre-wrap; background: #f6f5f1; padding: 1rem; border-radius: 8px; font-size: .9rem; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 10; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Kopf */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--brand-dark); text-decoration: none; font-size: 1.05rem; }
.main-nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.main-nav a { padding: .45rem .75rem; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 500; }
.main-nav a:hover { background: #f2f0ea; }
.main-nav a[aria-current="page"] { color: var(--brand); background: #eaf1f8; }
.main-nav .nav-admin { color: var(--accent); }
.nav-toggle { display: none; }
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .8rem; font: inherit; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; padding: .5rem 1.25rem 1rem; }
  .main-nav.open { display: flex; }
}

.admin-bar { background: var(--brand-dark); color: #fff; font-size: .92rem; }
.admin-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .4rem 0; }
.admin-bar nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.admin-bar a { color: #fff; text-decoration: none; opacity: .9; }
.admin-bar a:hover { opacity: 1; text-decoration: underline; }
.admin-bar .muted { color: #c9d7e6; }
.admin-bar .link-button { color: #fff; }

main { padding: 2rem 0 4rem; min-height: 60vh; }

/* Fuß */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 2rem 0; font-size: .95rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: flex-start; }

/* Startseite */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; padding: 1.5rem 0 1rem; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; margin: 0; }
.hero-art { text-align: center; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero-art { display: none; } }
.section { margin-top: 2.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.section-head h1, .section-head h2 { margin-bottom: .4em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; text-decoration: none; color: var(--text); box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.tile h3 { margin-top: 0; }
.tile:hover { border-color: var(--brand); }

/* Karten */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.stack { display: grid; gap: .8rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow); }
.course-card { position: relative; }
.course-card h3 { margin: .2em 0; }
.course-card p { margin: .2em 0; }
.course-card .card-link { text-decoration: none; color: var(--brand-dark); }
.course-card .card-link::after { content: ""; position: absolute; inset: 0; }
.course-card:hover { border-color: var(--brand); }
.course-card.is-cancelled h3 { text-decoration: line-through; }
.course-date { color: var(--accent); font-weight: 700; font-size: .95rem; }
.badge { display: inline-block; padding: .1em .6em; border-radius: 999px; font-size: .82rem; font-weight: 600; background: #eaf1f8; color: var(--brand); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-grey { background: #eeece6; color: var(--muted); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.course-detail { grid-template-columns: 1fr 1.25fr; }
@media (max-width: 900px) { .two-col, .course-detail { grid-template-columns: 1fr; } }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.breadcrumb { font-size: .92rem; color: var(--muted); margin: 0; }
.facts { display: grid; grid-template-columns: 9rem 1fr; gap: .5rem 1rem; margin: 0 0 1.5rem; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; }
.register-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.register-box h2 { margin-top: 0; }

/* Formulare */
.form fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; }
.form legend { font-weight: 700; color: var(--brand-dark); font-size: 1.05rem; margin-bottom: .4rem; }
.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .9rem; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
input, select, textarea { font: inherit; font-size: 1rem; padding: .55rem .7rem; border: 1px solid #c9c6bd; border-radius: 8px; background: #fff; color: var(--text); width: 100%; }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92rem; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid #cfe0f0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .row, .row-3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .8rem; }
.check input { width: auto; margin-top: .35rem; }
.check label { font-weight: 400; font-size: .95rem; }
.req { color: var(--accent); }
.hint { color: var(--muted); font-size: .85rem; }
.error { color: var(--red); font-size: .88rem; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.hp { position: absolute; left: -5000px; height: 0; overflow: hidden; }

.button { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: .65rem 1.2rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.button:hover { background: #c4432d; color: #fff; }
.button.secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.button.secondary:hover { background: #eaf1f8; }
.button.danger { background: var(--red); }
.button.small { padding: .3rem .7rem; font-size: .9rem; }
.button[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
form.inline { display: inline-flex; gap: .4rem; align-items: center; }

.notice { padding: .8rem 1rem; border-radius: 8px; background: #eaf1f8; margin: 1rem 0; border-left: 4px solid var(--brand); }
.notice.success { background: var(--green-bg); border-color: var(--green); }
.notice.warn { background: var(--amber-bg); border-color: var(--amber); }
.notice.error { background: var(--red-bg); border-color: var(--red); }
code.copy { display: inline-block; margin-top: .3rem; word-break: break-all; user-select: all; }
.cancel-box { margin: 1.5rem 0; }
.cancel-box summary { cursor: pointer; color: var(--red); }
.edit-link { margin-top: 2rem; font-size: .9rem; }

/* Verwaltung */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .95rem; }
.table th, .table td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: #f6f5f1; font-weight: 600; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.regs tr.status-cancelled, .regs tr.status-no_show { opacity: .55; }
.regs tr.status-waitlist td:first-child { border-left: 4px solid var(--amber); }
.regs tr.status-pending td:first-child { border-left: 4px solid #bbb; }
.status-form { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.status-form select { width: auto; padding: .25rem .4rem; font-size: .9rem; }
.small-check { font-size: .85rem; display: inline-flex; gap: .2rem; align-items: center; }
.small-check input { width: auto; }
.toggle { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .15rem .7rem; font: inherit; font-size: .88rem; cursor: pointer; }
.toggle.on { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem 1.2rem; min-width: 8rem; }
.stats strong { font-size: 1.5rem; color: var(--brand-dark); }
.stats span { display: block; color: var(--muted); font-size: .85rem; }
.tabs { display: flex; gap: .5rem; }
.tabs a { padding: .3rem .8rem; border-radius: 999px; text-decoration: none; border: 1px solid var(--line); }
.tabs a[aria-current="page"] { background: var(--brand); color: #fff; border-color: var(--brand); }
details.mail { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem; margin-bottom: .4rem; font-size: .92rem; }
details.mail summary { cursor: pointer; }
