/* ===== Voizoo – Eltern-Bereich & Admin: Formulare, Tabellen, Hinweise ===== */
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
a { color: var(--sea-deep); }
.parent-top .top-links { display: flex; gap: 14px; align-items: center; }
.parent-top .top-links a, .parent-top .top-links button { font-weight: 800; color: var(--primary); text-decoration: none; font-size: var(--fs-s); background: none; border: 0; cursor: pointer; padding: 0; }
.parent-nav a.nav-btn { text-decoration: none; position: relative; }
.nav-btn .nav-count { position: absolute; top: 2px; right: 10px; background: var(--berry); color: #fff; border-radius: 99px; font-size: 11px; min-width: 18px; padding: 0 5px; text-align: center; }
@media (min-width: 900px) { .nav-btn .nav-count { position: static; margin-left: auto; } }
.admin-mode .parent-top { background: var(--ink); color: #fff; border-color: var(--ink); }
.admin-mode .parent-top h1 small { color: #9fb6c8; }
.admin-mode .parent-top .top-links a, .admin-mode .parent-top .top-links button { color: var(--sun); }
.imp-bar { background: var(--sun); color: var(--ink); text-align: center; font-weight: 800; padding: 6px 10px; font-size: var(--fs-s); }
.imp-bar a { color: var(--ink); }

.flash { border-radius: var(--r-m); padding: 12px 16px; font-weight: 700; margin-bottom: var(--sp-4); background: var(--good-bg); color: #1F6B3A; }
.flash.err { background: var(--bad-bg); color: #9A3A16; }
.flash.warn { background: var(--warn-bg); color: #8A6400; }
.flash ul { margin: 6px 0 0; padding-left: 18px; }
.muted { color: var(--text-soft); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: var(--sp-4); }
.page-head .page-title { margin-bottom: 4px; }
.page-sub { color: var(--text-soft); margin: 0; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-light); }
textarea { min-height: 120px; resize: vertical; }
textarea.mono { font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
label { font-weight: 700; font-size: var(--fs-s); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 16px; align-items: end; }
.form-grid > label, .form-stack > label { display: flex; flex-direction: column; gap: 6px; }
.form-stack { display: grid; gap: 12px; max-width: 560px; }
label small { font-weight: 600; color: var(--text-soft); }
.check { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; }
.check input { width: 20px; height: 20px; accent-color: var(--sea); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: var(--sp-4); align-items: center; }
.btn-big { padding: 14px 22px; font-size: 1.05rem; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-good { color: #fff; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .ic { width: 16px; height: 16px; }
form.inline { display: inline-flex; gap: 6px; margin: 0; flex-wrap: wrap; }

table.t { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.t th { text-align: left; color: var(--text-soft); font-size: var(--fs-xs); padding: 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.t td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.dim td { opacity: .5; }
.t td.r { text-align: right; white-space: nowrap; }
.t input, .t select { padding: 6px 8px; font-size: 14px; min-width: 70px; }
.t input.emo { width: 58px; min-width: 58px; text-align: center; font-size: 18px; }
.t input.num { width: 72px; min-width: 72px; }
.t .wide { min-width: 170px; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 14px; }
.checks li::before { content: "✓"; display: inline-block; width: 22px; color: var(--good-edge); font-weight: 900; }
.checks li.bad::before { content: "✗"; color: var(--bad); }

.setup-page { background: linear-gradient(180deg, #bdeef2, var(--bg) 300px); }
.setup { max-width: 820px; margin: 0 auto; padding: 28px 16px 60px; }
.setup-logo { height: 54px; display: block; margin: 0 auto 18px; }
.login-box { max-width: 420px; margin: 8vh auto; padding: 0 16px; }
.login-box .card { padding: 26px 22px; }
.login-box img.logo { height: 48px; display: block; margin: 0 auto 14px; }

.kid-mini { display: flex; align-items: center; gap: 10px; }
.kid-mini img { width: 40px; height: 40px; object-fit: contain; }
.avatar-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.avatar-pick label { position: relative; cursor: pointer; display: block; }
.avatar-pick input { position: absolute; opacity: 0; }
.avatar-pick img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bg); border-radius: 14px; padding: 6px; border: 2px solid transparent; }
.avatar-pick input:checked + img { border-color: var(--sea); background: var(--sea-light); }
.pin-input { letter-spacing: .5em; font-size: 22px !important; text-align: center; max-width: 160px; }
.tag { display: inline-block; font-size: var(--fs-xs); font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--ink); }
.tag.good { background: var(--good-bg); color: #1F6B3A; } .tag.bad { background: var(--bad-bg); color: #9A3A16; } .tag.warn { background: var(--warn-bg); color: #8A6400; } .tag.ink { background: var(--ink); color: #fff; }
.stage-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.stage-pick label { display: block; border: 2px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; cursor: pointer; background: #fff; }
.stage-pick input { margin-right: 6px; }
.stage-pick label:has(input:checked) { border-color: var(--sea); background: var(--sea-light); }
.days14 { display: flex; align-items: flex-end; gap: 5px; height: 120px; }
.days14 div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; font-size: 11px; font-weight: 700; color: var(--text-soft); }
.days14 i { display: block; width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: #9fdcea; min-height: 3px; }
.days14 i.hit { background: var(--good); }
.reward-art { width: 46px; height: 46px; object-fit: contain; }
.art-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.art-pick label { cursor: pointer; }
.art-pick input { position: absolute; opacity: 0; }
.art-pick img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; border: 2px solid transparent; background: var(--bg); padding: 3px; }
.art-pick input:checked + img { border-color: var(--sea); }
.danger-zone { border: 1.5px dashed #f0b7a8; }
.state-pick { display: inline-flex; border: 1.5px solid var(--line); border-radius: 99px; overflow: hidden; }
.state-pick label { padding: 6px 12px; cursor: pointer; font-size: var(--fs-s); }
.state-pick input { display: none; }
.state-pick label:has(input:checked) { background: var(--ink); color: #fff; }
.stat-big { font: 800 2rem/1 var(--font-display); }
details.help { background: var(--bg); border-radius: var(--r-m); padding: 10px 14px; margin-bottom: var(--sp-4); }
details.help summary { font-weight: 800; cursor: pointer; }
code { background: var(--bg); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.progress-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.progress-steps li::before { content: "✓ "; color: var(--good-edge); font-weight: 900; }
.progress-steps li.bad::before { content: "✗ "; color: var(--bad); }
.progress-steps li.skip::before { content: "– "; color: var(--text-soft); }
@media (max-width: 899px) { .t .hide-m { display: none; } }
a.btn, .btn { text-decoration: none; }

/* 1.1: Kinder-Auswahl, Foto-Ablage, Belohnungsbilder */
.kid-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kid-chips label { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1.5px solid var(--line); border-radius: 99px; cursor: pointer; background: #fff; font-weight: 700; font-size: var(--fs-xs); white-space: nowrap; }
.kid-chips input { position: absolute; opacity: 0; pointer-events: none; }
.kid-chips img { width: 24px; height: 24px; object-fit: contain; border-radius: 50%; background: var(--bg); filter: grayscale(1); opacity: .5; }
.kid-chips label:has(input:checked) { border-color: var(--sea); background: var(--sea-light); }
.kid-chips label:has(input:checked) img { filter: none; opacity: 1; }
.kid-chips label:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--sea-light); }
.ai-reward-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .ai-reward-grid { grid-template-columns: minmax(220px, 300px) 1fr; } }
.drop { position: relative; display: grid; place-items: center; min-height: 220px; border: 2px dashed var(--line); border-radius: var(--r-m); background: var(--bg); cursor: pointer; overflow: hidden; text-align: center; padding: 12px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop.is-over { border-color: var(--sea); background: var(--sea-light); }
.drop .drop-empty { display: grid; gap: 4px; justify-items: center; color: var(--text-soft); pointer-events: none; }
.drop .drop-empty .ic { width: 34px; height: 34px; }
.drop.has-img .drop-empty { display: none; }
.drop > img { max-width: 100%; max-height: 260px; object-fit: contain; border-radius: 10px; pointer-events: none; }
.drop .thumbs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; pointer-events: none; }
.drop .thumbs img { width: 120px; height: 150px; object-fit: cover; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.art-cell { display: flex; align-items: center; gap: 6px; }
.art-cell select { min-width: 110px; }
body.is-busy { cursor: progress; }
.state-pick label:has(input[type=radio]:checked) { background: var(--ink); color: #fff; }

/* 1.2: Aufnahmen */
.audio-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-4); }
.audio-filter select, .audio-filter input { width: auto; flex: 1 1 180px; }
.audio-list { display: grid; }
.audio-row { display: grid; grid-template-columns: 44px minmax(160px, 1.3fr) minmax(120px, .9fr) minmax(160px, 1fr) auto; gap: 10px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.audio-row:last-child { border-bottom: 0; }
.play-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--sea, #12B5C4); color: #fff; display: grid; place-items: center; cursor: pointer; }
.play-btn .ic { width: 20px; height: 20px; fill: currentColor; }
.a-text { display: grid; min-width: 0; }
.a-text b { font-size: 1.05rem; overflow-wrap: anywhere; }
.a-text span { color: var(--text-soft); font-weight: 600; overflow-wrap: anywhere; }
.a-text small { font-size: var(--fs-xs); }
.a-state .heard { font-size: var(--fs-xs); margin-top: 2px; overflow-wrap: anywhere; }
.a-speak { padding: 8px 10px !important; font-size: 15px !important; }
.a-btns { display: flex; gap: 6px; }
@media (max-width: 899px) {
  .audio-row { grid-template-columns: 44px minmax(0, 1fr); }
  .audio-row .a-state { grid-column: 2; }
  .audio-row .a-speak { grid-column: 1 / -1; }
  .audio-row .a-btns { grid-column: 1 / -1; }
  .audio-row .a-btns .btn { flex: 1; justify-content: center; }
}

/* 1.2: Handy – Kopfzeile kompakt, Menü als Klapp-Raster statt langer Leiste */
.menu-toggle { display: none; }
.grid-2 > *, .form-grid > * { min-width: 0; }
input[type=file] { max-width: 100%; }
@media (max-width: 899px) {
  .parent-top { gap: 8px; padding: 8px 12px calc(8px); }
  .parent-top img { height: 28px; }
  .parent-top h1 { font-size: .98rem; min-width: 0; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .parent-top h1 small { display: none; }
  .parent-top .top-links { gap: 10px; flex: none; }
  .parent-top .top-links a[target=_blank] { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 6px; flex: none; max-width: 42vw; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 7px 10px; font: 800 .85rem var(--font-body); color: var(--ink); cursor: pointer; }
  .menu-toggle span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .admin-mode .menu-toggle { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
  .parent-nav { position: fixed; top: 52px; left: 0; right: 0; bottom: auto; display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px 10px 14px; background: #fff; border-top: 0; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -10px rgba(15,34,51,.3); max-height: calc(100vh - 60px); overflow: auto; z-index: 30; }
  body.nav-open .parent-nav { display: grid; }
  .parent-nav .nav-btn { flex: none; min-height: 64px; justify-content: center; gap: 4px; font-size: .78rem; text-align: center; line-height: 1.15; }
  .parent-nav .nav-btn .ic { width: 22px; height: 22px; }
  .nav-btn .nav-count { top: 4px; right: 8px; }
  .parent-main { padding: 14px 12px 40px; }
  .card { padding: 14px; }
  .page-title { font-size: 1.35rem; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  .t td, .t th { padding: 6px; }
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setting-row { gap: 10px; }
  .page-head { gap: 8px; }
}
@media (max-width: 380px) { .parent-top .top-links { gap: 8px; font-size: .8rem; } .menu-toggle { max-width: 36vw; } }
.card h2:has(> .ic:first-child) { justify-content: flex-start; }
.hide-sm { display: inline; }
@media (max-width: 899px) {
  .hide-sm { display: none; }
  .parent-top .top-links { font-size: .82rem; }
  /* Tabellen werden auf dem Handy zu Karten */
  .t.t-cards, .t.t-cards tbody { display: block; width: 100%; }
  .t.t-cards tr:first-child:has(th) { display: none; }
  .t.t-cards tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; background: #fff; }
  .t.t-cards td { display: flex; flex-direction: column; gap: 3px; border: 0; padding: 0; min-width: 0; }
  .t.t-cards td[data-label]::before { content: attr(data-label); font-size: .7rem; font-weight: 800; letter-spacing: .02em; color: var(--text-soft); }
  .t.t-cards td[data-label=""]::before { display: none; }
  .t.t-cards td:has(.wide), .t.t-cards td:has(.kid-chips) { grid-column: 1 / -1; }
  .t.t-cards .hide-m { display: flex !important; }
  .t.t-cards input, .t.t-cards select { width: 100%; min-width: 0 !important; }
  .t.t-cards input[type=checkbox] { width: 22px; height: 22px; }
  .table-wrap:has(.t-cards) { overflow: visible; }
}
@media (max-width: 420px) { .parent-top img { height: 24px; } .menu-toggle { padding: 6px 8px; } .menu-toggle span { max-width: 26vw; } }

/* 1.3: Erklärungen „So ist es gebaut“ */
textarea.ex-in { min-width: 230px; min-height: 52px; font-size: .82rem; line-height: 1.35; resize: vertical; }
@media (max-width: 760px) { textarea.ex-in { min-width: 0; width: 100%; } }
