:root {
  --bg-body: #f3f5ef;
  --bg-card: #ffffff;
  --bg-subtle: #f8faf5;
  --bg-hover: #edf3e7;
  --text-main: #193a30;
  --text-muted: #647164;
  --border-color: #dae0d6;
  --border-card: #d5ddd0;
  --primary: #204e3b;
  --primary-hover: #30624c;
  --primary-soft: #e8f0e8;
  --focus: #c69a20;
  --slot-bg: #e6f0dc;
  --slot-border: #4c743e;
  --slot-text: #234230;
  --slot-hover: #d1e5bb;
  --game-bg: #fff1d6;
  --game-border: #b87319;
  --game-text: #60400f;
  --notice-bg: #e0ecd1;
  --notice-border: #bdcfac;
  --error-bg: #fff0e9;
  --error-border: #f0bcae;
  --danger: #a33326;
  --header-mobile: #183e30;
  --header-mobile-text: #ffffff;
  --mobile-nav: #ffffffed;
  --mobile-nav-border: #d8e0d0;
  --pitch-bg-1: #367e46;
  --pitch-bg-2: #3e8b4e;
  --pitch-border: #307342;
  --pitch-line: #d9edcf;
  --shadow: #24352b12;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: var(--text-main);
  background: var(--bg-body);
  font-synthesis: none;
}

/* Darkmode: neutral charcoal/slate UI. Only the actual pitch stays green. */
[data-theme="dark"] {
  color-scheme: dark;
  --bg-body: #0b0f14;
  --bg-card: #141a22;
  --bg-subtle: #10161e;
  --bg-hover: #202938;
  --text-main: #edf2f7;
  --text-muted: #9aa7b6;
  --border-color: #293342;
  --border-card: #344052;
  --primary: #2563eb;
  --primary-hover: #3b82f6;
  --primary-soft: #17233a;
  --focus: #f0b94d;
  --slot-bg: #1c2d45;
  --slot-border: #4f8bdc;
  --slot-text: #e4efff;
  --slot-hover: #263d5c;
  --game-bg: #3a2c16;
  --game-border: #d29a3a;
  --game-text: #ffe2a8;
  --notice-bg: #172235;
  --notice-border: #344b70;
  --error-bg: #341c20;
  --error-border: #724047;
  --danger: #ff8d82;
  --header-mobile: #10151d;
  --header-mobile-text: #f4f7fb;
  --mobile-nav: #111720ed;
  --mobile-nav-border: #2b3545;
  --shadow: #00000045;
  --pitch-bg-1: #245a32;
  --pitch-bg-2: #2a6639;
  --pitch-border: #214f2d;
  --pitch-line: #b9dcb2;
}

* { box-sizing: border-box; }
html { background: var(--bg-body); }
body { margin: 0; background: var(--bg-body); color: var(--text-main); }
button, input, select { font: inherit; }
button { cursor: pointer; border: 1px solid var(--border-card); background: var(--bg-card); color: var(--text-main); border-radius: 8px; padding: 10px 15px; font-weight: 600; }
button:hover { background: var(--bg-hover); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.primary { background: var(--primary); color: white; border-color: var(--primary); }
.primary:hover { background: var(--primary-hover); }
.full { width: 100%; }
[hidden] { display: none !important; }

header { height: 90px; padding: 0 4%; display: flex; align-items: center; gap: 20px; background: var(--bg-card); border-bottom: 1px solid var(--border-color); }
.brand { display: flex; gap: 13px; align-items: center; text-decoration: none; color: inherit; font-size: 23px; font-weight: 750; }
.badge { background: var(--primary); color: #f5f7fa; border-radius: 8px 8px 18px 18px; padding: 15px 10px; font-size: 20px; }
.brand small { display: block; font-size: 10px; letter-spacing: 2px; margin-top: 5px; color: var(--text-muted); }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.header-actions > button { height: 42px; min-height: 42px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.1; white-space: nowrap; }
.header-actions #notifications-open,
.header-actions #theme-toggle { width: 42px; min-width: 42px; padding: 0; font-size: 18px; }
.header-actions #notifications-open { line-height: 1; }
.session-user { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

main { max-width: 1640px; margin: auto; padding: 32px 4%; }
.intro { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: 2px; color: var(--text-muted); margin: 0 0 8px; }
h1 { font-size: 34px; letter-spacing: -1px; margin: 0 0 8px; }
.intro p:not(.eyebrow) { margin: 0; color: var(--text-muted); }
.week-controls { display: flex; gap: 8px; }

.grounds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 26px; }
.ground-card { display: flex; text-align: left; align-items: center; gap: 18px; padding: 16px 20px; border-radius: 12px; border: 1px solid var(--border-card); background: var(--bg-card); color: var(--text-main); }
.ground-card.active { border: 2px solid var(--primary); padding: 15px 19px; background: var(--primary-soft); box-shadow: 0 3px 0 color-mix(in srgb, var(--primary) 30%, transparent); }
.ground-card h2 { font-size: 19px; margin: 0 0 5px; }
.ground-card p { font-size: 12px; font-weight: 400; color: var(--text-muted); margin: 0; }

.pitch { position: relative; background: repeating-linear-gradient(90deg, var(--pitch-bg-1) 0%, var(--pitch-bg-1) 12.5%, var(--pitch-bg-2) 12.5%, var(--pitch-bg-2) 25%); border: 7px solid var(--pitch-border); border-radius: 5px; isolation: isolate; overflow: hidden; }
.mini { width: 100px; height: 65px; flex-shrink: 0; }
.markings { position: absolute; inset: 5%; border: 1px solid var(--pitch-line); pointer-events: none; z-index: 3; }
.markings:before { content: ''; position: absolute; left: 50%; height: 100%; border-left: 1px solid var(--pitch-line); }
.markings:after { content: ''; position: absolute; width: 22%; height: 36%; border: 1px solid var(--pitch-line); border-radius: 50%; left: 39%; top: 32%; }
.box { position: absolute; top: 26%; height: 48%; width: 15%; border: 1px solid var(--pitch-line); }
.box.left { left: 0; border-left: 0; }
.box.right { right: 0; border-right: 0; }
.quarters { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; grid-auto-flow: column; }
.quarter { border-radius: 0; border: 1px dashed #bcd9b766; background: transparent; color: #fff; padding: 0; z-index: 2; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.quarter.occupied { background: repeating-linear-gradient(135deg, #bc7625b8 0 5px, #ce9137ba 5px 9px); }
.quarter.selected { background: #d2eb73d8; color: #182719; font-weight: 800; }

.schedule { border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-card); overflow: hidden; box-shadow: 0 6px 28px var(--shadow); }
.calendar-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 24px; }
.calendar-heading-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.calendar-heading h2 { font-size: 20px; margin: 0; }
.calendar-heading span { font-size: 13px; color: var(--text-muted); }
.calendar-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 6px; font-size: 13px; color: var(--text-muted); }
.calendar-tools { margin-left: auto; }
.calendar-week-controls { justify-content: flex-end; }
.legend { display: flex; gap: 18px; }
.calendar-scroll { overflow: auto; }
#calendar { min-width: 850px; display: grid; grid-template-columns: 60px repeat(7, minmax(108px, 1fr)); }
.day-head { padding: 13px 8px; text-align: center; border-bottom: 1px solid var(--border-color); background: var(--bg-subtle); font-size: 13px; color: var(--text-muted); }
.day-head strong { display: block; font-size: 20px; margin-top: 5px; color: var(--text-main); }
.day-head.today strong { background: var(--primary); color: #fff; border-radius: 50%; width: 34px; line-height: 34px; margin: 0 auto; }
.times, .day { height: 672px; position: relative; }
.times span { position: absolute; right: 8px; font-size: 11px; color: var(--text-muted); }
.day { border-left: 1px solid var(--border-color); background: repeating-linear-gradient(to bottom, transparent 0, transparent 79px, var(--border-color) 79px, var(--border-color) 80px); }
.slot { position: absolute; width: 25%; border: 1px solid var(--bg-card); border-left: 3px solid var(--slot-border); background: var(--slot-bg); color: var(--slot-text); border-radius: 4px; padding: 4px 2px; overflow: hidden; text-align: left; font-size: 11px; }
.slot:hover { background: var(--slot-hover); }
.slot.game { background: var(--game-bg); border-left-color: var(--game-border); color: var(--game-text); }
.slot.game:hover { filter: brightness(1.08); }
.slot.locked { cursor: help; opacity: .9; }
.slot strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot span { overflow-wrap: anywhere; }

footer { display: flex; align-items: center; gap: 16px; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: 18px; }
footer button { font-size: 12px; }
#notice { font-size: 14px; min-height: 20px; }
#notice:not(:empty) { padding: 12px 18px; border-radius: 10px; background: var(--notice-bg); border: 1px solid var(--notice-border); }

dialog { border: 1px solid var(--border-color); border-radius: 18px; padding: 28px; width: 560px; max-width: 95vw; color: var(--text-main); background: var(--bg-card); box-shadow: 0 20px 100px #00000066; }
dialog::backdrop { background: #05070aa3; backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.dialog-head h2 { margin: 0; font-size: 25px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
label { font-size: 14px; font-weight: 600; }
input, select { width: 100%; display: block; padding: 10px; border: 1px solid var(--border-card); border-radius: 7px; margin-top: 6px; background: var(--bg-card); color: var(--text-main); }
.area-head { display: flex; justify-content: space-between; margin-top: 23px; font-size: 14px; }
.hint { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.selectable { height: 210px; border-width: 12px; }
.selectable .quarter { font-size: 20px; }
.presets { display: flex; gap: 8px; margin-top: 12px; }
.presets button { font-size: 12px; flex: 1; padding: 9px 5px; }
#area-status { font-size: 14px; margin: 12px 0; }
.form-error { color: var(--danger); font-size: 14px; font-weight: 600; }
.form-error:not(:empty) { padding: 12px; border-radius: 9px; background: var(--error-bg); border: 1px solid var(--error-border); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 20px; }
.delete-actions { display: flex; gap: 8px; margin-right: auto; flex-wrap: wrap; }
.danger { color: var(--danger); }
#delete[hidden], #delete-series[hidden] { display: none; }

.auth-dialog { width: 420px; }
.auth-dialog h1 { font-size: 30px; }
.auth-dialog label { display: block; margin-top: 16px; }
.auth-dialog .full { margin-top: 8px; min-height: 46px; }

#admin-dialog { width: 650px; }
.user-list-wrap { border-top: 1px solid var(--border-color); margin-top: 24px; padding-top: 18px; }
.user-list-wrap h3 { margin: 0 0 10px; font-size: 15px; }
.user-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.user-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--border-color); border-radius: 9px; background: var(--bg-subtle); }
.user-row.inactive { opacity: .72; }
.user-row strong { display: block; }
.user-row span { font-size: 12px; color: var(--text-muted); }
.user-info { min-width: 0; }
.account-status { margin-top: 3px; font-weight: 700; }
.user-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.user-actions button { min-height: 34px; padding: 6px 9px; font-size: 11px; }
.role { border: 1px solid var(--border-card); padding: 4px 8px; border-radius: 999px; }
.role.admin { color: var(--primary-hover); border-color: var(--primary); }
.admin-result { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; margin-top: 18px; padding: 12px; border: 1px solid var(--primary); border-radius: 10px; background: var(--bg-subtle); }
.admin-result > div { display: grid; gap: 3px; }
.admin-result span { color: var(--text-muted); font-size: 12px; }
.admin-result code { padding: 8px 10px; border-radius: 7px; background: var(--bg-card); border: 1px solid var(--border-card); font-size: 13px; user-select: all; }

.mobile-nav { display: none; }
#mobile-day-label { display: none; }
.slot { min-height: 0; }

@media(max-width: 950px) {
  header { padding: 16px 3%; gap: 12px; }
  .session-user { display: none; }
  .grounds { gap: 10px; }
  .ground-card { gap: 10px; padding: 12px; }
  .ground-card.active { padding: 11px; }
  .ground-card .mini { width: 72px; height: 52px; }
  main { padding: 25px 3%; }
  footer { flex-wrap: wrap; }
  .legend { gap: 10px; }
}
@media(max-width: 600px) {
  header { height: auto; }
  .brand { font-size: 18px; }
  .brand small { display: none; }
  .badge { font-size: 15px; padding: 10px; }
  h1 { font-size: 27px; }
  .intro { align-items: flex-start; gap: 12px; }
  .week-controls { gap: 4px; }
  .week-controls button { padding: 8px; }
  .grounds { gap: 6px; }
  .ground-card { flex-direction: column; gap: 8px; }
  .ground-card h2 { font-size: 16px; }
  .ground-card p { font-size: 11px; }
  .calendar-heading { padding: 15px; align-items: flex-start; }
  .legend { flex-direction: column; gap: 3px; }
  .calendar-heading h2 { font-size: 17px; }
  .fields { gap: 10px; }
  dialog { padding: 20px; }
  .selectable { height: 180px; }
}

/* Benutzer-/Logo-/Serien-Erweiterungen */
.brand-logo { width: 54px; height: 54px; object-fit: contain; flex: 0 0 54px; border-radius: 10px; }
input[readonly], select:disabled { opacity: .78; cursor: not-allowed; background: var(--bg-subtle); }
.recurrence-group { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-subtle); }
.recurrence-group > label:not(.check-row) { display: block; margin-top: 12px; max-width: 280px; }
.check-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: 0; flex: 0 0 18px; accent-color: var(--primary); }
.check-row span { font-size: 14px; }
#series-note { margin: 0; }
.user-row > div { display: grid; gap: 2px; min-width: 0; }
.user-row > div span { display: block; overflow-wrap: anywhere; }
.role.trainer { color: var(--text-main); }

/* Branding, trainer scope and recurrence controls */
.brand-logo-wrap { width: 62px; height: 62px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 62px; }
.club-logo { max-width: 62px; max-height: 62px; width: auto; height: auto; object-fit: contain; }
input:disabled, select:disabled { opacity: .72; cursor: not-allowed; background: var(--bg-subtle); }
.recurrence-wrap { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-subtle); }
.check-row { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: 0; }
#repeat-until-field { display: block; margin-top: 12px; max-width: 260px; }
#repeat-hint { margin-bottom: 0; }
.user-row > div { min-width: 0; }
.user-row span { display: block; overflow-wrap: anywhere; }
.role.trainer { color: var(--text-main); }

@media(max-width:600px){
  .brand-logo-wrap { width: 48px; height: 48px; flex-basis: 48px; }
  .club-logo { max-width: 48px; max-height: 48px; }
  .recurrence-wrap { padding: 12px; }
}

/* PWA installation / connectivity */
.offline-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 9px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--game-text);
  background: var(--game-bg);
  border-bottom: 1px solid var(--game-border);
}
#install-app { white-space: nowrap; }
.install-header-button { font-size:18px; line-height:1; }
@media(display-mode: standalone) {
  #install-app { display: none !important; }
}

/* v4.2: zusätzliche Flächen, Platzinfos und Sperrungen */
.grounds { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.brand-logo-wrap { background: #fff; border-radius: 12px; padding: 4px; overflow: hidden; border: 1px solid var(--border-color); }
.club-logo { display: block; max-width: 100%; max-height: 100%; }
.ground-card .mini.area-count-2 .quarters { grid-template-columns: repeat(2,1fr); grid-template-rows: 1fr; grid-auto-flow: row; }
.ground-card .mini.area-count-1 .quarters { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.pitch.area-count-2 .quarters { grid-template-columns: repeat(2,1fr); grid-template-rows: 1fr; grid-auto-flow: row; }
.pitch.area-count-1 .quarters { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.pitch.area-count-2 .markings:before,
.pitch.area-count-1 .markings:before { display:none; }
.pitch.area-count-1 .markings:after { left:39%; }

.ground-info-card { margin: -6px 0 26px; padding: 18px 20px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-card); }
.ground-info-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }
.ground-info-head h2 { margin:0; font-size:19px; }
.ground-info-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.ground-info-item { min-width:0; padding:12px; border:1px solid var(--border-color); border-radius:9px; background:var(--bg-subtle); }
.ground-info-item strong { display:block; font-size:12px; margin-bottom:6px; }
.ground-info-item p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--text-muted); font-size:12px; line-height:1.45; }
.muted { opacity:.75; font-style:italic; }


.ground-block { position:absolute; left:0; right:0; z-index:1; display:flex; flex-direction:column; justify-content:center; gap:2px; padding:5px 7px; background:color-mix(in srgb, var(--danger) 22%, var(--bg-card)); border:1px solid color-mix(in srgb, var(--danger) 65%, var(--border-color)); color:var(--text-main); overflow:hidden; pointer-events:none; }
.ground-block.all-day { background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--danger) 16%,transparent) 0 8px,color-mix(in srgb,var(--danger) 6%,transparent) 8px 16px); }
.ground-block strong { font-size:10px; }
.ground-block span { font-size:9px; overflow-wrap:anywhere; }
.slot { z-index:2; }

textarea { width:100%; display:block; padding:10px; border:1px solid var(--border-card); border-radius:7px; margin-top:6px; resize:vertical; background:var(--bg-card); color:var(--text-main); font:inherit; }
textarea:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.block-list-wrap h3 { margin:0 0 12px; font-size:15px; }
#ground-info-form { display:grid; gap:12px; }
#block-dialog { width:650px; }
.block-all-day { align-self:end; padding:8px 0; }
.block-list-wrap { border-top:1px solid var(--border-color); margin-top:22px; padding-top:16px; }
.block-list { display:grid; gap:8px; max-height:250px; overflow:auto; }
.block-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:11px 12px; border:1px solid var(--border-color); border-radius:9px; background:var(--bg-subtle); }
.block-row > div { min-width:0; display:grid; gap:3px; }
.block-row span { color:var(--text-muted); font-size:12px; overflow-wrap:anywhere; }
.block-row button { flex:0 0 auto; }

@media(max-width:950px){
  .ground-info-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px){
  .grounds { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ground-info-card { padding:14px; }
  .ground-info-grid { grid-template-columns:1fr; }
  .ground-info-head { align-items:flex-start; }
  #block-dialog { width:100%; }
  .block-row { align-items:flex-start; flex-direction:column; }
}

/* v4.3: drei Standort-Kacheln, Zusatzflächen als Auswahl */
.surface-view-wrap { display:flex; align-items:center; gap:10px 14px; margin:-10px 0 22px; padding:12px 14px; border:1px solid var(--border-color); border-radius:10px; background:var(--bg-card); }
.surface-view-wrap label { font-size:12px; font-weight:800; white-space:nowrap; }
.surface-view-wrap select { width:auto; min-width:230px; margin:0; }
.surface-view-wrap span { font-size:12px; color:var(--text-muted); }
.slot-owner { font-weight:700; opacity:.9; }

/* v4.4: eindeutige Orientierung und Mehrfach-Mannschaftszuweisung */
.cabin-label {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 5px 12px;
  border-radius: 999px;
  background: #0b1220e6;
  color: #fff;
  border: 1px solid #ffffff66;
  box-shadow: 0 2px 8px #00000040;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}
.team-fieldset {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border-card);
  border-radius: 9px;
  min-width: 0;
}
.team-fieldset legend { padding: 0 5px; font-size: 14px; font-weight: 700; }
.team-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.team-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-subtle);
  cursor: pointer;
  font-weight: 600;
}
.team-check input { width: 17px; height: 17px; margin: 0; flex: 0 0 17px; accent-color: var(--primary); }
.team-check span { font-size: 12px; line-height: 1.25; }
#teams-dialog { width: 560px; }

@media(max-width:600px){
  .cabin-label { top: 5px; padding: 4px 9px; font-size: 9px; }
  .team-check-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
.role.vorstand { color: #7dd3fc; border-color: #38bdf8; }

/* v4.5.1: Benachrichtigungen und Mannschaftsverwaltung */
.notification-button { position: relative; }
.notification-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: #fff;
  border: 2px solid var(--bg-card);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.notification-actions { display: flex; justify-content: flex-end; margin: -4px 0 12px; }
.notification-list { display: grid; gap: 9px; max-height: 430px; overflow: auto; }
.notification-row { padding: 12px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-subtle); display: grid; gap: 5px; }
.notification-row.unread { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.notification-row strong { font-size: 14px; }
.notification-row p { margin: 0; white-space: pre-wrap; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.notification-row time { font-size: 11px; color: var(--text-muted); }
.team-create-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.team-create-form label { min-width: 0; }
.team-list { display: grid; gap: 8px; margin-top: 12px; max-height: 260px; overflow: auto; }
.team-admin-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 9px; background: var(--bg-subtle); }
.team-admin-row strong { overflow-wrap: anywhere; }

@media(max-width:700px){
  .notification-button { width:44px; padding:0; }
  .team-create-form { grid-template-columns: 1fr; }
  .team-admin-row { align-items: flex-start; flex-direction: column; }
}

/* v4.5.3: Kalender-Schnellerfassung und Standort-Hinweise */
.day.click-create { cursor: cell; }
.day.click-create:hover { background-color: color-mix(in srgb, var(--primary) 3%, transparent); }
.site-notices-card { margin: -10px 0 26px; padding: 16px 20px; border: 1px solid color-mix(in srgb, #d99516 48%, var(--border-color)); border-radius: 12px; background: color-mix(in srgb, #f6b73c 9%, var(--bg-card)); }
.site-notices-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.site-notices-head h2 { margin:0; font-size:18px; }
.site-notices-content { display:grid; gap:9px; }
.site-notice-row { padding:11px 13px; border:1px solid color-mix(in srgb, #d99516 35%, var(--border-color)); border-radius:10px; background:var(--bg-card); }
.site-notice-row > div { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.site-notice-row strong { font-size:14px; }
.site-notice-row span,.site-notice-row small { color:var(--text-muted); font-size:12px; }
.site-notice-row p { margin:6px 0; line-height:1.45; }
.calendar-create-hint { display:block; margin-top:6px; font-size:12px; color:var(--text-muted); }

/* v4.5.3: Kalender-Schnellerfassung und Standorthinweise */
.calendar-create-hint{display:block;margin-top:6px;font-size:12px;color:var(--text-muted)}
.day{cursor:crosshair}
.site-notices-card{margin:0 0 22px;border:1px solid var(--border-color);border-radius:12px;background:var(--bg-card);overflow:hidden}
.site-notices-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border-color)}
.site-notices-head h2{margin:0;font-size:18px}
.site-notices-content{display:grid;gap:0}
.site-notice-item{display:grid;grid-template-columns:auto 1fr;gap:12px;padding:15px 20px;border-bottom:1px solid var(--border-color)}
.site-notice-item:last-child{border-bottom:0}
.site-notice-icon{font-size:22px;line-height:1}
.site-notice-item strong{display:block;margin-bottom:3px}
.site-notice-item span,.site-notice-item small{display:block;color:var(--text-muted);font-size:12px}
.site-notice-item p{margin:7px 0 4px;line-height:1.45}

/* v4.6 Alltag & Kommunikation */
.dialog-head-actions{display:flex;gap:8px;align-items:center}.series-scope-wrap{margin-top:18px;padding:14px;border:1px solid var(--border-color);border-radius:10px;background:var(--bg-subtle)}.series-scope-wrap label{display:block}.booking-status-actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.warning{background:#8a5b13;color:#fff;border-color:#8a5b13}.slot.cancelled{background:var(--bg-subtle);border-left-color:#8a8f98;color:var(--text-muted);opacity:.78;text-decoration:line-through}.slot.rescheduled{outline:2px dashed #b57b16;outline-offset:-2px}.slot-status{font-weight:800;text-decoration:none}.my-bookings-list,.audit-list{display:grid;gap:10px}.my-booking-row,.audit-row{border:1px solid var(--border-color);border-radius:10px;padding:12px;background:var(--bg-subtle)}.my-booking-row{display:flex;justify-content:space-between;gap:16px;align-items:center}.my-booking-main{display:grid;gap:3px;min-width:0}.my-booking-main span,.my-booking-main small,.audit-row span,.audit-row small{color:var(--text-muted)}.status-pill{font-size:11px;font-weight:800;padding:4px 8px;border-radius:999px;background:var(--bg-card);border:1px solid var(--border-color);white-space:nowrap}.status-pill.cancelled{color:#8a3131}.status-pill.rescheduled{color:#8a5b13}.notification-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.wide-dialog{width:760px;max-width:95vw}.audit-row{display:grid;grid-template-columns:minmax(140px,auto) 1fr;gap:6px 16px}.audit-row time{color:var(--text-muted);font-size:12px}.audit-row strong{grid-column:2}.audit-row p{grid-column:2;margin:0}.audit-row small{grid-column:2}.push-ready{color:#2f7b46!important;font-weight:700}.push-off{color:#8a5b13!important;font-weight:700}

/* v4.8 Administration, Anfragen und kompaktere Formulare */
.admin-tabs{display:grid;grid-template-columns:repeat(var(--admin-tab-count,4),minmax(0,1fr));gap:8px;margin:0 0 20px}.admin-tabs button{background:var(--bg-subtle);border-color:var(--border-color)}.admin-tabs button.active{background:var(--primary);color:#fff;border-color:var(--primary)}.admin-panel>h3{margin:0 0 16px}.role.jugendleiter{color:#d9a441;border-color:#d9a441}.security-section{padding:4px 0 20px}.security-section+ .security-section{border-top:1px solid var(--border-color);padding-top:20px}.security-section h3{margin:0 0 8px}.danger-zone{background:color-mix(in srgb,#b91c1c 7%,transparent);border-radius:12px;padding:16px!important;border:1px solid color-mix(in srgb,#b91c1c 35%,var(--border-color))!important}.section-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.section-head h3{margin:0}.section-head p{margin:4px 0 0}.request-list-wrap{border-top:1px solid var(--border-color);margin-top:22px;padding-top:18px}.request-list-wrap h3{margin:0 0 12px}.request-list{display:grid;gap:10px;max-height:460px;overflow:auto}.request-row{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:13px;border:1px solid var(--border-color);border-radius:11px;background:var(--bg-subtle)}.request-row>div:first-child{display:grid;gap:4px;min-width:0}.request-row span,.request-row small{font-size:12px;color:var(--text-muted)}.request-row p{margin:4px 0;white-space:pre-wrap;line-height:1.45}.request-actions{display:flex!important;gap:7px;flex-wrap:wrap;justify-content:flex-end}.status-pill.request-open{color:#8a5b13}.status-pill.request-accepted{color:#2f7b46}.status-pill.request-rejected{color:#9b2c2c}.menu-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;margin-left:auto;padding:0 6px;border-radius:999px;background:var(--primary);color:white;font-size:11px;font-weight:800}#requests-open{position:relative}#requests-open .notification-badge{top:-7px;right:-7px}

/* v4.8.1: Kontenübersicht, Mehrfachrollen und aufgeräumtes Platzmanagement */
#admin-dialog{width:980px;max-width:96vw}
.admin-tabs{grid-template-columns:repeat(var(--admin-tab-count,4),minmax(0,1fr));align-items:stretch}
.admin-tabs button{width:100%;min-height:48px;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:700}
.user-list-wrap{margin-top:28px;padding-top:22px}
.user-list-head{display:flex;justify-content:space-between;gap:16px;align-items:end;margin-bottom:14px}
.user-list-head h3{font-size:19px;margin:0 0 4px}
.user-search-tools{display:grid;grid-template-columns:minmax(240px,1fr) 170px;gap:9px;min-width:min(100%,480px)}
.user-search-tools input,.user-search-tools select{margin-top:0}
.user-list{max-height:520px;gap:11px;padding-right:4px}
.user-row{padding:16px 17px;border-radius:12px;gap:18px;align-items:flex-start}
.user-row strong{font-size:17px;line-height:1.25}
.user-row .user-login{font-size:13px;font-weight:600;color:var(--text-main);margin-top:4px}
.user-row span{font-size:12px;line-height:1.45}
.user-row-side{min-width:300px}
.role-stack{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.role-fieldset{grid-column:1 / -1}
.role-check-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.place-management-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}
.place-management-actions button{min-height:50px;font-weight:700}
.management-divider{height:1px;background:var(--border-color);margin:4px 0 20px}

/* v4.8.2: Sicherheit zentral in der Verwaltung */
.admin-panel#admin-panel-security>h3{margin-bottom:18px}

/* v4.9 Dashboard, Aufgaben und Planungsassistent */
.dashboard{margin-bottom:24px;padding:18px;border:1px solid var(--border-color);border-radius:14px;background:var(--bg-card);box-shadow:0 5px 22px var(--shadow)}
.dashboard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.dashboard-head h2{margin:0;font-size:22px}.dashboard-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.dashboard-card{display:flex;gap:12px;align-items:flex-start;padding:14px;border:1px solid var(--border-color);border-radius:11px;background:var(--bg-subtle);min-width:0}.dashboard-icon{font-size:22px;line-height:1}.dashboard-card>div{display:grid;gap:4px;min-width:0}.dashboard-card strong{font-size:13px}.dashboard-value{display:grid;gap:3px;font-size:12px;color:var(--text-muted);min-width:0}.dashboard-value b{font-size:15px;color:var(--text-main)}.dashboard-value span{overflow-wrap:anywhere}
.field-help{display:block;margin-top:5px;color:var(--text-muted);font-size:11px;font-weight:400}.game-buffer-wrap{margin-top:16px;padding:14px;border:1px solid var(--border-color);border-radius:10px;background:var(--bg-subtle)}.buffer-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:10px}.conflict-suggestions{margin:14px 0;padding:13px;border:1px solid color-mix(in srgb,var(--primary) 45%,var(--border-color));border-radius:10px;background:var(--primary-soft)}.conflict-suggestion-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:9px}.conflict-suggestion-list button{background:var(--bg-card)}
.status-pill.request-completed{color:#37634a}.request-detail-card{padding:14px;border:1px solid var(--border-color);border-radius:11px;background:var(--bg-subtle)}.request-detail-meta{display:flex;justify-content:space-between;gap:12px;align-items:center;color:var(--text-muted);font-size:12px}.request-photo{display:block;max-width:100%;max-height:420px;margin-top:12px;border-radius:10px;border:1px solid var(--border-color);object-fit:contain}.request-comments{display:grid;gap:8px}.request-comments article{display:grid;grid-template-columns:1fr auto;gap:3px 10px;padding:10px 12px;border-radius:9px;background:var(--bg-subtle);border:1px solid var(--border-color)}.request-comments time{font-size:11px;color:var(--text-muted)}.request-comments p{grid-column:1/3;margin:3px 0 0;white-space:pre-wrap}.request-comment-box{margin-top:18px;padding-top:16px;border-top:1px solid var(--border-color)}.damage-photo-preview{margin:10px 0}.damage-photo-preview img{max-width:100%;max-height:320px;border-radius:10px;border:1px solid var(--border-color);object-fit:contain}.recovery-box{margin-top:12px;padding:12px;border:1px solid var(--border-color);border-radius:10px;background:var(--bg-subtle)}.recovery-box p{margin:6px 0 0;color:var(--text-muted);line-height:1.5}.block-actions{display:flex!important;gap:7px;flex-wrap:wrap}.block-recurrence{margin-top:14px}

/* v4.9.1: klare Zeitauswahl und Schadensübersicht */
.time-entry{display:grid;grid-template-columns:minmax(0,1fr) 132px;gap:8px;align-items:end}
.time-entry input,.time-entry select{margin-top:6px}
.time-quick{font-variant-numeric:tabular-nums}
.place-damage-head{margin-bottom:12px}
.place-damage-list{max-height:420px;overflow:auto;margin-bottom:4px}

/* v4.9.3: kompakte Zeiteingabe, ganze Spielflächen und endgültig schließbare Aufgaben */
.time-field{min-width:0}.time-field>label{display:block}.time-field>input{margin-top:6px}
.time-quick-panel{margin-top:7px;border:1px solid var(--border-color);border-radius:9px;background:var(--bg-subtle)}
.time-quick-panel summary{cursor:pointer;list-style:none;padding:8px 10px;font-size:12px;font-weight:700;color:var(--text-main);user-select:none}
.time-quick-panel summary::-webkit-details-marker{display:none}.time-quick-panel summary:after{content:'▾';float:right;color:var(--text-muted)}.time-quick-panel[open] summary:after{content:'▴'}
.time-quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;max-height:230px;overflow:auto;padding:0 9px 9px}
.time-quick-grid button{min-height:34px;padding:5px 7px;font-size:11px;font-variant-numeric:tabular-nums;background:var(--bg-card)}
.time-quick-grid button.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.pitch.whole-only .quarters.whole-only-grid{grid-template-columns:1fr;grid-template-rows:1fr;grid-auto-flow:row}
.pitch.whole-only .whole-quarter{grid-column:1/-1;grid-row:1/-1;font-size:16px;font-weight:800}
.pitch.forced-whole .quarter:disabled{opacity:1;cursor:default;color:inherit}
.request-actions [data-request-close],.request-actions [data-place-damage-close]{font-weight:700}
.dashboard-grid{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}

/* v4.9.3: Bei reinen Trainerkonten gibt es nur den Sicherheitsbereich; die einzelne Tab-Leiste wird dann ausgeblendet. */
.admin-tabs[hidden]{display:none!important}

/* v1.0.0 modules */
.team-chips { display:flex; flex-wrap:wrap; gap:7px; margin:8px 0 4px; }
.team-chip { display:inline-flex; align-items:center; gap:6px; background:var(--primary-soft); border:1px solid var(--border-card); border-radius:999px; padding:5px 9px; font-size:12px; font-weight:700; }
.team-chip button { min-height:24px; height:24px; width:24px; padding:0; border-radius:50%; }
.additional-team-row { display:grid; grid-template-columns:1fr auto; gap:8px; margin-top:8px; }
.additional-team-row select { margin-top:0; }
.training-plan-wrap { margin-top:22px; padding:16px; border:1px solid var(--border-card); border-radius:12px; background:var(--bg-subtle); }
.training-plan-summary { margin:8px 0 12px; font-weight:800; color:var(--primary); }
.training-plan-list { display:grid; gap:10px; }
.training-plan-item { border:1px solid var(--border-card); border-radius:10px; padding:12px; background:var(--bg-card); }
.training-plan-item-head,.exercise-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.training-plan-item-head strong,.exercise-card-head strong { display:block; }
.training-plan-item-head span,.exercise-card-head span { display:block; color:var(--text-muted); font-size:12px; margin-top:3px; }
.plan-order-actions { display:flex; gap:5px; }
.plan-order-actions button { min-width:36px; padding:5px 8px; min-height:36px; }
.training-plan-item-fields { display:grid; grid-template-columns:140px 1fr; gap:10px; margin-top:10px; }
.exercise-list { display:grid; gap:12px; margin-top:12px; }
.exercise-card { display:grid; grid-template-columns:130px 1fr; gap:14px; border:1px solid var(--border-card); border-radius:12px; padding:12px; background:var(--bg-card); }
.exercise-thumb { width:130px; height:100px; object-fit:cover; border-radius:9px; background:var(--bg-subtle); }
.exercise-thumb-empty { display:grid; place-items:center; font-size:32px; }
.exercise-card-body { min-width:0; }
.exercise-category { white-space:nowrap; border:1px solid var(--border-card); border-radius:999px; padding:3px 7px; }
.exercise-tags { display:flex; flex-wrap:wrap; gap:5px; margin:8px 0; }
.exercise-tags span { font-size:11px; padding:3px 7px; border-radius:999px; background:var(--primary-soft); }
.exercise-card-actions { display:flex; gap:8px; margin-top:10px; }
.exercise-details { font-size:13px; line-height:1.5; }
.exercise-details p { white-space:pre-wrap; }
.exercise-filter-row { display:grid; grid-template-columns:minmax(220px,1fr) 180px 150px auto; gap:8px; align-items:end; }
.exercise-filter-row input,.exercise-filter-row select { margin-top:0; }
.pagination { display:flex; align-items:center; justify-content:center; gap:12px; margin-top:14px; }
.chip-check-grid { display:flex; flex-wrap:wrap; gap:7px; }
.chip-check { position:relative; }
.chip-check input { position:absolute; opacity:0; width:1px; height:1px; }
.chip-check span { display:block; border:1px solid var(--border-card); border-radius:999px; padding:7px 10px; cursor:pointer; font-size:12px; }
.chip-check input:checked + span { background:var(--primary); color:#fff; border-color:var(--primary); }
.exercise-live-preview { border:1px dashed var(--border-card); border-radius:12px; padding:12px; margin-top:14px; }
.exercise-preview-card > span { color:var(--text-muted); font-size:12px; display:block; margin-top:4px; }
.exercise-preview-card p { font-size:13px; white-space:pre-wrap; }
.exercise-image-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:8px; margin-top:10px; }
.exercise-image-grid img { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:8px; }
.exercise-image-admin { position:relative; border:1px solid var(--border-card); border-radius:9px; padding:6px; }
.exercise-image-admin button { width:100%; margin-top:5px; min-height:34px; }
.plan-detail-image { max-width:280px; width:100%; border-radius:8px; }
.block-row,.mapping-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px solid var(--border-color); }
.block-row > div:first-child { display:flex; flex-direction:column; gap:4px; }
.block-row span,.mapping-row span { color:var(--text-muted); font-size:12px; }
.row-actions { display:flex; gap:6px; }
.game-profiles-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.game-profile-card { border:1px solid var(--border-card); border-radius:12px; padding:12px; background:var(--bg-subtle); }
.game-profile-card h4 { margin:0 0 8px; }
.profile-fields { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.profile-fields input { min-width:0; }
.sync-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.compact-form { display:grid; gap:8px; }
.audit-row.sync-run { width:100%; text-align:left; display:flex; flex-direction:column; align-items:stretch; }
.log-error { border-left:3px solid #b42318; padding-left:9px; }
.log-warning,.log-warn { border-left:3px solid #b76e00; padding-left:9px; }
.slot.conflict { outline:2px solid #c2410c; outline-offset:-2px; background-image:repeating-linear-gradient(135deg,transparent 0 7px,rgba(194,65,12,.16) 7px 11px); }
.slot-conflict-note { font-size:10px!important; font-weight:800; color:#c2410c!important; display:block; }
.management-divider { height:1px; background:var(--border-color); margin:20px 0; }
.feature-flag-wrap { margin:14px 0 18px; padding:12px; border:1px solid var(--border-card); border-radius:12px; background:var(--bg-subtle); }
.feature-flag-wrap h4 { margin:0 0 4px; }
.feature-flag-list { display:grid; gap:8px; margin-top:10px; }
.feature-flag-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 0; border-bottom:1px solid var(--border-color); }
.feature-flag-row:last-child { border-bottom:0; }
.feature-flag-row span { display:flex; flex-direction:column; gap:2px; }
.feature-flag-row small { color:var(--text-muted); font-weight:400; }
.feature-flag-row input { width:auto; margin:0; }
.read-only { opacity:.72; pointer-events:none; }

/* v1.0.4: Mehrfach-Mannschaft im Buchungsdialog bewusst kompakt halten. */
.multi-team-field { min-width:0; }
#add-team.compact-button {
  width:auto;
  min-height:30px;
  justify-self:start;
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  margin-top:6px;
  font-size:12px;
  line-height:1.2;
}
.additional-team-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; align-items:center; margin-top:7px; }
.additional-team-row button { min-width:32px; min-height:32px; padding:4px 8px; }

/* v1.0.5: Hallen sind eine einzelne buchbare Innenfläche, ohne Platz-/Kabinen-Symbolik. */
.pitch.indoor-surface {
  background: var(--bg-subtle);
  border-color: var(--border-card);
}
.pitch.indoor-surface .quarter {
  border: 0;
  color: var(--text-main);
}
.pitch.indoor-surface .quarter.selected {
  background: var(--primary-soft);
  color: var(--text-main);
}


/* v1.0.8: ruhige Einzelflächen-Darstellung und Live-Filter */
.exercise-filter-row-live { grid-template-columns:minmax(220px,1fr) 180px 150px; }
.pitch.whole-only-static { cursor:default; }
.pitch.whole-only-static.whole-occupied::before {
  content:'';
  position:absolute;
  inset:0;
  z-index:1;
  background:repeating-linear-gradient(135deg, color-mix(in srgb, var(--game-border) 48%, transparent) 0 7px, color-mix(in srgb, var(--game-border) 24%, transparent) 7px 13px);
  pointer-events:none;
}
.pitch.indoor-surface.whole-only-static {
  background:linear-gradient(90deg, color-mix(in srgb, var(--bg-subtle) 84%, var(--primary) 16%), var(--bg-subtle), color-mix(in srgb, var(--bg-subtle) 84%, var(--primary) 16%));
  border-color:var(--border-card);
}
.hall-court-markings { position:absolute; inset:6%; border:2px solid var(--pitch-line); z-index:3; pointer-events:none; }
.hall-center-line { position:absolute; left:50%; top:0; bottom:0; border-left:2px solid var(--pitch-line); }
.hall-center-circle { position:absolute; width:22%; aspect-ratio:1; left:39%; top:50%; transform:translateY(-50%); border:2px solid var(--pitch-line); border-radius:50%; }
.hall-goal { position:absolute; top:34%; width:5%; height:32%; border:2px solid var(--pitch-line); }
.hall-goal-left { left:-2px; border-left:0; }
.hall-goal-right { right:-2px; border-right:0; }
.hall-key { position:absolute; top:24%; width:18%; height:52%; border:2px solid var(--pitch-line); }
.hall-key-left { left:-2px; border-left:0; border-radius:0 50% 50% 0; }
.hall-key-right { right:-2px; border-right:0; border-radius:50% 0 0 50%; }

/* v1.0.9: smarte Mannschaftsauswahl für gemeinsame Trainings. */
.multi-team-field > label { display:block; }
.team-chips { margin-top:8px; }
.team-chip.primary-team-chip { background:var(--bg-subtle); border-style:dashed; }
.team-chip small { font-size:9px; line-height:1; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted); font-weight:800; }
.team-partner-toggle { margin-top:8px!important; }
.team-partner-picker { margin-top:8px; padding:10px; border:1px solid var(--border-card); border-radius:10px; background:var(--bg-subtle); display:grid; gap:10px; }
.team-picker-group { display:grid; gap:6px; }
.team-picker-group > strong { font-size:11px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; }
.team-partner-options { display:flex; flex-wrap:wrap; gap:6px; }
.team-partner-option { width:auto; min-height:32px; padding:5px 9px; font-size:12px; background:var(--bg-card); }
.team-picker-empty { margin:0; font-size:12px; color:var(--text-muted); }
#team-selection-help { display:block; margin-top:7px; line-height:1.35; }

@media (max-width: 620px) {
  .team-partner-options { display:grid; grid-template-columns:1fr 1fr; }
  .team-partner-option { width:100%; }
}

/* v1.0.9 Hotfix – frei erweiterbare Übungs-Schwerpunkte */
.exercise-focus-fieldset { display:grid; gap:10px; }
.exercise-selected-tags { display:flex; flex-wrap:wrap; gap:7px; min-height:32px; align-items:center; }
.exercise-selected-tag { display:inline-flex; align-items:center; gap:7px; border:1px solid var(--primary); background:var(--primary-soft); color:inherit; border-radius:999px; padding:7px 10px; }
.exercise-selected-tag b { font-size:16px; line-height:1; }
.exercise-tag-entry { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; }
.exercise-tag-entry input { min-width:0; }
.exercise-tag-suggestions { display:flex; flex-wrap:wrap; gap:7px; }
.exercise-tag-suggestions:empty { display:none; }
.exercise-tag-suggestions button { border-radius:999px; padding:6px 9px; font-size:12px; }
.exercise-tag-suggestions .exercise-tag-create { border-style:dashed; border-color:var(--primary); }
@media (max-width:640px){ .exercise-tag-entry { grid-template-columns:1fr; } .exercise-tag-entry button { width:100%; } }


/* v1.1.0: Eigene Hartplatz-Darstellung statt Rasenoptik im Buchungsdialog. */
.pitch.hard-surface {
  --hard-line: rgba(255,248,234,.95);
  background:
    radial-gradient(circle at 18% 28%, rgba(255,255,255,.14) 0 1px, transparent 1.45px),
    radial-gradient(circle at 72% 62%, rgba(64,40,26,.18) 0 1px, transparent 1.6px),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.04)),
    linear-gradient(135deg, #b77c4d 0%, #a86f43 48%, #956138 100%);
  background-size:13px 13px,17px 17px,100% 100%,100% 100%;
  border-color:#6c472c;
  box-shadow:inset 0 0 28px rgba(48,27,16,.22);
}
.pitch.hard-surface.whole-occupied::before { z-index:2; }
.hard-court-markings { position:absolute; inset:6%; border:2px solid var(--hard-line); z-index:3; pointer-events:none; }
.hard-center-line { position:absolute; left:50%; top:0; bottom:0; border-left:2px solid var(--hard-line); }
.hard-center-circle { position:absolute; width:22%; aspect-ratio:1; left:39%; top:50%; transform:translateY(-50%); border:2px solid var(--hard-line); border-radius:50%; }
.hard-box { position:absolute; top:25%; width:17%; height:50%; border:2px solid var(--hard-line); }
.hard-box-left { left:-2px; border-left:0; }
.hard-box-right { right:-2px; border-right:0; }
.hard-goal { position:absolute; top:38%; width:4%; height:24%; border:2px solid var(--hard-line); opacity:.82; }
.hard-goal-left { left:-2px; border-left:0; }
.hard-goal-right { right:-2px; border-right:0; }
[data-theme="dark"] .pitch.hard-surface {
  background:
    radial-gradient(circle at 18% 28%, rgba(255,255,255,.12) 0 1px, transparent 1.45px),
    radial-gradient(circle at 72% 62%, rgba(36,23,15,.22) 0 1px, transparent 1.6px),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.06)),
    linear-gradient(135deg, #9f693f 0%, #8f5b35 48%, #7b4d2d 100%);
  border-color:#5b3d2a;
}

/* v1.1.2: kompakte Aktionen für Trainingsplan/PDF. */
.section-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.section-actions button { white-space:nowrap; }
.exercise-card-actions [data-exercise-pdf] { white-space:nowrap; }


/* v1.1.3: Diagnose für persistenten Übungsbild-Speicher. */
.storage-health-card{display:grid;gap:4px;margin:10px 0 16px;padding:11px 13px;border:1px solid var(--border-color);border-radius:10px;background:var(--bg-card)}
.storage-health-card span{font-size:12px;color:var(--text-muted)}
.storage-health-card.ok{border-color:color-mix(in srgb,#22c55e 55%,var(--border-color))}
.storage-health-card.warn{border-color:color-mix(in srgb,#f59e0b 60%,var(--border-color))}
.storage-health-card.error{border-color:color-mix(in srgb,#ef4444 65%,var(--border-color))}
.exercise-thumb-missing,.exercise-image-missing{display:grid;place-items:center;text-align:center;font-size:12px;font-weight:700;color:var(--text-muted);background:var(--bg-soft);border:1px dashed var(--border-color)}
.exercise-image-missing{min-height:90px;padding:10px;border-radius:8px}

/* v1.4.0: Vereins-Setup und Pilot-Onboarding. */
.setup-card {
  margin:14px 0;
  padding:16px;
  border:1px solid var(--border-card);
  border-radius:12px;
  background:var(--bg-subtle);
}
.setup-card > h4 { margin:0 0 12px; }
.setup-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; align-items:start; }
.rule-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.rule-grid label { display:grid; gap:6px; min-width:0; font-weight:700; }
.rule-grid select { width:100%; min-width:0; }
#club-smtp-status { white-space:nowrap; }
#platform-org-list { margin-top:14px; }
