* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #F3F6F2;
  color: #1E3A5F;
}
h1, h2, h3, .brand-name, .font-display {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

a { color: inherit; text-decoration: none; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--farbe-primaer);
  color: #fff;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
}
.brand { margin-bottom: 28px; }
.brand-logo { max-width: 100%; max-height: 56px; margin-bottom: 8px; }
.brand-name { font-size: 1.2rem; color: var(--farbe-akzent); }

.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a { padding: 9px 10px; border-radius: 6px; font-size: 0.9rem; font-weight: 500; color: #DCE6F5; }
.sidebar nav a.active, .sidebar nav a:hover { background: rgba(255,255,255,0.08); color: var(--farbe-akzent); }

.user-box { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.85rem; }
.user-name { font-weight: 600; }
.user-role { color: #B7C6E6; margin-bottom: 8px; }
.logout-link { display: inline-block; color: #CFE0DB; font-size: 0.85rem; }

.content { flex: 1; padding: 32px; max-width: 960px; }

.card { background: #fff; border: 1px solid #E1E7DF; border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.card-dark { background: var(--farbe-primaer); color: #fff; border-radius: 10px; padding: 20px; margin-bottom: 24px; }

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--farbe-primaer); color: #fff;
  border: none; border-radius: 6px; padding: 9px 14px;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.btn-ghost { background: transparent; border: 1px solid #E1E7DF; color: #1E3A5F; }
.btn-danger { background: transparent; border: 1px solid #B4443B55; color: #B4443B; }
.btn:hover { filter: brightness(0.95); }

.badge { display: inline-flex; padding: 3px 9px; border-radius: 5px; font-size: 0.78rem; font-weight: 600; background: #6F95CF1A; color: #1E3A5F; }

input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #E1E7DF; border-radius: 6px;
  font-family: inherit; font-size: 0.9rem; margin-bottom: 12px;
}
label { display: block; font-size: 0.8rem; color: #5C7A73; margin-bottom: 4px; font-weight: 500; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #E1E7DF; }
th { color: #5C7A73; font-weight: 600; background: #F3F6F2; }

.player-card {
  display: block; background: #fff; border: 1px solid #E1E7DF; border-radius: 10px;
  padding: 16px; text-decoration: none; color: inherit;
}
.player-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.06); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid #E1E7DF; margin-bottom: 20px; }
.tabs a { padding: 10px 14px; font-size: 0.9rem; font-weight: 500; border-bottom: 2px solid transparent; color: #5C7A73; }
.tabs a.active { border-color: var(--farbe-primaer); color: #1E3A5F; }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid #E1E7DF; margin-left: 8px; }
.timeline li { margin-left: 22px; margin-bottom: 20px; position: relative; }
.timeline .dot { position: absolute; left: -30px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #E1E7DF; border: 2px solid #fff; }
.timeline .dot.current { background: var(--farbe-primaer); }
.timeline .entry { background: #fff; border: 1px solid #E1E7DF; border-radius: 8px; padding: 10px 12px; }
.timeline .entry.current { background: #EAF1FB; }

.note { background: #fff; border: 1px solid #E1E7DF; border-radius: 8px; padding: 12px; margin-bottom: 10px; border-left-width: 4px; border-left-style: solid; }

.muted { color: #5C7A73; }
.small { font-size: 0.82rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.error { color: #B4443B; font-size: 0.88rem; margin-bottom: 10px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1E3A5F; color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 0.88rem; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #6F95CF; padding: 20px; }
.login-box { width: 100%; max-width: 480px; }
.login-title { text-align: center; color: #fff; font-size: 1.8rem; margin-bottom: 4px; }
.login-sub { text-align: center; color: #EAF0FB; font-size: 0.9rem; margin-bottom: 24px; }
.login-card { background: #fff; border-radius: 10px; padding: 24px; }

/* Live-Spielstatistik */
.score-header { display:flex; align-items:center; justify-content:center; gap:20px; padding:20px; border-radius:10px; background:var(--farbe-primaer); color:#fff; margin-bottom:20px; }
.score-header .zahl { font-family:'Oswald',sans-serif; font-size:2.4rem; color:var(--farbe-akzent); line-height:1; }
.score-header .vs { font-size:0.85rem; color:#EAF0FB; text-align:center; }
.player-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap:12px; }
.player-tile { background:#fff; border:1px solid #E1E7DF; border-radius:10px; padding:12px; }
.player-tile .pname { font-weight:600; margin-bottom:8px; display:flex; align-items:center; gap:6px; justify-content:space-between; }
.stat-row { display:flex; align-items:center; justify-content:space-between; padding:6px 0; border-top:1px solid #F0F2EE; }
.stat-row:first-of-type { border-top:none; }
.stat-label { font-size:0.82rem; color:#5C7A73; flex:1; }
.stat-controls { display:flex; align-items:center; gap:8px; }
.tap-btn { width:40px; height:40px; border-radius:8px; border:none; font-size:1.2rem; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.tap-plus { background:var(--farbe-primaer); color:#fff; }
.tap-minus { background:#F0F2EE; color:#5C7A73; }
.stat-count { min-width:22px; text-align:center; font-family:'Oswald',sans-serif; font-size:1.1rem; }
@media (max-width: 600px) {
  .content { padding: 16px; }
  .tap-btn { width:46px; height:46px; }
}
