/* ==========================================================
   FUSSBALL DASHBOARD · VOLT DESIGN SYSTEM
   Alle Farben kommen aus theme.js (pro Nutzer anpassbar)
   ========================================================== */
:root {
  --bg: #060608; --bg-2: #0a0a0d; --panel: #0e0e12; --panel-2: #14141a; --input: #09090c;
  --line: #1e1e26; --line-2: #2a2a34; --text: #ececf2; --muted: #8a8a98; --muted-2: #5b5b68;
  --accent: #ff2a3d; --accent-rgb: 255, 42, 61; --on-accent: #fff; --accent-text: #ff5a68;
  --ok: #2fd27a; --warn: #ffb020; --bad: #ff4d5e; --info: #2fa8ff;
  --grid-c: rgba(255,255,255,.028); --shadow: 0 14px 40px rgba(0,0,0,.55);
  --font-head: 'Chakra Petch', 'Segoe UI', sans-serif;
  --font: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --r: 3px; --r-lg: 4px; --r-sm: 3px; --pad: 18px; --gap: 14px;
  --soft: rgba(var(--accent-rgb), .12); --soft-2: rgba(var(--accent-rgb), .22); --aline: rgba(var(--accent-rgb), .45);
}
body[data-corners='round'] { --r: 10px; --r-lg: 16px; --r-sm: 8px; }
body[data-density='compact'] { --pad: 12px; --gap: 10px; font-size: 13px; }

* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body[data-grid='on'] { background-image: linear-gradient(var(--grid-c) 1px, transparent 1px), linear-gradient(90deg, var(--grid-c) 1px, transparent 1px); background-size: 34px 34px; background-attachment: fixed; }
body[data-glow='on']::before { content: ''; position: fixed; inset: -20vh -10vw auto auto; width: 70vw; height: 70vh; background: radial-gradient(closest-side, rgba(var(--accent-rgb), .13), transparent); pointer-events: none; z-index: 0; }
#app { position: relative; z-index: 1; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--soft-2); }
.ic { width: 16px; height: 16px; flex: none; }
.ic.sm { width: 13px; height: 13px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.row.nowrap { flex-wrap: nowrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.sp { height: var(--gap); }
.sp2 { height: calc(var(--gap) * 2); }
.accent { color: var(--accent-text); }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.boot { display: grid; place-items: center; height: 100vh; }
.boot-bolt { font-size: 40px; animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: .3; } to { opacity: 1; } }

/* ---------- Überschriften ---------- */
.hd { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1.05; }
.lbl-mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ph { display: flex; gap: 18px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin: 4px 0 22px; }
.ph-l { display: flex; gap: 16px; align-items: flex-start; }
.ph-idx { font-family: var(--mono); font-size: 12px; color: var(--accent-text); border: 1px solid var(--aline); padding: 3px 6px; margin-top: 6px; background: var(--soft); border-radius: var(--r-sm); }
.ph h1 { margin: 0; font-family: var(--font-head); font-size: 32px; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; }
.ph p { margin: 4px 0 0; color: var(--muted); max-width: 720px; }

/* ---------- Buttons ---------- */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 600 13px var(--font); cursor: pointer; white-space: nowrap; transition: border-color .12s, background .12s, color .12s, transform .05s, box-shadow .12s; text-decoration: none !important; }
.b:hover { border-color: var(--aline); }
.b:active { transform: translateY(1px); }
.b:disabled { opacity: .45; cursor: not-allowed; }
.b.pri { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 700; }
.b.pri:hover { filter: brightness(1.08); box-shadow: 0 0 0 3px var(--soft); }
body[data-corners='cut'] .b.pri { clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); border-radius: 0; }
body[data-glow='on'] .b.pri { box-shadow: 0 6px 26px -10px rgba(var(--accent-rgb), .9); }
.b.soft { background: var(--soft); border-color: var(--aline); color: var(--accent-text); }
.b.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.b.ghost:hover { color: var(--text); background: var(--panel-2); }
.b.danger { color: var(--bad); border-color: rgba(255,77,94,.3); background: transparent; }
.b.danger:hover { background: rgba(255,77,94,.08); border-color: rgba(255,77,94,.6); }
.b.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.b.xs { height: 24px; padding: 0 8px; font-size: 11px; gap: 5px; }
.b.ic { width: 34px; padding: 0; }
.b.sm.ic { width: 28px; }
.b.xs.ic { width: 24px; }
.b.lg { height: 44px; padding: 0 22px; font-size: 14px; }
.b.block { width: 100%; }
.b.on { border-color: var(--accent); color: var(--accent-text); background: var(--soft); }

/* ---------- Formulare ---------- */
.f-lbl { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 7px; }
.in, select.in, textarea.in { width: 100%; height: 36px; padding: 0 11px; background: var(--input); border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--text); font: 500 13px var(--font); outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.in { height: auto; min-height: 82px; padding: 9px 11px; resize: vertical; }
.in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft); }
.in::placeholder { color: var(--muted-2); }
select.in { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 30px; }
select.in option { background: var(--panel); color: var(--text); }
.in.sm { height: 30px; font-size: 12px; }
.fg { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 16px; }
.fg .full { grid-column: 1 / -1; }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.srch { position: relative; }
.srch .ic { position: absolute; left: 10px; top: 10px; color: var(--muted-2); }
.srch .in { padding-left: 32px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ck { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--input); cursor: pointer; font-weight: 600; font-size: 13px; user-select: none; }
.ck input { display: none; }
.ck .box { width: 12px; height: 12px; border: 1.5px solid var(--muted); border-radius: 2px; }
.ck:has(input:checked) { border-color: var(--accent); background: var(--soft); color: var(--accent-text); }
.ck:has(input:checked) .box { background: var(--accent); border-color: var(--accent); }

.seg { display: inline-flex; background: var(--input); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: calc(var(--r-sm) - 1px); background: transparent; color: var(--muted); font: 600 12px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.seg.out button.on[data-v='win'] { background: var(--ok); color: #04140a; }
.seg.out button.on[data-v='loss'] { background: var(--bad); color: #1a0306; }
.seg.out button.on[data-v='draw'] { background: var(--muted); color: var(--bg); }

.sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.sw input { display: none; }
.sw .tr { width: 36px; height: 20px; border-radius: 20px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.sw .tr::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: left .15s, background .15s; }
.sw input:checked + .tr { background: var(--accent); }
.sw input:checked + .tr::after { left: 19px; background: var(--on-accent); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; gap: 11px; align-items: center; padding: 18px 16px 16px; border-bottom: 1px solid var(--line); }
.brand img { width: 36px; height: 36px; object-fit: contain; border-radius: var(--r-sm); }
.brand .t { font-family: var(--font-head); font-weight: 700; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.05; }
.brand .s { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .08em; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.nav { flex: 1; overflow-y: auto; padding: 10px 10px; }
.nav .grp { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--muted-2); padding: 14px 10px 6px; text-transform: uppercase; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--muted); font-weight: 600; font-size: 13.5px; }
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.on { color: var(--text); background: linear-gradient(90deg, var(--soft), transparent); }
.nav a.on::before { content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; background: var(--accent); border-radius: 0 3px 3px 0; box-shadow: 0 0 12px rgba(var(--accent-rgb), .8); }
.nav a.on .ic { color: var(--accent-text); }
.nav .cnt { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--accent-text); background: var(--soft); border: 1px solid var(--aline); padding: 0 6px; border-radius: 3px; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.me img { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); }
.me .n { font-weight: 700; font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .l { font-family: var(--mono); font-size: 10px; color: var(--accent-text); letter-spacing: .08em; text-transform: uppercase; }
.sysline { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--muted-2); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.off { background: var(--bad); }
.volt { color: var(--accent-text); font-weight: 700; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 15; height: 54px; display: flex; align-items: center; gap: 14px; padding: 0 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); }
.crumb { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.crumb b { color: var(--text); font-weight: 700; }
.clock { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.page { padding: 26px 28px 70px; width: 100%; max-width: 1480px; margin: 0 auto; }
.burger { display: none; }

/* ---------- Panels ---------- */
.pnl { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--pad); }
body[data-corners='cut'] .pnl::before, body[data-corners='cut'] .pnl::after { content: ''; position: absolute; width: 10px; height: 10px; pointer-events: none; }
body[data-corners='cut'] .pnl::before { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
body[data-corners='cut'] .pnl::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.pnl.flat::before, .pnl.flat::after { display: none; }
.pnl-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -2px 0 14px; }
.pnl-t { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.pnl-t .ic { color: var(--accent-text); }
.pnl-t b { color: var(--text); font-weight: 700; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .ic { width: 26px; height: 26px; color: var(--muted-2); display: block; margin: 0 auto 10px; }
.tbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.tbar .srch { width: 300px; max-width: 100%; }
.tbar select.in { width: auto; min-width: 170px; }
.callout { border: 1px solid var(--line-2); border-left: 3px solid var(--accent); background: var(--panel); padding: 11px 14px; border-radius: var(--r-sm); font-size: 13px; }
.callout.warn { border-left-color: var(--warn); }
.callout.bad { border-left-color: var(--bad); }
.callout.ok { border-left-color: var(--ok); }

/* Tags */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px; border-radius: 3px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.tag.abklaerung { color: var(--warn); border-color: rgba(255,176,32,.4); background: rgba(255,176,32,.08); }
.tag.geplant { color: var(--accent-text); border-color: var(--aline); background: var(--soft); }
.tag.abgesagt { color: var(--muted); border-color: var(--line-2); text-decoration: line-through; }
.tag.abgeschlossen, .tag.win { color: var(--ok); border-color: rgba(47,210,122,.4); background: rgba(47,210,122,.08); }
.tag.loss { color: var(--bad); border-color: rgba(255,77,94,.4); background: rgba(255,77,94,.08); }
.tag.draw { color: var(--text); }
.tag.acc { color: var(--accent-text); border-color: var(--aline); background: var(--soft); }
.str { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.str i { width: 18px; height: 6px; border-radius: 1px; background: var(--line-2); display: inline-block; position: relative; overflow: hidden; }
.str i::after { content: ''; position: absolute; inset: 0; width: var(--w); background: var(--c); }
.str.schwach { --w: 33%; --c: var(--ok); } .str.mittel { --w: 66%; --c: var(--warn); } .str.stark { --w: 100%; --c: var(--bad); }

/* ---------- Kennzahlen ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-bottom: var(--gap); }
.kpi { padding: 16px 18px; display: block; color: var(--text); }
.kpi:hover { text-decoration: none; border-color: var(--aline); }
.kpi .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .k .ic { color: var(--accent-text); width: 14px; height: 14px; }
.kpi .v { font-family: var(--mono); font-size: 30px; font-weight: 700; margin-top: 8px; letter-spacing: -.02em; }
.kpi .v small { font-size: 14px; color: var(--muted); font-weight: 500; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Nächstes Spiel */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.hero .vs { font-family: var(--font-head); font-size: 34px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; line-height: 1; }
.hero .vs span { color: var(--accent-text); }
.countdown { display: flex; gap: 8px; }
.countdown div { min-width: 64px; text-align: center; background: var(--input); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 6px; }
.countdown b { display: block; font-family: var(--mono); font-size: 24px; }
.countdown span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--muted); }

/* Meter */
.meter { display: flex; flex-direction: column; gap: 5px; }
.meter .mv { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.meter .mv small { color: var(--muted); font-weight: 500; }
.bar { height: 4px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
body[data-glow='on'] .bar > span { box-shadow: 0 0 10px rgba(var(--accent-rgb), .7); }
.bar.full > span { background: var(--ok); box-shadow: none; }

/* ---------- Spiele-Liste ---------- */
.matches { display: flex; flex-direction: column; gap: 8px; }
.match { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr) 150px 120px 112px; gap: 16px; align-items: center; padding: 12px 16px 12px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; transition: border-color .12s, background .12s; }
.match:hover { border-color: var(--aline); background: var(--panel-2); }
.match.st-geplant { border-left: 3px solid var(--accent); }
.match.st-abklaerung { border-left: 3px solid var(--warn); }
.match.st-abgesagt { border-left: 3px solid var(--line-2); opacity: .8; }
.match.st-abgeschlossen { border-left: 3px solid var(--ok); }
.mdate { text-align: center; border-right: 1px solid var(--line); padding-right: 12px; }
.mdate .d { font-family: var(--mono); font-size: 24px; font-weight: 700; line-height: 1; }
.mdate .m { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--muted); margin-top: 3px; }
.mdate .t { font-family: var(--mono); font-size: 12px; color: var(--accent-text); margin-top: 3px; }
.mdate.open .d { font-size: 15px; color: var(--muted); }
.mtitle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mtitle .n { font-family: var(--font-head); font-size: 19px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.mmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 5px; color: var(--muted); font-size: 12.5px; }
.mmeta span { display: inline-flex; align-items: center; gap: 5px; }
.mmeta .ic { width: 13px; height: 13px; color: var(--muted-2); }
.mact { display: flex; justify-content: flex-end; gap: 4px; }
.qr { width: 30px; height: 30px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--line-2); background: var(--input); color: var(--muted); border-radius: var(--r-sm); cursor: pointer; }
.qr:hover { color: var(--text); border-color: var(--aline); }
.qr.yes.on { background: rgba(47,210,122,.15); color: var(--ok); border-color: var(--ok); }
.qr.maybe.on { background: rgba(255,176,32,.12); color: var(--warn); border-color: var(--warn); }
.qr.no.on { background: rgba(255,77,94,.12); color: var(--bad); border-color: var(--bad); }

/* Kompakte Zeile (Übersicht) */
.mini { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-sm); background: var(--panel-2); cursor: pointer; }
.mini:hover { border-color: var(--aline); }
.mini .mdate { padding-right: 10px; }
.mini .mdate .d { font-size: 18px; }
.mini .mn { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .03em; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Drawer (Spiel-Details) ---------- */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; animation: fade .12s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 580px; max-width: 100%; background: var(--bg-2); border-left: 1px solid var(--line-2); z-index: 61; display: flex; flex-direction: column; animation: slide .18s ease-out; box-shadow: var(--shadow); }
.dr-h { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.dr-h .vs { font-family: var(--font-head); font-size: 26px; font-weight: 700; text-transform: uppercase; line-height: 1.05; }
.dr-b { flex: 1; overflow-y: auto; padding: 18px 20px 30px; display: flex; flex-direction: column; gap: 18px; }
.dr-f { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--bg-2); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 12px; }
.kv dt { color: var(--muted); display: flex; gap: 8px; align-items: center; font-size: 13px; }
.kv dt .ic { color: var(--accent-text); width: 14px; height: 14px; }
.kv dd { margin: 0; font-weight: 600; }
.sect-t { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.note { background: var(--input); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; white-space: pre-wrap; font-size: 13px; }
.plist { display: flex; flex-wrap: wrap; gap: 5px; }
.pc { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; }
.pc .nr { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.pc.bench { border-style: dashed; opacity: .7; }
.pc button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; display: inline-flex; }
.pc button:hover { color: var(--bad); }
.rsvp-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rsvp-big .b.on-yes { background: rgba(47,210,122,.15); border-color: var(--ok); color: var(--ok); }
.rsvp-big .b.on-maybe { background: rgba(255,176,32,.12); border-color: var(--warn); color: var(--warn); }
.rsvp-big .b.on-no { background: rgba(255,77,94,.12); border-color: var(--bad); color: var(--bad); }
.dlink { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.dlink .ic { color: #8c95ff; }

/* ---------- Stage ---------- */
.stage-head { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; margin-bottom: var(--gap); }
.stage-title { font-family: var(--font-head); font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.stools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: var(--gap); padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.counter { font-family: var(--mono); font-size: 13px; padding: 0 10px; height: 34px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--input); }
.counter b { color: var(--accent-text); }
.counter.full b { color: var(--warn); }
.dirty { font-family: var(--mono); font-size: 11px; color: var(--warn); letter-spacing: .06em; }
.board { display: grid; grid-template-columns: 250px minmax(0, 1fr) 250px; gap: var(--gap); align-items: start; }
.board .side { display: flex; flex-direction: column; gap: var(--gap); position: sticky; top: 70px; max-height: calc(100vh - 84px); overflow-y: auto; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--gap); }
.zone { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; min-width: 0; }
.zone-h { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.zone-h .zt { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.zone-h .zn { font-family: var(--font-head); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.zone-h .zc { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--accent-text); }
.zone-h .zc.over { color: var(--bad); }
.zone-h .zv { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 11.5px; }
.dz { padding: 8px; display: flex; flex-direction: column; gap: 5px; min-height: 56px; flex: 1; transition: background .1s, outline-color .1s; outline: 1.5px dashed transparent; outline-offset: -5px; border-radius: var(--r-sm); }
.dz.over, .dz.target { background: var(--soft); outline-color: var(--accent); }
.dz-empty { color: var(--muted-2); font-size: 12px; text-align: center; padding: 10px 0; }
.zone.pool .zone-h { background: var(--panel-2); }
.zone.sit .zn { color: var(--warn); }
.zone.abs .zn { color: var(--bad); }
.pgrp { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); padding: 6px 2px 2px; }
.mc { display: flex; align-items: center; gap: 8px; padding: 5px 7px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); cursor: grab; user-select: none; transition: border-color .1s, transform .1s, opacity .1s; }
.mc:hover { border-color: var(--aline); }
.mc.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--soft-2); }
.mc.dragging { opacity: .35; }
.mc img { width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--input); }
.mc .mn { font-weight: 700; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc .ms { font-family: var(--mono); font-size: 9.5px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc .bdg { margin-left: auto; display: flex; gap: 3px; flex: none; }
.mc .bd { font-family: var(--mono); font-size: 9.5px; padding: 1px 4px; border-radius: 2px; border: 1px solid var(--line-2); color: var(--muted); }
.mc .bd.rot { color: var(--warn); border-color: rgba(255,176,32,.45); }
.mc .bd.may { color: var(--warn); }
.mc .bd.no { color: var(--bad); border-color: rgba(255,77,94,.45); }
.mc .bd.na { color: var(--muted-2); }
.mc.ro { cursor: default; }
.stage-list { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; }
.sl-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; border: 1px solid transparent; }
.sl-item:hover { background: var(--panel-2); }
.sl-item.on { border-color: var(--aline); background: var(--soft); }
.sl-item .d { font-family: var(--mono); font-size: 11px; color: var(--muted); width: 44px; flex: none; }

/* Stammbesetzung */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; padding: 9px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(var(--accent-rgb), .03); }
.tbl .grp-row td { background: var(--panel-2); font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.tbl .grp-row td .c { font-family: var(--mono); color: var(--accent-text); font-size: 11px; margin-left: 8px; }
.tbl .grp-row.over td { background: var(--soft); outline: 1.5px dashed var(--accent); outline-offset: -2px; }
.tbl tr.dragging td { opacity: .35; }
.tbl .handle { cursor: grab; color: var(--muted-2); width: 24px; }
.tbl .num { font-family: var(--mono); text-align: right; }
.tbl .fname { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 15px; }
.tbl .act { display: flex; gap: 5px; justify-content: flex-end; }
.tbl select.in, .tbl .in { height: 30px; font-size: 12.5px; }
.tw { overflow-x: auto; }
.lost td { opacity: .55; }

/* Positionen */
.pos-edit { display: flex; flex-direction: column; gap: var(--gap); }
.pf { display: grid; grid-template-columns: 2fr 1fr 110px auto; gap: 10px; align-items: end; }
.thumb { width: 84px; height: 62px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line-2); position: relative; background: var(--input); cursor: zoom-in; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 3px; border: 0; background: rgba(0,0,0,.75); color: #fff; cursor: pointer; display: grid; place-items: center; }
.thumb .tg { position: absolute; left: 4px; bottom: 4px; font-family: var(--mono); font-size: 9.5px; background: rgba(0,0,0,.75); color: #fff; padding: 1px 5px; border-radius: 2px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); padding: 18px; text-align: center; color: var(--muted); cursor: pointer; background: var(--input); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--text); background: var(--soft); }

/* ---------- Felder ---------- */
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--gap); }
.field { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 14px 12px; cursor: pointer; transition: border-color .12s, background .12s; overflow: hidden; }
.field:hover { border-color: var(--aline); background: var(--panel-2); }
.field .fn { font-family: var(--font-head); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 7px; }
.field .fn .ic { color: var(--muted-2); }
.field .fo { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.field .fs { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 4px; letter-spacing: .04em; }
.field.own { border-color: var(--aline); background: linear-gradient(135deg, var(--soft), var(--panel) 60%); }
.field.own .fn .ic { color: var(--accent-text); }
.field.free .fo { color: var(--muted); font-weight: 600; }
.field .stripe { position: absolute; top: 0; right: 0; width: 4px; bottom: 0; background: var(--line-2); }
.field.own .stripe { background: var(--accent); }
.field.fam.s-stark .stripe { background: var(--bad); } .field.fam.s-mittel .stripe { background: var(--warn); } .field.fam.s-schwach .stripe { background: var(--ok); }
.hist { display: flex; flex-direction: column; }
.hist .hi { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.hist .hi:last-child { border-bottom: 0; }
.hist .hi .t { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.addrow { display: flex; gap: 8px; }
.addrow .in { max-width: 300px; }
.fchips { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- Mitglieder ---------- */
.rot-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.rot { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; display: flex; gap: 10px; align-items: center; }
.rot img { width: 34px; height: 34px; border-radius: 50%; }
.rot .n { font-weight: 700; }
.spark { display: inline-flex; gap: 2px; vertical-align: middle; }
.spark i { width: 7px; height: 14px; border-radius: 1px; background: var(--line-2); display: inline-block; }
.spark i.p { background: var(--accent); } .spark i.s { background: var(--warn); } .spark i.a { background: var(--bad); opacity: .7; }

/* ---------- Design-Editor ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 38px; height: 38px; border-radius: var(--r-sm); border: 2px solid transparent; cursor: pointer; position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.swatch.on { border-color: var(--text); }
.swatch.on::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.picker { display: inline-flex; align-items: center; gap: 8px; }
.picker input[type='color'] { width: 38px; height: 38px; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: none; cursor: pointer; }
.bases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.base-opt { border: 1.5px solid var(--line-2); border-radius: var(--r-sm); padding: 8px; cursor: pointer; text-align: center; font-weight: 600; font-size: 12px; }
.base-opt.on { border-color: var(--accent); }
.base-opt .pv { height: 46px; border-radius: 3px; margin-bottom: 6px; display: flex; align-items: flex-end; padding: 6px; gap: 4px; }
.base-opt .pv span { height: 8px; flex: 1; border-radius: 2px; }
.preview-box { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Einstellungen ---------- */
.role-list { display: flex; flex-wrap: wrap; gap: 5px; max-height: 180px; overflow-y: auto; padding: 1px; }
.rc { display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 9px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--input); color: var(--muted); font: 600 12px var(--font); cursor: pointer; }
.rc .rd { width: 8px; height: 8px; border-radius: 50%; background: #99aab5; }
.rc.on { color: var(--text); border-color: var(--accent); background: var(--soft); }
.tagc { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line-2); font-weight: 600; font-size: 12px; }
.tagc button { border: 0; background: none; color: var(--muted); cursor: pointer; display: inline-flex; }
.savebar { position: sticky; bottom: 14px; margin-top: 18px; display: flex; justify-content: flex-end; gap: 10px; align-items: center; background: var(--panel-2); border: 1px solid var(--aline); border-radius: var(--r-lg); padding: 10px 14px; box-shadow: var(--shadow); z-index: 5; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; border-right: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px; background: linear-gradient(160deg, var(--soft), transparent 55%), var(--bg-2); }
.login-art .big { font-family: var(--font-head); font-size: clamp(54px, 8vw, 120px); font-weight: 700; line-height: .9; text-transform: uppercase; letter-spacing: .01em; }
.login-art .big span { color: var(--accent-text); display: block; }
.login-art .bolt { position: absolute; right: -60px; top: 50%; transform: translateY(-50%); width: 420px; height: 420px; opacity: .07; color: var(--accent); }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(24px, 6vw, 90px); gap: 16px; }
.login-form img { width: 64px; height: 64px; object-fit: contain; }
.login-form h1 { margin: 0; font-family: var(--font-head); text-transform: uppercase; font-size: 30px; letter-spacing: .04em; }
.discord-btn { background: #5865f2 !important; color: #fff !important; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 44px 16px; overflow-y: auto; z-index: 80; animation: fade .12s; }
.modal { position: relative; width: 660px; max-width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: pop .14s; }
body[data-corners='cut'] .modal { border-top: 2px solid var(--accent); }
.modal.wide { width: 960px; }
.modal.narrow { width: 440px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 6px; }
.modal-h h2 { margin: 0; font-family: var(--font-head); font-size: 20px; text-transform: uppercase; letter-spacing: .04em; }
.modal-b { padding: 12px 20px 8px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; flex-wrap: wrap; }
.lightbox img { max-width: 100%; max-height: 78vh; display: block; margin: 0 auto; border-radius: var(--r-sm); }
.member-list { max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.member-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); cursor: pointer; }
.member-item:hover { background: var(--panel-2); }
.member-item img { width: 28px; height: 28px; border-radius: 50%; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { min-width: 260px; max-width: 380px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); box-shadow: var(--shadow); font-size: 13px; animation: pop .15s; }
.toast.err { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); }
.toast.ok { border-left-color: var(--ok); }

.flyer-wrap { display: flex; justify-content: center; }
.flyer-wrap canvas { width: 100%; max-width: 400px; border-radius: var(--r-sm); border: 1px solid var(--line-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1250px) {
  .board { grid-template-columns: 220px minmax(0, 1fr); }
  .board .side.right { grid-column: 1 / -1; position: static; max-height: none; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .ff-grid, .design-grid { grid-template-columns: 1fr !important; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .match { grid-template-columns: 62px minmax(0, 1fr) 120px; }
  .match .mstat, .match .mact { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .rail.open { transform: none; box-shadow: var(--shadow); }
  .burger { display: inline-flex; }
  .top { padding: 0 14px; }
  .clock { display: none; }
  .page { padding: 18px 14px 60px; }
  .ph h1 { font-size: 26px; }
  .fg { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .board .side { position: static; max-height: none; }
  .board .side.right { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .pf { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
  .bases { grid-template-columns: repeat(2, 1fr); }
  .match { grid-template-columns: 56px minmax(0, 1fr); }
  .match .mmeter { grid-column: 2; }
}
