/* public/assets/css/einheit.css — v1.6 (27.11.2026)
 *
 * EIN Layout für alle Seiten.
 *
 * Warum es diese Datei gibt: Von 227 Seiten bringen 106 ein eigenes Farbschema und
 * 163 eigene Stilregeln mit. Marco: "viel zu viele Seiten und jetzt verschiedene
 * Layouts ... wir brauchen ein Layout auf alles, damit es klar aussieht und leicht
 * zu verstehen ist, aber ohne wichtige Informationen zu verlieren."
 *
 * Wie sie wirkt: navigation.php bindet sie auf jeder Seite ein. Sie überschreibt
 *   1. die Farb-Variablen, die die Seiten selbst setzen (--card, --primary, ...),
 *   2. Hintergrund, Schrift und Überschriften,
 *   3. die häufigsten Bausteine (.widget auf 64 Seiten, .btn auf 76, .card auf 30 ...).
 * Inhalte und Funktionen fasst sie nicht an — nur das Aussehen.
 *
 * Farbwelt wie auf "Heute" und dem Dashboard:
 *   #0B1220 Grund · #151E30 Karte · #1C2740 Karte in Karte · #24304A Linie
 *   #22C55E Hauptaktion · #FBBF24 Belohnung/Hinweis · #F87171 Warnung
 *
 * Abschalten: Einstellung "layout_einheitlich" leeren (siehe navigation.php).
 */

/* ── 1) Farb-Variablen ─────────────────────────────────────────────────────
   "html:root" ist genauer als das ":root" der Seiten und gewinnt deshalb immer,
   egal in welcher Reihenfolge geladen wird. */
html:root {
  --bg:#0B1220; --bg-dark:#0B1220; --bg2:#151E30; --bg-light:#151E30; --panel:#151E30; --pnl:#151E30;
  --card:#1C2740; --border:#24304A; --radius:16px; --r:16px; --shadow:none; --sha:none;
  --text:#F1F5F9; --text-main:#F1F5F9; --text-heading:#F1F5F9; --txt:#F1F5F9; --white:#F1F5F9; --ink:#F1F5F9;
  --muted:#9AA7BD; --text-muted:#9AA7BD; --mut:#9AA7BD;
  /* --primary dient auf den Seiten mal als Schriftfarbe, mal als Fläche mit weißer Schrift.
     #16A34A ist das Grün, das in beiden Rollen lesbar bleibt; das hellere steht in --primary-light. */
  --primary:#16A34A; --primary-light:#4ADE80; --pri:#16A34A; --pril:#4ADE80; --accent:#4ADE80; --acc:#4ADE80;
  --green:#4ADE80; --accent-green:#4ADE80; --ok:#4ADE80; --win:#4ADE80;
  --amber:#FBBF24; --accent-amber:#FBBF24; --gold:#FBBF24; --warn:#FBBF24; --pending:#FBBF24;
  --red:#F87171; --accent-red:#F87171; --err:#F87171; --bad:#F87171; --lose:#F87171;
}

/* ── 2) Grund, Schrift, Überschriften ──────────────────────────────────── */
/* Auch das html-Element: auf kurzen Seiten schaute sonst unter dem Inhalt ein grauer Rest hervor */
html { background:#0B1220 !important; }
html body {
  background:#0B1220 !important;
  background-image:none !important;
  color:#F1F5F9;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
html body h1 { color:#F1F5F9; font-size:clamp(1.5rem,4vw,1.9rem); line-height:1.15; letter-spacing:0; text-transform:none; }
html body h2 { color:#F1F5F9; font-size:1.2rem; letter-spacing:0; }
html body h3 { color:#F1F5F9; letter-spacing:0; }
html body .muted, html body .sub, html body .meta, html body .stat-label, html body .note { color:#9AA7BD; }

/* ── 3) Seitenbreite: überall dieselbe Spalte ──────────────────────────── */
html body .wrap, html body .container { max-width:1040px; margin-left:auto; margin-right:auto; }

/* ── 4) Karten und Kästen ──────────────────────────────────────────────── */
html body .widget, html body .card, html body .stat-card, html body .info-box, html body .section, html body .panel {
  background:#151E30; border-color:#24304A; border-radius:16px; box-shadow:none;
}
html body .widget-head { background:transparent; border-color:#24304A; color:#F1F5F9; }
html body .widget-body { background:transparent; }
html body .stat-box, html body .feed-item { background:#1C2740; border-color:#24304A; border-radius:12px; box-shadow:none; }
html body .page-header, html body .hero { border-radius:16px; box-shadow:none; }
html body .flash, html body .alert, html body .msg, html body .hinweis, html body .err { border-radius:12px; }
html body .empty-state, html body .empty { color:#9AA7BD; }

/* ── 5) Knöpfe: gleiche Form, EINE grüne Hauptaktion ───────────────────── */
html body .btn, html body .btn-primary, html body .btn-ghost, html body .btn-secondary, html body .btn-danger {
  border-radius:12px; font-weight:700; box-shadow:none; text-shadow:none; letter-spacing:0; text-transform:none;
}
html body .btn-primary { background:#22C55E; background-image:none; color:#06200F; border-color:#22C55E; }
html body .btn-primary:hover { background:#4ADE80; }
html body .btn-ghost, html body .btn-secondary, html body .btn.secondary {
  background:transparent; background-image:none; color:#F1F5F9; border:1px solid #3A4963;
}
html body .btn-danger { background:transparent; background-image:none; color:#F87171; border:1px solid #F87171; }
html body .btn:disabled, html body .btn-primary:disabled, html body button:disabled { opacity:.5; cursor:not-allowed; }

/* ── 6) Reiter, Abzeichen, Eingabefelder ───────────────────────────────── */
html body .tab.active, html body .tab-btn.active, html body .tabs .active { color:#4ADE80; border-color:#4ADE80; }
html body .badge, html body .chip, html body .pill, html body .tag, html body .status-badge { border-radius:999px; box-shadow:none; }
html body .form-input,
html body input[type="text"], html body input[type="number"], html body input[type="email"], html body input[type="password"],
html body input[type="search"], html body select, html body textarea {
  background:#0F1829; color:#F1F5F9; border:1px solid #24304A; border-radius:10px;
}
html body .progress, html body .progress-bar { border-radius:999px; }

/* Tabellenköpfe: auf einigen Seiten (z. B. Spielerliste) waren sie fast weiß — auf dunklem Grund ein Fremdkörper */
html body table thead th, html body table th { background-color:#1C2740; color:#9AA7BD; border-color:#24304A; }
html body table td { border-color:#24304A; }

/* ── 7) Bedienbarkeit ──────────────────────────────────────────────────── */
html body a:focus-visible, html body button:focus-visible, html body input:focus-visible,
html body select:focus-visible, html body textarea:focus-visible, html body summary:focus-visible {
  outline:3px solid #FBBF24; outline-offset:2px;
}

/* ── 8) Handy (27.11.2026, nach dem Durchklicken von 66 Seiten in 390 px Breite) ──
   Vier Dinge ragten am Handy über den Rand oder wurden abgeschnitten. */
@media (max-width:700px) {
  /* Benachrichtigungen: Text und Knöpfe standen nebeneinander, "Gelesen" und "Löschen"
     waren abgeschnitten. Jetzt stehen die Knöpfe unter dem Text. */
  html body .notification { flex-direction:column; align-items:stretch; gap:10px; }
  html body .notification-actions { align-items:stretch; width:100%; }
  html body .action-buttons { flex-wrap:wrap; }
  html body .action-buttons > * { flex:1 1 auto; text-align:center; }

  /* Tabellen: etwas kleinere Schrift und engere Zellen, damit die letzte Spalte
     (z. B. Punkte in der Liga) nicht mehr abgeschnitten wird */
  html body table { font-size:.82rem; }
  html body table th, html body table td { padding-left:4px; padding-right:4px; }

  /* 27.11.2026, Marcos Bildschirmfoto: Hier stand "overflow-wrap:anywhere" für die ganze Seite.
     In Tabellen zerlegte das Namen in einzelne Buchstaben untereinander ("D-u-k-e ..."), weil
     die Spalte beliebig schmal werden durfte. Jetzt brechen Wörter in Tabellen nur noch an
     Leerzeichen, Spaltenköpfe gar nicht — nur Fließtext darf lange Wörter umbrechen. */
  html body p, html body li { overflow-wrap:break-word; }
  html body table, html body table td, html body table th { overflow-wrap:normal; word-break:normal; hyphens:none; }
  html body table th { white-space:nowrap; }
  /* Zellen dürfen an Leerzeichen umbrechen (z. B. "Sa 21.11. / um 20:00 Uhr") — sonst ist die
     Tabelle breiter als das Handy und die letzten Spalten (Legs, Punkte) sind abgeschnitten */
  html body table td { white-space:normal; }
  /* Bleibt eine Tabelle trotzdem breiter als das Handy (manche Seiten verbieten den Umbruch
     selbst), lässt sie sich seitlich wischen statt abgeschnitten zu werden. Gewischt wird im
     umgebenden Kasten, die Tabelle selbst behält ihre Spalten. */
  html body :has(> table) { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  html body img, html body video { max-width:100%; height:auto; }

  /* Reiterzeilen der Seiten selbst dürfen umbrechen */
  html body .tabs { flex-wrap:wrap; }
}
