/* Kidsdabei – Dashboard, Admin & Anmeldung (Bootstrap 5 aus dem Turie-Theme) */
:root {
  --kdb-red: #d73732; --kdb-red-dark: #b52a26; --kdb-red-soft: #fdeeed;
  --kdb-yellow: #ffce06; --kdb-green: #41c555; --kdb-purple: #a63582;
  --kdb-ink: #1c1c1c; --kdb-muted: #6b6b6b; --kdb-line: #ece8e4; --kdb-bg: #f7f5f3;
  --bs-primary: var(--kdb-red); --bs-primary-rgb: 215,55,50;
  --bs-link-color: var(--kdb-red); --bs-link-color-rgb: 215,55,50;
  --bs-link-hover-color: var(--kdb-red-dark); --bs-link-hover-color-rgb: 181,42,38;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bs-body-color: var(--kdb-ink);
  --bs-border-color: var(--kdb-line);
  --bs-focus-ring-color: rgba(215,55,50,.2);
}
body.kdb-dash { background: var(--kdb-bg); font-size: 15px; }
a { text-decoration: none; }

/* Buttons & Formulare in Markenfarbe */
.btn-primary { --bs-btn-bg: var(--kdb-red); --bs-btn-border-color: var(--kdb-red); --bs-btn-hover-bg: var(--kdb-red-dark);
  --bs-btn-hover-border-color: var(--kdb-red-dark); --bs-btn-active-bg: var(--kdb-red-dark); --bs-btn-active-border-color: var(--kdb-red-dark);
  --bs-btn-disabled-bg: var(--kdb-red); --bs-btn-disabled-border-color: var(--kdb-red); }
.btn-outline-primary { --bs-btn-color: var(--kdb-red); --bs-btn-border-color: var(--kdb-red); --bs-btn-hover-bg: var(--kdb-red);
  --bs-btn-hover-border-color: var(--kdb-red); --bs-btn-active-bg: var(--kdb-red-dark); }
.btn { border-radius: 10px; font-weight: 500; }
.form-control, .form-select { border-radius: 10px; padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: #eaa19e; box-shadow: 0 0 0 .2rem rgba(215,55,50,.15); }
.form-check-input:checked { background-color: var(--kdb-red); border-color: var(--kdb-red); }
.form-label { font-weight: 600; font-size: 14px; margin-bottom: .35rem; }
.form-text { font-size: 13px; }

/* Kopfleiste */
.kdb-topbar { background: #fff; border-bottom: 1px solid var(--kdb-line); height: 64px; position: sticky; top: 0; z-index: 1020; }
.kdb-topbar .kdb-brand img { height: 30px; width: auto; }
.kdb-topbar .kdb-brand small { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--kdb-muted); margin-left: 10px; }
.kdb-avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--kdb-purple); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; }

/* Seitenleiste */
.kdb-side { background: #fff; border-right: 1px solid var(--kdb-line); min-height: calc(100vh - 64px); padding: 20px 14px; }
.kdb-side a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--kdb-ink); font-weight: 500; margin-bottom: 2px; }
.kdb-side a i { width: 20px; text-align: center; color: var(--kdb-muted); }
.kdb-side a:hover { background: var(--kdb-bg); }
.kdb-side a.active { background: var(--kdb-red-soft); color: var(--kdb-red); }
.kdb-side a.active i { color: var(--kdb-red); }
.kdb-side .kdb-side-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--kdb-muted); padding: 18px 12px 6px; }
.kdb-side .badge { margin-left: auto; }
.kdb-side .kdb-soon { opacity: .55; }
@media (max-width: 991.98px) {
  .kdb-side { min-height: 0; border-right: 0; border-bottom: 1px solid var(--kdb-line); display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; padding: 10px; }
  .kdb-side a { white-space: nowrap; margin: 0; }
  .kdb-side .kdb-side-title { display: none; }
}
.kdb-main { padding: 32px; }
@media (max-width: 767.98px) { .kdb-main { padding: 20px 14px; } }

/* Karten & Kennzahlen */
.kdb-card { background: #fff; border: 1px solid var(--kdb-line); border-radius: 16px; }
.kdb-card > .kdb-card-head { padding: 18px 22px; border-bottom: 1px solid var(--kdb-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kdb-card > .kdb-card-head h2 { font-size: 17px; font-weight: 700; margin: 0; }
.kdb-card > .kdb-card-body { padding: 22px; }
.kdb-stat { display: block; padding: 20px 22px; color: var(--kdb-ink); position: relative; overflow: hidden; }
.kdb-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--kdb-red)); }
.kdb-stat .kdb-stat-label { color: var(--kdb-muted); font-size: 13px; }
.kdb-stat .kdb-stat-value { font-size: 30px; font-weight: 800; line-height: 1.2; }
a.kdb-stat:hover { color: var(--kdb-ink); box-shadow: 0 8px 25px rgba(0,0,0,.06); }
.kdb-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.kdb-page-head h1 { font-size: 26px; font-weight: 800; margin: 0; }
.kdb-page-head p { color: var(--kdb-muted); margin: 4px 0 0; }

/* Tabellen */
.kdb-table { margin: 0; }
.kdb-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--kdb-muted); font-weight: 600; background: #fcfbfa; white-space: nowrap; }
.kdb-table td, .kdb-table th { padding: 12px 16px; vertical-align: middle; }
.kdb-table tr:last-child td { border-bottom: 0; }
.kdb-thumb { width: 56px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--kdb-bg); }

/* Status-Badges */
.kdb-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.kdb-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.kdb-status-live { background: #e8f8eb; color: #23893a; }
.kdb-status-pending { background: #fff7d6; color: #8a6d00; }
.kdb-status-draft { background: #eef0f2; color: #5c6670; }
.kdb-status-archived { background: #f3e6ef; color: var(--kdb-purple); }

/* Editor */
.kdb-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.kdb-steps input { position: absolute; opacity: 0; pointer-events: none; }
.kdb-steps label { border: 1px solid var(--kdb-line); background: #fff; border-radius: 10px; padding: 8px 14px; cursor: pointer; font-size: 14px; user-select: none; }
.kdb-steps input:checked + label { background: var(--kdb-red); border-color: var(--kdb-red); color: #fff; }
.kdb-steps input:focus-visible + label { outline: 2px solid var(--kdb-red); outline-offset: 2px; }
.kdb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kdb-chips .form-check { padding: 0; margin: 0; }
.kdb-chips .form-check-input { position: absolute; opacity: 0; }
.kdb-chips .form-check-label { border: 1px solid var(--kdb-line); border-radius: 20px; padding: 6px 12px; cursor: pointer; font-size: 13px; background: #fff; }
.kdb-chips .form-check-input:checked + .form-check-label { background: var(--kdb-red-soft); border-color: #eaa19e; color: var(--kdb-red); font-weight: 600; }
.kdb-editor-nav { position: sticky; top: 88px; }
.kdb-editor-nav a { display: block; padding: 7px 12px; color: var(--kdb-muted); border-left: 2px solid var(--kdb-line); font-size: 14px; }
.kdb-editor-nav a:hover { color: var(--kdb-red); border-color: var(--kdb-red); }
.kdb-savebar { position: sticky; bottom: 0; background: rgba(247,245,243,.94); backdrop-filter: blur(6px); border-top: 1px solid var(--kdb-line);
  padding: 14px 0; margin-top: 24px; z-index: 5; }
.kdb-image-preview { width: 100%; max-width: 320px; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; border: 1px solid var(--kdb-line); background: var(--kdb-bg); }
.kdb-admin-box { background: #fff8e1; border: 1px solid #f3e3a6; }
.kdb-city-result { font-size: 13px; color: var(--kdb-muted); margin-top: 6px; }
.kdb-city-result.ok { color: #23893a; }
.kdb-ac { position: relative; }
.kdb-ac-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff; border: 1px solid var(--kdb-line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.1); margin-top: 4px; max-height: 260px; overflow: auto; }
.kdb-ac-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; font-size: 14px; }
.kdb-ac-list button:hover, .kdb-ac-list button.is-active { background: var(--kdb-red-soft); }
.kdb-ac-list small { color: var(--kdb-muted); }

/* Anmeldung */
.kdb-auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.kdb-auth-art { background: var(--kdb-red); position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 60px; }
.kdb-auth-art h2 { color: #fff; font-size: 38px; font-weight: 800; line-height: 1.15; max-width: 440px; }
.kdb-auth-art p { opacity: .9; font-size: 17px; max-width: 420px; }
.kdb-auth-art span { position: absolute; border-radius: 36px; }
.kdb-auth-art .b1 { width: 160px; height: 160px; background: var(--kdb-yellow); right: -40px; top: 60px; transform: rotate(14deg); }
.kdb-auth-art .b2 { width: 120px; height: 120px; background: var(--kdb-green); right: 120px; bottom: -40px; transform: rotate(-10deg); }
.kdb-auth-art .b3 { width: 90px; height: 90px; background: var(--kdb-purple); left: -30px; bottom: 110px; transform: rotate(20deg); }
.kdb-auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.kdb-auth-box { width: 100%; max-width: 400px; }
.kdb-auth-box .kdb-brand img { height: 36px; width: auto; }
.kdb-auth-box h1 { font-size: 26px; font-weight: 800; margin: 28px 0 6px; }
.kdb-auth-box .lead { font-size: 15px; color: var(--kdb-muted); margin-bottom: 26px; }
.kdb-hp { position: absolute; left: -9999px; }
@media (max-width: 991.98px) { .kdb-auth { grid-template-columns: 1fr; } .kdb-auth-art { display: none; } }
.pagination { --bs-pagination-active-bg: var(--kdb-red); --bs-pagination-active-border-color: var(--kdb-red); --bs-pagination-color: var(--kdb-ink); }
.nav-pills .nav-link { border-radius: 20px; }
/* Premium-Bereiche im Editor */
.kdb-premium-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
  background: linear-gradient(135deg, #a63582, #d73732); color: #fff; }
.kdb-premium-badge.is-on { background: #e8f8eb; color: #23893a; }
.kdb-premium-note { background: #f8eef5; border: 1px dashed #d9a9c9; color: #6d2455; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.kdb-premium-note a { color: var(--kdb-purple); font-weight: 600; text-decoration: underline; }
.kdb-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.kdb-gallery-item { display: block; border: 1px solid var(--kdb-line); border-radius: 10px; overflow: hidden; background: #fff; cursor: pointer; }
.kdb-gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.kdb-gallery-item .form-check { padding: 6px 10px 6px 34px; margin: 0; }
/* Paketauswahl */
.kdb-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kdb-plan { position: relative; cursor: pointer; margin: 0; }
.kdb-plan input { position: absolute; opacity: 0; }
.kdb-plan-body { display: flex; flex-direction: column; gap: 4px; height: 100%; border: 2px solid var(--kdb-line); border-radius: 16px; padding: 20px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.kdb-plan:hover .kdb-plan-body { border-color: #e6bfb9; }
.kdb-plan input:checked + .kdb-plan-body { border-color: var(--kdb-red); box-shadow: 0 8px 28px rgba(215,55,50,.15); }
.kdb-plan input:focus-visible + .kdb-plan-body { outline: 2px solid var(--kdb-red); outline-offset: 2px; }
.kdb-plan.is-recommended .kdb-plan-body { background: linear-gradient(180deg, #fff8f7 0%, #fff 40%); }
.kdb-plan-flag { position: absolute; top: -11px; right: 16px; background: var(--kdb-purple); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 3px 10px; border-radius: 20px; }
.kdb-plan-name { font-weight: 700; font-size: 16px; }
.kdb-plan-price { font-size: 24px; line-height: 1.2; white-space: nowrap; }
.kdb-plan-price s { font-size: 16px; color: var(--kdb-muted); margin-right: 6px; }
.kdb-plan-price strong { font-weight: 800; }
.kdb-plan-sub { font-size: 12px; color: var(--kdb-muted); }
.kdb-plan-save { display: inline-block; align-self: flex-start; background: #e8f8eb; color: #23893a; font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 20px; margin-top: 4px; }
.kdb-plan ul { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; }
.kdb-plan li { padding: 3px 0 3px 20px; position: relative; }
.kdb-plan li::before { content: "✓"; position: absolute; left: 0; color: var(--kdb-green); font-weight: 700; }
.kdb-plan-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: linear-gradient(135deg, #a63582, #d73732); color: #fff; }
.kdb-side a.kdb-side-cta { margin-top: 14px; border: 1px dashed #e6bfb9; color: var(--kdb-red); font-weight: 600; }
.kdb-side a.kdb-side-cta i { color: var(--kdb-red); }
.kdb-side a.kdb-side-cta:hover { background: var(--kdb-red-soft); }
.kdb-offer-card { display: flex; flex-direction: column; height: 100%; }
.kdb-offer-card .kdb-offer-icon { width: 54px; height: 54px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; margin-bottom: 14px; }
.kdb-md-preview { border: 1px solid var(--kdb-line); border-radius: 10px; padding: 18px 22px; min-height: 440px; background: #fff; font-size: 15px; line-height: 1.7; }
.kdb-md-preview h2 { font-size: 22px; margin: 24px 0 10px; } .kdb-md-preview h3 { font-size: 18px; margin: 18px 0 8px; }
.kdb-md-preview ul, .kdb-md-preview ol { padding-left: 22px; }
.kdb-md-preview blockquote { border-left: 4px solid var(--kdb-yellow); background: #fffbea; padding: 10px 14px; border-radius: 0 10px 10px 0; }
.kdb-auth-context { background: var(--kdb-red-soft); border-left: 4px solid var(--kdb-red); border-radius: 0 12px 12px 0; padding: 12px 16px; }
.kdb-parent-box { background: #fbfaf8; border: 1px dashed var(--kdb-line); border-radius: 12px; padding: 14px 16px; }
.kdb-plans-divider { grid-column: 1 / -1; font-size: 14px; color: #555; border-top: 1px dashed var(--kdb-line); padding-top: 14px; margin-top: 4px; }
.kdb-plans-divider strong { display: block; color: #1c1c1c; font-size: 15px; margin-bottom: 2px; }
.kdb-site-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 0; border-bottom: 1px solid #f1efec; }
.kdb-site-row:last-child { border-bottom: 0; }
.kdb-site-row .form-select { width: auto; min-width: 260px; }
.kdb-site-title { font-weight: 600; color: #1c1c1c; min-width: 200px; }
.kdb-site-check { display: flex; gap: 14px; font-size: 13px; }
.kdb-site-row .form-text { flex-basis: 100%; margin: 0; }
/* Events */
.kdb-date-row { border: 1px solid var(--kdb-line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.kdb-date-row.is-past { opacity: .55; }
.kdb-date-row.is-tentative { border-style: dashed; background: #fffdf6; }
.kdb-date-main { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.kdb-date-main label { display: flex; flex-direction: column; font-size: 12px; color: #777; margin: 0; }
.kdb-date-main label span { margin-bottom: 2px; }
.kdb-date-main input[type=date] { width: 150px; } .kdb-date-main input[type=time] { width: 110px; }
.kdb-date-del { margin-left: auto; }
.kdb-date-extra { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 8px; }
.kdb-date-extra input[type=text], .kdb-date-extra input:not([type]) { flex: 1 1 320px; }
.kdb-yearly { background: #fbfaf8; border-radius: 12px; padding: 12px 14px; }
.kdb-pill-select { display: flex; flex-wrap: wrap; gap: 8px; }
.kdb-pill-check { margin: 0; cursor: pointer; }
.kdb-pill-check input { position: absolute; opacity: 0; pointer-events: none; }
.kdb-pill-check span { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--kdb-line); border-radius: 999px; padding: 6px 14px; font-size: 14px; background: #fff; transition: all .15s; }
.kdb-pill-check input:checked + span { border-color: var(--kdb-red); background: #fdf0ef; color: var(--kdb-red); font-weight: 600; }
.kdb-pill-check input:focus-visible + span { outline: 2px solid var(--kdb-red); outline-offset: 2px; }
.kdb-confirm-box { border-color: #f1c84b; }
.kdb-confirm-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #f1efec; }
.kdb-season-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.kdb-season-row select { width: auto; min-width: 82px; }
.kdb-season-row select[name$="_m]"] { min-width: 140px; }
.kdb-season-row input { flex: 1 1 220px; }
.kdb-closure-badge { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 6px; background: #fff6d9; color: #8a6d00; margin-left: 6px; }
.kdb-closure-badge.is-permanent { background: #fde8e7; color: #b42520; }
.kdb-transfer { background: #fff; border: 1px solid var(--kdb-line); border-radius: 10px; padding: 8px 10px; }
.kdb-ad-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 20px; max-height: 320px; overflow: auto; border: 1px solid var(--kdb-line); border-radius: 12px; padding: 12px; }
.kdb-ad-preview .kdb-ad-box { border: 1px solid var(--kdb-line); border-radius: 16px; padding: 16px; position: relative; background: #fffdf7; }
.kdb-ad-preview .kdb-ad-label { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 2px 7px; }
.kdb-ad-preview img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }
.kdb-ad-preview a { color: #1c1c1c; display: block; }
.kdb-ad-domain { font-size: 13px; color: #777; }
.kdb-balance { font-size: 34px; font-weight: 800; line-height: 1.1; margin: 4px 0 8px; }
.kdb-balance.is-empty { color: #b42520; }
.kdb-month { display: inline-block; margin: 0 1px; cursor: pointer; }
.kdb-month input { display: none; }
.kdb-month span { display: inline-block; padding: 2px 5px; border-radius: 6px; background: #f1f1f1; color: #999; font-size: 11px; }
.kdb-month input:checked + span { background: var(--kdb-red, #d73732); color: #fff; }
.kdb-hours-row { display: flex; align-items: center; gap: 12px; padding: 5px 0; border-bottom: 1px solid #f2f2f2; flex-wrap: wrap; }
.kdb-hours-day { width: 92px; font-size: 14px; font-weight: 500; }
.kdb-hours-slots { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kdb-hours-slot { display: inline-flex; align-items: center; gap: 4px; }
.kdb-hours-slot[hidden] { display: none; }
.kdb-hours-slot input { width: 76px; padding-left: 6px; padding-right: 6px; text-align: center; }
.kdb-hours.is-disabled { opacity: .4; pointer-events: none; }
.kdb-edit-box summary { cursor: pointer; color: #666; }
