/* ==========================================================
   lottjonn 2.0 – Stylesheet
   Farbschemata: jedes Schema setzt nur Hauptfarbe (--primary),
   Akzent (--accent) und Seitenhintergrund (--bg). Alle weiteren
   Töne werden daraus abgeleitet. Das Schema wählt jede/r Benutzer/in
   selbst (konto.php), es landet als data-theme auf <html>.
   ========================================================== */

:root {
  --text:          #1B2230;
  --text-muted:    #6E7582;
  --danger:        #B4483C;
  --success:       #2F7D50;
  --card:          #FFFFFF;

  --radius-lg:     20px;
  --radius-md:     14px;
  --radius-sm:     10px;
  --shadow-card:   0 1px 2px rgba(15, 32, 56, 0.06);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Grundfarben (Standard = "nacht") und daraus abgeleitete Töne. Steht auch
   auf jedem Element mit data-theme, damit z. B. die Vorschau-Kacheln auf der
   Farbschema-Seite ihre eigenen Farben berechnen. */
:root, [data-theme] {
  --primary:       #0B132B;
  --accent:        #39FF88;
  --bg:            #F2F4F7;
  --on-primary:    #FFFFFF;         /* Schrift auf der Hauptfarbe */
  --highlight:     var(--accent);   /* sichtbarer Akzent auf weißem Grund */
  --highlight-soft: var(--accent-soft);
  --on-highlight:  var(--on-accent);
  --card-soft:     #F8F9FB;
  --border:        #E3E6EB;

  --ink:            color-mix(in srgb, var(--primary) 55%, #0E1116);          /* Überschriften, dunkler Text */
  --primary-strong: color-mix(in srgb, var(--primary) 82%, #000);             /* Links, Fokus */
  --primary-soft:   color-mix(in srgb, var(--primary) 9%, #fff);              /* zarte Flächen */
  --accent-soft:    color-mix(in srgb, color-mix(in srgb, var(--accent) 38%, #fff) 94%, var(--primary));
  --on-accent:      var(--ink);
  --on-primary-muted: color-mix(in srgb, var(--on-primary) 72%, var(--primary));
  --eyebrow:        color-mix(in srgb, var(--accent) 35%, var(--ink));

  /* Alte Namen, die im Code noch verwendet werden */
  --navy-900:       var(--ink);
  --navy-800:       color-mix(in srgb, var(--ink) 88%, #fff);
  --navy-700:       var(--primary-strong);
  --blue-accent:    var(--primary-strong);
  --blue-accent-soft: var(--primary-soft);
  --gold:           var(--highlight);
  --gold-soft:      var(--highlight-soft);
}

/* Die sechs Farbschemata */
[data-theme="nacht"]   { --primary: #0B132B; --accent: #39FF88; --bg: #F2F4F7; }
[data-theme="wald"]    { --primary: #18251D; --accent: #B7FF72; --bg: #F2F4F1; }
[data-theme="orange"]  { --primary: #FF6115; --accent: #FFFCF4; --bg: #FFFCF4; --highlight: var(--primary); --highlight-soft: var(--primary-soft); --on-highlight: var(--on-primary); --card-soft: #FFFDF8; --border: #EFE6D8; }
[data-theme="violett"] { --primary: #7A35FF; --accent: #F0F2F5; --bg: #F0F2F5; --highlight: var(--primary); --highlight-soft: var(--primary-soft); --on-highlight: var(--on-primary); }
[data-theme="pflaume"] { --primary: #1A0B2E; --accent: #FFB7A5; --bg: #F4F2F5; }
[data-theme="schoko"]  { --primary: #6B352A; --accent: #FFF1A6; --bg: #F5F3EF; }

/* Weitere Farbschemata. L = zweite Farbe fast weiß → Hervorhebungen in der
   Hauptfarbe; P = helle Hauptfarbe → dunkle Schrift darauf; D = dunkle zweite
   Farbe → weiße Schrift darauf. */
[data-theme="signalrot"]  { --primary: #FF2E3A; --accent: #DBF6FF; --highlight: var(--primary); --highlight-soft: var(--primary-soft); --on-highlight: var(--on-primary); } /* Signalrot & Eisblau */
[data-theme="kobalt"]     { --primary: #0038FF; --accent: #D6E3FF; --highlight: var(--primary); --highlight-soft: var(--primary-soft); --on-highlight: var(--on-primary); } /* Kobalt & Himmel */
[data-theme="aubergine"]  { --primary: #2E0F35; --accent: #FF7FEC; } /* Aubergine & Pink */
[data-theme="mango"]      { --primary: #FF9030; --accent: #111827; --on-primary: #111827; --ink: color-mix(in srgb, var(--primary) 25%, #10131A); --primary-strong: var(--ink); --on-accent: #FFFFFF; --on-highlight: #FFFFFF; } /* Mango & Anthrazit */
[data-theme="schwarz"]    { --primary: #050505; --accent: #D7FFE0; --highlight: var(--primary); --highlight-soft: var(--primary-soft); --on-highlight: var(--on-primary); } /* Schwarz & Mint */
[data-theme="zitrone"]    { --primary: #1C2459; --accent: #F5FF67; } /* Mitternacht & Zitrone */
[data-theme="smaragd"]    { --primary: #075E46; --accent: #E8FFF2; --highlight: var(--primary); --highlight-soft: var(--primary-soft); --on-highlight: var(--on-primary); } /* Smaragd & Minze */
[data-theme="kuerbis"]    { --primary: #FC6C26; --accent: #FFF8DF; --highlight: var(--primary); --highlight-soft: var(--primary-soft); --on-highlight: var(--on-primary); } /* Kürbis & Vanille */
[data-theme="koralle"]    { --primary: #FF5C23; --accent: #C8F3FF; --highlight: var(--primary); --highlight-soft: var(--primary-soft); --on-highlight: var(--on-primary); } /* Koralle & Eis */
[data-theme="neongelb"]   { --primary: #EFFF4F; --accent: #10131A; --on-primary: #111827; --ink: color-mix(in srgb, var(--primary) 25%, #10131A); --primary-strong: var(--ink); --on-accent: #FFFFFF; --on-highlight: #FFFFFF; } /* Neongelb & Graphit */
[data-theme="bernstein"]  { --primary: #4B3FCF; --accent: #FFCE6B; } /* Indigo & Bernstein */
[data-theme="marine"]     { --primary: #071A52; --accent: #A7FF83; } /* Marine & Limette */
[data-theme="salbei"]     { --primary: #152D35; --accent: #D4ECDD; --highlight: var(--primary); --highlight-soft: var(--primary-soft); --on-highlight: var(--on-primary); } /* Petrol & Salbei */
[data-theme="tuerkis"]    { --primary: #6D28D9; --accent: #98E8DE; } /* Violett & Türkis */
[data-theme="kirsche"]    { --primary: #F62440; --accent: #FFFAF3; --highlight: var(--primary); --highlight-soft: var(--primary-soft); --on-highlight: var(--on-primary); } /* Kirschrot & Porzellan */
[data-theme="lavendel"]   { --primary: #0C134F; --accent: #D4ADFC; } /* Nachtblau & Lavendel */
[data-theme="ultramarin"] { --primary: #1B4EF5; --accent: #F7DCFF; --highlight: var(--primary); --highlight-soft: var(--primary-soft); --on-highlight: var(--on-primary); } /* Ultramarin & Rosé */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ---------- App shell ---------- */

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

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--primary);
  color: var(--on-primary-muted);
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 32px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark svg { width: 20px; height: 20px; }

.brand-name { font-size: 17px; font-weight: 700; color: var(--on-primary); line-height: 1.2; }
.brand-sub  { font-size: 10.5px; letter-spacing: 0.14em; color: var(--on-primary-muted); opacity: .8; text-transform: uppercase; }

.nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--on-primary-muted);
  font-weight: 500;
  font-size: 14.5px;
  transition: background .15s ease, color .15s ease;
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: var(--on-primary); }
.nav-item.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.nav-section { margin: 14px 14px 4px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--on-primary-muted); opacity: .8; }

.sidebar-footer { margin-top: auto; }

.logout-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--on-primary-muted);
  font-size: 14px;
  border-radius: 12px;
}
.logout-link:hover { color: var(--on-primary); background: rgba(255,255,255,0.08); }
.logout-link svg { width: 18px; height: 18px; }

.mobile-topbar { display: none; }

/* ---------- Main content ---------- */

.main {
  flex: 1;
  min-width: 0;
  padding: 44px 56px 80px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin-bottom: 8px;
  display: block;
}

.page-title { font-size: 40px; color: var(--navy-900); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity .15s ease, transform .05s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: var(--card); color: var(--navy-900); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--card-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 8px 10px; }
.btn-ghost:hover { color: var(--navy-900); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Cards / grid ---------- */

.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 26px 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.card-dark {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
}
.card-dark .stat-label { color: var(--on-primary-muted); }

.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}
.stat-value { font-size: 30px; font-weight: 700; color: var(--navy-900); letter-spacing: -0.02em; }
.card-dark .stat-value { color: var(--accent); }
.stat-hint { font-size: 13px; color: var(--text-muted); margin-top: 6px; display: block; }

.section-card { margin-bottom: 24px; }
.section-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.section-title { font-size: 21px; color: var(--navy-900); }
.section-tag { font-size: 12.5px; color: var(--text-muted); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state h3 { color: var(--navy-900); font-size: 19px; margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* ---------- Tabs (Jahre) ---------- */

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.tab {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.tab.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.tab:hover:not(.active) { background: var(--card-soft); }

/* ---------- Step indicator (Abend-Workflow) ---------- */

.steps { display: flex; gap: 6px; margin-bottom: 28px; flex-wrap: wrap; }
.step-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.step-pill .num {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--border); color: var(--text-muted); font-size: 11.5px;
}
.step-pill.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.step-pill.active .num { background: var(--accent); color: var(--on-accent); }
.step-pill.done { color: var(--navy-800); }
.step-pill.done .num { background: var(--success); color: #fff; }

/* ---------- Sub-Fortschritt (Einzel-Eintrag-Karussell, Schritt 4/5) ---------- */

.entry-progress {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.entry-progress-label { font-size: 13px; font-weight: 700; color: var(--navy-800); white-space: nowrap; }
.entry-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.entry-pill {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--card); border: 1px solid var(--border); color: var(--text-muted);
  cursor: pointer;
}
.entry-pill.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.entry-pill.done { background: var(--success); color: #fff; border-color: var(--success); }
.entry-pill.done.active { background: var(--primary); border-color: var(--primary); }
.entry-status { font-size: 13px; font-weight: 600; margin-top: 10px; min-height: 18px; }
.entry-status.success { color: var(--success); }
.entry-status.error { color: var(--danger, #C0392B); }
.entry-nav-buttons { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.field input[type=text],
.field input[type=password],
.field input[type=number],
.field input[type=date],
.field input[type=email],
.field select,
.field textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  background: var(--card-soft);
  outline: none;
  transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-accent); background: #fff; }
.field-hint { font-size: 12px; color: var(--text-muted); }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--primary); }

.input-inline {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: var(--card-soft);
  width: 100%;
  outline: none;
}
.input-inline:focus { border-color: var(--blue-accent); background: #fff; }
.input-xs { width: 64px; text-align: center; padding: 8px 4px; }

/* ---------- Toggle pill button ---------- */

.pill-toggle {
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--card-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.pill-toggle.on { background: var(--highlight-soft); color: var(--ink); border-color: color-mix(in srgb, var(--highlight) 60%, var(--primary)); }

/* ---------- Tables / lists ---------- */

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--border); }
td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }
.rank { display: inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%; background: var(--blue-accent-soft); color: var(--navy-800); font-weight:700; font-size:12.5px; margin-right:10px;}
.rank.gold { background: var(--highlight); color: var(--on-highlight); }

.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.list-row:last-child { border-bottom: none; }
/* Pfeil-Icons in verlinkten Zeilen (Regeln, Abende) */
a.list-row svg, a.section-card .section-title-row svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Member list (Listenansicht) ---------- */

.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
  background: var(--primary); color: var(--on-primary);
}
.avatar.inactive { background: var(--border); color: var(--text-muted); }
.avatar.guest { background: var(--blue-accent); }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Platzhalter, solange kein eigenes Foto da ist: helle Fläche, weiche Silhouette */
.avatar.placeholder { background: color-mix(in srgb, var(--primary) 7%, #fff); color: color-mix(in srgb, var(--primary) 26%, #fff); align-items: flex-end; box-shadow: inset 0 0 0 1px rgba(15, 32, 56, 0.06); }
.avatar.placeholder svg { width: 82%; height: 82%; margin-bottom: -8%; }
.avatar.placeholder.guest { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 55%, var(--primary)); }
.avatar.placeholder.inactive { background: #F0EFEA; color: #D3D1C8; }

.member-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.member-row:last-child { border-bottom: none; }
.member-row .info { flex: 1; min-width: 180px; }
.member-name { font-size: 15.5px; font-weight: 700; color: var(--navy-900); }
.member-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.badge { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; display: inline-block; }
.badge.active { color: var(--success); background: #E6F0E9; }
.badge.inactive { color: var(--text-muted); background: var(--border); }
.badge.guest { color: var(--blue-accent); background: var(--blue-accent-soft); }
.badge.member { color: var(--navy-800); background: var(--blue-accent-soft); }

/* ---------- Evening participant cards ---------- */

.participant-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px; background: var(--card-soft); }
.participant-head { display:flex; justify-content: space-between; align-items:center; gap:12px; margin-bottom:16px; flex-wrap: wrap;}
.participant-total { font-size: 20px; font-weight: 700; color: var(--navy-900); }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.mini-field label { display:block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.mini-field .price-hint { font-size: 11px; color: var(--text-muted); }
.subsection-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--navy-700); margin: 18px 0 10px; }

.throws-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.throws-row .throw-field { display:flex; flex-direction:column; align-items:center; gap:4px; }
.throws-row .throw-field label { font-size: 10.5px; color: var(--text-muted); }

/* ---------- Game selection chips ---------- */

.game-chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.game-chip { border: 1px solid var(--border); border-radius: 999px; padding: 10px 18px; background: var(--card); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.game-chip.selected { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

.game-entry-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px; background: var(--card); }
.game-entry-head { display:flex; justify-content: space-between; align-items:center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px;}
.selector-list { display: flex; flex-direction: column; }
.selector-row { display:flex; align-items:center; justify-content: space-between; padding: 10px 4px; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap;}
.selector-row:last-child { border-bottom: none; }
.place-input { width: 70px; text-align: center; }

/* ---------- Alerts ---------- */

.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; }
.alert-success { background: #E6F0E9; color: var(--success); }
.alert-error   { background: #F6E6E3; color: var(--danger); }
.alert-info    { background: var(--blue-accent-soft); color: var(--navy-800); }

/* ---------- History table ---------- */

.history-toggle { font-size: 12.5px; color: var(--blue-accent); font-weight: 600; cursor: pointer; display:inline-flex; align-items:center; gap:5px; }
.history-toggle svg { width: 14px; height: 14px; }
.history-list { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); display: none; }
.history-list.open { display: block; }
.history-row { display:flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: var(--text-muted); }
.history-row strong { color: var(--navy-800); }

/* ---------- Login page ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  padding: 20px;
}
.login-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 44px 38px;
  width: 100%;
  max-width: 380px;
}
.login-brand { display:flex; flex-direction:column; align-items:center; gap:14px; margin-bottom: 30px; }

/* ---------- Utility ---------- */

.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mt-0{margin-top:0} .mb-0{margin-bottom:0}
.flex { display:flex; }
.gap-8 { gap: 8px; } .gap-12 { gap:12px; }
.items-center { align-items:center; }
.justify-between { justify-content: space-between; }

/* ---------- Termine (Kalender-Liste) ---------- */

.date-tile { width: 56px; flex-shrink: 0; border-radius: 12px; overflow: hidden; text-align: center; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.date-tile .mon { display: block; background: var(--primary); color: var(--on-primary); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 0; }
.date-tile .day { display: block; font-size: 21px; font-weight: 800; color: var(--navy-900); line-height: 1; padding: 6px 0 2px; }
.date-tile .wd { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-muted); padding-bottom: 5px; }
.list-row.past .date-tile .mon { background: var(--text-muted); }

/* ---------- Ergebnisübersicht eines Abends ---------- */

.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.result-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; background: var(--card); display: flex; flex-direction: column; gap: 10px; }
.result-head { display: flex; align-items: center; gap: 10px; }
.result-head .avatar { width: 34px; height: 34px; }
.result-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.result-name strong { color: var(--navy-900); font-size: 15px; }
.result-name span { font-size: 12px; }
.result-total { font-size: 18px; font-weight: 800; color: var(--navy-900); white-space: nowrap; font-variant-numeric: tabular-nums; }
.result-konig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; background: var(--gold-soft); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 13px; }
.result-konig span { color: var(--ink); font-weight: 600; opacity: .75; }
.result-konig strong { color: var(--navy-900); }
.result-konig small { width: 100%; color: var(--ink); opacity: .7; font-size: 11.5px; }
.result-block { display: flex; flex-direction: column; gap: 2px; }
.result-label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding-bottom: 3px; border-bottom: 1px solid var(--border); margin-bottom: 2px; }
.result-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.result-line > span:last-child { white-space: nowrap; }
.result-line em { font-style: normal; color: var(--text-muted); font-size: 12px; }
.result-base { color: var(--text-muted); border-top: 1px dashed var(--border); padding-top: 6px; }
.result-absent { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--card-soft); border: 1px solid var(--border); max-width: 520px; }
/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 32px 24px 90px; }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 60;
    width: 260px;
    height: 100%;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 24px rgba(0,0,0,.25); }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    color: var(--on-primary);
    padding: 16px 18px;
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .mobile-topbar .brand { padding: 0; }
  .mobile-topbar .brand-name { font-size: 15px; }
  .hamburger { background: rgba(255,255,255,0.08); border: none; border-radius: 10px; width: 42px; height: 42px; display:flex; align-items:center; justify-content:center; color: var(--on-primary); }
  .hamburger svg { width: 20px; height: 20px; }

  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(14,32,56,0.45); z-index: 55; }
  .sidebar-backdrop.open { display: block; }

  .main { padding: 24px 16px 90px; }
  .page-title { font-size: 30px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  /* Kennzahl-Kacheln bleiben zweispaltig, damit der Inhalt darunter schneller sichtbar ist */
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-4 .card { padding: 16px; }
  .grid-4 .stat-value { font-size: 22px; }
  .page-header { align-items: stretch; }
  .btn-block-mobile { width: 100%; justify-content: center; }
}

/* ---------- Königin/König ---------- */

.konig-head { margin-bottom: 4px; }
.konig-head small { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.konig-card { border-top: 3px solid var(--gold); }
.konig-winner { display: flex; flex-direction: column; gap: 2px; padding: 12px 0 8px; }
.konig-winner strong { font-size: 20px; color: var(--navy-900); }
.konig-winner span { font-size: 13px; }

/* ---------- Farbschema-Auswahl ---------- */

.scheme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.scheme-option { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: var(--radius-md); background: var(--card); border: 2px solid var(--border); cursor: pointer; transition: border-color .15s ease, transform .1s ease; }
.scheme-option:hover { transform: translateY(-1px); }
.scheme-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.scheme-option input { position: absolute; opacity: 0; pointer-events: none; }
.scheme-option input:focus-visible + .scheme-preview { outline: 2px solid var(--primary); outline-offset: 2px; }
.scheme-preview { display: flex; height: 120px; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--border); }
.sp-side { width: 30%; background: var(--primary); padding: 8px 6px; display: flex; flex-direction: column; gap: 5px; }
.sp-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); margin-bottom: 4px; }
.sp-nav { height: 7px; border-radius: 4px; background: var(--on-primary-muted); opacity: .45; }
.sp-nav.active { background: var(--accent); opacity: 1; height: 9px; }
.sp-main { flex: 1; padding: 9px; display: flex; flex-direction: column; gap: 7px; }
.sp-title { width: 55%; height: 9px; border-radius: 4px; background: var(--ink); }
.sp-cards { display: flex; gap: 6px; flex: 1; }
.sp-card { flex: 1; border-radius: 6px; background: var(--card); border: 1px solid var(--border); }
.sp-card.dark { background: var(--primary); border: none; display: flex; align-items: flex-end; padding: 6px; }
.sp-num { width: 60%; height: 8px; border-radius: 4px; background: var(--accent); }
.sp-btn { width: 40%; height: 12px; border-radius: 999px; background: var(--primary); }
.scheme-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scheme-meta strong { color: var(--ink); font-size: 14.5px; flex: 1; }
.scheme-swatches { display: flex; }
.scheme-swatches span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); margin-left: -4px; }
.logout-link.active { color: var(--on-primary); background: rgba(255,255,255,0.08); }
/* ---------- Königskegeln nachholen ---------- */

.makeup-box { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--highlight-soft); border: 1px dashed color-mix(in srgb, var(--highlight) 50%, var(--border)); }
.makeup-box .checkbox-row { flex-wrap: wrap; gap: 6px 10px; font-size: 13.5px; cursor: pointer; }
.makeup-box .throws-row { margin-top: 10px; }
.result-konig .makeup-note { width: 100%; font-size: 11.5px; color: var(--ink); opacity: .8; }

/* ---------- Offene Beiträge / PayPal ---------- */

.pay-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; border-left: 4px solid var(--highlight); }
.pay-items { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.pay-items a { color: var(--primary-strong); font-weight: 600; }
.pay-action { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 320px; }

/* ---------- Zwei-Faktor-Anmeldung ---------- */

.code-input { font-size: 22px !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.mfa-steps { padding-left: 20px; margin: 0 0 16px; font-size: 14px; display: flex; flex-direction: column; gap: 10px; }
.mfa-qr { margin: 10px 0 6px; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); width: max-content; }
.mfa-qr img, .mfa-qr canvas { display: block; }
.mfa-manual summary { font-size: 12.5px; color: var(--primary-strong); cursor: pointer; margin-top: 6px; }
.mfa-manual code { display: block; margin: 8px 0 4px; padding: 8px 10px; background: var(--card-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; letter-spacing: .08em; word-break: break-all; }

/* ---------- Mitglieder: Historie der Zeiträume ---------- */

.period-history { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.period-chip { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--ink); }
.period-chip.gast { background: var(--accent-soft); }
.change-type { padding: 12px; border-radius: var(--radius-sm); background: var(--card-soft); border: 1px solid var(--border); margin-bottom: 6px; }

/* ---------- König & Pudelkönig des Abends ---------- */

.kings-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kings-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: var(--radius-md); }
.kings-item.konig { background: var(--primary); color: var(--on-primary); }
.kings-item.konig strong { color: var(--accent); font-size: 20px; }
.kings-item.pudel { background: var(--highlight-soft); border: 1px solid color-mix(in srgb, var(--highlight) 40%, var(--border)); }
.kings-item.pudel strong { color: var(--ink); font-size: 20px; }
.kings-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.kings-value { font-size: 13px; opacity: .8; }
.result-card.is-konig { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.result-card.is-pudel:not(.is-konig) { border-color: color-mix(in srgb, var(--highlight) 60%, var(--border)); }
.result-titles { display: flex; gap: 6px; margin: -4px 0 -2px; }
.title-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.title-badge.konig { background: var(--primary); color: var(--accent); }
.title-badge.pudel { background: var(--highlight-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--highlight) 50%, var(--border)); }

/* ---------- Kalender: geplante Termine, Geburtstage ---------- */

.event-row { border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.event-row:last-child { border-bottom: none; }
.event-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 4px 8px 76px; }
.event-row.type-geburtstag .date-tile .mon { background: var(--accent); color: var(--on-accent); }
.event-row.type-plan .date-tile { border-style: dashed; }
.plan-edit { width: 100%; }
@media (max-width: 768px) { .event-actions { padding-left: 4px; } }

.throw-sum { align-self: flex-end; padding: 0 0 8px 6px; font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.throw-sum strong { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pay-person { margin-top: 8px; }
.pay-person strong { font-size: 18px; color: var(--ink); }
.pay-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pay-copy { display: flex; flex-wrap: wrap; gap: 2px; }
.pay-copy .btn { padding: 4px 8px; font-size: 12px; }

/* ---------- Spiel aussetzen ---------- */

.skip-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--card-soft); border: 1px dashed var(--border); }
.skip-label { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.skip-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; padding: 2px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); cursor: pointer; }
.skip-chip:has(input:checked) { background: var(--accent-soft); border-color: color-mix(in srgb, var(--highlight) 50%, var(--border)); }
.selector-row.is-skipped { opacity: .45; }
.selector-row.is-skipped span::after { content: " – setzt aus"; font-size: 12px; color: var(--text-muted); }
.placement-rule { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--card-soft); border: 1px solid var(--border); margin-bottom: 8px; }
.cost-note { font-size: 13px; margin-bottom: 6px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--highlight-soft); }
.selector-row.is-skipped[data-keep-input] { opacity: 1; }
.selector-row.is-skipped[data-keep-input] span::after { content: " – setzt aus: Betrag eintragen oder leer lassen (= Durchschnitt)"; }
.yesno-toggle { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card-soft); cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-muted); }
.yesno-toggle input { width: 18px; height: 18px; accent-color: var(--primary); }
.yesno-toggle:has(input:checked) { background: var(--highlight-soft); color: var(--ink); border-color: color-mix(in srgb, var(--highlight) 50%, var(--border)); }
.mini-field .yesno-toggle { display: flex; align-items: center; font-size: 14px; margin-bottom: 4px; height: 38px; }
.donation-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.donation-field .input-inline { width: 80px; text-align: right; }
.result-donation { color: var(--success); }

/* ---------- Auswertungen: Mitglied, Spiel, offene Punkte ---------- */

a.name-link { color: inherit; text-decoration: none; border-bottom: 1px dotted color-mix(in srgb, var(--text-muted) 60%, transparent); }
a.name-link:hover { color: var(--navy-900); border-bottom-style: solid; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .badge, td .title-badge { margin-left: 4px; vertical-align: middle; }
.cell-sub { font-size: 12px; white-space: normal; }
.card > .table-wrap { margin: 0 -4px; }
.avatar.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.member-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: -8px 0 20px; font-size: 13.5px; color: var(--text-muted); }
.member-facts svg { width: 15px; height: 15px; vertical-align: -2px; }
.list-row svg { width: 16px; height: 16px; vertical-align: -3px; }
.place-table { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.place-table span { font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--card-soft); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.place-table em, .round-result em { font-style: normal; color: var(--text-muted); font-weight: 700; }
.round-result { font-size: 13.5px; margin-top: 4px; }
.round-row > div { min-width: 0; flex: 1; }

.open-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.open-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--highlight-soft); color: var(--ink); text-decoration: none; border: 1px solid color-mix(in srgb, var(--highlight) 40%, var(--border)); }
.open-chip strong { font-weight: 800; }
.open-chip.done { background: var(--card-soft); color: var(--text-muted); border-color: var(--border); font-weight: 500; }
.open-chip svg { width: 14px; height: 14px; color: var(--success); }
.open-hint { font-size: 12.5px; margin: 2px 0 8px; }
.open-done { color: var(--success); font-weight: 600; font-size: 14px; padding: 8px 0 4px; }
.open-done svg { width: 16px; height: 16px; vertical-align: -3px; }
.open-items { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; margin-top: 4px; }
.open-items a { color: var(--text-muted); }
a.list-row { text-decoration: none; color: inherit; }
.list-row.is-preliminary { background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--border) 35%, transparent) 8px 9px); }
.list-row.is-preliminary strong { font-style: italic; }
.kasse-grid { grid-template-columns: 2fr 1fr; align-items: start; }
@media (max-width: 768px) { .kasse-grid { grid-template-columns: 1fr; } .kasse-grid > .card:last-child { order: -1; } }

/* ---- Angemeldete Person hervorheben ------------------------------------- */
.name-link.is-me, .name-me {
  background: var(--highlight-soft);
  color: var(--ink);
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--highlight) 45%, transparent);
}
.list-row.is-me, .member-row.is-me, .result-line.is-me {
  background: color-mix(in srgb, var(--highlight-soft) 55%, transparent);
  margin-left: -10px; margin-right: -10px;
  padding-left: 10px; padding-right: 10px;
  border-radius: 10px;
}
tr.is-me td { background: color-mix(in srgb, var(--highlight-soft) 55%, transparent); }
.result-card.is-me { box-shadow: 0 0 0 2px var(--highlight); }
.event-row.is-me { background: color-mix(in srgb, var(--highlight-soft) 55%, transparent); border-radius: 12px; }

/* ---- Startseite: nächster Kegelabend ----------------------------------- */
.next-evening .section-title svg { width: 20px; height: 20px; vertical-align: -3px; }
.next-evening-date { margin: 10px 0 4px; font-size: 15px; }
a.section-tag { text-decoration: none; }

/* ---- Königskegeln-Tabelle eines Abends ---------------------------------- */
.konig-table tr.is-winner td:first-child { font-weight: 800; color: var(--highlight); }

/* ---- Logo als Link zur Startseite --------------------------------------- */
a.brand { text-decoration: none; color: inherit; }
a.brand:hover .brand-name { opacity: .85; }

/* ---- Passwort anzeigen (Auge) ------------------------------------------- */
.password-field { position: relative; }
.password-field input { padding-right: 46px; width: 100%; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.password-toggle:hover, .password-toggle:focus-visible { color: var(--ink); background: var(--card-soft); }
.password-toggle svg { width: 20px; height: 20px; }
.password-toggle .icon-eye-off { display: none; }
.password-toggle.is-visible .icon-eye { display: none; }
.password-toggle.is-visible .icon-eye-off { display: inline; }

/* ---- Teilnahme absagen ---------------------------------------------------- */
.inline-form { display: inline; margin: 0; }
.cancelled-note { font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.next-evening-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }

/* ---- Profilbild ------------------------------------------------------------- */
.avatar.avatar-xl { width: 96px; height: 96px; }
.photo-edit { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.photo-edit input[type=file] { font-size: 13.5px; max-width: 100%; }

/* ---- Telefonnummer ---------------------------------------------------------- */
.phone-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.phone-link svg { width: 13px; height: 13px; }
.phone-link:hover { text-decoration: underline; }

/* ---- Mitgliederliste als Tabelle ------------------------------------------- */
.member-table { padding: 6px 22px; }
.member-table .mt-head, .member-table .mt-row {
  display: grid;
  grid-template-columns: 44px minmax(170px, 1.3fr) minmax(90px, .6fr) minmax(120px, 1fr);
  gap: 16px;
  align-items: center;
}
.member-table.admin .mt-head, .member-table.admin .mt-row {
  grid-template-columns: 44px minmax(170px, 1.3fr) minmax(190px, 1.4fr) minmax(120px, .8fr) minmax(100px, .7fr) 92px;
}
.mt-head { padding: 12px 0 10px; border-bottom: 1px solid var(--border); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.mt-row { padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.mt-row:last-child { border-bottom: none; }
.mt-row.is-inactive { opacity: .6; }
.mt-row.is-me { background: color-mix(in srgb, var(--highlight-soft) 55%, transparent); margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 10px; }
.mt-avatar .avatar { width: 40px; height: 40px; }
.mt-name { min-width: 0; }
.mt-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; font-weight: 700; color: var(--navy-900); }
.mt-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.mt-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; }
.mt-tag.admin { background: var(--primary-soft); color: var(--ink); }
.mt-tag.off { background: var(--border); color: var(--text-muted); }
.mt-cell { min-width: 0; font-size: 13.5px; }
.mt-muted { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.mt-empty { color: var(--text-muted); }
.mt-line { display: flex; align-items: center; gap: 6px; min-width: 0; color: inherit; text-decoration: none; }
.mt-line + .mt-line { margin-top: 3px; }
.mt-line svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--text-muted); }
.mt-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.mt-line:hover span { text-decoration: underline; }
.mt-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.mt-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.mt-status.ok::before { background: var(--success); }
.mt-status.warn::before { background: #E8A33D; }
.mt-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.mt-actions .btn svg { width: 15px; height: 15px; }
.mt-btn-label { display: none; }

/* Menü „⋯“ für weitere Aktionen */
.row-menu { position: relative; }
.row-menu > summary { list-style: none; cursor: pointer; font-size: 18px; line-height: 1; min-width: 34px; justify-content: center; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px;
  background: var(--card, #fff); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .14); padding: 6px;
}
.row-menu-list form { margin: 0; }
.row-menu-list button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  background: none; border: 0; border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.row-menu-list button:hover { background: var(--card-soft); }
.row-menu-list button svg { width: 15px; height: 15px; color: var(--text-muted); }
.row-menu-list button.danger, .row-menu-list button.danger svg { color: var(--danger, #C2410C); }

@media (max-width: 900px) {
  .member-table { padding: 4px 16px; }
  .member-table .mt-head { display: none; }
  .member-table .mt-row, .member-table.admin .mt-row { grid-template-columns: 40px 1fr auto; gap: 4px 12px; align-items: start; }
  .mt-row .mt-avatar { grid-row: span 2; }
  .mt-row .mt-name { grid-column: 2 / 3; }
  .mt-row .mt-actions { grid-column: 3; grid-row: 1; }
  .mt-row .mt-cell { grid-column: 2 / 4; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
  .mt-row .mt-cell::before { content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); min-width: 78px; }
  .mt-row .mt-cell .mt-muted { margin-top: 0; }
  .mt-row .mt-contact { display: block; margin-top: 4px; }
  .mt-row .mt-contact::before { display: none; }
  .mt-row .mt-contact .mt-empty { display: none; }
  .mt-actions { width: auto; }
}

/* ---- Ergebniskarte: selbst erzielte Alle 9 / Kränze ------------------------ */
.result-scored { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.scored-chip { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--ink); }
.scored-chip strong { font-weight: 800; }
