/* Design-Tokens aus dem Claude-Design-Canvas "Kinderlauf Screens" übernommen. */
:root {
  color-scheme: light;
  --blue: #3d5c9a;
  --orange: #e46a2b;
  --bg: #f3efe6;
  --card-bg: #fdfbf7;
  --border: #e8e2d3;
  --muted: #8a8d9c;
  --muted-2: #9599a6;
  --success-bg: #e6f4ec;
  --success-text: #2c8a5e;
  --warn-bg: #fdefdf;
  --warn-text: #c76a1e;
  --donation-bg: #fef2e9;
  --donation-border: #e46a2b;
  --donation-text: #a06a2f;
  --radius: 11px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: #222;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
a { color: var(--blue); }
a:hover { color: var(--orange); }
.kf-n { font-family: 'Fredoka', sans-serif; }

.wrap { max-width: 440px; margin: 0 auto; padding: 0 0 48px; }

.page-wrap { padding: 0 0 48px; }
.layout { max-width: 440px; margin: 0 auto; }

.hero { width: 100%; height: 170px; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.title-band { background: var(--blue); padding: 12px 16px; text-align: center; }
.title-band .event-name { font-family: 'Fredoka', sans-serif; font-size: 16px; font-weight: 700; color: #fff; line-height: 1.1; }
.title-band .event-sub { font-size: 11px; color: #ffd7ad; margin-top: 2px; }

.main-col { padding: 0; }
.main-col > .error, .main-col > .success-banner { margin: 14px 16px 0; }

.infobox { background: var(--blue); border-radius: 12px; padding: 14px 16px; color: #fff; margin: 14px 16px 0; }
.infobox .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 12px; }
.infobox .facts .label { opacity: .6; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.infobox .facts .value { font-weight: 600; }
.infobox .divider { height: 1px; background: rgba(255,255,255,.14); margin: 10px 0; }
.infobox .note { font-size: 11.5px; line-height: 1.5; opacity: .92; }
.infobox a { color: #ffd7ad; font-size: 11px; text-decoration: underline; display: inline-block; margin-top: 6px; }

form { padding: 16px 16px 0; display: grid; gap: 10px; }
form.desktop-form { padding: 0; }
.section-title { grid-column: 1/-1; font-size: 14px; font-weight: 700; color: var(--blue); margin: 4px 0 2px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); }
label.field.full { grid-column: 1/-1; }
input:not([type="checkbox"]), select {
  height: 40px; border-radius: 9px; border: 1.3px solid var(--border);
  padding: 0 12px; font-size: 13px; font-family: inherit; background: #fff; width: 100%;
}
input:disabled { background: #f2efe7; color: var(--muted-2); }
input::placeholder { color: #b7b2a3; }
input[type="checkbox"] {
  width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--orange); margin: 0;
}

.child-card { grid-column: 1/-1; border: 1.3px solid var(--border); border-radius: var(--radius); padding: 12px 12px 6px; position: relative; }
.child-card .child-title { font-size: 11px; font-weight: 700; color: var(--blue); margin-bottom: 8px; }
.child-card .grid2 { margin-bottom: 8px; }
.remove-child { position: absolute; top: 10px; right: 10px; border: none; background: none; color: var(--muted); font-size: 16px; cursor: pointer; line-height: 1; }

.add-child-btn {
  grid-column: 1/-1; height: 40px; border-radius: 9px; border: 1.3px dashed var(--blue);
  background: #f4f6fb; color: var(--blue); font-size: 13px; font-weight: 700; cursor: pointer;
}

.checkbox-row { grid-column: 1/-1; display: flex; align-items: flex-start; gap: 8px; padding-left: 13px; font-size: 11px; color: #7a7d8a; line-height: 1.4; }
.checkbox-row input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--orange); flex-shrink: 0; }

.donation-row {
  grid-column: 1/-1; display: flex; align-items: flex-start; gap: 9px;
  background: var(--donation-bg); border: 1.3px dashed var(--donation-border);
  border-radius: var(--radius); padding: 10px 13px;
}
.donation-row span { font-size: 11px; color: var(--donation-text); font-weight: 600; line-height: 1.4; }

.price-box {
  grid-column: 1/-1; background: #fbf1e4; border-radius: var(--radius);
  padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; margin-top: 2px;
}
.price-box .price-label { font-size: 10.5px; color: var(--donation-text); font-weight: 600; }
.price-box .price-value { font-family: 'Fredoka', sans-serif; font-size: 19px; font-weight: 700; color: var(--blue); }
.price-box .price-hint { font-size: 10px; color: var(--donation-text); text-align: right; max-width: 130px; line-height: 1.3; }

.submit {
  grid-column: 1/-1; height: 46px; border-radius: var(--radius); border: none;
  background: var(--orange); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.stripe-note { grid-column: 1/-1; text-align: center; font-size: 10px; color: #a5a5a5; margin: 0 0 20px; }

.error { grid-column: 1/-1; background: #fde8e8; border: 1px solid #f3b0b0; padding: 10px 12px; border-radius: 9px; color: #a33; font-size: 12px; }
.success-banner { grid-column: 1/-1; background: var(--success-bg); border: 1px solid #b9e2c9; padding: 10px 12px; border-radius: 9px; color: var(--success-text); font-size: 12px; }

/* Ab hier: zweispaltiges Desktop-Layout (Sidebar + Formular) statt der
   einspaltigen mobilen Ansicht, die vorher unverändert auch auf Desktop lief. */
@media (min-width: 860px) {
  .page-wrap { padding: 40px 20px 64px; }
  .layout {
    max-width: 920px;
    display: grid;
    grid-template-columns: 320px 1fr;
    background: var(--card-bg);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 44px rgba(61, 92, 154, .14);
  }
  .sidebar {
    background: var(--blue);
    color: #fff;
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .sidebar .hero { height: 150px; border-radius: 10px; }
  .sidebar .title-band { background: none; padding: 0; text-align: left; }
  .sidebar .infobox { background: rgba(255, 255, 255, .07); margin: 0; }
  .sidebar .infobox a { color: #fff; }

  .main-col { padding: 26px 32px; }
  .main-col > .error, .main-col > .success-banner { margin: 0 0 12px; }
  form { padding: 0; }
}

/* Bestätigungsseite */
.confirm { text-align: center; padding: 44px 18px 24px; }
.confirm .check { width: 56px; height: 56px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; font-weight: 700; margin: 0 auto; }
.confirm h1 { font-family: 'Fredoka', sans-serif; font-size: 17px; color: var(--blue); margin: 14px 0 4px; }
.confirm p.lede { font-size: 12px; color: #7a7d8a; line-height: 1.5; margin: 0; }
.summary-card { background: #fff; border: 1.2px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-top: 16px; text-align: left; }
.summary-card .row { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; border-bottom: 1px solid #f3f0e9; }
.summary-card .row:last-child { border-bottom: none; }
.summary-card .row .k { color: var(--muted-2); }
.summary-card .row .v { font-weight: 600; color: var(--blue); }
.summary-card .row .v.paid { color: var(--success-text); }
.note-box { background: #f1f3fa; border-radius: var(--radius); padding: 11px 13px; margin-top: 10px; font-size: 11px; color: #4a5375; line-height: 1.5; text-align: left; }
.donation-thanks { background: var(--donation-bg); border: 1.3px dashed var(--donation-border); border-radius: var(--radius); padding: 11px 13px; margin-top: 10px; font-size: 11px; color: var(--donation-text); line-height: 1.5; text-align: center; font-weight: 600; }
.back-btn { display: inline-block; width: 100%; height: 42px; line-height: 42px; border-radius: var(--radius); border: 1.3px solid var(--blue); background: #fff; color: var(--blue); font-size: 12.5px; font-weight: 700; margin-top: 18px; text-align: center; text-decoration: none; }

/* Admin */
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.admin-card { width: 100%; max-width: 300px; background: #fff; border-radius: 14px; padding: 26px 24px; box-shadow: 0 8px 22px rgba(61,92,154,.09); }
.admin-card h1 { font-family: 'Fredoka', sans-serif; font-size: 16px; color: var(--blue); text-align: center; margin: 0; }
.admin-card .sub { font-size: 11px; color: var(--muted-2); text-align: center; margin-top: 2px; }
.admin-card form { padding: 0; margin-top: 16px; }
.admin-card label.field { margin-top: 9px; }
.admin-card .submit { margin-top: 14px; height: 40px; font-size: 12.5px; }

.admin-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: var(--blue); color: #fff; }
.admin-bar .title { font-weight: 700; font-size: 14px; }
.admin-bar .who { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.admin-bar .avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 10.5px; }
.admin-bar form { padding: 0; }
.admin-bar button { background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 7px; padding: 4px 10px; font-size: 11px; cursor: pointer; }

.stat-row { display: flex; gap: 10px; padding: 14px 18px 2px; flex-wrap: wrap; }
.stat-tile { flex: 1; min-width: 120px; background: #fff; border: 1px solid #ece7d9; border-radius: 10px; padding: 10px 14px; }
.stat-tile .label { font-size: 10px; color: var(--muted-2); font-weight: 600; }
.stat-tile .value { font-family: 'Fredoka', sans-serif; font-size: 19px; font-weight: 800; color: var(--blue); }
.stat-tile .value.paid { color: var(--success-text); }
.stat-tile .value.open { color: var(--warn-text); }

.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 18px; flex-wrap: wrap; }
.toolbar select, .toolbar input[type="search"] { height: 32px; border-radius: 8px; border: 1.3px solid #e2ddd0; padding: 0 10px; font-size: 11.5px; font-family: inherit; background: #fff; width: auto; }
.toolbar input[type="search"] { flex: 1; min-width: 160px; }
.toolbar a.btn-outline {
  height: 30px; line-height: 28px; padding: 0 12px; border-radius: 8px; border: 1.3px solid var(--blue);
  background: #fff; color: var(--blue); font-size: 11px; font-weight: 700; text-decoration: none; display: inline-block;
}

.table-card { margin: 0 18px 20px; background: #fff; border: 1px solid #ece7d9; border-radius: 10px; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { font-size: 9.5px; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: .03em; padding: 8px 14px; border-bottom: 1px solid #f0ede4; text-align: left; white-space: nowrap; }
tbody td { padding: 8px 14px; font-size: 11.5px; color: #333; border-bottom: 1px solid #f5f3ec; }
tbody tr:last-child td { border-bottom: none; }
tbody tr[hidden] { display: none; }
td.name { font-weight: 600; color: var(--blue); }
td.email { color: #777; }
.pill { font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 999px; display: inline-block; }
.pill.paid { background: var(--success-bg); color: var(--success-text); }
.pill.open { background: var(--warn-bg); color: var(--warn-text); }

.settings-page { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; }
.settings-page h1 { font-family: 'Fredoka', sans-serif; color: var(--blue); }
fieldset { border: 1.3px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; padding: 14px 16px; background: #fff; }
fieldset legend { font-weight: 700; color: var(--blue); padding: 0 6px; }
fieldset form { padding: 0; }
.hint { font-size: 11px; color: var(--muted); }
.test-form { border-top: 1px dashed var(--border); margin-top: 12px; padding-top: 12px; }
.legal-page { max-width: 640px; margin: 0 auto; padding: 32px 16px 64px; line-height: 1.6; }
