/* Kleine, mobile-first UI-Verbesserungen für die Profilfelder. */
.child-row {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 1fr) auto;
}

.child-row input,
.child-row select {
  min-width: 0;
}

.child-row select {
  background: #f8fafb;
  border-color: #cbd7de;
  font-weight: 700;
}

@media (max-width: 520px) {
  .child-row {
    grid-template-columns: minmax(0, 1fr) 42px;
    row-gap: 8px;
  }

  .child-row input {
    grid-column: 1;
    grid-row: 1;
  }

  .child-row select {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }

  .child-row .remove-child {
    grid-column: 2;
    grid-row: 1 / 3;
  }
}

/* Auch auf Desktop bleibt die Kinderzeile luftig und lesbar. */
.child-row {
  grid-template-columns: minmax(0, 1fr) 42px;
  row-gap: 8px;
}

.child-row input {
  grid-column: 1;
  grid-row: 1;
}

.child-row select {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
}

.child-row .remove-child {
  grid-column: 2;
  grid-row: 1 / 3;
}

.setup-card {
  border-radius: 22px;
  padding: 32px;
}

.role-switch {
  gap: 4px;
  padding: 5px;
  border-radius: 13px;
  background: #edf2f4;
}

.role-button {
  min-height: 44px;
  border-radius: 9px;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.role-button.is-active {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 5px 14px rgba(13, 27, 42, .16);
}

.setup-card > label,
.child-row > label {
  color: var(--navy);
  font-size: 11px;
  letter-spacing: .02em;
}

.setup-card > label input,
.child-row > label input,
.setup-card > label select,
.child-row > label select {
  margin-top: 8px;
  min-height: 46px;
  border-radius: 11px;
  background: #fbfcfd;
}

.child-row > label {
  margin: 0;
}

.child-row .child-name-field {
  grid-column: 1;
  grid-row: 1;
}

.child-row .child-team-field {
  grid-column: 1;
  grid-row: 2;
}

.child-row > label select,
#playerTeam {
  appearance: none;
  padding-right: 38px;
  background-color: #fbfcfd;
  background-image: linear-gradient(45deg, transparent 50%, #52616d 50%), linear-gradient(135deg, #52616d 50%, transparent 50%);
  background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.child-row .remove-child {
  align-self: end;
  height: 46px;
}

.setup-card input,
.setup-card select,
.child-row > label input,
.child-row > label select {
  width: 100%;
  min-height: 46px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  padding: 4px;
  background: #fff;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 4px 12px rgba(13, 27, 42, .14);
}

.club-logo-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 4px;
}

.club-logo-field .eyebrow,
.club-logo-field .field-hint {
  margin-bottom: 0;
}

.club-logo-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.club-logo-preview {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  padding: 5px;
}

.club-logo-preview img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  object-position: center;
}

.logo-upload-button {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.avatar-button {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  letter-spacing: .01em;
}

.access-gate {
  padding: 24px;
  border: 1px solid #cfe2e7;
  border-radius: 16px;
  background: #f2faf9;
  margin-bottom: 20px;
}

.access-gate h2 { margin-bottom: 8px; }
.access-gate p:not(.eyebrow) { color: var(--muted); line-height: 1.55; margin-bottom: 8px; }
.access-gate small { color: #397066; line-height: 1.5; }
.club-identity { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; }
.club-hero-logo { width: 72px; height: 72px; flex: 0 0 72px; padding: 5px; border-radius: 50%; object-fit: contain; background: #fff; border: 2px solid rgba(255,255,255,.88); }
.club-identity strong, .club-identity span { display: block; }
.club-identity strong { color: #fff; font-size: 18px; letter-spacing: -.02em; }
.club-identity span { color: #c3d0d8; font-size: 12px; margin-top: 4px; }
.sync-note { color: var(--muted); font-size: 12px; line-height: 1.4; max-width: 180px; text-align: right; }
.invitation-admin-card { padding: 26px; margin-bottom: 24px; }
.invitation-admin-card h2 { margin: 0; }
.invitation-grid { grid-template-columns: 390px 1fr; }
.invitation-grid .source-form,
.invitation-grid .source-list-panel { padding: 0; box-shadow: none; border: 0; background: transparent; }
.invitation-grid select[multiple] { min-height: 132px; }
.invitation-item { background: #fbfcfd; }

.backup-card {
  padding: 26px;
  margin-bottom: 24px;
}

.backup-card h2 { margin: 0; }

.backup-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}

.backup-upload-button {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

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

@media (max-width: 520px) {
  .club-logo-field {
    align-items: flex-start;
    flex-direction: column;
  }

  .club-logo-actions {
    justify-content: flex-start;
  }
}

/* Geschützte Vereinsidentität und ruhige, gleich hohe Profilfelder. */
.club-identity-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  padding: 14px;
  border: 1px solid #d5e6e5;
  border-radius: 16px;
  background: linear-gradient(135deg, #f4fbf9, #eef7f8);
}

.club-identity-card .eyebrow { margin-bottom: 5px; color: #397066; }
.club-identity-card strong,
.club-identity-card span { display: block; }
.club-identity-card strong { color: var(--navy); font-size: 17px; letter-spacing: -.02em; }
.club-identity-card span { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.club-identity-logo-wrap { display: grid; place-items: center; width: 58px; height: 58px; flex: 0 0 58px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(13,27,42,.08); }
.club-identity-card .club-hero-logo { width: 100%; height: 100%; flex: 0 0 100%; border: 0; }
.club-identity-card .club-identity-logo-wrap:has(img[hidden]) { display: none; }
.add-child-button { white-space: nowrap; }
.field-label { margin: 0 0 8px; color: var(--navy); font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.team-choice-list { display: grid; gap: 8px; }
.team-choice { position: relative; display: flex; align-items: center; gap: 10px; min-height: 46px; margin: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfd; color: var(--navy); cursor: pointer; font-size: 13px; font-weight: 750; }
.team-choice:has(input:checked) { border-color: var(--mint); background: #eefaf7; box-shadow: 0 0 0 2px rgba(95,209,178,.18); }
.team-choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--mint); }
.team-choice span { line-height: 1.3; }
.profile-data-actions { justify-content: space-between; }
.audit-card { margin-top: 24px; padding: 26px; }
.audit-card h2 { margin: 0; }
.audit-item time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.update-card { margin-top: 24px; padding: 26px; }
.update-card h2 { margin: 0; }
.update-status { margin: 0 0 8px; color: var(--navy); font-weight: 800; }
.update-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: #e6f7f2; color: #087b64; font-size: 12px; font-weight: 900; }
.update-card .backup-actions { margin-top: 14px; }

@media (max-width: 520px) {
  .club-identity-card { align-items: flex-start; }
  .profile-data-actions { align-items: stretch; flex-direction: column-reverse; }
  .profile-data-actions .button { width: 100%; }
}
