:root {
  --bg: #f1f4f7;
  --panel: #ffffff;
  --text: #1d2733;
  --muted: #6b7785;
  --line: #dfe5eb;
  --side: #17222f;
  --side-text: #c9d3de;
  --accent: #2e7d32;
  --accent-2: #e8f5e9;
  --danger: #c62828;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: #1565c0; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; }

/* Layout */
#app { display: flex; height: 100vh; }
.sidebar { width: 232px; flex: none; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand b { color: #fff; font-size: 16px; display: block; }
.brand small { font-size: 12px; opacity: .75; }
.sport-switch { padding: 12px 16px 4px; }
.sport-switch label { color: var(--side-text); opacity: .6; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.sport-switch select { width: 100%; font: inherit; padding: 7px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.07); color: #fff; cursor: pointer; }
.sport-switch option { color: #111; }
.nav { display: flex; flex-direction: column; padding: 10px 8px; gap: 2px; }
.nav a { color: var(--side-text); padding: 9px 12px; border-radius: 8px; display: flex; gap: 10px; align-items: center; }
.nav a span { width: 20px; text-align: center; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.nav a.active { background: var(--accent); color: #fff; }
.side-foot { margin-top: auto; padding: 14px 16px; font-size: 11px; opacity: .5; }
.main-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
#nav-toggle { display: none; }
.search-wrap { position: relative; width: min(420px, 100%); }
.search-results { position: absolute; top: 40px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 50; max-height: 360px; overflow: auto; }
.search-results a { display: block; padding: 8px 12px; color: var(--text); }
.search-results a:hover { background: var(--bg); text-decoration: none; }
.search-results small { display: inline-block; width: 64px; color: var(--muted); }
#view { flex: 1; overflow: auto; padding: 22px 24px 40px; }

/* Bausteine */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.actions, .btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row.end { justify-content: flex-end; align-self: end; }
.grow { flex: 1; min-width: 0; }
.back { font-size: 13px; display: table; margin-bottom: 4px; }
.title-input { font-family: inherit; font-size: 22px; font-weight: 600; line-height: 1.2; border: 1px solid transparent; background: transparent; padding: 4px 6px; margin-left: -7px; border-radius: 6px; width: 100%; max-width: 640px; color: var(--text); }
.title-input:hover { border-color: var(--line); }
.title-input:focus { border-color: var(--accent); background: #fff; outline: none; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.no-pad { padding: 0; overflow: hidden; }
.card-foot { margin-top: 10px; text-align: right; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2 > .card { margin-bottom: 16px; }

.btn { font: inherit; border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 8px; cursor: pointer; color: var(--text); white-space: nowrap; }
.btn:hover { background: #f6f8fa; border-color: #c8d1da; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #276b2b; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: #fdecea; border-color: #f4b4ae; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.icon-btn { font: inherit; border: 1px solid var(--line); background: #fff; width: 30px; height: 30px; border-radius: 7px; cursor: pointer; color: var(--text); }
.icon-btn:hover:not(:disabled) { background: #f0f3f6; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger { color: var(--danger); }
.link { background: none; border: 0; color: #1565c0; cursor: pointer; font: inherit; padding: 0; }

.input { font: inherit; width: 100%; padding: 7px 10px; border: 1px solid #cfd7df; border-radius: 7px; background: #fff; color: var(--text); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,125,50,.15); }
.input.sm { padding: 4px 8px; font-size: 13px; }
textarea.input { resize: vertical; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
label .input { font-weight: 400; color: var(--text); font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.form-grid.cols4 { grid-template-columns: repeat(4, 1fr); }
.form-grid.cols5 { grid-template-columns: 1fr .7fr .9fr 1.2fr 1.6fr; }
.card.form-grid { padding-bottom: 6px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.empty { color: var(--muted); padding: 18px; text-align: center; }
.empty.big { padding: 60px 20px; font-size: 15px; }
.pre { white-space: pre-wrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0 6px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); white-space: nowrap; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 5px; font-size: 12px; background: #eef2f6; color: #44505c; }
.pill { display: inline-block; background: #eef2f6; border-radius: 99px; padding: 0 8px; font-size: 12px; margin-left: 4px; color: var(--muted); }
kbd { background: #eef2f6; border: 1px solid #d5dce3; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 12px; }

.chip { font: inherit; border: 1px solid var(--line); background: #fff; padding: 5px 12px; border-radius: 99px; cursor: pointer; font-size: 13px; color: var(--text); }
.chip.active { background: var(--side); border-color: var(--side); color: #fff; }
.chip small { opacity: .6; margin-left: 2px; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters .input { width: auto; min-width: 200px; }
.filters .search { min-width: 260px; }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.table th.r { text-align: right; }
.table td { padding: 9px 14px; border-bottom: 1px solid #edf1f4; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table.clickable tbody tr { cursor: pointer; }
.table.clickable tbody tr:hover { background: #f6f9fb; }
.table th.sortable { cursor: pointer; }
.table th.sorted { color: var(--text); }
.table th.sorted::after { content: " ▾"; }
.table .num { width: 44px; font-weight: 700; color: var(--muted); }
.table td.good { color: var(--accent); font-weight: 600; }
.table td.bad { color: var(--danger); font-weight: 600; }
.scroll-x { overflow-x: auto; }
.bar { display: inline-block; width: 80px; height: 7px; border-radius: 4px; background: #e8edf2; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.bar.wide { width: 40%; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* Übersicht */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); color: var(--text); }
.stat:hover { text-decoration: none; border-color: var(--accent); }
.stat b { font-size: 26px; display: block; }
.stat span { color: var(--muted); font-size: 13px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-bottom: 1px solid #edf1f4; color: var(--text); border-radius: 6px; }
.list-row:last-of-type { border-bottom: 0; }
.list-row:hover { background: #f6f9fb; text-decoration: none; }
.list-row.tight { padding: 5px 6px; font-size: 13px; }
.row-title { font-weight: 600; }
.date-box { width: 46px; text-align: center; background: var(--accent-2); color: var(--accent); border-radius: 8px; padding: 4px 0; line-height: 1.1; }
.date-box b { font-size: 18px; display: block; }
.date-box small { font-size: 11px; text-transform: uppercase; }
.att-mini { font-size: 12px; color: var(--muted); }

/* Übungskarten */
.drill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.drill-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: var(--shadow); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.drill-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,24,40,.12); }
.drill-card .thumb { aspect-ratio: 1000 / 640; background: #ccc; }
.drill-card .thumb svg, .block-thumb svg { width: 100%; height: 100%; display: block; }
.dc-body { padding: 10px 12px; }
.dc-title { font-weight: 600; margin-bottom: 4px; }
.dc-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.drill-grid.picker { max-height: 60vh; overflow: auto; padding: 2px; }

/* Kalender */
.cal { padding: 0; overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-head div { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: #fafbfc; border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 112px; border-right: 1px solid #edf1f4; border-bottom: 1px solid #edf1f4; padding: 4px 6px 6px; display: flex; flex-direction: column; gap: 3px; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.other { background: #fafbfc; }
.cal-cell.other .cal-day span { opacity: .4; }
.cal-day { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.cal-cell.today .cal-day span { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; }
.cal-add { visibility: hidden; border: 0; background: #eef2f6; border-radius: 5px; width: 20px; height: 20px; cursor: pointer; color: var(--muted); }
.cal-cell:hover .cal-add { visibility: visible; }
.cal-ev { display: block; font-size: 12px; padding: 2px 6px; border-radius: 5px; color: #fff; background: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover { text-decoration: none; filter: brightness(1.1); }
.cal .legend { padding: 10px 14px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.lg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { font: inherit; border: 0; background: none; padding: 10px 16px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Ablauf-Blöcke */
.blocks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.block { display: grid; grid-template-columns: 70px 170px 1fr 150px; gap: 14px; align-items: center; margin: 0; padding: 12px 14px; }
.block-time { text-align: center; line-height: 1.2; }
.block-time b { font-size: 16px; display: block; }
.block-time small { color: var(--muted); font-size: 11px; }
.block-thumb { aspect-ratio: 1000 / 640; border-radius: 6px; overflow: hidden; background: #eef2f6; }
.block-thumb a { display: block; height: 100%; }
.thumb-empty { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; border: 2px dashed #d5dce3; border-radius: 6px; }
.block-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.block-title { font-weight: 700; color: var(--text); font-size: 15px; }
.block-title-input { font-weight: 600; }
.block-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.dur { flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.dur .input { width: 70px; text-align: right; }
.total-row { text-align: right; margin: 0 4px 14px; color: var(--muted); }
.total-row b { color: var(--text); }

/* Anwesenheit */
.att-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.att-sum { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: 12px; border: 0; border-right: 1px solid var(--line); background: #fff; padding: 5px 10px; cursor: pointer; color: var(--muted); }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: #f4f6f8; }
.seg button.on { background: var(--c); color: #fff; }

/* Übung / Taktiktafel */
.drill-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.board-card { padding: 10px; }
.be-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 8px; }
.be-toolbar.secondary { gap: 6px; }
.be-toolbar.secondary select { width: auto; }
.be-toolbar .sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.tool { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #34404c; }
.tool:hover { background: #f0f3f6; }
.tool.active { background: var(--side); border-color: var(--side); color: #fff; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #c3ccd5; cursor: pointer; padding: 0; }
.swatch.active { box-shadow: 0 0 0 2px var(--text); }
.be-hint { font-size: 12px; color: var(--muted); margin-left: auto; }
.be-canvas { border-radius: 8px; overflow: hidden; outline: none; user-select: none; touch-action: none; aspect-ratio: 1000 / 640; }
.be-canvas:focus-visible { box-shadow: 0 0 0 3px rgba(46,125,50,.35); }
.be-canvas svg { display: block; width: 100%; height: 100%; }
.be-canvas[data-tool="select"] .bi { cursor: move; }
.be-canvas[data-tool="erase"] .bi { cursor: not-allowed; }
.be-canvas:not([data-tool="select"]):not([data-tool="erase"]) { cursor: crosshair; }

/* Spieler */
.player-head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; }
.big-rate { font-size: 34px; font-weight: 700; }
.big-rate small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.stack-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #e8edf2; margin: 10px 0 4px; }

/* Tests */
.tests-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.test-list button { display: block; width: 100%; text-align: left; font: inherit; border: 0; border-bottom: 1px solid #edf1f4; background: #fff; padding: 11px 14px; cursor: pointer; font-weight: 600; color: var(--text); }
.test-list button small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.test-list button.active { background: var(--accent-2); box-shadow: inset 3px 0 0 var(--accent); }
.chart { width: 100%; height: auto; margin-top: 8px; }
.chart .grid { stroke: #edf1f4; }
.chart .axis { font-size: 11px; fill: var(--muted); }
.rank { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.rank .rk { width: 24px; color: var(--muted); }
.measure-list { max-height: 50vh; overflow: auto; border-top: 1px solid var(--line); }
.m-row { flex-direction: row; align-items: center; gap: 10px; margin: 0; padding: 5px 0; border-bottom: 1px solid #f0f3f6; color: var(--text); font-weight: 400; font-size: 14px; }
.m-row span:first-child { flex: 1; }
.m-row .input { width: 110px; }

/* TeamServer / Spieler-App */
.sync { display: inline-flex; align-items: center; gap: 6px; }
.sync::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aa5b1; }
.sync.ok::before { background: #4caf50; }
.sync.err::before { background: #e53935; }
.side-foot .sync { opacity: 1; }
.side-foot { opacity: .75 !important; }
.form-grid.cols6 { grid-template-columns: 1fr .7fr .7fr .9fr 1.2fr 1.5fr; }
.resp-summary { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.resp-cell { min-width: 170px; }
.resp-sel { width: auto; border-left: 4px solid var(--c); }
.resp-note { font-style: italic; margin-top: 2px; }
.resp-mini { font-size: 12px; white-space: nowrap; }
.resp-mini b { font-weight: 700; }
.list-row .resp-mini { margin-right: 4px; }
.table tr.cancelled td { color: var(--muted); }
.table tr.cancelled b { text-decoration: line-through; }
.conn code { background: #eef2f6; padding: 2px 6px; border-radius: 5px; font-size: 13px; }
.conn .inline { display: inline-block; width: auto; margin: 0 6px; }
.dot-ok { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #4caf50; margin-right: 6px; }
.steps li { margin-bottom: 6px; }
.open-ev { padding: 8px 0; border-bottom: 1px solid #edf1f4; }
.open-ev:last-child { border-bottom: 0; }
.open-ev a { color: var(--text); margin-right: 6px; }
.msg-list { margin-top: 12px; border-top: 1px solid var(--line); }
.msg-item { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #edf1f4; }
.card-headline { padding: 14px 18px 4px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.card-headline h2 { margin: 0; }
.link-input { min-width: 260px; font-family: Consolas, monospace; font-size: 12px; color: var(--muted); }

.mail-input { min-width: 220px; }
.access-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: #f6f8fa; border-radius: 8px; }
.check-row { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-weight: 400; font-size: 14px; }
.span2 { grid-column: span 2; }
.btn.block { display: block; width: 100%; text-align: center; }
a.btn { text-decoration: none; display: inline-block; }
.btn:disabled { opacity: .5; cursor: default; }

/* Anmeldung */
#login-root { position: fixed; inset: 0; z-index: 150; background: var(--side); overflow: auto; }
.auth-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { background: #fff; border-radius: 14px; padding: 28px 28px 22px; width: min(400px, 100%); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.auth-card h1 { text-align: center; margin: 8px 0 2px; }
.auth-card h2 { margin: 10px 0 4px; }
.auth-logo { text-align: center; }
.auth-team { text-align: center; color: var(--muted); margin-bottom: 14px; }
.auth-card form { margin-top: 12px; }
.auth-error { color: var(--danger); font-weight: 600; }
.auth-ok { color: var(--accent); font-weight: 600; }
.auth-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; }
.user-box { margin-left: auto; position: relative; }
.user-btn { font: inherit; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 12px 4px 4px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text); }
.ub-av { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ub-menu { position: absolute; right: 0; top: 42px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); min-width: 230px; z-index: 60; overflow: hidden; }
.ub-head { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ub-head small { display: block; color: var(--muted); }
.ub-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 14px; font: inherit; cursor: pointer; color: var(--text); }
.ub-menu button:hover { background: var(--bg); }

/* handball.net-Import */
.hb-row { margin: 10px 0; flex-wrap: nowrap; }
.hb-row .input { flex: 1; }
.hb-head { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; flex-wrap: wrap; }
.hb-table { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.hb-table tr.past td { color: var(--muted); }
.hb-opts { margin-top: 14px; align-items: end; }
.hb-opts .check-row { margin-bottom: 14px; }
.score { display: inline-block; font-weight: 700; background: #eef2f6; border-radius: 5px; padding: 0 6px; font-size: 12px; color: var(--text); }
.hb-tag { font-size: 12px; background: #fff3e0; color: #e65100; border-radius: 6px; padding: 4px 8px; }
.hb-tag a { color: inherit; text-decoration: underline; }

/* Updates */
.update-banner { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 140; display: flex; align-items: center; gap: 10px;
  max-width: min(760px, calc(100% - 24px)); padding: 10px 12px 10px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); background: #fff; border: 1px solid var(--line); }
.update-banner.info { border-left: 5px solid #1e88e5; }
.update-banner.error { border-left: 5px solid var(--danger); }
.update-banner span { flex: 1; }
.update-banner .icon-btn { border: 0; }
.upd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.upd-ver { font-size: 20px; font-weight: 700; }
.upd-checks { display: flex; gap: 6px; flex-wrap: wrap; }
.upd-box { background: #f6f8fa; border-radius: 8px; padding: 12px 14px; margin-top: 12px; }
.upd-box ol { margin: 6px 0; padding-left: 20px; }
.notes { margin: 8px 0; padding-left: 20px; }
.notes li { margin-bottom: 4px; }

/* Dialoge */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 32, .45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 12px; width: min(480px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; }
.modal-head .icon-btn { border: 0; }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.modal-foot .left { margin-right: auto; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--side); color: #fff; padding: 10px 18px; border-radius: 8px; opacity: 0; pointer-events: none; transition: .2s; z-index: 200; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsiv */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .drill-layout { grid-template-columns: 1fr; }
  .form-grid.cols5, .form-grid.cols6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 90; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  #nav-toggle { display: inline-block; }
  #view { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .grid2, .tests-layout { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .form-grid.cols4, .form-grid.cols5, .form-grid.cols6 { grid-template-columns: repeat(2, 1fr); }
  .block { grid-template-columns: 56px 1fr; }
  .block-main, .block-side { grid-column: 1 / -1; }
  .block-side { flex-direction: row; justify-content: space-between; align-items: center; }
  .cal-cell { min-height: 80px; }
  .cal-ev b { display: none; }
}

/* Druck */
#print-area { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  #app, #modal-root, #toast { display: none !important; }
  #print-area { display: block; font-size: 12px; }
  #print-area h1 { font-size: 20px; margin: 4px 0; }
  .pr-team { color: #666; font-size: 11px; }
  .pr-sub { color: #444; margin: 0 0 8px; }
  .pr-block { page-break-inside: avoid; border-top: 1px solid #ccc; padding-top: 8px; margin-top: 12px; }
  .pr-block h3 { margin: 0 0 6px; font-size: 15px; }
  .pr-block h3 span { display: inline-block; min-width: 92px; color: #2e7d32; }
  .pr-note { font-style: italic; margin: 2px 0 6px; }
  .pr-board { width: 62%; margin: 6px 0; }
  .pr-board svg { width: 100%; height: auto; display: block; border-radius: 4px; }
  .pr-meta { border-collapse: collapse; margin: 6px 0; }
  .pr-meta td { padding: 2px 10px 2px 0; }
  .pr-meta td:nth-child(odd) { color: #666; }
  #print-area h4 { margin: 8px 0 2px; }
  #print-area p { margin: 0 0 4px; }
}

/* Gruppen, Nominierung, Serien, Rechte, Teamkasse (1.3.0) */
.form-grid.cols3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.cols2 { grid-template-columns: repeat(2, 1fr); }
.span3 { grid-column: span 3; }
.lbl { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.gchip { display: inline-block; font-size: 11px; font-weight: 600; color: #fff; background: var(--g); border-radius: 99px; padding: 0 8px; line-height: 18px; white-space: nowrap; }
.gchip.off { background: #fff; color: var(--g); border: 1px solid var(--g); }
.gpick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.gopt { flex-direction: row; align-items: center; gap: 6px; margin: 0; padding: 4px 10px; border: 1.5px solid var(--g); border-radius: 99px; color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; }
.gopt input { accent-color: var(--g); margin: 0; }
.gopt small { color: var(--muted); font-weight: 400; }
.gopt:has(input:checked) { background: color-mix(in srgb, var(--g) 14%, #fff); }
.series-box { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px 10px; margin: 6px 0 0; }
.series-box legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.wd-pick { display: flex; gap: 4px; }
.wd-pick label { margin: 0; cursor: pointer; }
.wd-pick input { display: none; }
.wd-pick span { display: inline-block; width: 34px; text-align: center; border: 1px solid var(--line); border-radius: 7px; padding: 6px 0; font-size: 13px; color: var(--text); background: #fff; }
.wd-pick input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.series-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: #f3f8ff; border-color: #cfe0f5; }
.nom-card .btn-row { margin-top: 2px; }
tr.not-nom td { opacity: .5; }
.check-list { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; margin-top: 8px; }
.check-list.cols { columns: 2; column-gap: 18px; }
.check-list .check-row { margin: 0; padding: 5px 0; break-inside: avoid; }
.num-badge { display: inline-block; min-width: 24px; text-align: center; font-weight: 700; color: var(--muted); font-size: 12px; }
.group-list { display: flex; flex-direction: column; }
.group-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.group-row:last-child { border-bottom: 0; }
.group-row .grow { flex: 1; min-width: 0; }
.gdot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.color-pick { display: flex; gap: 6px; }
.color-pick label { margin: 0; cursor: pointer; }
.color-pick input { display: none; }
.color-pick span { display: block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.color-pick input:checked + span { box-shadow: 0 0 0 2px var(--text); }
.perm-box { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.perm-box > label { max-width: 260px; }
.perm-list .check-row { margin-bottom: 4px; }
p.pad { padding: 0 18px 12px; margin: 8px 0 0; }
.stat b.neg, td.neg { color: #c62828; }
.big-seg { display: flex; gap: 0; margin-bottom: 12px; }
.big-seg label { flex: 1; margin: 0; cursor: pointer; }
.big-seg input { display: none; }
.big-seg span { display: block; text-align: center; padding: 8px; font-size: 14px; color: var(--text); border-right: 1px solid var(--line); }
.big-seg label:last-child span { border-right: 0; }
.big-seg input:checked + span { background: var(--accent); color: #fff; }
.table tfoot td { padding: 10px 14px; border-top: 2px solid var(--line); font-weight: 600; }
@media (max-width: 900px) {
  .form-grid.cols3 { grid-template-columns: 1fr; }
  .span3 { grid-column: auto; }
  .check-list.cols { columns: 1; }
}
