/* ============================================================
   Namens-Tinder – CSS
   Basis-System von CashPal übernommen, erweitert um Tinder-UI
   ============================================================ */

/* ─── CSS-Variablen ───────────────────────────────────────── */
:root {
  --bg:          #ffffff;
  --text:        #111111;
  --border:      #cccccc;
  --muted:       #666666;
  --highlight:   #f7f0ff;

  --primary:     #e1a4ff;
  --primary-dk:  #9b2de0;
  --primary-lt:  #f3d8ff;

  --yes:         #27ae60;
  --yes-lt:      #d4f5e2;
  --no:          #e74c3c;
  --no-lt:       #fde8e6;
  --skip:        #7f8c8d;
  --skip-lt:     #ecf0f1;

  --card-shadow: 0 8px 32px rgba(0,0,0,.12);
  --card-shadow-dark: 0 12px 48px rgba(255, 230, 230, 0.39);
  --radius:      16px;
}

/* ─── Reset & Basis ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Roboto, Oxygen, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  text-align: center;
  margin: .8em 0 .6em;
  font-weight: 700;
  line-height: 1.3;
}
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }

a { color: var(--primary-dk); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.muted { color: var(--muted); }
.small { font-size: .85em; }

/* ─── Navigation ──────────────────────────────────────────── */
.main-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: .5rem 1rem;
}

.nav-container {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: .2rem;
  flex: 1;
  flex-wrap: wrap;
}

.nav-menu a {
  display: block;
  padding: .4rem .7rem;
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: .9rem;
  white-space: nowrap;
  transition: background .15s;
}
.nav-menu a:hover  { background: var(--highlight); text-decoration: none; }
.nav-menu a.active { background: var(--primary-lt); color: var(--primary-dk); }

.badge {
  display: inline-block;
  background: var(--no);
  color: #fff;
  font-size: .7rem;
  padding: 0 .35em;
  border-radius: 999px;
  vertical-align: top;
  margin-left: .15em;
  line-height: 1.5;
}

/* Account-Dropdown */
.nav-account { margin-left: auto; }
.nav-account summary {
  cursor: pointer;
  font-size: .9rem;
  padding: .4rem .7rem;
  border-radius: 8px;
  list-style: none;
  user-select: none;
  white-space: nowrap;
  transition: background .15s;
}
.nav-account summary:hover { background: var(--highlight); }
.nav-account-dropdown {
  position: absolute;
  top: calc(100% + .25rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .4rem 0;
  list-style: none;
  margin: 0;
  min-width: 200px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  z-index: 200;
}
.nav-account-dropdown li a,
.nav-account-dropdown li.dropdown-partner {
  display: block;
  padding: .45rem 1rem;
  color: var(--text);
  font-size: .9rem;
}
.nav-account-dropdown li a:hover { background: var(--highlight); text-decoration: none; }
.dropdown-divider { height: 1px; background: var(--border); margin: .3rem 0; }
.dropdown-group-switcher { padding: .4rem 1rem; }
.group-switcher select {
  width: 100%;
  margin-top: .25rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  padding: .3rem .5rem;
  font-size: .85rem;
}

/* ─── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  border-radius: 8px;
  margin: .75rem auto;
  max-width: 640px;
  font-weight: 500;
  border: 1px solid;
}
.alert-success { background: var(--yes-lt);  color: #155724; border-color: #b7dfc5; }
.alert-error   { background: var(--no-lt);   color: #721c24; border-color: #f5c6cb; }
.alert-info    { background: var(--primary-lt); color: var(--primary-dk); border-color: #d4a0f0; }
.alert-warning { background: #fff3cd; color: #856404; border-color: #ffc107; }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .65rem 1.4rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background .15s, transform .1s;
  text-decoration: none;
}
.btn-primary:hover   { background: var(--primary-dk); text-decoration: none; }
.btn-primary:active  { transform: scale(.97); }

.btn-secondary {
  display: inline-block;
  background: var(--highlight);
  color: var(--primary-dk);
  border: 1px solid var(--primary-lt);
  border-radius: 10px;
  padding: .55rem 1.1rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--primary-lt); text-decoration: none; }

.btn-danger {
  display: inline-block;
  background: transparent;
  color: var(--no);
  border: 1px solid var(--no);
  border-radius: 10px;
  padding: .45rem .9rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-danger:hover { background: var(--no); color: #fff; }

.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-large { font-size: 1.15rem; padding: .8rem 2rem; }
.btn-full { width: 100%; }

/* ─── Formulare ───────────────────────────────────────────── */
.form-block {
  display: grid;
  gap: .75rem;
  padding: 1rem;
  background: var(--highlight);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 480px;
  margin: 0 auto;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  appearance: none;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .5rem .75rem;
  font-size: 1rem;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 77, 255, .2);
}
input[readonly] { background: var(--highlight); cursor: default; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  cursor: pointer;
}
.checkbox-label input { width: auto; }

.password-field {
  display: flex;
  gap: .25rem;
}
.password-field input { flex: 1; }
.toggle-pw {
  background: var(--highlight);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 .6rem;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ─── Auth-Seiten ─────────────────────────────────────────── */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem 4rem;
  flex: 1;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
}
.auth-logo { font-size: 3rem; text-align: center; margin-bottom: .5rem; }
.auth-card h1 { margin-top: 0; }
.auth-subtitle { text-align: center; color: var(--muted); margin-top: -.4rem; margin-bottom: 1.2rem; }
.auth-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin: 1rem 0;
}
.auth-link { text-align: center; font-size: .9rem; }
.auth-hint { text-align: center; font-size: .85rem; color: var(--muted); }

/* ─── Swipe-Seite ─────────────────────────────────────────── */
.swipe-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .5rem 1rem 5rem;
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

/* Modus-Tabs */
.swipe-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: .75rem;
  gap: .5rem;
  flex-wrap: wrap;
}
.swipe-mode-tabs {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.mode-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: .3rem .85rem;
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s;
}
.mode-tab.active,
.mode-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.swipe-remaining {
  font-size: .82rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Karten-Stack */
.card-stack {
  position: relative;
  width: 100%;
  height: min(100vw, 420px);
  margin: .5rem 0 1rem;
}

.name-card {
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: none;
  overflow: hidden;
  border: 2px solid transparent;
}
.name-card:active { cursor: grabbing; }
.card-behind {
  background: var(--highlight);
  border-radius: var(--radius);
  transform: scale(.94) translateY(6px);
  z-index: 0;
  pointer-events: none;
}
#current-card { z-index: 2; }

.card-body {
  text-align: center;
  padding: 1.5rem;
  pointer-events: none;
}
.card-name {
  font-size: clamp(2rem, 9vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text);
  line-height: 1.1;
}
.card-gender {
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: .4rem;
}

/* Swipe-Indikatoren */
.swipe-indicator {
  position: absolute;
  top: 1rem;
  font-size: 1.2rem;
  font-weight: 800;
  opacity: 0;
  transition: opacity .1s;
  pointer-events: none;
  padding: .4rem .8rem;
  border-radius: 8px;
  border: 3px solid;
  letter-spacing: .05em;
}
.swipe-yes {
  right: 1rem;
  color: var(--yes);
  border-color: var(--yes);
  background: rgba(39,174,96,.08);
}
.swipe-no {
  left: 1rem;
  color: var(--no);
  border-color: var(--no);
  background: rgba(231,76,60,.08);
}

/* Lade- und Leer-Zustände */
.card-loading,
.card-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  z-index: 3;
  text-align: center;
  padding: 1.5rem;
}
/* Verhindert, dass display:flex das HTML-hidden-Attribut überschreibt */
.card-loading[hidden],
.card-empty[hidden] {
  display: none;
}
.empty-icon { font-size: 2.5rem; }

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--primary-lt);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Aktions-Buttons */
.swipe-actions {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  margin-top: .25rem;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
  gap: .15rem;
  aspect-ratio: 1;
  font-weight: 700;
}
.action-btn:active { transform: scale(.93); }

.btn-no {
  width: 68px;
  height: 68px;
  background: var(--no-lt);
  color: var(--no);
  font-size: 1.6rem;
  box-shadow: 0 4px 12px rgba(231,76,60,.25);
}
.btn-no:hover { box-shadow: 0 6px 18px rgba(231,76,60,.4); }

.btn-skip {
  width: 52px;
  height: 52px;
  background: var(--skip-lt);
  color: var(--skip);
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.btn-yes {
  width: 68px;
  height: 68px;
  background: var(--yes-lt);
  color: var(--yes);
  font-size: 1.6rem;
  box-shadow: 0 4px 12px rgba(39,174,96,.25);
}
.btn-yes:hover { box-shadow: 0 6px 18px rgba(39,174,96,.4); }

.btn-icon { line-height: 1; }
.btn-label { font-size: .65rem; letter-spacing: .03em; }

.keyboard-hint {
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .75rem;
}

/* ─── Match-Overlay ───────────────────────────────────────── */
.match-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.match-overlay[hidden] { display: none; }

.match-content {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: popIn .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.match-hearts {
  font-size: 3.5rem;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}
.match-content h2 {
  font-size: 2rem;
  color: var(--primary);
  margin: .5rem 0 .25rem;
}
.match-name-display {
  font-size: 2.2rem;
  font-weight: 800;
  margin: .5rem 0 1rem;
  color: var(--text);
}
.match-groups { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.match-link {
  display: block;
  margin-top: .75rem;
  font-size: .9rem;
}

/* ─── Matches-Seite ───────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 1.25rem;
}
.filter-tab {
  padding: .35rem .85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--muted);
  transition: all .15s;
}
.filter-tab:hover, .filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  text-decoration: none;
}
.filter-tab-yes.active { background: var(--yes); border-color: var(--yes); }
.filter-tab-no.active  { background: var(--no);  border-color: var(--no); }

/* ─── Sort-Tabs (Swipe) ───────────────────────────────────── */
.swipe-sort-tabs { display: flex; gap: .3rem; }
.sort-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: .25rem .7rem;
  font-size: .78rem;
  cursor: pointer;
  transition: all .15s;
}
.sort-tab.active, .sort-tab:hover {
  background: var(--primary-dk);
  border-color: var(--primary-dk);
  color: #fff;
}

/* ─── Gender-Tabs (Swipe) ─────────────────────────────────── */
.swipe-gender-tabs { display: flex; gap: .25rem; }
.gender-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: .25rem .65rem;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
}
.gender-tab:hover { background: var(--highlight); border-color: var(--primary); color: var(--primary-dk); }
.gender-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.gender-tab[data-gender="f"].active { background: #e91e8c; border-color: #e91e8c; }
.gender-tab[data-gender="m"].active { background: #1e7ae9; border-color: #1e7ae9; }

/* ─── Meine Bewertungen ───────────────────────────────────── */
.my-names-search-wrap {
  max-width: 640px;
  margin: 0 auto 1rem;
}
.my-names-search {
  width: 100%;
  padding: .55rem .9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .95rem;
  outline: none;
  transition: border-color .15s;
}
.my-names-search:focus { border-color: var(--primary); }
.my-names-list {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.my-names-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .6rem 1rem;
  gap: .75rem;
}
.my-names-info {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  min-width: 0;
}
.my-names-name   { font-weight: 700; font-size: 1rem; }
.my-names-gender { color: var(--muted); font-size: .85rem; }
.decision-badge {
  display: inline-block;
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-yes { background: var(--yes-lt); color: var(--yes); }
.badge-no  { background: var(--no-lt);  color: var(--no); }
.my-names-change-form { flex-shrink: 0; }
.btn-toggle {
  border: none;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  transition: all .15s;
}
.btn-toggle-yes { background: var(--yes-lt); color: var(--yes); }
.btn-toggle-yes:hover { background: var(--yes); color: #fff; }
.btn-toggle-no  { background: var(--no-lt);  color: var(--no); }
.btn-toggle-no:hover  { background: var(--no);  color: #fff; }

/* ─── Near-Misses ─────────────────────────────────────────── */
.near-misses-section {
  max-width: 640px;
  margin: 2rem auto 0;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}
.near-misses-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
  user-select: none;
  padding: .25rem 0;
}
.near-misses-toggle::marker,
.near-misses-toggle::-webkit-details-marker { display: none; }
.near-misses-toggle::before { content: '▶'; font-size: .7rem; transition: transform .2s; }
details[open] .near-misses-toggle::before { transform: rotate(90deg); }
.near-misses-hint {
  font-size: .8rem;
  font-weight: 400;
  color: var(--muted);
}
.near-misses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.near-miss-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem;
  text-align: center;
}
.near-miss-name   { font-weight: 700; font-size: 1.1rem; margin-bottom: .15rem; }
.near-miss-gender { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.btn-near-miss-yes {
  background: var(--yes-lt);
  color: var(--yes);
  border: 1px solid var(--yes);
  border-radius: 8px;
  padding: .3rem .7rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  margin-top: .5rem;
}
.btn-near-miss-yes:hover { background: var(--yes); color: #fff; }

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .85rem;
  margin: 0 auto;
  max-width: 640px;
}
.match-card {
  background: #fff;
  border: 2px solid var(--yes-lt);
  border-radius: var(--radius);
  padding: 1rem .75rem .75rem;
  text-align: center;
  position: relative;
  box-shadow: 0 2px 8px rgba(39,174,96,.1);
  transition: box-shadow .15s;
}
.match-card:hover { box-shadow: 0 4px 16px rgba(39,174,96,.2); }
.match-card-name  { font-size: 1.3rem; font-weight: 800; margin-bottom: .15rem; }
.match-card-gender{ font-size: .9rem; color: var(--muted); }
.match-card-group { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.match-card-date  { font-size: .75rem; color: var(--border); margin-top: .4rem; }
.match-dissolve-form { margin-top: .6rem; }
.btn-dissolve {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  width: 28px; height: 28px;
  cursor: pointer;
  font-size: .75rem;
  transition: all .15s;
}
.btn-dissolve:hover { border-color: var(--no); color: var(--no); }

.matches-count { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 1rem; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 3rem; display: block; margin-bottom: .5rem; }

/* ─── Gruppen-Seite ───────────────────────────────────────── */
.group-section {
  max-width: 640px;
  margin: 0 auto 2rem;
}
.group-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.group-card--active { border-color: var(--primary); box-shadow: 0 2px 12px rgba(196,77,255,.15); }
.group-card-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .6rem;
  flex-wrap: wrap;
}
.group-card-name { font-weight: 700; font-size: 1.1rem; flex: 1; }
.group-card-badge {
  background: var(--primary);
  color: #fff;
  font-size: .7rem;
  padding: .15rem .5rem;
  border-radius: 999px;
}
.group-card-members { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.member-chip {
  background: var(--highlight);
  border: 1px solid var(--primary-lt);
  color: var(--primary-dk);
  border-radius: 999px;
  padding: .2rem .7rem;
  font-size: .85rem;
  font-weight: 600;
}
.member-chip--empty { background: #f0f0f0; border-color: #ddd; color: var(--muted); }

.group-card-invite { margin-bottom: .75rem; }
.copy-row { display: flex; gap: .4rem; }
.copy-row input { flex: 1; font-size: .82rem; }

.invite-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.invite-email-form { display: flex; gap: .4rem; flex: 1; min-width: 220px; }
.invite-email-form input { flex: 1; }

.group-card-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.invite-link-box {
  background: var(--yes-lt);
  border: 1px solid #b7dfc5;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Namen-Seite ─────────────────────────────────────────── */
.names-section {
  max-width: 640px;
  margin: 0 auto 2rem;
}
.stats-row { display: flex; gap: 1rem; justify-content: center; }
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  border: 2px solid;
  padding: 1.25rem 2rem;
  text-align: center;
  min-width: 100px;
}
.stat-yes { border-color: var(--yes); }
.stat-no  { border-color: var(--no); }
.stat-num { font-size: 2rem; font-weight: 800; }
.stat-label { font-size: .85rem; color: var(--muted); }

.admin-section {
  background: #fffdf0;
  border: 1px solid #ffe96b;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.import-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.import-source-info { display: flex; flex-direction: column; gap: .1rem; }
.import-output {
  background: #1a1a1a;
  color: #00ff00;
  padding: 1rem;
  border-radius: 8px;
  font-size: .82rem;
  overflow: auto;
  max-height: 300px;
}
.import-cli-hint {
  margin-top: 1rem;
  background: var(--highlight);
  border-radius: 8px;
  padding: .75rem 1rem;
}
.import-cli-hint code {
  display: block;
  background: #1a1a1a;
  color: #00ff00;
  padding: .5rem .75rem;
  border-radius: 6px;
  font-size: .82rem;
  margin: .5rem 0;
  overflow: auto;
}

/* Upload-Box im Admin-Import */
.import-upload-box {
  background: var(--highlight);
  border: 1px solid var(--primary-lt);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  margin-bottom: 1rem;
}
.import-upload-box h3 {
  margin: 0 0 .6rem;
  font-size: 1rem;
  text-align: left;
}
.import-upload-form { }
.import-upload-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.import-upload-row select,
.import-upload-row input[type="file"] {
  flex: 1;
  min-width: 140px;
}
input[type="file"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .4rem .6rem;
  font-size: .88rem;
  cursor: pointer;
}

/* ─── Join-Seite ──────────────────────────────────────────── */
.join-card {
  text-align: center;
  max-width: 360px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
}
.join-icon { font-size: 3rem; margin-bottom: .5rem; }
.join-group-name {
  font-size: 1.5rem;
  font-weight: 800;
  margin: .75rem 0 1.5rem;
  color: var(--primary-dk);
}
.join-form { margin-top: .5rem; }

/* ─── Footer ──────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: .75rem 1rem;
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer a { color: var(--muted); }
.footer-admin { margin-top: .25rem; }

/* ─── Dark Mode ───────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #111;
    --text:      #eee;
    --border:    #333;
    --muted:     #aaa;
    --highlight: #1e1228;
  }
  .main-nav, .auth-card, .name-card, .match-card,
  .group-card, .stat-card, .card-loading, .card-empty {
    background: #1a1a1a;
    border-color: #333;
  }
  .nav-brand { color: #d488ff; }
  input, select, textarea {
    background: #1a1a1a;
    color: var(--text);
    border-color: #444;
  }
  .card-behind { background: #1e1e1e; }
  .name-card {
    box-shadow: var(--card-shadow-dark);
  }
}

/* ─── Mobile-Optimierungen ────────────────────────────────── */
@media (max-width: 600px) {
  /* Nav: eine Reihe, nur Icons, klare Trennung */
  .main-nav { padding: .3rem .75rem; }
  .nav-container { gap: .15rem; justify-content: space-between; }
  .nav-label { display: none; }
  .nav-icon { font-size: 1.2rem; line-height: 1; }
  .nav-brand { font-size: 1.2rem; padding: .3rem; }
  .nav-menu { flex: none; gap: .1rem; }
  .nav-menu a {
    padding: .45rem .6rem;
    border-radius: 10px;
    background: var(--highlight);
    font-size: 1rem;
  }
  .nav-menu a.active { background: var(--primary-lt); }
  .nav-account { margin-left: 0; }
  .nav-account summary {
    padding: .45rem .6rem;
    background: var(--highlight);
    border-radius: 10px;
    font-size: 1.2rem;
  }
  .nav-account-dropdown {
    right: 1rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.4rem; }
  .matches-grid  { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .swipe-actions { gap: .75rem; }
}
