:root {
  --bg: #f3f5f2;
  --card: #ffffff;
  --ink: #17221c;
  --muted: #5f6d65;
  --line: #dfe5df;
  --line-strong: #c6cfc7;
  --brand: #0f3d2a;
  --brand-2: #17603f;
  --accent: #1f9d55;
  --accent-ink: #ffffff;
  --danger: #c0392b;
  --warn: #b7791f;
  --grass-1: #2f8a4a;
  --grass-2: #2a7d43;
  --closed: repeating-linear-gradient(135deg, #eef1ee 0 6px, #e4e8e4 6px 12px);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 40, 28, .06), 0 4px 16px rgba(16, 40, 28, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-2); }
code { background: #eef2ee; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px; min-height: 56px;
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.logo-dot { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 18%, #9be3b5 19% 40%, var(--accent) 41%); box-shadow: 0 0 0 2px rgba(255,255,255,.25); flex: none; }
.nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: rgba(255,255,255,.78); text-decoration: none; padding: 17px 10px 15px; white-space: nowrap; font-size: 14.5px;
  border-bottom: 3px solid transparent; font-weight: 500;
}
.nav a:hover { color: #fff; }
.nav a.active { color: #fff; border-bottom-color: #7ee2a4; }
.nav .sep { width: 1px; background: rgba(255,255,255,.2); margin: 14px 6px; }
.usermenu { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; color: var(--ink); border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--line); min-width: 180px; overflow: hidden; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 14px; background: none; border: 0; text-decoration: none; color: var(--ink); cursor: pointer; }
.menu a:hover, .menu button:hover { background: #f1f5f1; }

/* ---------- Layout ---------- */
.app { padding: 18px 16px 60px; max-width: 1500px; margin: 0 auto; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { font-size: 22px; margin: 0; flex: 1; min-width: 200px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.week-label { font-weight: 700; font-size: 18px; margin: 0 6px; white-space: nowrap; }
.week-label small { font-weight: 500; color: var(--muted); font-size: 14px; margin-left: 6px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: #fff; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap;
}
.btn:hover { background: #f4f7f4; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #198a4a; }
.btn.danger { color: var(--danger); border-color: #e9c3be; }
.btn.danger:hover { background: #fdf1ef; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost.light { color: #fff; }
.btn.ghost.light:hover { background: rgba(255,255,255,.1); }
.btn.icon { width: 36px; padding: 0; font-size: 18px; }
.btn.big { height: 44px; font-size: 16px; width: 100%; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 0 14px; height: 34px; cursor: pointer; font-weight: 600; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--brand-2); color: #fff; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }

input[type=text], input[type=password], input[type=email], input[type=tel], input[type=date], input[type=number], input:not([type]), select, textarea {
  height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; min-width: 0;
}
textarea { height: auto; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(31,157,85,.35); border-color: var(--accent); }
input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: 13px; color: #33433a; }
.form label.check, label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; cursor: pointer; }
.form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; }
.form legend { font-weight: 700; padding: 0 6px; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
@media (max-width: 640px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr 1fr; } }
.alert { padding: 10px 12px; border-radius: 9px; font-size: 14px; }
.alert.error { background: #fdecea; color: #8a1f14; border: 1px solid #f3c2bb; }
.alert.info { background: #eaf6ef; color: #0f5132; border: 1px solid #bfe3cd; }
.alert.warn { background: #fff7e6; color: #7a4b00; border: 1px solid #f2d8a7; }
.daypick { display: flex; gap: 4px; flex-wrap: wrap; }
.daypick label { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 32px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; }
.daypick input { display: none; }
.daypick label:has(input:checked) { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }

/* ---------- Chips / legend ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.chip.clickable { cursor: pointer; }
.chip.clickable:hover { border-color: var(--line-strong); }
.badge { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #eef2ee; font-size: 12px; font-weight: 600; color: #3b4a41; white-space: nowrap; }
.badge.green { background: #e2f5e9; color: #146c3c; }
.badge.gray { background: #eceff1; color: #66727a; }
.badge.red { background: #fdecea; color: #a12a1d; }

/* ---------- Timeline (Wochenplan) ---------- */
.day { margin-bottom: 14px; overflow: hidden; }
.day-head { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfa; }
.day-head h3 { margin: 0; font-size: 16px; }
.day-head .muted { font-size: 13px; }
.day.today .day-head { background: #eaf6ef; }
.day.today .day-head h3::after { content: "Heute"; margin-left: 8px; font-size: 11px; background: var(--accent); color: #fff; border-radius: 5px; padding: 1px 6px; vertical-align: 2px; }
.day.closed-day { opacity: .75; }
.day.closed-day .day-head { border-bottom: 0; }
.tl-scroll { overflow-x: auto; }
.tl { --label: 168px; min-width: calc(var(--label) + var(--hours) * 62px); }
.tl-head, .tl-row { display: grid; grid-template-columns: var(--label) 1fr; }
.tl-head { height: 26px; border-bottom: 1px solid var(--line); }
.tl-corner, .tl-label { position: sticky; left: 0; z-index: 3; background: #fff; border-right: 1px solid var(--line); }
.tl-scale { position: relative; }
.tl-scale span { position: absolute; top: 5px; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-scale span:first-child { transform: none; padding-left: 4px; }
.tl-row { border-bottom: 1px solid var(--line); }
.tl-row:last-child { border-bottom: 0; }
.tl-label { padding: 7px 10px; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.tl-label b { font-size: 14px; line-height: 1.15; }
.tl-label span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track {
  position: relative; height: 64px; cursor: copy;
  background-image:
    linear-gradient(to bottom, transparent calc(50% - 1px), var(--line-strong) calc(50% - 1px), var(--line-strong) 50%, transparent 50%),
    linear-gradient(to bottom, transparent calc(25% - .5px), #edf0ed calc(25% - .5px), #edf0ed 25%, transparent 25%, transparent calc(75% - .5px), #edf0ed calc(75% - .5px), #edf0ed 75%, transparent 75%),
    linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, calc(100% / var(--hours)) 100%;
}
.tl-track.readonly { cursor: default; }
.tl-closed { position: absolute; top: 0; bottom: 0; background: var(--closed); pointer-events: none; }
.tl-now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #e53e3e; z-index: 2; pointer-events: none; }
.tl-now::before { content: ""; position: absolute; top: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: #e53e3e; }
.lanes-hint { position: absolute; left: 4px; top: 0; bottom: 0; display: grid; grid-template-rows: repeat(4, 1fr); font-size: 9px; color: #aab5ad; pointer-events: none; line-height: 1; align-items: center; }
.bk {
  position: absolute; border-radius: 6px; padding: 2px 6px; overflow: hidden; cursor: pointer; z-index: 1;
  display: flex; flex-direction: column; justify-content: center; gap: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.12);
  border: 1px solid rgba(255,255,255,.65); line-height: 1.1; min-width: 6px;
}
.bk:hover { filter: brightness(1.06); z-index: 2; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), 0 3px 10px rgba(0,0,0,.2); }
.bk-t { font-weight: 700; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.bk-s { font-size: 10.5px; opacity: .88; white-space: nowrap; overflow: hidden; }
.bk.short .bk-s { display: none; }
.bk-block { background: repeating-linear-gradient(135deg, #5b6770 0 7px, #4a555d 7px 14px) !important; color: #fff !important; }
.bk-auto::after { content: "A"; position: absolute; right: 3px; top: 2px; font-size: 9px; font-weight: 800; opacity: .55; }
.bk-dim { opacity: .3; }
.bk-ghost { background: rgba(31,157,85,.15) !important; border: 2px dashed var(--accent); color: var(--brand) !important; box-shadow: none; pointer-events: none; }

.empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- Pitch view ---------- */
.pitch-controls { display: grid; gap: 10px; margin-bottom: 14px; }
.time-slider { display: flex; align-items: center; gap: 14px; }
.time-slider input[type=range] { flex: 1; accent-color: var(--accent); height: 28px; }
.time-big { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 92px; color: var(--brand); }
.pitch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.pitch-card { padding: 12px; display: grid; gap: 8px; }
.pitch-card-head { display: flex; align-items: center; gap: 8px; }
.pitch-card-head b { font-size: 15px; }
.pitch-card-head .grow { flex: 1; }
.pitch-wrap { position: relative; }
.pitch-closed { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(240,243,240,.82); border-radius: 8px; font-weight: 700; color: var(--muted); }
svg.pitch { width: 100%; height: auto; display: block; border-radius: 8px; }
svg.pitch .grass { fill: var(--grass-1); }
svg.pitch .stripe { fill: var(--grass-2); }
svg.pitch .mk { fill: none; stroke: rgba(255,255,255,.85); stroke-width: .45; pointer-events: none; }
svg.pitch .mk-dot { fill: rgba(255,255,255,.85); pointer-events: none; }
svg.pitch .reg { stroke: rgba(255,255,255,.95); stroke-width: .5; transition: opacity .15s; }
svg.pitch .reg.click { cursor: pointer; }
svg.pitch .reg.click:hover { opacity: .9; stroke-width: 1; }
svg.pitch .reg-free { fill: rgba(255,255,255,.08); }
svg.pitch .reg-free.click:hover { fill: rgba(255,255,255,.3); }
svg.pitch text { font-family: var(--font); font-weight: 700; pointer-events: none; text-anchor: middle; dominant-baseline: middle; }
svg.pitch .lbl-sub { font-weight: 500; }
.day-list { display: flex; flex-wrap: wrap; gap: 5px; }
.day-list .chip { font-size: 12px; }
.day-list .chip.active { box-shadow: 0 0 0 2px var(--accent); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfa; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #f7faf7; }
.tbl tr.inactive td { opacity: .55; }
.color-dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: -2px; margin-right: 8px; }
.wrap-badges { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- Dialog ---------- */
dialog.dlg { border: 0; padding: 0; border-radius: 16px; width: min(640px, calc(100vw - 20px)); max-height: calc(100vh - 30px); box-shadow: 0 20px 60px rgba(0,0,0,.3); color: var(--ink); }
dialog.dlg.wide { width: min(860px, calc(100vw - 20px)); }
dialog.dlg::backdrop { background: rgba(10, 30, 20, .45); backdrop-filter: blur(2px); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.dlg-head h2 { margin: 0; font-size: 18px; flex: 1; }
.dlg-body { padding: 16px 18px; display: grid; gap: 14px; }
.dlg-foot { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; flex-wrap: wrap; }
.dlg-foot .grow { flex: 1; }
.dlg-pitch { max-width: 520px; width: 100%; justify-self: center; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.hours-table { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 6px 10px; align-items: center; }
.matrix { display: grid; grid-template-columns: 1fr 160px 110px; gap: 6px 10px; align-items: center; }
.matrix .mh { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #14281d; color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.25); z-index: 100; max-width: calc(100vw - 30px); font-weight: 500; }
.toast.error { background: #8a1f14; }

/* ---------- Autoplan ---------- */
.ap-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 960px) { .ap-grid { grid-template-columns: 1fr; } }
.team-checks { display: grid; gap: 2px; max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; padding: 6px; }
.team-checks label { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; font-weight: 500; font-size: 14px; cursor: pointer; }
.team-checks label:hover { background: #f4f7f4; }
.team-checks .muted { margin-left: auto; font-size: 12px; }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { padding: 10px 14px; border-radius: 10px; background: #f4f7f4; min-width: 120px; }
.stat b { font-size: 22px; display: block; }
.stat span { font-size: 12px; color: var(--muted); }

/* ---------- Auth ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at top, #1d5b3d, var(--brand) 60%); }
.auth-card { background: #fff; border-radius: 18px; padding: 26px; width: min(400px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.35); display: grid; gap: 16px; }
.auth-card.wide { width: min(640px, 100%); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--brand); }
.auth-pitch { width: 100%; border-radius: 10px; }
.auth-pitch .g { fill: var(--grass-1); }
.auth-pitch .m * { fill: none; stroke: rgba(255,255,255,.85); stroke-width: .5; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 14px; }
.checks .ok { color: #146c3c; }
.checks .bad { color: var(--danger); font-weight: 700; }
.checks .warn { color: var(--warn); font-weight: 600; }
.mysql-only { opacity: .5; }
.form:has(input[value=mysql]:checked) .mysql-only { opacity: 1; }

@media (max-width: 720px) {
  .brand-name { display: none; }
  .app { padding: 12px 10px 60px; }
  .tl { --label: 112px; }
  .tl-label b { font-size: 13px; }
  .week-label { font-size: 16px; }
  .kv { grid-template-columns: 100px 1fr; }
  .matrix { grid-template-columns: 1fr 120px 90px; }
}
@media print {
  .topbar, .toolbar, .legend .clickable { display: none !important; }
  .app { padding: 0; max-width: none; }
  .card { box-shadow: none; }
  .day { break-inside: avoid; }
}

/* ---------- Tausch ---------- */
.nav-badge { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #f59e0b; color: #1a1a1a; font-size: 11px; font-weight: 800; text-align: center; vertical-align: 1px; }
.sec-title { font-size: 16px; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.swap-list { display: grid; gap: 12px; }
.swap-card { display: grid; gap: 10px; }
.swap-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.swap-msg { background: #f4f7f4; border-radius: 8px; padding: 8px 12px; font-style: italic; }
.swap-pair { display: grid; grid-template-columns: minmax(0, 280px) auto minmax(0, 280px); gap: 18px; align-items: center; justify-content: start; }
.swap-pair:has(> :only-child) { grid-template-columns: minmax(0, 380px); }
.swap-side { display: grid; gap: 4px; align-content: start; }
.swap-cap { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; color: var(--muted); }
.swap-mini { max-width: 220px; }
.swap-line { display: flex; align-items: center; }
.swap-arrow { font-size: 26px; color: var(--accent); font-weight: 800; }
.swap-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swap-actions input { flex: 1; min-width: 160px; }
.swap-opts { display: grid; gap: 4px; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; padding: 6px; }
.swap-opt { display: flex !important; align-items: flex-start; gap: 10px; padding: 7px 8px; border-radius: 7px; cursor: pointer; font-weight: 500 !important; font-size: 14px !important; color: var(--ink) !important; }
.swap-opt:hover { background: #f4f7f4; }
.swap-opt input { margin-top: 3px; }
.swap-opt.disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 640px) { .swap-pair { grid-template-columns: 1fr; } .swap-arrow { transform: rotate(90deg); justify-self: center; } }

/* ---------- Plan Drag & Drop ---------- */
.bk-drag { cursor: grab; touch-action: none; user-select: none; }
.bk-drag:active { cursor: grabbing; }
.bk-dragging { opacity: .35; }
.is-dragging, .is-dragging * { cursor: grabbing !important; user-select: none; }
.bk-resize { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; background: linear-gradient(to right, transparent, rgba(255,255,255,.45)); }
.bk-resize:hover { background: rgba(255,255,255,.6); }
.bk-fixed { opacity: .45; filter: grayscale(.5); cursor: default; }
.bk-warn { outline: 2px solid #f59e0b; outline-offset: -2px; }
.bk-warn .bk-t::before { content: "⚠ "; }
.bk-ghost-drag { pointer-events: none; z-index: 5; border: 2px dashed; font-size: 11px; font-weight: 700; padding: 2px 6px; display: flex; align-items: center; box-shadow: none; }
.bk-ghost-drag.ok { background: rgba(31,157,85,.22); border-color: var(--accent); color: var(--brand); }
.bk-ghost-drag.warn { background: rgba(245,158,11,.25); border-color: #f59e0b; color: #7a4b00; }
.bk-ghost-drag.bad { background: rgba(192,57,43,.2); border-color: var(--danger); color: #8a1f14; }

/* ---------- Spieler / Termine / Spiele ---------- */
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; background: #fffbeb; border-color: #f2d8a7; }
.badge.amber { background: #fff4d6; color: #8a5a00; }
.cnt { display: inline-block; padding: 0 6px; border-radius: 6px; font-weight: 700; font-size: 12px; background: #eef2ee; margin-right: 3px; white-space: nowrap; }
.cnt.green { background: #e2f5e9; color: #146c3c; }
.cnt.amber { background: #fff4d6; color: #8a5a00; }
.cnt.red { background: #fdecea; color: #a12a1d; }
.ev-day { margin-bottom: 16px; }
.ev-date { font-size: 15px; margin: 0 0 8px; color: var(--muted); }
.ev-date.today { color: var(--accent); }
.ev-date.today::after { content: " · Heute"; }
.ev-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border-left: 5px solid var(--team); }
.ev-card.ev-past { opacity: .7; }
.ev-main { display: flex; gap: 14px; flex: 1; min-width: 260px; align-items: flex-start; }
.ev-time { font-weight: 800; font-size: 18px; color: var(--brand); font-variant-numeric: tabular-nums; min-width: 64px; }
.ev-time span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.ev-info { display: grid; gap: 3px; }
.ev-title { font-size: 15px; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.ev-staff { display: flex; gap: 6px; flex-wrap: wrap; }
.resp { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.resp-btn { height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-strong); background: #fff; font-weight: 700; cursor: pointer; }
.resp-btn:disabled { cursor: not-allowed; opacity: .5; }
.resp-btn.green.on { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.resp-btn.amber.on { background: #f59e0b; border-color: #f59e0b; color: #1a1a1a; }
.resp-btn.red.on { background: #c0392b; border-color: #c0392b; color: #fff; }
.bk-match { border: 2px solid #fff !important; box-shadow: 0 0 0 2px #111, inset 0 0 0 1px rgba(0,0,0,.2) !important; }
.bk-match .bk-t::before { content: "● "; }
dialog.dlg.xwide { width: min(1100px, calc(100vw - 20px)); }
.lineup-grid { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .lineup-grid { grid-template-columns: 1fr; } }
.lineup-view { max-width: 420px; width: 100%; margin: 0 auto; }
svg.lineup-pitch .slot circle { fill: rgba(255,255,255,.18); stroke: #fff; stroke-width: .5; }
svg.lineup-pitch .slot.filled circle { fill: var(--brand); }
svg.lineup-pitch .slot.sel circle { fill: #f59e0b; stroke-width: .9; }
svg.lineup-pitch .slot.click { cursor: pointer; }
svg.lineup-pitch .slot-num { fill: #fff; font-weight: 800; }
svg.lineup-pitch .slot-name { fill: #fff; font-weight: 700; paint-order: stroke; stroke: rgba(0,0,0,.45); stroke-width: .5px; }
.lineup-right { max-height: 62vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.lp-head { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--muted); padding: 8px 6px 4px; cursor: pointer; }
.lp-row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.lp-row:hover { background: #f1f6f1; }
.lp-row.used { background: #eaf6ef; }
.lp-num { width: 24px; text-align: right; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lp-name { flex: 1; }
.bench { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; }

.chip.chip-extra { background: #f6f8f6; border-style: dashed; font-weight: 500; }

.rule-sum { font-size: 12px; color: var(--muted); margin-top: 3px; width: 100%; }
.rules-box { display: grid; gap: 8px; }
.rule-row { display: grid; grid-template-columns: 140px 140px 1fr 170px 36px; gap: 8px; align-items: end; padding: 8px; border: 1px dashed var(--line-strong); border-radius: 9px; }
@media (max-width: 760px) { .rule-row { grid-template-columns: 1fr 1fr; } }
.row-elsewhere td { background: #f7f8f7; color: var(--muted); }

fieldset.card { background: #fff; }
.ro { display: grid; gap: 2px; padding: 4px 0; }
