/* Coaching Zone — Spvgg. Sterkrade-Nord 1920/25 e.V.
 * Design-System: Schwarz / Vereinsblau / Weiß, Inter-Typografie, dezente Tiefen.
 */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Backgrounds — layered */
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f1f5f9;

  /* Borders */
  --border: #e5e7eb;
  --border-strong: #cbd5e1;
  --border-subtle: #f1f5f9;

  /* Text */
  --text: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  /* Primary — Vereinsblau */
  --primary: #1e5cb3;
  --primary-hover: #174a99;
  --primary-light: #eff6ff;
  --primary-soft: #dbeafe;

  /* Akzent — Electric Blue (dosierte Highlights) */
  --accent: #0ea5e9;
  --accent-bright: #38bdf8;
  --accent-soft: #e0f2fe;
  --accent-gradient: linear-gradient(90deg, #0ea5e9, #38bdf8);

  /* Marineblau — dunkle Flächen (Nav, Hero) */
  --navy: #0b1220;
  --navy-2: #0e1830;
  --navy-3: #16203a;
  --navy-border: #24304f;

  /* Nav */
  --nav-bg: #0b1220;
  --nav-bg-gradient: linear-gradient(100deg, #0b1220 0%, #0e1830 100%);
  --nav-text: #ffffff;
  --nav-text-muted: #9db4e0;
  --nav-border: #1d3a6e;

  /* States */
  --success: #15803d;
  --success-bg: #dcfce7;
  --warning: #92400e;
  --warning-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --info: #1d4ed8;
  --info-bg: #dbeafe;

  /* Stars */
  --star-on: #eab308;
  --star-off: #d1d5db;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.04);
  --shadow: 0 1px 3px 0 rgb(15 23 42 / 0.08), 0 1px 2px -1px rgb(15 23 42 / 0.05);
  --shadow-md: 0 4px 8px -2px rgb(15 23 42 / 0.08), 0 2px 4px -2px rgb(15 23 42 / 0.04);
  --shadow-lg: 0 10px 20px -5px rgb(15 23 42 / 0.1), 0 4px 8px -4px rgb(15 23 42 / 0.05);
  --shadow-xl: 0 20px 30px -8px rgb(15 23 42 / 0.12), 0 8px 12px -6px rgb(15 23 42 / 0.06);

  /* Radii */
  --r-sm: 6px;
  --r: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Transitions */
  --t-fast: .12s ease;
  --t: .18s ease;

  /* Redesign 2026-06: großzügige Radien + gedämpfte Semantik */
  --r-card: 24px;
  --r-tile: 18px;
  --good: #2f7d4f; --good-bg: #e9f4ec;
  --bad-2: #c0473e; --bad-bg-2: #fbecea;
  --gold-2: #b78521; --gold-bg-2: #f9f1dd;
  --mid: #9a6b14; --mid-bg: #f6efe0;
  --av-bg: #e9edf3; --av-fg: #475569;

  /* Layout */
  --sidebar-w: 220px;
}

/* ===== Dark Mode ===== */
html[data-theme="dark"] {
  --bg: #000000;
  --surface: #111111;
  --surface-2: #1a1a1a;
  --surface-3: #222222;

  --border: #2a2a2a;
  --border-strong: #3a3a3a;
  --border-subtle: #1e1e1e;

  --text: #e8e8e8;
  --text-muted: #999999;
  --text-faint: #666666;

  --primary-light: #111827;
  --primary-soft: #172035;

  --accent-soft: #0c2d3f;

  --navy: #000000;
  --navy-2: #0a0a0a;
  --navy-3: #141414;
  --navy-border: #2a2a2a;

  --nav-bg: #000000;
  --nav-bg-gradient: linear-gradient(100deg, #000000 0%, #0a0a0a 100%);
  --nav-text: #e8e8e8;
  --nav-text-muted: #888888;
  --nav-border: #222222;

  --success-bg: #0d2818;
  --warning-bg: #2a1a00;
  --danger-bg: #2a0e0e;
  --info-bg: #0e1a2e;

  --good-bg: #0d2818;
  --bad-bg-2: #2a0e0e;
  --gold-bg-2: #2a1a00;
  --mid-bg: #231a0a;
  --av-bg: #1a1a1e; --av-fg: #999999;

  --star-off: #3a3a3a;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 8px -2px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 20px -5px rgb(0 0 0 / 0.5), 0 4px 8px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 30px -8px rgb(0 0 0 / 0.5), 0 8px 12px -6px rgb(0 0 0 / 0.3);

  color-scheme: dark;
}
html[data-theme="dark"] .modal-overlay { background: rgb(0 0 0 / 0.7); }
html[data-theme="dark"] .nav-more-menu { background: #111111; border-color: #2a2a2a; }
html[data-theme="dark"] .bell-menu { background: #111111; }
html[data-theme="dark"] .nav-logout { border-color: #2a2a2a; }
html[data-theme="dark"] .nav-logout:hover { border-color: #3a3a3a; }
html[data-theme="dark"] img { opacity: .92; }
html[data-theme="dark"] .status-Kontakt-aufgenommen { background: #0e1a2e; color: #5b8def; }
html[data-theme="dark"] .status-In-Verhandlung { background: #2a1a00; color: #d4a03a; }
html[data-theme="dark"] .status-Pausiert { background: #1e0e2e; color: #b47de8; }

/* Audit-Action-Badges im Dark Mode */
html[data-theme="dark"] .action-USER_CREATED,
html[data-theme="dark"] .action-USER_UPDATED,
html[data-theme="dark"] .action-USER_PASSWORD_RESET,
html[data-theme="dark"] .action-USER_DEACTIVATED,
html[data-theme="dark"] .action-USER_REACTIVATED { background: #0e1a2e; color: #5b8def; }
html[data-theme="dark"] .action-CSV_IMPORTED,
html[data-theme="dark"] .action-SAISON_CLONED { background: #2a1a00; color: #d4a03a; }
html[data-theme="dark"] .action-FILE_UPLOADED,
html[data-theme="dark"] .action-FILE_DELETED { background: #1e0e2e; color: #b47de8; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Figtree', system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main, .container { flex: 1 0 auto; }

/* ===== Navigation ===== */
nav {
  background: var(--nav-bg-gradient);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--nav-border);
  position: relative;
  box-shadow: 0 1px 0 0 rgb(0 0 0 / 0.4), 0 4px 14px -2px rgb(0 0 0 / 0.15);
}
nav .nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--r-sm);
  padding: 4px 6px;
  margin: -4px -6px;
  transition: opacity var(--t-fast);
  margin-right: auto;
  min-width: 0;
}
nav .nav-brand:hover { opacity: .85; }
nav img { height: 38px; width: auto; }
nav h1 {
  font-size: 1.05rem;
  color: var(--nav-text);
  font-weight: 700;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
  letter-spacing: -.01em;
}
nav h1 .nav-subtitle {
  font-size: .7rem;
  color: var(--nav-text-muted);
  font-weight: 400;
  margin-top: 3px;
  letter-spacing: .02em;
}

.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: flex-end; flex-wrap: wrap; }
.nav-links a {
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
  position: relative;
}
.nav-links a:hover { color: var(--nav-text); background: rgb(255 255 255 / 0.06); }
.nav-links a.current {
  color: var(--nav-text);
  background: rgb(14 165 233 / 0.16);
}
.nav-links a.current::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px;
  bottom: 1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-logout {
  background: transparent;
  border: 1px solid #2a2a3a;
  color: var(--nav-text-muted);
  padding: 6px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  font-family: inherit;
  transition: all var(--t-fast);
}
.nav-logout:hover { background: rgb(255 255 255 / 0.08); color: var(--nav-text); border-color: #3a3a4a; }

/* "Mehr"-Dropdown */
.nav-more { position: relative; }
.nav-more-btn {
  background: transparent;
  border: 1px solid #2a2a3a;
  color: var(--nav-text-muted);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  font-family: inherit;
  transition: all var(--t-fast);
}
.nav-more-btn:hover { background: rgb(255 255 255 / 0.08); color: var(--nav-text); border-color: #3a3a4a; }
.nav-more-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0e0e1f;
  border: 1px solid #1f1f2e;
  border-radius: var(--r);
  padding: 6px;
  min-width: 220px;
  z-index: 110;
  box-shadow: var(--shadow-xl);
}
.nav-more-menu.open { display: flex; flex-direction: column; gap: 1px; }
.nav-more-menu a {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: all var(--t-fast);
}
.nav-more-menu a:hover { background: rgb(255 255 255 / 0.08); color: var(--nav-text); }
.nav-more-menu a.current { color: var(--primary); background: rgb(30 92 179 / 0.15); }

.nav-burger { display: none; background: transparent; border: none; color: var(--nav-text); font-size: 1.5rem; cursor: pointer; padding: 4px 10px; line-height: 1; }
.nav-drawer, .nav-overlay { display: none; }

/* ===== Container ===== */
.container { padding: 18px 24px; max-width: none; margin: 0 auto; width: 100%; }
.page-title { font-size: 1.5rem; color: var(--text); margin-bottom: 22px; font-weight: 700; letter-spacing: -.01em; }

/* ===== Buttons ===== */
.btn {
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.2;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px 0 rgb(30 92 179 / 0.2); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 2px 6px -1px rgb(30 92 179 / 0.35); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #991b1b; }
.btn-scout { background: #d97706; color: #fff; font-weight: 700; box-shadow: 0 2px 8px -2px rgba(217,119,6,.4); }
.btn-scout:hover { background: #b45309; box-shadow: 0 4px 12px -2px rgba(217,119,6,.5); transform: translateY(-1px); }

/* Datum-Sortier-Schalter in Tagebuch-Sektionsköpfen (team.html + tagebuch.html) */
.je-sort { display: inline-flex; align-items: center; gap: 4px; background: none; border: 1px solid var(--border); color: var(--text-muted); font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 8px; cursor: pointer; transition: all .15s; }
.je-sort:hover { border-color: var(--primary); color: var(--primary); }
.je-sort .arr { font-size: .7rem; }
.btn-sm { padding: 5px 12px; font-size: .82rem; border-radius: var(--r); }

/* ===== Form Controls ===== */
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* App-weit: Textfelder volle Breite, vernünftige Höhe, vertikal anpassbar */
textarea { width: 100%; box-sizing: border-box; min-height: 112px; line-height: 1.5; resize: vertical; }

.filter-bar select, .filter-bar input:not([type=checkbox]):not([type=file]),
.modal input:not([type=checkbox]):not([type=file]), .modal select, .modal textarea,
.form-row input:not([type=checkbox]):not([type=file]), .form-row select,
.field select, .field input:not([type=checkbox]):not([type=file]), .field textarea {
  padding: 9px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text);
  font-size: .9rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.filter-bar input:not([type=checkbox]):not([type=file]) { width: 220px; }
.filter-bar input:not([type=checkbox]):not([type=file]):focus,
.filter-bar select:focus,
.modal input:not([type=checkbox]):not([type=file]):focus, .modal select:focus, .modal textarea:focus,
.form-row input:not([type=checkbox]):not([type=file]):focus, .form-row select:focus,
.field select:focus, .field input:not([type=checkbox]):not([type=file]):focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(14 165 233 / 0.18);
}
.filter-bar input[type=checkbox], .modal input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.filter-bar label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-muted); font-size: .85rem; line-height: 1; font-weight: 500; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; align-items: center; }

/* ===== Tables ===== */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  letter-spacing: .04em;
}
th.sortable { cursor: pointer; user-select: none; transition: color var(--t-fast); }
th.sortable:hover { color: var(--text); }
th.sortable.active { color: var(--accent); box-shadow: inset 0 -2px 0 0 var(--accent); }
.sort-ind { font-size: .68rem; margin-left: 4px; opacity: .85; }
td { padding: 11px 14px; border-bottom: 1px solid var(--border-subtle); font-size: .9rem; color: var(--text); }
tr:last-child td { border-bottom: none; }
tbody tr { cursor: pointer; transition: background var(--t-fast); }
tbody tr:nth-child(even) td { background: var(--surface-3); }
tbody tr:hover td { background: var(--accent-soft); }

/* ===== Badges ===== */
.badge { padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.4; display: inline-block; }
.badge-aktiv { background: var(--success-bg); color: var(--success); }
.badge-inaktiv { background: var(--warning-bg); color: var(--warning); }
.badge-akzent { background: var(--accent-soft); color: var(--accent); }

.link { color: var(--accent); cursor: pointer; text-decoration: none; font-weight: 500; transition: color var(--t-fast); }
.link:hover { color: var(--accent-bright); text-decoration: underline; }

/* ===== Cards ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 22px; box-shadow: var(--shadow-sm); position: relative; }
.card h3 { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 16px; letter-spacing: .05em; font-weight: 600; }

/* ===== Field group ===== */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .8rem; color: var(--text-muted); margin-bottom: 5px; font-weight: 500; }
.field .val { font-size: .95rem; color: var(--text); }
.field textarea { resize: vertical; width: 100%; }

/* ===== Modal ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgb(15 23 42 / 0.5); backdrop-filter: blur(2px); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; animation: fadeIn .15s ease; }
.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px;
  width: 440px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  animation: modalIn .2s ease;
}
.modal h2 { margin-bottom: 18px; color: var(--text); font-size: 1.1rem; font-weight: 700; }
.modal label { display: block; font-size: .8rem; color: var(--text-muted); margin: 12px 0 5px; font-weight: 500; }
.modal input, .modal select { width: 100%; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; justify-content: flex-end; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ===== Stars (rating) ===== */
.stars { display: flex; gap: 3px; cursor: pointer; }
.star {
  font-size: 1.4rem;
  color: var(--star-off);
  transition: color var(--t-fast), transform var(--t-fast);
  padding: 2px;
  user-select: none;
}
.star.on, .star:hover { color: var(--star-on); }
.star:active { transform: scale(1.25); }
.rating-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rating-row .rl { font-size: .9rem; width: 160px; color: var(--text); font-weight: 500; }

/* ===== Avatar ===== */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: -.02em;
  text-transform: uppercase;
  width: 32px; height: 32px;
  font-size: .75rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.1);
}
.avatar-sm { width: 24px; height: 24px; font-size: .65rem; }
.avatar-lg { width: 40px; height: 40px; font-size: .9rem; }

/* ===== Empty State ===== */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; text-align: center; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; color: var(--text-faint); }
.empty-state p { font-size: .9rem; font-style: italic; }

/* ===== Page Hero (alle Seiten) ===== */
.page-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.page-hero-crest { height: 42px; width: auto; flex-shrink: 0; }
.page-hero-text { min-width: 0; }
.page-hero-text h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
  line-height: 1.15;
}
.page-hero-ctx {
  margin-left: auto;
  font-size: .78rem;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--primary-soft);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .page-hero { padding: 14px 16px; gap: 12px; border-radius: var(--r-md); }
  .page-hero-crest { height: 34px; }
  .page-hero-text h1 { font-size: 1.15rem; }
  .page-hero-ctx { margin-left: auto; font-size: .7rem; padding: 5px 10px; }
}
@media (max-width: 480px) {
  .page-hero { flex-wrap: wrap; }
  .page-hero-ctx { margin-left: 54px; }
}

/* ===== Footer ===== */
.cz-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: .8rem;
  margin-top: 40px;
  background: var(--surface);
}
.cz-footer strong { color: var(--text-muted); font-weight: 600; }

/* ===== Mobile Responsiveness ===== */
@media (max-width: 768px) {
  .container { padding: 18px 14px; max-width: 100%; }
  .page-title { font-size: 1.3rem; margin-bottom: 16px; }

  /* Nav: kompakter, heller Header — Hamburger ersetzt Top-Links */
  nav { padding: 12px 16px; gap: 10px; flex-wrap: nowrap; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
  nav img { height: 32px; }
  nav h1 { font-size: 1rem; flex: 1 1 auto; min-width: 0; color: var(--text); }
  nav h1 .nav-subtitle { font-size: .65rem; color: var(--text-muted); }
  .nav-links, .nav-logout { display: none; }
  .nav-burger { display: block; color: var(--text); }
  .nav-bell-btn { color: var(--text-muted); }

  /* Drawer von rechts */
  .nav-drawer {
    display: flex; flex-direction: column; gap: 6px;
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 290px; max-width: 85vw;
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 20px 18px;
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 200;
    box-shadow: -8px 0 24px -8px rgb(15 23 42 / 0.25);
  }
  .nav-drawer.open { transform: translateX(0); }
  .nav-drawer a {
    color: var(--text-muted);
    padding: 12px 14px;
    border-radius: 11px;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
    transition: all var(--t-fast);
  }
  .nav-drawer a:hover { background: var(--surface-3); color: var(--text); }
  .nav-drawer a.current {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
  }
  .nav-drawer-close {
    align-self: flex-end;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 10px;
  }
  .nav-drawer-links { display: flex; flex-direction: column; gap: 4px; flex: 1; margin-top: 8px; }

  .nav-overlay { display: block; position: fixed; inset: 0; background: rgb(15 23 42 / 0.5); backdrop-filter: blur(2px); z-index: 150; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .nav-overlay.open { opacity: 1; pointer-events: auto; }

  /* Filterleiste stapelt vertikal */
  .filter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .filter-bar select, .filter-bar input:not([type=checkbox]):not([type=file]) { width: 100%; }
  .filter-bar > .btn, .filter-bar > button { width: 100%; }

  /* Tabellen scrollen horizontal */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; max-width: 100%; }
  th, td { padding: 9px 11px; font-size: .85rem; }

  /* Spielertabelle → Karten auf Mobil */
  #spielerTable { border: none; box-shadow: none; background: transparent; white-space: normal; overflow: visible; }
  #spielerTable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #spielerTable tbody { display: flex; flex-direction: column; gap: 12px; }
  #spielerTable tr {
    display: block; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-md);
    box-shadow: var(--shadow-sm); padding: 12px 14px 12px 40px; position: relative;
  }
  #spielerTable td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: none; font-size: .9rem; }
  #spielerTable td[data-label]::before {
    content: attr(data-label); color: var(--text-muted);
    font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
  }
  #spielerTable td.col-select { position: absolute; left: 12px; top: 12px; padding: 0; }
  #spielerTable td.col-select::before { content: none; }
  #spielerTable td.col-action { justify-content: flex-end; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--border-subtle); }
  #spielerTable td.col-action::before { content: none; }
  /* Mobile Karten: ganze Karte streifen statt nur die Zellen */
  #spielerTable tr:nth-child(even) { background: var(--surface-3); }
  #spielerTable tr:nth-child(even) td { background: transparent; }
  #spielerTable tr:hover { background: var(--accent-soft); }
  #spielerTable tr:hover td { background: transparent; }

  /* Modal füllt sich besser aus */
  .modal { width: calc(100vw - 28px); max-width: 500px; padding: 22px; }

  /* Buttons fingerfreundlich (44px Touch-Target Apple HIG) */
  .btn { min-height: 44px; padding: 10px 16px; }
  .btn-sm { min-height: 32px; padding: 6px 12px; font-size: .8rem; }

  /* Sterne größer für Touch */
  .star { font-size: 1.7rem; padding: 4px; }
  .rating-row { gap: 10px; }
  .rating-row .rl { width: 130px; font-size: .85rem; }

  .card { padding: 18px; }
  .sort-ind { font-size: .65rem; }
}

@media (max-width: 480px) {
  nav h1 .nav-subtitle { display: none; }
  nav a { font-size: .8rem; }
  table { font-size: .8rem; }
  .container { padding: 14px 12px; }
}

/* ===== Nav-User-Anzeige ===== */
.nav-user { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--text-muted); }
.nav-ico { width: 18px; height: 18px; display: block; }
.nav-user-name { font-weight: 600; color: var(--text); }
.role-badge { font-size: .72rem; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.role-badge.role-admin { background: var(--primary); color: #fff; }
.role-badge.role-trainer { background: var(--border); color: var(--text-muted); }
.role-badge.role-scout { background: var(--accent); color: #fff; }
.nav-drawer .nav-user { margin: 4px 0 12px; }

/* Rollen-Dropdown in der Nutzerliste */
.role-select { padding: 5px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--text); font-size: .85rem; font-family: inherit; cursor: pointer; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.role-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(14 165 233 / 0.18); }
.role-select:disabled { opacity: .5; cursor: progress; }

/* ===== Benachrichtigungs-Glocke ===== */
.nav-bell { position: relative; }
.nav-bell-btn { background: transparent; border: none; color: var(--nav-text); font-size: 1.15rem; cursor: pointer; padding: 4px 8px; line-height: 1; position: relative; }
.bell-badge { position: absolute; top: -3px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .65rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; box-shadow: 0 0 0 2px var(--nav-bg); }
.bell-badge[hidden] { display: none; }
.bell-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-width: 90vw; background: #0e0e1f; border: 1px solid var(--navy-border); border-radius: var(--r); box-shadow: var(--shadow-xl); z-index: 120; overflow: hidden; }
.bell-menu.open { display: block; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--navy-border); color: var(--nav-text); font-size: .82rem; font-weight: 600; }
.bell-allread { background: transparent; border: none; color: var(--accent-bright); font-size: .76rem; cursor: pointer; font-family: inherit; }
.bell-list { max-height: 360px; overflow-y: auto; }
.bell-item { padding: 10px 12px; border-bottom: 1px solid var(--navy-border); cursor: pointer; transition: background var(--t-fast); }
.bell-item:last-child { border-bottom: none; }
.bell-item:hover { background: rgb(255 255 255 / 0.06); }
.bell-item.unread { background: rgb(14 165 233 / 0.10); }
.bell-text { color: var(--nav-text); font-size: .86rem; line-height: 1.35; }
.bell-time { color: var(--nav-text-muted); font-size: .72rem; margin-top: 3px; }
.bell-empty { padding: 18px 12px; text-align: center; color: var(--nav-text-muted); font-size: .85rem; }
@media (max-width: 768px) { .bell-menu { position: fixed; top: 56px; right: 8px; left: 8px; width: auto; } }

/* ===== Scouting-Status-Farben (zentral, von Scouting-Seiten + Dashboard genutzt) ===== */
.status-Neu { background: var(--accent-soft); color: var(--accent); }
.status-Beobachten { background: var(--surface-3); color: var(--text-muted); }
.status-Kontakt-aufgenommen { background: #dbeafe; color: #1d4ed8; }
.status-In-Verhandlung { background: #fef3c7; color: #b45309; }
.status-Verpflichtet { background: var(--success-bg); color: var(--success); }
.status-Abgesagt { background: var(--danger-bg); color: var(--danger); }
.status-Pausiert { background: #f3e8ff; color: #6b21a8; }

/* ===== Desktop-Seitenleiste (Navigation links) ===== */
.app-sidebar { display: none; }

@media (min-width: 769px) {
  .app-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 90;
    overflow-y: auto;
  }
  .sidebar-brand {
    display: flex; align-items: center; gap: 11px;
    padding: 16px 14px;
    border-bottom: 1px solid var(--border-subtle);
    text-decoration: none;
  }
  .sidebar-brand img { height: 38px; width: auto; flex-shrink: 0; }
  .sidebar-brand span {
    color: var(--text); font-weight: 700; font-size: .95rem; line-height: 1.15;
    display: flex; flex-direction: column; letter-spacing: -.01em;
  }
  .sidebar-brand small {
    color: var(--text-muted); font-weight: 500; font-size: .62rem; margin-top: 3px;
  }
  .sidebar-links { display: flex; flex-direction: column; padding: 8px; gap: 3px; }
  .sidebar-link {
    display: flex; align-items: center; gap: 11px;
    color: var(--text-muted); text-decoration: none;
    font-size: .9rem; font-weight: 500; padding: 9px 11px;
    border-radius: 11px;
    transition: color var(--t-fast), background var(--t-fast);
  }
  .sidebar-link svg { width: 18px; height: 18px; stroke-width: 1.9; flex-shrink: 0; }
  .sidebar-link:hover { color: var(--text); background: var(--surface-3); }
  .sidebar-link.current { background: var(--primary); color: #fff; font-weight: 600; }
  .sidebar-link.current svg { color: #fff; }

  /* Fuß: Abmelden + Meta (Version / Letzter Import) */
  .sidebar-foot { margin-top: auto; padding: 8px 8px 12px; }
  .sidebar-logout {
    width: 100%; padding: 9px; border: 1px solid var(--border);
    background: var(--surface); border-radius: 11px;
    color: var(--text-muted); font-family: inherit; font-size: .85rem;
    font-weight: 500; cursor: pointer;
  }
  .sidebar-logout:hover { background: var(--surface-3); color: var(--text); }
  .sidebar-meta {
    margin-top: 12px; padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    display: flex; flex-direction: column; gap: 2px; text-align: center;
  }
  .sidebar-meta .imp { font-size: .7rem; color: var(--text-muted); }
  .sidebar-meta .ver { font-size: .68rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }

  /* Obere Leiste schlank + hell, rechts neben der Sidebar */
  nav { margin-left: var(--sidebar-w); justify-content: flex-end; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: none; }
  nav .nav-brand, nav .nav-links, nav .nav-burger, .nav-logout { display: none; }
  .nav-bell-btn { color: var(--text-muted); }

  /* Inhalt rückt nach rechts und füllt die volle Breite neben der Sidebar */
  .container { width: auto; margin-left: var(--sidebar-w); margin-right: 0; }
  .cz-footer { display: none; }
}

/* Drawer-Fuß-Meta (mobil) */
.drawer-meta {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 2px; text-align: center;
}
.drawer-meta .imp { font-size: .7rem; color: var(--text-muted); }
.drawer-meta .ver { font-size: .68rem; color: var(--text-faint); }
/* Icons in Drawer-Links */
.nav-drawer-links a { display: flex; align-items: center; gap: 11px; }
.nav-drawer-links a svg { width: 18px; height: 18px; stroke-width: 1.9; flex-shrink: 0; }

/* ===== Globale Suche (Top-Bar) ===== */
.nav-search { position: relative; margin-right: auto; }
.nav-search-toggle { display: none; }
.nav-search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 7px 12px; width: 280px;
}
.nav-search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(14 165 233 / 0.15); }
.nav-search-ico { width: 16px; height: 16px; stroke: var(--text-faint); flex-shrink: 0; }
.nav-search-box input {
  border: none; background: transparent; outline: none; flex: 1;
  font-family: inherit; font-size: .88rem; color: var(--text); min-width: 0;
}
.nav-search-close { display: none; }
.nav-search-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  width: 380px; max-width: 80vw; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-md); padding: 6px; z-index: 60;
  max-height: 70vh; overflow-y: auto;
}
.nav-search.has-menu .nav-search-menu { display: block; }
.nav-search-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; padding: 10px 10px 4px; }
.nav-search-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--text); }
.nav-search-item:hover { background: var(--surface-3); }
.nav-search-item .avatar { width: 32px; height: 32px; font-size: .72rem; flex-shrink: 0; }
.nav-search-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nav-search-info b { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-search-info span { font-size: .76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-search-item.inaktiv { opacity: .55; }
.nav-search-tag { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); background: var(--surface-3); border: 1px solid var(--border); padding: 2px 7px; border-radius: 999px; flex-shrink: 0; }
.nav-search-item .status-badge { flex-shrink: 0; }
.nav-search-hint { padding: 14px; text-align: center; color: var(--text-muted); font-size: .85rem; }

@media (max-width: 768px) {
  .nav-search { position: static; margin-right: 0; }
  .nav-search-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-muted); cursor: pointer; padding: 0;
  }
  .nav-search-toggle svg { width: 18px; height: 18px; }
  .nav-search-box { display: none; }
  .nav-search.open .nav-search-box {
    display: flex; position: fixed; top: 0; left: 0; right: 0; width: auto;
    z-index: 70; border-radius: 0; border-left: none; border-right: none;
    border-top: none; padding: 12px 14px; background: var(--surface);
  }
  .nav-search.open .nav-search-close {
    display: block; background: none; border: none; font-size: 1.1rem;
    color: var(--text-muted); cursor: pointer; padding: 4px 8px; line-height: 1;
  }
  .nav-search.has-menu .nav-search-menu {
    position: fixed; top: 56px; left: 8px; right: 8px; width: auto; max-width: none;
  }
}

/* ===== Einklappbare Sidebar (Desktop) ===== */
@media (min-width: 769px) {
  body.sidebar-collapsed { --sidebar-w: 68px; }
  .app-sidebar { transition: width .2s ease; }
  .container, nav { transition: margin-left .2s ease; }

  /* Schwebender Ein-/Ausklapp-Button auf der rechten Kante (Paperless-Stil) */
  .sidebar-toggle {
    position: fixed; top: 72px; left: calc(var(--sidebar-w) - 13px);
    z-index: 95;
    display: flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; padding: 0;
    border: 1px solid var(--border); background: var(--surface);
    border-radius: 8px; color: var(--text-muted);
    cursor: pointer; font-family: inherit;
    box-shadow: var(--shadow-sm);
    transition: left .2s ease, color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  }
  .sidebar-toggle:hover { color: var(--text); background: var(--surface-3); box-shadow: var(--shadow); }
  .sidebar-toggle svg { width: 15px; height: 15px; flex-shrink: 0; transition: transform .2s ease; }
  .sidebar-logout { display: flex; align-items: center; justify-content: center; gap: 8px; }
  .sidebar-logout svg { width: 18px; height: 18px; flex-shrink: 0; }

  body.sidebar-collapsed .sidebar-brand { justify-content: center; }
  body.sidebar-collapsed .sidebar-link { justify-content: center; padding-left: 0; padding-right: 0; }
  body.sidebar-collapsed .sidebar-brand span,
  body.sidebar-collapsed .sidebar-link span,
  body.sidebar-collapsed .sidebar-logout span,
  body.sidebar-collapsed .sidebar-meta { display: none; }
  body.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
}

/* ===== Trainertagebuch (Mannschaftsseite + Tagebuch-Seite) ===== */
.journal-entry { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 12px; }
.je-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.je-type { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 9px; border-radius: 8px; }
.je-type.training { background: var(--accent-soft); color: var(--accent); }
.je-type.spiel { background: var(--primary-soft); color: var(--primary); }
.je-date { font-weight: 600; font-size: .9rem; }
.je-sub { color: var(--text-muted); font-size: .85rem; }
.je-actions { margin-left: auto; display: flex; gap: 6px; }
.je-notiz { font-size: .9rem; color: var(--text); white-space: pre-wrap; margin-top: 4px; }
.je-foot { font-size: .74rem; color: var(--text-faint); margin-top: 8px; }
.icon-btn { background: none; border: 1px solid var(--border); border-radius: 7px; padding: 4px 8px; font-size: .76rem; color: var(--text-muted); cursor: pointer; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.form-grid { display: grid; gap: 12px; }
.form-grid label { font-size: .8rem; color: var(--text-muted); display: block; margin-bottom: 4px; }
.seg-form { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; margin-bottom: 4px; }
.seg-form button { border: none; background: none; font-family: inherit; font-size: .84rem; font-weight: 600; color: var(--text-muted); padding: 6px 16px; border-radius: 7px; cursor: pointer; }
.seg-form button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ===== Dark-Mode-Toggle (Icon-Button neben Rollen-Badge) ===== */
.theme-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  background: transparent; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-muted);
  cursor: pointer; flex-shrink: 0;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.theme-icon-btn:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-strong); }
.theme-icon-btn svg { width: 16px; height: 16px; }
.theme-icon-btn svg.icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-btn svg.icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-btn svg.icon-sun { display: inline; }

.hidden { display:none !important; }

/* ===== Journal Rating Buttons ===== */
.jr-btns { display:inline-flex; gap:3px; }
.jr-btn { width:30px; height:28px; border:1px solid var(--border); border-radius:6px; background:var(--surface); color:var(--text-muted); font-weight:700; font-size:.82rem; cursor:pointer; transition:all .12s; font-family:inherit; }
.jr-btn:hover:not(:disabled) { border-color:var(--primary); color:var(--primary); }
.jr-btn.on { background:var(--primary); color:#fff; border-color:var(--primary); }
.jr-btn:disabled { opacity:.3; cursor:default; }
.jr-detail td { background:var(--surface-2); }
