:root {
  --bg: #e3e4e6;
  --card: #f0f0f0;
  --text: #1c1f24;
  --muted: #6b7280;
  --primary: #2563eb;
  --danger: #dc2626;
  --border: #e5e7eb;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  --radius: 14px;
  --gap: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0 auto;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
}

.app-header {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

@media (max-width: 500px) {
  .app-header {
    flex-direction: column;
  }
}

.main-logo {
  width: 120px;
  /* Größe anpassbar */
  height: 87px;
  object-fit: cover;
  border-radius: 0%;
  /* falls PNG transparent -> sauber rund */
}

.app-header,
.app-footer {
  text-align: center;
  padding: 18px 16px;
}

.app-header h1 {
  margin: 0;
  font-size: clamp(20px, 2.5vw, 28px);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 16px;
}

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

.row {
  display: flex;
  align-items: center;
}

.space {
  justify-content: space-between;
}

.gap {
  gap: var(--gap);
}

.field {
  display: flex;
  flex-direction: column;
  min-width: 240px;
}

.field span {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--primary);
}

.btn {
  border: 1px solid var(--border);
  background: #f3f4f6;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn.danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hint {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.list {
  display: grid;
  gap: 10px;
}

.person {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.person .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.person .dogs {
  color: var(--muted);
  font-size: 14px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  margin-right: 6px;
}

.person .actions {
  display: flex;
  gap: 8px;
}

.warnings {
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px;
  display: none;
}

.warnings.show {
  display: block;
}

.groups {
  display: grid;
  gap: 16px;
}

.group {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #fafafa;
}

.group h3 {
  margin: 0.2rem 0 0.8rem;
}

.role {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  margin: 6px 0;
}

.role .title {
  font-weight: 600;
}

.role .name {
  opacity: 0.9;
}

.role .meta {
  color: var(--muted);
  font-size: 13px;
}

.placeholder {
  opacity: 0.6;
  font-style: italic;
}

.present-label {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.present-label input {
  transform: scale(1.1);
}

/* Liste insgesamt */
.list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* enger zusammen */
}

/* Einzelne Person */
.person {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

/* Zebra-Effekt */
.list .person:nth-child(even) {
  background-color: #f8f8f8;
}

/* Kopfzeile: Name links, Aktionen rechts */
.person .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.person .header strong {
  font-size: 15px;
}

/* Checkbox + Button */
.person .actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.present-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  opacity: 0.8;
}

.present-label input[type="checkbox"] {
  transform: scale(1.05);
}

/* Hunde-Zeile */
.person .dogs {
  font-size: 13px;
  padding-left: 2px;
}

/* Hund-Badge */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: #eef3ff;
  border: 1px solid #c5d8ff;
  margin-right: 4px;
  margin-bottom: 3px;
}

/* kleines x für Hund löschen */
.btn.btn-sm {
  font-size: 11px;
  padding: 2px 6px;
  margin-left: 2px;
}

/* kleines Delete-Icon daneben */
.btn.btn-sm {
  font-size: 11px;
  padding: 2px 6px;
  margin-left: 2px;
}

/* Buttons generell etwas kompakter */
.btn {
  padding: 4px 10px;
  font-size: 13px;
}

/* Button-Row in der Teilnehmerübersicht */
.card .row.gap {
  gap: 6px;
  flex-wrap: wrap;
}

.card .row.gap .btn {
  font-size: 12px;
  padding: 3px 10px;
}

/* Card allgemein etwas kompakter */
.card {
  padding: 12px 14px;
  margin-bottom: 10px;
}

/* Überschriften enger */
.card h2 {
  margin-bottom: 4px;
}

.hint {
  font-size: 12px;
  opacity: 0.8;
}

.round {
  border-top: 1px solid #ddd;
  padding-top: 8px;
  margin-top: 10px;
}

.round:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.round > h3 {
  margin-bottom: 4px;
}

.group {
  margin-top: 6px;
}

/* Teilnehmerliste: 1 Spalte mobil, 2 Spalten ab 900px */
.list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

@media (min-width: 900px) {
  .list {
    grid-template-columns: 1fr 1fr;
  }
}

/* Jede Runde */
.round {
  margin-bottom: 20px;
}

/* Rundentitel */
.round > h3 {
  margin-bottom: 10px;
}

/* Gruppen nebeneinander */
.round-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 900px) {
  .round-groups {
    grid-template-columns: 1fr 1fr;
    /* 2 Gruppen nebeneinander */
  }
}

/* Jede Gruppe */
.group {
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
}

/* Titel der Gruppe */
.group > h4 {
  margin: 0 0 8px 0;
}

/* Rollenliste */
.role {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #e0e0e0;
}

.role:last-child {
  border-bottom: none;
}

/* Rolle links */
.role .title {
  font-weight: 600;
  color: #555;
}

/* Name rechts */
.role .name {
  font-weight: 600;
}

/* leichte Farben für bessere Abgrenzung */
.group:nth-child(odd) {
  background: #fafafa;
}

.login-body {
  background: #f5f5f7;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 480px;
  margin: 60px auto;
  margin-top: 16px;
  padding: 0 16px;
  text-align: center;
}

.app-header-login {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

.app-header-login img {
  width: 398px;
  height: 288px;
  margin-top: 40px;
}

.app-header-login h1 {
  margin: 0;
  font-size: 32px;
}

.app-header-login h2 {
  margin: 0;
  font-size: 24px;
}

.column {
  display: flex;
  flex-direction: column;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flanker-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

.rank-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.rank-trainer {
  background: #1565c0;
  color: #fff;
}

.rank-trailer {
  background: #2e7d32;
  color: #fff;
}

.rank-beginner {
  background: #f9a825;
  color: #222;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.collapsible-icon {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.collapsible .collapsible-body {
  display: none;
  margin-top: 12px;
}

.collapsible.open .collapsible-body {
  display: block;
}

.collapsible.open .collapsible-icon {
  transform: rotate(90deg);
}
