@import url('fonts.css');

:root {
  --ink: #07111c;
  --navy: #0c1f33;
  --navy-2: #143150;
  --blue: #1f8fd6;
  --blue-d: #0b6fb8;
  --blue-50: #e8f3fc;
  --ball: #d6f03a;
  --bg: #eef1f5;
  --card: #ffffff;
  --line: #e1e6ed;
  --line-2: #eef1f5;
  --text: #0f1b28;
  --muted: #627285;
  --ok: #17a673;
  --warn: #e39b0b;
  --err: #d64545;
  --radius: 10px;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 1px 2px rgba(12,31,51,.06), 0 6px 18px rgba(12,31,51,.05);
  --shadow-lg: 0 24px 60px rgba(7,17,28,.28);
  --side-w: 248px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; font-weight: 800; letter-spacing: .01em; line-height: 1; margin: 0; }
a { color: var(--blue-d); }
button, input, select, textarea { font: inherit; color: inherit; }
code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.warn-text { color: #b77700; font-weight: 600; }
.err-text { color: var(--err); }
.spacer { flex: 1; }
[hidden] { display: none !important; }
svg.ic { width: 18px; height: 18px; flex: none; vertical-align: middle; }
svg.ic.red { color: var(--err); }
svg.ic.green { color: var(--ok); }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* ── Marke / Logo ── */
.app-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 20px 16px; text-decoration: none; }
.app-brand .brand-full { width: 168px; height: auto; filter: brightness(0) invert(1); }
.app-brand .brand-mark { display: none; width: 40px; height: 40px; border-radius: 10px; }
.app-brand small { font-family: var(--display); font-weight: 600; letter-spacing: .3em; text-transform: uppercase; font-size: .66rem; color: #8696a8; }
.brand { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; color: #fff; }
.brand b { font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: .06em; font-style: italic; }
.brand b span { color: var(--ball); }
.brand small { font-family: var(--display); font-weight: 600; letter-spacing: .3em; text-transform: uppercase; font-size: .66rem; opacity: .7; margin-top: 3px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .1s; text-decoration: none; color: var(--text); position: relative; }
.btn:hover { border-color: #c8d1dc; background: #f8fafc; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); border-color: var(--blue-d); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: #fdf0f0; border-color: #f2c6c6; }
.btn.danger-solid { background: var(--err); border-color: var(--err); color: #fff; }
.btn.danger-solid:hover { background: #bf3434; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(12,31,51,.06); }
.btn.sm { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.btn.block { width: 100%; min-height: 46px; font-size: 15px; }
.btn .count { background: var(--ball); color: var(--ink); font-size: 11px; font-weight: 800; border-radius: 99px; padding: 0 6px; margin-left: 2px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: var(--muted); flex: none; }
.icon-btn:hover { background: rgba(12,31,51,.07); color: var(--text); }
.icon-btn.bordered { border: 1px solid var(--line); background: #fff; }
.icon-btn.danger:hover { background: #fdf0f0; color: var(--err); }
.archive-list li > svg { color: var(--muted); flex: none; }
.archive-list li .btn { flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ── Formulare ── */
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld > span { font-size: 12px; font-weight: 600; color: #334457; }
.fld input, .fld select, .fld textarea, .input { width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; transition: border-color .15s, box-shadow .15s; font-size: 14px; }
.input { width: auto; }
.input.sm { min-height: 32px; padding: 4px 9px; font-size: 13px; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .input:focus, .search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,143,214,.15); }
.fld input:disabled, .fld select:disabled, .fld textarea:disabled { background: #f6f8fa; color: #4a5a6c; }
.fld textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.fld input[type=color] { padding: 3px; height: 38px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: start; }
.form-grid.tight { gap: 10px; }
.form-grid .full, .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--blue); margin: 0; }
.switch-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; margin-top: 12px; background: #fff; }
.switch-row.disabled { opacity: .6; cursor: default; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { flex: none; width: 40px; height: 24px; border-radius: 99px; background: #cfd7e1; position: relative; transition: background .2s; margin-top: 1px; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--blue); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.switch-row input:focus-visible + .switch { box-shadow: 0 0 0 3px rgba(31,143,214,.3); }
.seg { display: inline-flex; background: #eef1f5; border-radius: 9px; padding: 3px; gap: 2px; }
.seg.wide { display: flex; }
.seg.wide label { flex: 1; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--muted); border-radius: 7px; text-align: center; white-space: nowrap; transition: background .15s, color .15s; }
.seg input:checked + span { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(12,31,51,.15); }
.seg input:focus-visible + span { box-shadow: 0 0 0 2px var(--blue); }
.seg input:disabled + span { cursor: not-allowed; opacity: .45; }
.chip-select { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-select label { position: relative; }
.chip-select input { position: absolute; opacity: 0; }
.chip-select span { display: block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 12.5px; font-weight: 500; cursor: pointer; background: #fff; }
.chip-select input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-select input:focus-visible + span { box-shadow: 0 0 0 3px rgba(31,143,214,.3); }
.search { position: relative; }
.search input { width: 260px; min-height: 38px; padding: 8px 11px 8px 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search.sm input { width: 100%; min-height: 34px; font-size: 13px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 13px; border-radius: 8px; font-size: 13px; margin-bottom: 10px; }
.alert .ic { width: 17px; height: 17px; margin-top: 1px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert.error { background: #fdeeee; color: #a42828; }
.alert.warn { background: #fff6e0; color: #7a5000; }
.alert.info { background: var(--blue-50); color: #0b5c99; }
.alert.ok { background: #e3f6ee; color: #0e7a53; }
.alert a { color: inherit; font-weight: 600; }

/* ── Login ── */
.login-page { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; min-height: 100dvh; background: #fff; }
.login-visual { position: relative; background: linear-gradient(160deg, rgba(7,17,28,.25), rgba(7,17,28,.85)), url('../img/gallery/indoor-drill.jpg') center / cover; }
.login-claim { position: absolute; left: 48px; bottom: 48px; color: #fff; font-family: var(--display); text-transform: uppercase; }
.login-claim span { display: block; color: var(--ball); letter-spacing: .25em; font-weight: 700; font-size: 1rem; }
.login-claim b { font-size: clamp(2.6rem, 5vw, 4.4rem); font-style: italic; line-height: .95; }
.login-box { padding: calc(40px + var(--sat)) clamp(24px, 6vw, 80px) 40px; display: flex; flex-direction: column; justify-content: center; max-width: 520px; width: 100%; }
.login-logo { width: 220px; height: auto; }
.login-box h1 { font-size: 2.5rem; font-style: italic; margin: 34px 0 8px; }
.login-box form { display: grid; gap: 16px; margin: 24px 0 18px; }
.login-box .fld input { min-height: 48px; font-size: 16px; }
.pw-field { position: relative; display: block; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--blue-d); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px; }
.login-box .back { margin-top: 26px; font-size: 13px; color: var(--muted); text-decoration: none; }
@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-box { margin: 0 auto; justify-content: flex-start; padding-top: calc(56px + var(--sat)); }
}

/* ── App-Layout ── */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; min-height: 100dvh; }
.sidebar { background: var(--ink); color: #c7d1dc; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; padding-top: var(--sat); z-index: 40; }
.sidebar .brand { padding: 22px 22px 18px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px 12px; }
.side-nav .sec { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #5f7186; padding: 14px 12px 5px; font-weight: 700; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: #c7d1dc; text-decoration: none; font-weight: 500; position: relative; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: rgba(31,143,214,.2); color: #fff; }
.side-nav a.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ball); }
.side-nav .ic { opacity: .9; }
.side-nav .count { margin-left: auto; background: var(--ball); color: var(--ink); font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; }
.side-foot { margin-top: auto; padding: 14px 12px calc(14px + var(--sab)); border-top: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: 8px; }
.who-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; padding: 4px; border-radius: 8px; }
.who-link:hover { background: rgba(255,255,255,.05); }
.avatar { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; letter-spacing: .02em; }
.who { flex: 1; min-width: 0; line-height: 1.25; }
.who b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { font-size: 11.5px; color: #8696a8; }
.side-foot .icon-btn { color: #8696a8; }
.side-foot .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-backdrop { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: calc(12px + var(--sat)) 28px 12px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar h1 { font-size: 1.8rem; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.season-pick { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.season-pick select { min-height: 34px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 600; color: var(--text); max-width: 240px; }
.menu-btn { display: none; }
.content { padding: 24px 28px 64px; max-width: 1500px; width: 100%; }
.content.wide { max-width: none; }
.banner { display: flex; align-items: center; gap: 12px; background: #fff6e0; color: #6d4800; padding: 10px 28px; font-size: 13px; border-bottom: 1px solid #f5e2b0; }
.offline-bar { display: none; background: var(--ink); color: #fff; padding: 8px 28px; font-size: 13px; }
body.offline .offline-bar { display: block; }
.bottom-nav { display: none; }

/* ── Karten & Listen ── */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-head h2 { font-size: 1.25rem; letter-spacing: .03em; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px 18px; }
.card-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-2); background: #fafbfc; border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.pad { padding: 10px 18px 14px; margin: 0; }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-2.narrow { max-width: 1100px; }
.span-2 { grid-column: 1 / -1; }
.kpis { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.dash { grid-template-columns: 1.3fr 1fr; align-items: start; }
.hello { margin-bottom: 18px; }
.hello h2 { font-size: 2rem; font-style: italic; }
.hello p { margin: 4px 0 0; color: var(--muted); }
.kpi { display: block; padding: 18px 20px; position: relative; overflow: hidden; text-decoration: none; color: inherit; }
.kpi .lbl { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.kpi .val { font-family: var(--display); font-weight: 800; font-size: 2.7rem; line-height: 1.05; margin-top: 4px; font-style: italic; }
.kpi .sub { font-size: 12px; color: var(--muted); }

.kpi.link { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.kpi.link:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(12,31,51,.1); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list li.click { cursor: pointer; }
.list li.click:hover { background: #f8fafc; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list .s { font-size: 12.5px; color: var(--muted); }
.list.compact li { padding: 8px 14px; }
.list.bordered { border: 1px solid var(--line); border-radius: 10px; }
.list li.opened { background: #f6f9fd; }
.list li.done { opacity: .6; }
.list li.is-cancelled .t { text-decoration: line-through; color: var(--muted); }
.list li.mine { box-shadow: inset 3px 0 0 var(--ball); }
.time-col { width: 52px; flex: none; line-height: 1.2; }
.time-col b { display: block; font-variant-numeric: tabular-nums; }
.time-col span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tasks .task-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #eef1f5; color: var(--muted); flex: none; }
.task-ic.red { background: #fde8e8; color: var(--err); }
.task-n { font-family: var(--display); font-weight: 800; font-size: 1.5rem; font-style: italic; }
.issues li { font-size: 12.5px; padding: 8px 14px; align-items: flex-start; }
.iss { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; margin-top: 1px; }
.iss.err { background: var(--err); color: #fff; }
.iss.warn { background: #fff0cc; color: #a26a00; }

.empty { padding: 34px 18px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty b { color: var(--text); font-size: 15px; }
.empty p { margin: 0; max-width: 46ch; font-size: 13px; }
.empty.small { padding: 16px; font-size: 12.5px; }
.empty-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--line-2); display: grid; place-items: center; margin-bottom: 6px; color: var(--muted); }
.empty-ic .ic { width: 22px; height: 22px; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #eef1f5; color: #475769; white-space: nowrap; line-height: 1.6; }
.badge.blue { background: #e3f1fb; color: #0b6fb8; }
.badge.green { background: #e2f6ee; color: #0e7a53; }
.badge.yellow { background: #fff3d6; color: #8a5a00; }
.badge.red { background: #fde8e8; color: #b42727; }
.badge.purple { background: #efe8fa; color: #6236a8; }
.badge.dark { background: var(--ink); color: #fff; }
.badge.outline { background: #fff; border: 1px solid #d5dde6; color: #475569; }
.fmt-badge { display: inline-flex; align-items: center; font-family: var(--display); font-weight: 700; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; padding: 0 7px; border-radius: 5px; border: 1px solid #cbd5e1; color: #334155; line-height: 1.6; background: #fff; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.pill-list { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.chips-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 8px; }
.chip { border: 1px dashed #b9c6d4; background: #f7f9fb; color: #31465c; border-radius: 6px; padding: 2px 7px; font-size: 11.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.chip:hover { border-color: var(--blue); color: var(--blue-d); }
.quote { background: var(--blue-50); border-left: 3px solid var(--blue); padding: 10px 14px; border-radius: 6px; white-space: pre-wrap; font-size: 13.5px; }
.hint { margin-top: 12px; }

/* ── Toolbar, Tabs, Tabellen ── */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.tabs { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--ink); color: #fff; }
.tabs button .n { opacity: .65; margin-left: 5px; font-weight: 500; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfc; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #f7f9fc; }
.tbl tr.inactive td { opacity: .55; }
.tbl .name { font-weight: 600; }
.tbl .sub { font-size: 12px; color: var(--muted); }
.tbl .actions { text-align: right; white-space: nowrap; }

/* Verfügbarkeit */
.av-mini { display: inline-grid; grid-template-columns: repeat(5, 10px); grid-template-rows: repeat(4, 5px); grid-auto-flow: column; gap: 2px; vertical-align: middle; }
.av-mini i { background: #e3e8ee; border-radius: 1px; }
.av-mini i.on { background: var(--blue); }
.we-chip { display: inline-block; margin-left: 5px; font-size: 9.5px; font-weight: 800; color: var(--blue-d); background: var(--blue-50); border-radius: 3px; padding: 0 3px; vertical-align: middle; }
.av-wrap { display: flex; flex-direction: column; gap: 8px; overflow-x: auto; }
.av-edit { border-collapse: separate; border-spacing: 4px; font-size: 12px; }
.av-edit th { font-weight: 600; color: var(--muted); padding: 2px 6px; text-align: center; white-space: nowrap; }
.av-edit th:first-child { text-align: left; }
.av-edit td label { display: block; position: relative; }
.av-edit td input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.av-edit td span { display: block; width: 44px; height: 30px; border-radius: 6px; background: #f0f3f7; border: 1px solid var(--line); transition: background .12s; }
.av-edit td input:checked + span { background: var(--blue); border-color: var(--blue); }
.av-edit td input:focus-visible + span { box-shadow: 0 0 0 3px rgba(31,143,214,.3); }
.av-edit.ro td span { width: 34px; height: 22px; }

/* ── Dialoge ── */
.dlg-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; background: rgba(7,17,28,.55); overflow-y: auto; animation: fade .15s; overscroll-behavior: contain; }
.dlg-wrap.closing { animation: fadeOut .14s forwards; }
.dlg { background: #fff; border-radius: 14px; width: min(640px, 100%); box-shadow: var(--shadow-lg); animation: rise .2s ease-out; }
.dlg.sm { width: min(460px, 100%); }
.dlg.md { width: min(560px, 100%); }
.dlg.lg { width: min(820px, 100%); }
.dlg.xl { width: min(1080px, 100%); }
.dlg-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line-2); }
.dlg-head .grow { flex: 1; min-width: 0; }
.dlg-head h2 { font-size: 1.6rem; font-style: italic; }
.dlg-sub { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dlg-body { padding: 18px 22px 22px; }
.dlg-foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-2); background: #fafbfc; border-radius: 0 0 14px 14px; flex-wrap: wrap; position: sticky; bottom: 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.99); } }
.confirm-text { font-size: 14px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; margin: 22px 0 10px; display: flex; gap: 8px; align-items: center; }
.pw-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 19px; padding: 14px; background: #f4f6f9; border-radius: 8px; text-align: center; letter-spacing: .06em; user-select: all; margin: 12px 0; }

/* Termin: einzelne Stunde */
.occ { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); }
.occ-head { display: flex; gap: 12px; align-items: center; }
.occ-head > .ic { width: 22px; height: 22px; }
.occ-head .grow { flex: 1; }
.occ.normal { background: #f3fbf7; border-color: #cdeedd; }
.occ.normal .occ-head > .ic { color: var(--ok); }
.occ.cancelled { background: #fff5f5; border-color: #f6d0d0; }
.occ.cancelled .occ-head > .ic { color: var(--err); }
.occ.holiday { background: #fffbea; border-color: #f4e3a3; }
.occ.outside { background: #f6f8fa; }
.occ-flags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 10px; border-radius: 99px; background: #fff; border: 1px solid #f0c8c8; color: #9a3a3a; }
.flag .ic { width: 14px; height: 14px; }
.flag.ok { border-color: #bfe6d3; color: #0e7a53; }
details.series { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
details.series summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; }
details.series summary::-webkit-details-marker { display: none; }
details.series summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .2s; }
details.series[open] summary::after { transform: rotate(180deg); }
#slotCheck, #repCheck { margin-top: 12px; }
.rep-box { margin-top: 10px; padding: 14px; background: #f7f9fc; border-radius: 10px; }
.mode-switch span { padding: 9px 12px; }

/* Spielerauswahl */
.picker { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.picker-list { max-height: 210px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.picker-list.tall { max-height: 50vh; }
.pick { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.pick:hover { background: #f5f8fb; }
.pick input { width: 17px; height: 17px; accent-color: var(--blue); margin: 0; }
.pick .grow { flex: 1; min-width: 0; }

/* Versand-Dialog */
.composer { display: grid; grid-template-columns: 1fr 1.25fr; gap: 22px; }
.comp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.comp-head h3 { font-size: 1.05rem; letter-spacing: .06em; }
.comp-msg { display: flex; flex-direction: column; gap: 12px; }
.rcpt-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; padding-right: 2px; margin-bottom: 10px; }
.rcpt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .15s, background .15s; }
.rcpt.previewing { border-color: var(--blue); background: #f7fbfe; }
.rcpt.missing { border-color: #f1c9c9; background: #fffafa; }
.rcpt-check input { width: 18px; height: 18px; accent-color: var(--blue); }
.rcpt-main { flex: 1; min-width: 0; }
.rcpt-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.rcpt-mail { width: 100%; border: 0; border-bottom: 1px dashed #c8d2dd; padding: 3px 0; font-size: 12.5px; color: #36495d; background: transparent; }
.rcpt-mail:focus { outline: none; border-bottom-color: var(--blue); }
.rcpt.missing .rcpt-mail::placeholder { color: #c45555; }
.mail-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.mp-subject { padding: 10px 14px; background: #f5f7fa; font-weight: 700; border-bottom: 1px solid var(--line); }
.mp-body { padding: 14px; white-space: pre-wrap; font-size: 13.5px; max-height: 300px; overflow-y: auto; line-height: 1.55; }

/* Toasts */
.toasts { position: fixed; right: 20px; bottom: calc(20px + var(--sab)); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 500; animation: rise .2s; max-width: 420px; transition: opacity .3s, transform .3s; }
.toast .ic { color: var(--ball); }
.toast.error { background: var(--err); }
.toast.error .ic { color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ── Trainings-Board ── */
.board { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start; }
.pool-panel { position: sticky; top: calc(84px + var(--sat)); max-height: calc(100vh - 110px); display: flex; flex-direction: column; transition: box-shadow .15s; }
.pool-panel.drop { box-shadow: 0 0 0 3px var(--err), var(--shadow); }
.pool-panel .pad { padding: 10px 10px 0; }
.pool-panel .scroll { overflow-y: auto; padding: 8px; flex: 1; }
.pool-panel h3 { font-size: .9rem; letter-spacing: .1em; color: var(--muted); padding: 10px 6px 6px; }
.pcard { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); margin-bottom: 6px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: box-shadow .15s, border-color .15s, transform .15s; }
.pcard.ed { cursor: grab; }
.pcard:hover { border-color: #c5d0dc; box-shadow: var(--shadow); }
.pcard.pool { border-left: 3px solid var(--ball); }
.pcard .grow { flex: 1; min-width: 0; }
.pcard .t { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .s { font-size: 11.5px; color: var(--muted); }
.lifted { transform: scale(1.03); box-shadow: 0 10px 30px rgba(12,31,51,.2) !important; }
.dragging { opacity: .35; }
body.dragging-now, body.dragging-now * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
.groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.gcard { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--gc, var(--blue)); display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.gcard.drop { box-shadow: 0 0 0 3px var(--blue), var(--shadow); transform: translateY(-2px); }
.gcard-head { padding: 13px 12px 10px 14px; display: flex; gap: 8px; align-items: flex-start; }
.gcard-head .grow { flex: 1; min-width: 0; }
.gcard-head h3 { font-size: 1.3rem; letter-spacing: .02em; }
.gcard-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.gcard-actions { display: flex; }
.slots-line { padding: 0 14px 8px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.slots-line .ic { width: 12px; height: 12px; }
.focus { padding: 0 14px 10px; font-size: 12px; color: #43546a; font-style: italic; }
.members { padding: 8px 10px 12px; border-top: 1px dashed var(--line); min-height: 64px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.member { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; background: #f6f8fb; font-size: 12.5px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.member.ed { cursor: grab; }
.member:hover { background: #edf1f6; }
.member .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member .grow b { font-weight: 600; }
.member .rm { width: 26px; height: 26px; opacity: .45; }
.member:hover .rm { opacity: 1; }
.drop-hint { font-size: 12px; color: #9aa8b8; text-align: center; padding: 14px 6px; border: 1.5px dashed #d9e0e8; border-radius: 8px; }
.fill { height: 4px; background: #eef1f5; border-radius: 2px; overflow: hidden; margin-top: 8px; }
.fill i { display: block; height: 100%; background: var(--ok); }
.fill.over i { background: var(--err); }
.fill.full i { background: var(--warn); }
.fit { font-size: 11px; font-weight: 800; }
.fit.ok { color: var(--ok); }
.fit.no { color: var(--warn); }
.side-hint { font-size: 12px; color: var(--muted); padding: 8px 12px 12px; margin: 0; }

/* ── Trainingsplan ── */
.plan-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.week-nav { display: flex; align-items: center; gap: 6px; }
.week-label { display: flex; flex-direction: column; line-height: 1.15; min-width: 128px; text-align: center; }
.week-label b { font-family: var(--display); font-size: 1.25rem; font-style: italic; letter-spacing: .03em; }
.week-label span { font-size: 12px; color: var(--muted); }
.side-toggle { display: none; }
.day-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tabs button { flex: 1; min-width: 58px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; position: relative; line-height: 1.2; }
.day-tabs button b { font-size: 13px; }
.day-tabs button span { font-size: 11px; color: var(--muted); }
.day-tabs button i { position: absolute; top: -6px; right: -4px; background: var(--blue); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; border-radius: 99px; min-width: 18px; padding: 0 4px; line-height: 18px; }
.day-tabs button.today { border-color: var(--ball); box-shadow: inset 0 -3px 0 var(--ball); }
.day-tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.day-tabs button.on span { color: #aab7c5; }
.planner { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.plan-side { position: sticky; top: calc(84px + var(--sat)); max-height: calc(100vh - 104px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding-bottom: 6px; }
.side-tabs { margin: 12px 12px 0; }
.side-search { padding: 10px 12px 6px; }
.side-list { max-height: 44vh; overflow-y: auto; padding: 4px 0; }
.grp-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; margin: 0 12px 6px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.grp-item.ed { cursor: grab; }
.grp-item:hover { border-color: #c5d0dc; box-shadow: var(--shadow); }
.grp-item .sw { width: 6px; align-self: stretch; border-radius: 3px; flex: none; }
.grp-item .ply-sw { background: repeating-linear-gradient(180deg, #00838f 0 4px, #6cc3cb 4px 8px); }
.grp-item .grow { flex: 1; min-width: 0; }
.grp-item .t { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-item .s { font-size: 11px; color: var(--muted); }
.holiday-note { margin: 0 14px 12px; padding: 8px 10px; border-radius: 8px; background: #fffbea; color: #7a5a00; font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.plan-card { overflow: hidden; }
.plan-wrap { overflow: auto; max-height: calc(100vh - 230px); position: relative; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.plan { display: grid; grid-template-columns: 54px repeat(var(--cols), minmax(var(--colw, 120px), 1fr)); min-width: min-content; position: relative; }
.plan-head { position: sticky; top: 0; z-index: 6; background: #fff; border-bottom: 1px solid var(--line); padding: 9px 6px; font-weight: 700; text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-head small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.plan-head.today { box-shadow: inset 0 -3px 0 var(--ball); }
.plan-head.today small { color: var(--text); font-weight: 700; }
.plan-head.hol { background: #fffbea; }
.plan-head.corner { left: 0; z-index: 7; }
.plan-times { position: sticky; left: 0; z-index: 5; background: #fff; border-right: 1px solid var(--line); }
.plan-times div { position: absolute; right: 8px; font-size: 11px; color: var(--muted); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.pcol { position: relative; border-right: 1px solid var(--line-2); cursor: copy;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(#f7f9fb 1px, transparent 1px);
  background-size: 100% calc(60px * var(--ppm)), 100% calc(30px * var(--ppm)); }
.pcol.weekend { background-color: #fbfcfd; }
.pcol.holiday { background-color: #fffcef; }
.pcol.outside { background-color: #f5f6f8; }
.pcol:hover { background-color: #fafcff; }
.slot { position: absolute; border-radius: 7px; padding: 5px 7px; font-size: 11.5px; line-height: 1.3; color: #fff; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: var(--sc); box-shadow: 0 1px 2px rgba(0,0,0,.15); border: 1px solid rgba(0,0,0,.08); transition: box-shadow .15s, opacity .15s; cursor: pointer; }
.slot.ed { cursor: grab; touch-action: auto; }
.slot:hover { box-shadow: 0 6px 18px rgba(0,0,0,.22); z-index: 3; }
.slot b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .ln { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .92; }
.slot.light { color: var(--ink); }
.slot.conflict { outline: 2.5px solid var(--err); outline-offset: 1px; }
.slot.warning::after, .slot.conflict::after { content: '!'; position: absolute; top: 4px; right: 5px; width: 16px; height: 16px; border-radius: 50%; font-weight: 800; font-size: 11px; display: grid; place-items: center; }
.slot.warning::after { background: #fff; color: var(--warn); }
.slot.conflict::after { background: var(--err); color: #fff; }
.slot.dim { opacity: .22; }
.slot.cancelled { background: repeating-linear-gradient(135deg, #f3f5f8 0 6px, #e7ebf0 6px 12px); color: #7b8a9b; border: 1.5px solid #d4dbe3; box-shadow: none; }
.slot.cancelled b { text-decoration: line-through; }
.slot.holiday { background: repeating-linear-gradient(135deg, #fffaf0 0 6px, #fdf1cf 6px 12px); color: #8a6c13; border: 1px solid #f0dca0; box-shadow: none; }
.slot.outside { opacity: .4; }
.slot.rep { background: #fff; color: var(--text); border: 2px dashed var(--sc); box-shadow: 0 2px 8px rgba(12,31,51,.08); }
.slot.rep b { color: var(--text); }
.slot-tag { float: right; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 0 5px; border-radius: 4px; background: rgba(7,17,28,.75); color: #fff; margin-left: 4px; line-height: 16px; }
.slot.rep .slot-tag { background: var(--sc); }
.slot.holiday .slot-tag { background: #c99a10; }
.slot.cancelled .slot-tag { background: var(--err); }
.slot .rz { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; cursor: ns-resize; }
.slot .rz::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 18px; height: 2px; margin-left: -9px; border-radius: 1px; background: currentColor; opacity: .35; }
.slot.ghost { opacity: .9; box-shadow: 0 12px 30px rgba(0,0,0,.3); z-index: 10; pointer-events: none; outline: 2px dashed #fff; outline-offset: -4px; }
.slot.drop-on { outline: 3px solid var(--ball); outline-offset: 1px; box-shadow: 0 0 0 6px rgba(214,240,58,.35); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--err); z-index: 4; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--err); }
.drag-follow { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; padding: 7px 12px; border-radius: 8px; color: #fff; font-weight: 600; font-size: 12.5px; box-shadow: 0 12px 28px rgba(0,0,0,.28); display: flex; align-items: center; gap: 6px; background: var(--ink); white-space: nowrap; }
.drag-follow .ic { width: 15px; height: 15px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--line-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lgd { display: inline-block; width: 16px; height: 11px; border-radius: 3px; }
.lgd-cancel { background: repeating-linear-gradient(135deg, #f3f5f8 0 3px, #d6dce4 3px 6px); border: 1px solid #c9d1da; }
.lgd-rep { border: 2px dashed var(--blue); }
.lgd-hol { background: repeating-linear-gradient(135deg, #fffaf0 0 3px, #f6e2a6 3px 6px); }

/* Ausfälle */
.abs-list { display: flex; flex-direction: column; gap: 10px; }
.abs { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 16px; align-items: center; padding: 14px 16px; cursor: pointer; transition: box-shadow .15s; }
.abs:hover { box-shadow: 0 8px 24px rgba(12,31,51,.08); }
.abs.past { opacity: .65; }
.abs-date { text-align: center; border-right: 1px solid var(--line); padding-right: 12px; }
.abs-date b { display: block; font-family: var(--display); font-size: 1.5rem; font-style: italic; line-height: 1; }
.abs-date span { font-size: 11.5px; color: var(--muted); }
.abs-main .t { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.abs-main .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.abs-main .s .ic { width: 14px; height: 14px; }
.abs-flags { display: flex; flex-direction: column; gap: 6px; }
.flag-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #9a3a3a; }
.flag-line.ok { color: var(--ok); }
.flag-line span { flex: 1; min-width: 150px; }
.flag-line .ic { width: 15px; height: 15px; }

/* Auswertung */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bars.scroll-y { max-height: 320px; overflow-y: auto; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 64px; gap: 12px; align-items: center; font-size: 13px; }
.bar-row > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.bar-row .track { height: 10px; background: #eef1f5; border-radius: 5px; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 5px; }
.bar-row .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Einstellungen */
.settings { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; max-width: 1200px; }
.settings-nav { display: flex; flex-direction: column; gap: 3px; position: sticky; top: calc(84px + var(--sat)); }
.settings-nav button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: #3b4d61; text-align: left; position: relative; }
.settings-nav button:hover { background: #fff; }
.settings-nav button.on { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.settings-nav button.on .ic { color: var(--blue); }
.dot-warn { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-left: auto; }
.status-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 12px; background: #f7f9fc; border-radius: 8px; font-size: 13px; }
.tpl-layout { display: grid; grid-template-columns: 250px 1fr; min-height: 420px; }
.tpl-list { border-right: 1px solid var(--line-2); padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.tpl-item { border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.tpl-item b { font-size: 13px; }
.tpl-item span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.tpl-item:hover { background: #f5f8fb; }
.tpl-item.on { background: var(--blue-50); }
.tpl-item.on b { color: var(--blue-d); }
.tpl-edit { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* Trainer & Rechte */
.intro-card { display: flex; gap: 18px; align-items: center; padding: 16px 20px; margin-bottom: 18px; }
.intro-card .grow { flex: 1; }
.intro-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; max-width: 95ch; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.user-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .15s, transform .15s; }
.user-card.click { cursor: pointer; }
.user-card.click:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(12,31,51,.1); }
.user-card.inactive { opacity: .55; }
.uc-head { display: flex; gap: 12px; align-items: center; }
.uc-head .grow { flex: 1; min-width: 0; }
.uc-head .t { font-weight: 700; }
.uc-head .s { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.uc-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.perm-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.pd { font-size: 11px; padding: 2px 7px; border-radius: 5px; background: #f1f3f6; color: #a2adb9; }
.pd.lv1 { background: #eef5fb; color: #3a6f99; }
.pd.lv2 { background: var(--blue); color: #fff; }
.perm-dots.big .pd { font-size: 12.5px; padding: 5px 10px; }
.user-dlg { display: grid; grid-template-columns: 1fr 1.25fr; gap: 26px; }
.perm-col.muted-col .perm-list { opacity: .4; pointer-events: none; }
.perm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.perm-list { display: flex; flex-direction: column; gap: 6px; }
.perm-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; }
.perm-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.perm-row .grow b { font-size: 13px; }
.perm-row .grow span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.perm-row .seg span { padding: 5px 9px; font-size: 11.5px; }
.perm-row .seg label.cap span { text-decoration: line-through; }
.perm-row.dimmed { opacity: .6; }

/* Konto */
.profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.steps-list { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.steps-list .ic { width: 15px; height: 15px; }

/* ── Neue Bausteine ── */
.nowrap { white-space: nowrap; }
.center-row { display: flex; justify-content: center; margin-top: 14px; }
.link-btn { border: 0; background: none; color: var(--blue-d); font-weight: 600; cursor: pointer; padding: 6px; justify-self: center; }
.chip-x { border: 0; background: none; cursor: pointer; color: inherit; font-size: 14px; line-height: 1; padding: 0 0 0 4px; }
.kv-chip { font-size: 11px; background: #f1f5f9; border-radius: 5px; padding: 1px 6px; color: #475569; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #cbd5e1; border-top-color: var(--blue); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.choice-list { display: flex; flex-direction: column; gap: 6px; }
.choice-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice-row input { margin-top: 3px; accent-color: var(--blue); }
.choice-row:has(input:checked) { border-color: var(--blue); background: #f5faff; }
.archive-box summary { cursor: pointer; font-weight: 600; color: var(--muted); display: flex; gap: 6px; align-items: center; padding: 6px 0; }
.legend-sep { width: 1px; height: 14px; background: var(--line); }
.credit-chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #0f172a; }
.credit-chip .ic { width: 15px; height: 15px; color: var(--muted); }
.credit-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.credit-head > div:first-child { display: flex; align-items: baseline; gap: 8px; }
.credit-n { font-family: var(--display); font-size: 2.2rem; font-style: italic; }
.dlg-tabs { margin-bottom: 18px; }
.list li.archived .t { color: var(--muted); text-decoration: line-through; }
.list li .ic { color: var(--muted); }
/* MFA */
.mfa-qr { display: flex; justify-content: center; margin: 10px 0; }
.mfa-qr img { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.small-box { font-size: 14px; padding: 10px; }
.code-input { font-size: 22px !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.recovery-grid code { text-align: center; padding: 8px; font-size: 14px; }
/* Rechte-Gruppen */
.perm-group { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; margin: 12px 0 6px; }
/* Saisonplaner */
.planer-start { grid-template-columns: 1.1fr 1fr; align-items: start; }
.planer-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 12px; position: sticky; top: calc(62px + var(--sat)); z-index: 12; flex-wrap: wrap; }
.planer-bar .grow { flex: 1; min-width: 200px; }
.planer-notes { margin-bottom: 12px; }
.planer-notes summary { padding: 12px 16px; cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.planer-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.planer-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(140px + var(--sat)); max-height: calc(100vh - 160px); overflow-y: auto; }
.planer-list input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--blue); }
.unplaced.ed { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.planer-wrap { max-height: calc(100vh - 250px); min-height: 360px; }
@media (max-height: 760px) { .planer-bar { position: static; } .planer-side { position: static; max-height: none; } }
.slot-edit { display: grid; grid-template-columns: 1.2fr 1fr auto 1fr 1.2fr auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.slot-edit select { min-height: 36px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; }
/* Homepage-Editor */
.cms .settings-nav .btn { margin-top: 10px; justify-content: flex-start; }
.cms-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.cms-item > summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; }
.cms-item > summary::-webkit-details-marker { display: none; }
.cms-item > summary::before { content: '▸'; color: var(--muted); }
.cms-item[open] > summary::before { content: '▾'; }
.cms-tools { margin-left: auto; display: flex; }
.cms-body { padding: 4px 12px 14px; border-top: 1px solid var(--line-2); }
.img-field { display: flex; gap: 12px; align-items: center; }
.img-field .img-prev { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #f1f5f9; flex: none; }
.img-field .grow { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }

/* ── iPad / kleine Laptops: schmale Icon-Leiste ── */
@media (max-width: 1180px) {
  :root { --side-w: 76px; }
  .sidebar .brand small, .side-nav .sec, .side-nav .lbl, .who, .side-foot .icon-btn { display: none; }
  .app-brand { padding: 18px 0 12px; align-items: center; width: 100%; }
  .app-brand .brand-full { display: none; }
  .app-brand .brand-mark { display: block; }
  .planer-grid, .planer-start { grid-template-columns: 1fr; }
  .planer-side { position: static; max-height: none; }
  .side-nav { padding: 6px 10px; gap: 4px; }
  .side-nav a { justify-content: center; padding: 11px 0; }
  .side-nav a .ic { width: 21px; height: 21px; }
  .side-nav .count { position: absolute; top: 3px; right: 6px; padding: 0 5px; font-size: 10px; }
  .side-nav a.active::before { left: -10px; }
  .side-foot { flex-direction: column; padding: 12px 8px calc(12px + var(--sab)); }
  .side-foot .who-link { justify-content: center; flex: none; }
  .side-foot #logoutBtn { display: inline-grid; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash { grid-template-columns: 1fr; }
  .planner { grid-template-columns: 1fr; }
  .side-toggle { display: inline-flex; }
  .plan-side { display: none; position: fixed; z-index: 60; top: 0; bottom: 0; left: var(--side-w); width: min(340px, 86vw); max-height: none; padding: calc(16px + var(--sat)) 14px 16px; background: var(--bg); box-shadow: 20px 0 60px rgba(7,17,28,.25); }
  .planner.side-open .plan-side { display: flex; animation: slideIn .2s ease-out; }
  .plan-wrap { max-height: calc(100vh - 220px); }
  .board { grid-template-columns: 1fr; }
  .pool-panel { position: static; max-height: 360px; }
  .user-dlg, .composer { grid-template-columns: 1fr; }
  .settings { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .settings-nav button { white-space: nowrap; }
  .abs { grid-template-columns: 64px 1fr auto; }
  .abs-flags { grid-column: 2 / -1; }
}
@keyframes slideIn { from { transform: translateX(-20px); opacity: 0; } }

/* ── iPhone ── */
@media (max-width: 700px) {
  body { font-size: 15px; }
  .app { grid-template-columns: 1fr; }
  :root { --side-w: 0px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-102%); transition: transform .22s ease; z-index: 90; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 80px rgba(0,0,0,.45); }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(7,17,28,.45); z-index: 80; }
  .sidebar .brand small, .side-nav .sec, .side-nav .lbl, .who, .side-foot .icon-btn { display: revert; }
  .side-nav .lbl { display: inline; }
  .who { display: block; }
  .app-brand { padding: 22px 20px 14px; align-items: flex-start; }
  .app-brand .brand-full { display: block; }
  .app-brand .brand-mark { display: none; }
  .slot-edit { grid-template-columns: 1fr 1fr auto 1fr; }
  .slot-edit [data-f=court_id] { grid-column: 1 / -2; }
  .planer-bar { top: calc(56px + var(--sat)); }
  .recovery-grid { grid-template-columns: 1fr; }
  .side-nav a { justify-content: flex-start; padding: 11px 12px; }
  .side-nav .count { position: static; margin-left: auto; }
  .side-foot { flex-direction: row; }
  .side-foot .who-link { flex: 1; justify-content: flex-start; }
  .menu-btn { display: none; }
  .topbar { padding: calc(10px + var(--sat)) 16px 10px; gap: 10px; }
  .topbar h1 { font-size: 1.55rem; }
  .season-pick span { display: none; }
  .season-pick select { max-width: 150px; font-size: 13px; }
  .content { padding: 14px 12px calc(92px + var(--sab)); }
  .banner { padding: 10px 16px; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: rgba(7,17,28,.97); backdrop-filter: blur(10px); padding: 6px 4px calc(6px + var(--sab)); justify-content: space-around; }
  .bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #8d9cad; text-decoration: none; font-size: 10.5px; font-weight: 600; background: none; border: 0; padding: 4px 0; position: relative; cursor: pointer; }
  .bottom-nav .ic { width: 22px; height: 22px; }
  .bottom-nav a.active { color: #fff; }
  .bottom-nav a.active .ic { color: var(--ball); }
  .bottom-nav i { position: absolute; top: 0; left: 55%; background: var(--ball); color: var(--ink); font-style: normal; font-size: 10px; font-weight: 800; border-radius: 99px; padding: 0 5px; line-height: 16px; }
  .bottom-nav i.dot { width: 8px; height: 8px; padding: 0; }
  .toasts { left: 12px; right: 12px; bottom: calc(80px + var(--sab)); align-items: stretch; }
  .toast { max-width: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .val { font-size: 2.1rem; }
  .hello h2 { font-size: 1.6rem; }
  .grid { gap: 12px; }
  .cols-2, .form-grid { grid-template-columns: 1fr; }
  .form-grid.tight { grid-template-columns: 1fr 1fr; }
  .toolbar { gap: 8px; }
  .toolbar .search { flex: 1 1 100%; order: -1; }
  .search input { width: 100%; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .btn { min-height: 40px; }
  .btn.sm { min-height: 34px; }
  .icon-btn { width: 40px; height: 40px; }
  .fld input, .fld select, .fld textarea, .input { font-size: 16px; min-height: 44px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  /* Tabellen als Karten */
  .tbl.cards-on-phone thead { display: none; }
  .tbl.cards-on-phone, .tbl.cards-on-phone tbody, .tbl.cards-on-phone tr, .tbl.cards-on-phone td { display: block; width: 100%; }
  .tbl.cards-on-phone tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl.cards-on-phone td { padding: 3px 0; border: 0; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
  .tbl.cards-on-phone td::before { content: attr(data-label); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; flex: none; }
  .tbl.cards-on-phone td:first-child { display: block; padding-bottom: 6px; }
  .tbl.cards-on-phone td:first-child::before { content: none; }
  .tbl.cards-on-phone td .pill-list { justify-content: flex-end; }
  /* Dialoge als Vollbild-Sheet */
  .dlg-wrap { padding: 0; align-items: flex-end; }
  .dlg, .dlg.sm, .dlg.md, .dlg.lg, .dlg.xl { width: 100%; border-radius: 18px 18px 0 0; max-height: calc(100dvh - var(--sat) - 12px); display: flex; flex-direction: column; animation: sheet .25s ease-out; }
  .dlg-body { overflow-y: auto; flex: 1; padding: 16px; -webkit-overflow-scrolling: touch; }
  .dlg-head { padding: 16px 16px 12px; }
  .dlg-head h2 { font-size: 1.4rem; }
  .dlg-foot { padding: 10px 12px calc(10px + var(--sab)); border-radius: 0; }
  .dlg-foot .btn { flex: 1 1 auto; }
  .dlg-foot .btn span { white-space: nowrap; }
  .dlg-foot .spacer { display: none; }
  .composer { gap: 14px; }
  .rcpt-list { max-height: none; }
  /* Plan */
  .plan-toolbar { gap: 8px; }
  .week-nav { width: 100%; justify-content: space-between; }
  .week-label { flex: 1; }
  #modeTabs { flex: 1; }
  #modeTabs label { flex: 1; }
  .plan-toolbar .btn span { display: none; }
  .plan-toolbar .btn.primary span { display: inline; }
  .hide-phone { display: none; }
  .plan-side { left: 0; width: 88vw; }
  .plan-wrap { max-height: calc(100dvh - 300px); }
  .plan { grid-template-columns: 44px repeat(var(--cols), minmax(var(--colw, 110px), 1fr)); }
  .slot { font-size: 12px; }
  .legend span.muted { display: none; }
  .abs { grid-template-columns: 56px 1fr; gap: 12px; }
  .abs > .icon-btn { position: absolute; top: 8px; right: 8px; }
  .abs { position: relative; }
  .abs-flags { grid-column: 1 / -1; }
  .flag-line span { min-width: 0; }
  .bar-row { grid-template-columns: 110px 1fr 54px; }
  .tpl-layout { grid-template-columns: 1fr; }
  .tpl-list { border-right: 0; border-bottom: 1px solid var(--line-2); flex-direction: row; overflow-x: auto; }
  .tpl-item { min-width: 180px; }
  .user-grid { grid-template-columns: 1fr; }
  .intro-card { flex-direction: column; align-items: stretch; }
  .perm-row { flex-direction: column; align-items: stretch; }
  .perm-row .seg { display: flex; }
  .perm-row .seg label { flex: 1; }
  .card-foot .input { flex: 1; min-width: 0; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }

/* ── Druck (Wochenplan) ── */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; font-size: 10px; }
  .sidebar, .topbar, .plan-side, .plan-toolbar, .day-tabs, .banner, .toasts, .bottom-nav, .legend, .offline-bar { display: none !important; }
  .app { display: block; }
  .content { padding: 0; }
  .planner { display: block; }
  .plan-wrap { max-height: none; overflow: visible; }
  .card { box-shadow: none; }
  .slot, .pcol { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-title { display: block !important; font-family: var(--display); font-size: 20px; margin-bottom: 8px; }
}
.print-title { display: none; }
