/* Peltrix Dashboard
   Minimal: neutrale Flächen, feine 1-px-Linien, kleine Rundungen, keine Schatten, eine blaue Akzentfarbe.
   Hell und dunkel, von Handy bis Breitbild. */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f6f6;
  --hover: #efefef;
  --line: #e6e6e6;
  --line-strong: #d4d4d4;
  --text: #171717;
  --text-2: #3d3d3d;
  --muted: #737373;
  --accent: #0b6cf4;
  --accent-hover: #075ad1;
  --accent-soft: #e9f1fe;
  --accent-text: #ffffff;
  --ok: #16a34a;
  --ok-soft: #e8f6ee;
  --warn: #c27c0e;
  --warn-soft: #fdf4e3;
  --err: #dc2626;
  --err-soft: #fdecec;
  --radius: 10px;
  --radius-sm: 8px;
  --topbar: 60px;
  --gutter: clamp(16px, 3vw, 36px);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --surface: #0b0b0b;
    --surface-2: #161616;
    --hover: #1c1c1c;
    --line: #262626;
    --line-strong: #363636;
    --text: #f5f5f5;
    --text-2: #d4d4d4;
    --muted: #9a9a9a;
    --accent: #1d72ff;
    --accent-hover: #3a85ff;
    --accent-soft: #10203d;
    --accent-text: #ffffff;
    --ok: #22c55e;
    --ok-soft: #0f2618;
    --warn: #f0a93a;
    --warn-soft: #2a1f0c;
    --err: #f87171;
    --err-soft: #2d1414;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: var(--radius-sm); }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.pad { padding: 0 12px; }
.nowrap { white-space: nowrap; }
.err-text { color: var(--err); }

/* ------------------------------------------------------------------ Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: var(--topbar); padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; border: 0; background: none; padding: 6px; margin-left: -6px; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-2); }
.menu-btn:hover { background: var(--hover); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; padding-right: 12px; }
.logo { width: 26px; height: 26px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); flex: none; }
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.env-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-left: 4px; }
.env-switch button { border: 1px solid transparent; background: none; padding: 3px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; }
.env-switch button:hover { color: var(--text); }
.env-switch button.active { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.dot.on { background: var(--ok); }
.user-box { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); object-fit: cover; }

/* Verbindungshinweis */
.conn-banner { position: sticky; top: var(--topbar); z-index: 15; display: flex; align-items: center; gap: 12px; justify-content: center;
  padding: 7px var(--gutter); background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--line); font-size: 13px; }

/* ------------------------------------------------------------------ Grundraster */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - var(--topbar)); }
.sidebar { border-right: 1px solid var(--line); padding: 16px 12px; background: var(--surface); position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto; }
.sidebar h2 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 4px 12px 8px; }
.guild { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; text-align: left; color: var(--text); font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.guild:hover { background: var(--hover); }
.guild.active { background: var(--hover); font-weight: 600; }
.guild img, .guild .icon { width: 22px; height: 22px; border-radius: var(--radius-sm); flex: none; }
.guild .icon { display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 10px; font-weight: 700; }
.guild span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { padding: 24px var(--gutter) 64px; max-width: 1240px; width: 100%; }
.content > h1 { font-size: 22px; font-weight: 600; margin: 0; }
.page-sub { color: var(--muted); margin: 2px 0 0; font-size: 13px; }

/* Reiter */
.tabs { display: inline-flex; max-width: 100%; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 18px 0 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 1px solid transparent; background: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); white-space: nowrap; font-size: 14px; font-weight: 500; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--surface-2); border-color: var(--line-strong); font-weight: 600; }

/* Hinweise */
.notice { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 16px; color: var(--text-2); display: flex; gap: 10px; align-items: flex-start; }
.notice.warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); color: var(--text); }
.notice.err { border-color: color-mix(in srgb, var(--err) 35%, var(--line)); background: var(--err-soft); color: var(--text); }

/* ------------------------------------------------------------------ Karten (Einstellungsbereiche) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; align-items: start; }
.cards + .cards { margin-top: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; }
.card > h3 { margin: 0; padding: 14px 18px 4px; font-size: 15px; font-weight: 500; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.card > :not(h3) { margin-left: 18px; margin-right: 18px; }
.card > :last-child { margin-bottom: 14px; }
.card > h3 + * { margin-top: 6px; }
.card.editing { border-color: var(--accent); }
.card.wide { grid-column: 1 / -1; margin-top: 16px; }
.head-right { display: flex; align-items: center; gap: 8px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.row:first-of-type { border-top: 0; }
.row > span:first-child { color: var(--muted); flex: none; }
.row > span:last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
/* Aktionen als Fusszeile der Karte, rechtsbündig auf grauem Streifen */
.card > .card-actions, .card > .form > .actions:last-child {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center;
  padding: 12px 18px; background: transparent; border-top: 1px solid var(--line);
}
/* Karte hat keinen Innenabstand: direkte Fusszeile füllt die Breite, die im Formular muss dessen Rand ausgleichen */
.card > .card-actions { margin: 14px 0 0; }
.card > .form > .actions:last-child { margin: 14px -18px 0; }
.card > .card-actions:last-child, .card > .form:last-child { margin-bottom: 0; }
.card > .form { padding-bottom: 0; }
.card > .card-actions + *, .card > .form + * { margin-top: 12px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 8px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 0 8px; line-height: 22px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--text); background: var(--surface-2); white-space: nowrap; }
.badge.on::before, .badge.off::before, .badge.warn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.badge.on::before { background: var(--ok); }
.badge.warn::before { background: var(--warn); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; line-height: 22px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; margin: 2px 0 2px 4px; max-width: 100%; }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.chip .x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; display: inline-flex; }
.chip .x:hover { color: var(--err); }
.gone { opacity: .55; }
.sub { font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------ Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); padding: 0 14px; height: 34px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; line-height: 1; }
.btn:hover:not(:disabled) { background: var(--hover); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--err) 85%, black); }
.btn.danger-outline { color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, var(--line-strong)); }
.btn.danger-outline:hover:not(:disabled) { background: var(--err-soft); }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.btn.big { height: 40px; padding: 0 20px; font-size: 14.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; animation: spin .7s linear infinite; }
.btn.primary.loading::after { border-color: var(--accent-text) transparent var(--accent-text) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ Formulare */
.form { display: grid; gap: 14px; padding: 4px 0 2px; }
.field { display: grid; gap: 4px; }
.label { font-size: 13px; font-weight: 600; color: var(--text); }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.actions.bottom { align-items: end; }
.form input[type=text], .form input[type=number], .form input[type=password], .form input[type=datetime-local], .form input[type=time], .form select, .form textarea,
.search, .season-select, .inline-input {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 6px 11px; min-height: 36px;
}
.form textarea { resize: vertical; min-height: 64px; }
.form input:hover, .form select:hover, .form textarea:hover, .search:hover, .season-select:hover { border-color: var(--muted); }
.form input:focus, .form select:focus, .form textarea:focus, .search:focus, .season-select:focus, .inline-input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent);
}
.form input[type=color] { width: 100%; height: 32px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.picker { max-height: 220px; overflow: auto; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 4px; }
.pick { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.pick:hover { background: var(--hover); }
.pick i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.pick .warn-tag { margin-left: auto; font-size: 11.5px; color: var(--warn); }
.switch { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.slider { position: absolute; inset: 0; background: var(--line-strong); border-radius: 999px; transition: background .15s; pointer-events: none; }
.slider::before { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(14px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }
details.import, details.msg-group { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
details > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
details[open] > summary::before { transform: rotate(45deg); }
details.msg-group .field { margin: 12px 0; }

/* Statusmeldungen in Karten */
.change { font-size: 13px; margin: 10px 0 0; display: flex; align-items: flex-start; gap: 6px; }
.change.pending { color: var(--warn); }
.change.ok { color: var(--ok); }
.change.err { color: var(--err); }
.change .ico { margin-top: 2px; }
.elapsed { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Icons */
.ico { display: inline-flex; width: 1.05em; height: 1.05em; vertical-align: -0.15em; flex: none; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.with-ico { display: inline-flex; align-items: center; gap: 5px; }
.owner-mark { color: var(--warn); display: inline-flex; margin-left: 2px; }

/* ------------------------------------------------------------------ Daten, Tabellen */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.search { flex: 1 1 260px; width: auto; }
.season-select { width: auto; }
select { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 5px 10px; min-height: 34px; font-size: 13.5px; }
.grow { flex: 1; }
.section-title { font-size: 15px; font-weight: 600; margin: 28px 0 12px; display: flex; align-items: baseline; gap: 8px; }
.hint.inline { font-weight: 400; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.team { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.team.editing { grid-column: 1 / -1; border-color: var(--accent); }
.team-head { display: flex; align-items: center; gap: 8px; }
.team-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.members { display: flex; flex-wrap: wrap; gap: 4px; }
.members .chip { margin: 0; }
.team-date { margin: 0; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.table td { padding: 12px 18px; border-top: 1px solid var(--line); vertical-align: top; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions .btn { margin-left: 4px; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-input { width: 150px; min-height: 28px; padding: 3px 8px; }
.social-form { flex-wrap: wrap; }
.social-form .inline-input { width: 190px; }
.social-flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.live-now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }

/* ------------------------------------------------------------------ Statistik: Kennzahl klein oben, Wert gross darunter */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kpi { padding: 16px 20px; display: grid; gap: 2px; border-left: 1px solid var(--line); margin-left: -1px; }
.kpi-label { order: -1; color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.kpi-value { font-size: 22px; font-weight: 500; line-height: 1.25; }
.kpi-small { font-size: 14px; font-weight: 600; color: var(--text); }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.chart > h3 { border-bottom: 0; padding-bottom: 4px; }
.chart-box { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .axis { fill: var(--muted); font-size: 11px; }
.chart-svg .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart-svg .area { fill: var(--accent-soft); stroke: none; }
.chart-svg .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-svg .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 6px 10px; font-size: 12.5px; pointer-events: none; white-space: nowrap; }

/* ------------------------------------------------------------------ Laden: Platzhalter */
.skeleton { display: grid; gap: 10px; }
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--hover) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; border-radius: var(--radius-sm); }
.sk-card { height: 150px; border-radius: var(--radius); }
.sk-row { height: 44px; }
.sk-line { height: 14px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk, .btn.loading::after { animation: none; } }

/* ------------------------------------------------------------------ Rückmeldungen unten rechts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line-strong); border-left-width: 3px; border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 13.5px; box-shadow: 0 2px 8px rgb(0 0 0 / .08); animation: toast-in .15s ease-out; }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
.toast .ico { margin-top: 2px; }
.toast.ok .ico { color: var(--ok); }
.toast.err .ico { color: var(--err); }
@keyframes toast-in { from { opacity: 0; transform: translateY(4px); } }

/* ------------------------------------------------------------------ Anmelden */
.center { display: grid; place-items: center; text-align: center; min-height: 70vh; padding: var(--gutter); }
.login { display: grid; gap: 6px; align-content: center; justify-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 36px; }
.login h1 { font-size: 20px; font-weight: 600; margin: 0; }
.login p { max-width: 360px; margin: 4px 0 20px; }

/* ------------------------------------------------------------------ Schmal: Menü statt Seitenleiste */
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: var(--topbar); bottom: 0; width: min(300px, 85vw); height: auto; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 0 100vmax transparent; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgb(0 0 0 / .35); }
  .user-name { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .brand span:last-child { display: none; }
  .env-switch { margin-left: 0; }
  .content { padding-top: 16px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .row { flex-direction: column; gap: 2px; }
  .row > span:last-child { text-align: left; }
  .row > span:last-child .chip:first-child { margin-left: 0; }
  .kpi { border-left: 0; border-top: 1px solid var(--line); margin: -1px 0 0; }
  /* Tabellen als Liste */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 14px; border-top: 1px solid var(--line); }
  .table tbody tr:first-child { border-top: 0; }
  .table td { border: 0; padding: 3px 0; }
  .table td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--muted); }
  .row-actions { text-align: left; padding-top: 8px !important; }
  .row-actions .btn { margin: 0 6px 0 0; }
  .toasts { left: 16px; right: 16px; }
}

/* Saisons */
.season-list { display: grid; }
.season-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.season-row:first-child { border-top: 0; }
.season-row.editing { gap: 8px; }
.season-row .inline-input { flex: 1; width: auto; }
.season-main { flex: 1; min-width: 180px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.season-main .sub { flex-basis: 100%; }
.season-actions { display: flex; gap: 6px; }
.inline-toggle { display: inline-flex; margin: -4px 0 12px; color: var(--text-2); }

/* Minecraft-Server */
.keybox { border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 12px; margin-top: 12px; display: grid; gap: 8px; }
.keybox pre { margin: 0; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font: 12.5px/1.5 var(--mono); overflow-x: auto; white-space: pre; }
.card-actions input[type=text] { flex: 1 1 180px; min-width: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 5px 10px; min-height: 30px; }
.season-main .dot { flex: none; }

/* Adventskalender */
.card.wide { grid-column: 1 / -1; }
.doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.door { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--surface); min-height: 84px; }
.door.today { border-color: var(--accent); background: var(--accent-soft); }
.door.empty { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.door-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.door-head strong { font-size: 18px; }
.door ul { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; }
.door p { margin: 6px 0 0; font-size: 12.5px; }

/* Team bearbeiten: Mitglieder als Liste mit Entfernen */
.member-list { display: grid; gap: 4px; }
.member-list .label { margin: 0 0 2px; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); min-height: 36px; }
.member-row .with-ico { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }

/* Minecraft: Moderation */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.seg-btn { border: 1px solid transparent; background: none; padding: 3px 12px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.seg-btn:hover:not(.active) { color: var(--text); }
.seg-btn.active { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); font-weight: 600; }
.mc .badge + .badge { margin-left: 4px; }
.act-row td { background: var(--surface-2); }
.inline-form.act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form.act .grow { flex: 1 1 220px; }
.inline-form.act input, .inline-form.act select { min-height: 32px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 4px 8px; background: var(--surface); }
.inline-form.act .num { width: 80px; }
.dur { display: inline-flex; gap: 6px; align-items: center; }
.dur[hidden] { display: none; }
.chatlog { border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--font); background: var(--surface); max-height: 70vh; overflow-y: auto; font-size: 13.5px; }
.chatline { display: grid; grid-template-columns: 150px 110px 130px 1fr; gap: 8px; padding: 5px 10px; border-bottom: 1px solid var(--line); align-items: baseline; }
.chatline:last-child { border-bottom: 0; }
.chatline.team { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.chatline .at { color: var(--muted); font-size: 12px; white-space: nowrap; }
.chatline .chan { color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatline .who { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.chatline .who:hover { text-decoration: underline; }
.chatline .text { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .chatline { grid-template-columns: 1fr 1fr; }
  .chatline .text { grid-column: 1 / -1; }
}

/* Minecraft-Statistiken */
.mc-stats { margin-top: 24px; }
.stats-table th.sortable { cursor: pointer; white-space: nowrap; }
.stats-table th.sorted { color: var(--text); text-decoration: underline; }
.stats-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Kalender pro Spieler */
.door-grid th.d, .door-grid td.d { width: 26px; min-width: 26px; padding: 4px 2px; text-align: center; font-size: 12px; }
.door-grid td.d.yes { background: var(--ok-soft, color-mix(in srgb, var(--ok) 18%, transparent)); color: var(--ok); }
.door-grid td.d.missed { background: var(--surface-2); }
.door-grid td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* End-Event */
.event-tables { margin-top: 12px; align-items: start; }
.event-tables td.num { text-align: right; width: 1%; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Empfänger-Auswahl */
.pick-list { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 220px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.pick-list .pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.chatline.private { background: color-mix(in srgb, var(--warn-soft) 70%, transparent); }

/* [Team XY] wie im Spiel */
.mc-tag { font-weight: 600; white-space: nowrap; }
.mc-tag .br { color: var(--muted); font-weight: 400; }
.mc-player { font-weight: 600; }
.event-hero { display: flex; flex-wrap: wrap; gap: 24px; margin: 6px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.event-holder { font-size: 17px; margin-top: 2px; }
.event-tables tr.first td { font-weight: 700; }
.event-tables td.place { color: var(--muted); }

/* Hologramme */
.holo-editor { margin-top: 14px; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.holo-editor h4 { margin: 0; }
.holo-page { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.holo-page select, .holo-page input[type=text], .holo-page textarea { min-height: 30px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 4px 8px; background: var(--surface); }
.holo-page input[type=text] { flex: 1 1 180px; }
.holo-page textarea { flex: 1 1 100%; }
.holo-page .num { width: 60px; min-height: 30px; }
