* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Verhindert Layout-Shift, wenn nach dem Laden die vertikale Scrollbar erscheint */
html {
  scrollbar-gutter: stable;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 600px;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
#header-placeholder {
  /* Platzhalter in Header-Höhe: verhindert Content-Sprung, bis header.html geladen ist */
  min-height: 73px;
}

.header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  z-index: 101;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #2d3748;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.nav-link {
  padding: 8px 16px;
  text-decoration: none;
  color: #4a5568;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: block;
  white-space: nowrap; /* Verhindert Zeilenumbrüche innerhalb der Links */
}

/* Versteckte Nav-Links nehmen keinen Platz ein (für Zentrierung) */
.nav-link.hidden {
  display: none;
}

.nav-link:hover {
  background: #f7fafc;
  color: #2d3748;
}

.nav-link.active {
  background: #667eea;
  color: white;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  /* Icon-Slot immer reservieren (Login- oder User-Icon), kein Layout-Shift */
  min-width: 48px;
  min-height: 48px;
  justify-content: flex-end;
}

.btn-login {
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
  min-height: 48px;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-login:active {
  transform: translateY(0);
}

/* Header Icon Buttons */
.header-icon-btn {
  padding: 12px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #4a5568;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  min-width: 48px;
  min-height: 48px;
}

.header-icon-btn:hover {
  background: #f7fafc;
  color: #667eea;
}

.header-icon-btn svg {
  display: block;
}

.header-icon-btn {
  position: relative;
}

/* Notification Badge (roter Punkt) */
.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  background-color: #e53e3e;
  border-radius: 50%;
  border: 2px solid white;
  display: none;
  z-index: 10;
}

.user-dropdown-item {
  position: relative;
}

.user-dropdown-item .notification-badge {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
}

/* User Menu Dropdown */
.user-menu {
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  display: none;
  z-index: 1000;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.user-dropdown.active {
  display: block;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-header {
  padding: 12px 16px;
  background: #f7fafc;
  border-bottom: 1px solid #e2e8f0;
}

.user-email {
  font-size: 13px;
  font-weight: 500;
  color: #2d3748;
  word-break: break-word;
}

.user-plan-badge {
  display: none;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  width: fit-content;
  max-width: 100%;
  line-height: 1.4;
  transition: opacity 0.15s ease;
}
.user-plan-badge:hover {
  opacity: 0.85;
}
.user-plan-badge.is-free {
  background: #edf2f7;
  color: #4a5568;
}
.user-plan-badge.is-plus {
  background: #ebf8ff;
  color: #2b6cb0;
}
.user-plan-badge.is-custom {
  background: #faf5ff;
  color: #6b46c1;
}

.user-dropdown-divider {
  height: 1px;
  background: #e2e8f0;
}

.user-dropdown-item {
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s ease;
  font-family: inherit;
}

.user-dropdown-item:hover {
  background: #f7fafc;
  color: #2d3748;
}

.user-dropdown-item svg {
  flex-shrink: 0;
  color: #718096;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 20px 15px;
  width: 100%;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
}

/* Legal Pages Styles */
.legal-page {
  max-width: 900px;
}

.legal-page h1 {
  font-size: 28px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 3px solid #667eea;
}

.legal-page h2 {
  font-size: 20px;
  font-weight: 600;
  color: #2d3748;
  margin-top: 32px;
  margin-bottom: 16px;
}

.legal-page h3 {
  font-size: 16px;
  font-weight: 600;
  color: #4a5568;
  margin-top: 20px;
  margin-bottom: 12px;
}

.legal-section {
  margin-bottom: 32px;
}

.legal-section p {
  font-size: 14px;
  line-height: 1.8;
  color: #4a5568;
  margin-bottom: 16px;
}

.legal-section ul {
  margin-left: 24px;
  margin-bottom: 16px;
}

.legal-section li {
  font-size: 14px;
  line-height: 1.8;
  color: #4a5568;
  margin-bottom: 8px;
}

.legal-section a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-section a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.legal-section a.btn,
.legal-section a.btn:hover {
  text-decoration: none;
}

.legal-section strong {
  color: #2d3748;
  font-weight: 600;
}

/* Info Page Styles */
.info-page-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 3px solid #667eea;
}

.page-intro {
  font-size: 16px;
  color: #4a5568;
  margin-top: 16px;
  font-style: italic;
}

.info-box {
  background: #f7fafc;
  border-left: 4px solid #667eea;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 4px;
}

.info-box.highlight {
  background: #edf2f7;
  border-left-color: #48bb78;
}

.info-box.security {
  background: #fff5f5;
  border-left-color: #fc8181;
}

.feature-section {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  padding: 24px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.feature-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.section-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.section-content {
  flex: 1;
}

.highlight-box {
  background: #f0fff4;
  border: 1px solid #48bb78;
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
}

.highlight-box p {
  margin: 0;
  color: #22543d;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.feature-card {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.feature-card h3 {
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 18px;
}

.feature-card p {
  color: #4a5568;
  margin: 0;
  font-size: 14px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.option-card {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.option-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.option-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.option-card h3 {
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 16px;
}

.option-card p {
  color: #4a5568;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
}

.checklist li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #48bb78;
  font-weight: bold;
  font-size: 18px;
}

.contact-box {
  background: #f7fafc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin-top: 16px;
}

.contact-box a {
  font-size: 16px;
  font-weight: 600;
}

.step-list {
  list-style: none;
  counter-reset: step-counter;
  padding-left: 0;
}

.step-list li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 40px;
  margin-bottom: 16px;
  padding-top: 4px;
}

.step-list li:before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.role-card {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  transition: all 0.3s ease;
}

.role-card:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.role-card h3 {
  color: #2d3748;
  margin-bottom: 16px;
  font-size: 20px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 12px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.benefit-card {
  background: linear-gradient(135deg, #f7fafc 0%, #ffffff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.benefit-card h3 {
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 18px;
}

.benefit-card p {
  color: #4a5568;
  margin: 0;
  font-size: 14px;
}

@media (max-width: 768px) {
  .feature-section {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .section-number {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .feature-grid,
  .options-grid,
  .roles-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .info-page-header {
    text-align: left;
  }

  .step-list li {
    padding-left: 36px;
  }

  .step-list li:before {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
}

.page-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  position: relative;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0;
  color: #2d3748;
  letter-spacing: -0.3px;
  grid-column: 2;
}

.page-header .btn-clear-form {
  grid-column: 3;
  justify-self: end;
}

.page-header .btn-dbb-games {
  grid-column: 1;
  justify-self: start;
}

.page-type-badge {
  grid-column: 1;
  justify-self: start;
  display: inline-block;
  padding: 6px 12px;
  background: #e53e3e;
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  letter-spacing: 0.3px;
  position: relative;
  cursor: help;
}

.page-type-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  background: #2d3748;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  pointer-events: none;
  z-index: 1000;
  white-space: normal;
  max-width: 250px;
  width: max-content;
  font-weight: normal;
}

.page-type-badge::before {
  content: '';
  position: absolute;
  bottom: calc(100% - 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2d3748;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  pointer-events: none;
  z-index: 1001;
}

.page-type-badge:hover::after,
.page-type-badge:hover::before {
  opacity: 1;
  visibility: visible;
}

.btn-clear-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  color: #718096;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  flex-shrink: 0;
  min-height: 48px;
  box-sizing: border-box;
}

.btn-clear-form:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
  color: #4a5568;
}

.btn-clear-form:active {
  background: #e2e8f0;
  transform: scale(0.98);
}

.btn-clear-form svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.btn-clear-form span {
  white-space: nowrap;
}

.btn-dbb-games {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #4a5568;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  min-height: 48px;
  box-sizing: border-box;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn-dbb-games:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
  color: #2d3748;
}

.btn-dbb-games.is-active {
  background: #ebf4ff;
  border-color: #90cdf4;
  color: #2b6cb0;
}

.btn-dbb-games[hidden] {
  display: none !important;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group[hidden] {
  display: none !important;
}

label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 8px;
  color: #4a5568;
  letter-spacing: 0.1px;
}

input[type='text'],
input[type='email'],
input[type='date'],
input[type='password'],
input[type='number'],
input[type='tel'],
input[type='search'],
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px; /* verhindert iOS-Zoom beim Fokus */
  font-family: inherit;
  min-height: 48px;
  box-sizing: border-box;
  transition: all 0.25s ease;
  color: #2d3748;
}

/* Einheitliche Selects (User-Bereich) */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.3;
  color: #2d3748;
  min-height: 44px;
  box-sizing: border-box;
  cursor: pointer;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1.5 1.5L7 7L12.5 1.5' stroke='%234A5568' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

select:hover {
  border-color: #a3bffa;
}

select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #f7fafc;
}

/* Pfeil dreht sich beim Ausklappen (Fallback ohne Wrapper) */
select:open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1.5 7.5L7 2L12.5 7.5' stroke='%234A5568' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Wrapper: animierter Chevron (via load-components.js) */
.select-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  vertical-align: middle;
}

/* Inhaltsbreite statt unnötig volle Breite */
.receipt-scope .select-wrap,
.current-club-bar .select-wrap,
.status-cell .select-wrap,
.club-billing-context-switch .select-wrap,
td .select-wrap,
.select-wrap:has(.role-select),
.select-wrap:has(.receipt-scope-select),
.select-wrap:has(.status-select),
.select-wrap:has(.detail-status-select) {
  width: fit-content;
  max-width: 100%;
  display: inline-block;
}

.select-wrap > select {
  background-image: none !important;
  padding-right: 2.1rem !important;
}

.receipt-scope .select-wrap > select,
.current-club-bar .select-wrap > select,
.status-cell .select-wrap > select,
.club-billing-context-switch .select-wrap > select,
td .select-wrap > select,
.select-wrap:has(.role-select) > select,
.select-wrap:has(.receipt-scope-select) > select,
.select-wrap:has(.status-select) > select,
.select-wrap:has(.detail-status-select) > select {
  width: auto;
  max-width: 100%;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 12px;
  height: 8px;
  margin-top: -4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1.5 1.5L7 7L12.5 1.5' stroke='%234A5568' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 8px;
  pointer-events: none;
  transition: transform 0.2s ease;
  transform: rotate(0deg);
  transform-origin: center;
}

.select-wrap:has(select:open)::after,
.select-wrap.is-open::after {
  transform: rotate(180deg);
}

.select-wrap:has(select:disabled)::after {
  opacity: 0.55;
}

.select-wrap:has(select.club-current-select:disabled)::after {
  opacity: 1;
}

/* Native Option-Listen (wo der Browser Styling zulässt) */
option {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  padding: 12px 14px;
  min-height: 44px;
  color: #2d3748;
  background-color: #fff;
}

optgroup {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input[type='checkbox'] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  margin: 0;
  cursor: pointer;
  accent-color: #667eea;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Checkbox + Text vertikal zentriert */
label:has(> input[type='checkbox']) {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  cursor: pointer;
  line-height: 1.3;
}

/* Rot nur wenn explizit als invalid markiert (beim Absenden) */
input.field-invalid {
  border-color: #fc8181;
  background: #fff5f5;
}

/* Grün wenn ausgefüllt/valid */
input.field-valid {
  border-color: #48bb78;
  background: #f0fff4;
}

input[type='text']:focus,
input[type='email']:focus,
input[type='date']:focus,
input[type='password']:focus,
input[type='number']:focus,
input[type='tel']:focus,
input[type='search']:focus,
textarea:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select:focus {
  outline: none;
  border-color: #667eea;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.18);
}

input[type='text']::placeholder,
input[type='email']::placeholder,
textarea::placeholder {
  color: #a0aec0;
}

.referees-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.referee-add-slot {
  display: flex;
  align-items: center;
  justify-content: stretch;
  min-height: 100%;
}

.btn-add-referee {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #4a5568;
  background: #edf2f7;
  border: 1px dashed #cbd5e0;
  border-radius: 8px;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-add-referee:hover {
  background: #e2e8f0;
  border-color: #a0aec0;
  color: #2d3748;
}

.btn-add-referee-below {
  display: block;
  margin: -8px 0 16px;
}

.referee-section {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 0;
  background: #f7fafc;
  transition: all 0.25s ease;
}

.referee-section:hover {
  border-color: #cbd5e0;
  background: #edf2f7;
}

.referee-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.btn-hide-referee {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #718096;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-hide-referee:hover {
  color: #c53030;
  background: #fff5f5;
}

.btn-hide-referee:active {
  background: #fed7d7;
}

.referee-section h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 0;
  color: #2d3748;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.referee-section .referee-section-header h3 {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.signature-group {
  margin-top: 12px;
}

.signature-group label {
  font-size: 11px;
  margin-bottom: 6px;
}

.signature-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.signature-preview-wrapper {
  position: relative;
  flex: 1;
  cursor: pointer;
}

.signature-canvas {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  background: white;
  width: 100%;
  height: auto;
  aspect-ratio: 280 / 90; /* Gleiches Seitenverhältnis wie im PDF */
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  display: block;
}

.signature-canvas:hover {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.signature-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #a0aec0;
  font-size: 12px;
  pointer-events: all;
  text-align: center;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  width: calc(100% - 16px);
}

.signature-placeholder:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.signature-canvas.signature-valid + .signature-placeholder {
  display: none;
}

.signature-canvas.signature-required {
  border-color: #fc8181;
  background: #fff5f5;
  animation: pulse-required 2s infinite;
}

.signature-canvas.signature-valid {
  border-color: #48bb78;
  background: #f0fff4;
}

@keyframes pulse-required {
  0%,
  100% {
    border-color: #fc8181;
  }
  50% {
    border-color: #feb2b2;
  }
}

.btn-clear {
  padding: 12px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  color: #718096;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
  min-width: 48px;
  min-height: 48px;
}

.btn-clear:hover {
  background: #fed7d7;
  border-color: #fc8181;
  color: #c53030;
}

.btn-clear svg {
  display: block;
}

.info-text {
  font-size: 10px;
  color: #718096;
  font-style: italic;
  margin-bottom: 16px;
  margin-top: -8px;
  padding-left: 4px;
}

.total-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid #e2e8f0;
}

.total-group label {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
}

.total-input-wrapper {
  position: relative;
}

.total-group input {
  font-size: 15px;
  font-weight: 600;
}

.total-group input.field-valid {
  border-color: #48bb78;
  background: #f0fff4;
}

.total-group input.field-invalid {
  border-color: #fc8181;
  background: #fff5f5;
}

.auto-calc-hint {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #718096;
  font-style: italic;
  pointer-events: none;
}

.button-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

@media (min-width: 769px) {
  .button-group {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
  }
}

.button-group-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 0 0 auto; /* Buttons nehmen nur den benötigten Platz ein */
}

.button-group-inner .btn {
  height: 48px;
  min-height: 48px;
  padding: 0 18px;
  white-space: nowrap;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.button-group-inner .receipt-scope-select,
.button-group-inner .select-wrap > select {
  height: 48px;
  min-height: 48px;
}

.receipt-scope {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.receipt-scope[hidden] {
  display: none !important;
}

.receipt-scope-label {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 600;
  color: #718096;
  white-space: nowrap;
  line-height: 1.2;
}

.receipt-scope-select {
  width: auto;
  max-width: 220px;
  min-width: 0;
}

.receipt-scope-select:hover,
.receipt-scope-select:focus {
  color: #2d3748;
}

/* Anzeige/Umschalter „aktueller Verein“ (Verwalten / Wechseln) */
.club-current-select {
  width: auto;
  max-width: min(320px, 100%);
  min-width: 0;
}

.form-group > .club-current-select {
  width: 100%;
  max-width: 100%;
}

.club-current-select:disabled {
  opacity: 1;
  color: #2d3748;
  background-color: #fff;
  cursor: default;
}

.current-club-bar {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  grid-column: 1;
  justify-self: start;
  max-width: 100%;
}

.current-club-bar .club-current-select {
  width: auto;
  max-width: min(360px, 100%);
}

@media (max-width: 768px) {
  .current-club-bar {
    order: 1;
    width: 100%;
  }
  .current-club-bar .club-current-select {
    width: 100%;
    max-width: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.club-current-info {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #f7fafc;
  color: #2d3748;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rollen-Select in Mitgliederverwaltung */
.role-select {
  width: auto;
  min-width: 8.75rem;
  font-size: 14px;
  min-height: 40px;
  padding-top: 6px;
  padding-bottom: 6px;
  padding-left: 10px;
}

.btn-remove-member {
  padding: 8px 14px;
  background: #fed7d7;
  color: #c53030;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  min-height: 44px;
  box-sizing: border-box;
}

.btn-remove-member:hover {
  background: #feb2b2;
}

@media (max-width: 768px) {
  .receipt-scope {
    max-width: 100%;
  }
  .receipt-scope-select {
    max-width: min(200px, 50vw);
  }
}

.btn {
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Deaktivierter Button ohne Login */
.btn.disabled-no-login {
  opacity: 0.6;
  cursor: not-allowed;
  position: relative;
}

.btn.disabled-no-login:hover {
  opacity: 0.7;
}

/* Tooltip Container */
.tooltip-container {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

.btn.disabled-no-login:hover .tooltip-container {
  opacity: 1;
  visibility: visible;
}

.tooltip-text {
  background: #2d3748;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  max-width: 300px;
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}

.tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2d3748;
}

/* Searchable Dropdown Styles */
.searchable-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-selected {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  color: #2d3748;
  background: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  box-sizing: border-box;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  user-select: none;
}

.dropdown-selected:hover {
  border-color: #a3bffa;
}

.dropdown-selected.active {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.18);
}

.dropdown-placeholder {
  color: #a0aec0;
}

.dropdown-arrow {
  display: inline-block;
  color: #4a5568;
  font-size: 12px;
  line-height: 1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  transform: rotate(0deg);
  transform-origin: center;
}

.dropdown-selected.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  z-index: 1000;
  max-height: min(50vh, 380px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dropdown-search {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.dropdown-search input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  min-height: 48px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.dropdown-search input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.dropdown-options {
  max-height: min(42vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 0;
}

.dropdown-option {
  padding: 14px 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  font-size: 16px;
  color: #2d3748;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  box-sizing: border-box;
}

.dropdown-option:hover,
.dropdown-option:active {
  background-color: #edf2f7;
}

.dropdown-option.selected {
  background-color: #ebf8ff;
  color: #667eea;
  font-weight: 600;
}

.dropdown-option.hidden {
  display: none;
}

.dropdown-option-name {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  line-height: 1.35;
}

.dropdown-option-role {
  flex-shrink: 0;
  font-size: 13px;
  padding: 6px 10px;
  background: #e6fffa;
  color: #234e52;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.dropdown-no-results {
  padding: 16px;
  text-align: center;
  color: #718096;
  font-size: 14px;
}

.message {
  padding: 12px 16px;
  border-radius: 8px;
  display: none;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  text-align: center;
  order: -1; /* Auf Mobil oben */
  margin-bottom: 12px;
}

@media (min-width: 769px) {
  .message {
    width: 100%;
    text-align: center;
    order: -1; /* Immer oben */
    margin-bottom: 12px;
    margin-right: 0;
  }
}

.message.success {
  background: #c6f6d5;
  color: #22543d;
  display: block;
  border: 2px solid #9ae6b4;
}

.message.error {
  background: #fed7d7;
  color: #742a2a;
  display: block;
  border: 2px solid #fc8181;
}

.message.is-sticky,
.message.error {
  position: relative;
  padding-right: 36px;
  text-align: left;
}

.flash-text {
  display: block;
  line-height: 1.45;
}

.flash-dismiss {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  border-radius: 4px;
}
.flash-dismiss:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

/* ===== Globale Toasts (ersetzen Inline-Flash-Boxen) ===== */
.toast-root {
  position: fixed;
  left: calc(12px + env(safe-area-inset-left, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  top: auto;
  right: auto;
  z-index: 10060;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 24px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-radius: 10px;
  border: 1px solid transparent;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  font-size: 0.95rem;
  line-height: 1.45;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.toast.toast-in {
  opacity: 1;
  transform: translateY(0);
}

.toast.toast-out {
  opacity: 0;
  transform: translateY(8px);
}

.toast-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  padding: 14px 12px 14px 16px;
  align-self: center;
}

.toast-dismiss {
  flex-shrink: 0;
  align-self: stretch;
  width: 56px;
  min-width: 56px;
  min-height: 56px;
  margin: 0;
  padding: 0;
  border: none;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.04);
  color: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.toast-dismiss:hover,
.toast-dismiss:focus-visible {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
  outline: none;
}

.toast-dismiss:active {
  background: rgba(0, 0, 0, 0.14);
}

.toast-error {
  background: #fed7d7;
  color: #742a2a;
  border-color: #fc8181;
}

.toast-success {
  background: #c6f6d5;
  color: #22543d;
  border-color: #9ae6b4;
}

.toast-info {
  background: #ebf8ff;
  color: #2a4365;
  border-color: #90cdf4;
}

@media (max-width: 1024px) {
  .toast-dismiss {
    width: 64px;
    min-width: 64px;
    min-height: 64px;
    font-size: 32px;
  }

  .toast-text {
    padding: 16px 14px 16px 16px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .toast-root {
    left: calc(12px + env(safe-area-inset-left, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
  }
}

/* Kontingent / Abo Upsell */
.quota-upsell-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.quota-upsell-modal[hidden] {
  display: none !important;
}
.quota-upsell-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 32, 44, 0.55);
}
.quota-upsell-dialog {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  border: 1px solid #e2e8f0;
}
.quota-upsell-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #718096;
  cursor: pointer;
}
.quota-upsell-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2f855a;
  margin-bottom: 8px;
}
.quota-upsell-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.25;
  color: #1a202c;
}
.quota-upsell-usage {
  margin: 0 0 12px;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fff5f5;
  color: #9b2c2c;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #feb2b2;
}
.quota-upsell-usage[hidden] {
  display: none !important;
}
.quota-upsell-body {
  margin: 0 0 20px;
  color: #4a5568;
  font-size: 14px;
  line-height: 1.5;
}
.quota-upsell-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quota-upsell-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.quota-upsell-btn-primary {
  background: #38a169;
  color: #fff;
}
.quota-upsell-btn-primary:hover {
  background: #2f855a;
}
.quota-upsell-btn-secondary {
  background: #edf2f7;
  color: #2d3748;
  border-color: #e2e8f0;
}
.quota-upsell-btn-secondary:hover {
  background: #e2e8f0;
}
.quota-upsell-btn-ghost {
  background: transparent;
  color: #4a5568;
  border-color: transparent;
}
.quota-upsell-btn-ghost:hover {
  background: #f7fafc;
}

/* Vorab-Kontingent-Hinweis auf Beleg-Formularen */
.quota-warning-banner {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.quota-warning-banner[hidden] {
  display: none !important;
}
.quota-warning-banner.is-warn {
  background: #fffbeb;
  border-color: #f6e05e;
  color: #744210;
}
.quota-warning-banner.is-danger {
  background: #fff5f5;
  border-color: #feb2b2;
  color: #9b2c2c;
}
.quota-warning-banner a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}
.quota-warning-banner a:hover {
  opacity: 0.85;
}

/* Basketball-Bund Spiele (Beleg-Seite) */
.dbb-games-box {
  margin: 0 0 20px 0;
  padding: 14px 16px;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.dbb-games-box-panel {
  padding: 14px 16px;
}
.dbb-games-panel-header {
  margin-bottom: 10px;
}
.dbb-games-title {
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 2px;
  font-size: 15px;
}
.dbb-games-week {
  font-size: 12px;
  color: #718096;
  margin: 0;
}
.dbb-games-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dbb-game-card {
  text-align: left;
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.dbb-game-card:hover {
  border-color: #667eea;
}
.dbb-game-card.selected {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}
.dbb-game-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #718096;
  margin-bottom: 4px;
}
.dbb-game-card-match {
  color: #2d3748;
  font-size: 14px;
}
.dbb-game-card-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #a0aec0;
}
.dbb-games-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #c6f6d5;
  color: #276749;
  font-size: 11px;
  font-weight: 700;
}
.dbb-games-empty {
  margin: 0;
  color: #718096;
  font-size: 13px;
}
.dbb-games-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: #a0aec0;
}
#dbbGamesContainer[hidden] {
  display: none !important;
}

/* Signature Modal */
.signature-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.signature-modal.active {
  display: flex;
}

.signature-modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.signature-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.signature-modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}

.btn-close-modal {
  background: none;
  border: none;
  cursor: pointer;
  color: #718096;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
  min-width: 48px;
  min-height: 48px;
}

.btn-close-modal:hover {
  background: #f7fafc;
  color: #2d3748;
}

.signature-modal-body {
  flex: 1;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.signature-modal-canvas {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  cursor: crosshair;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  touch-action: none;
  aspect-ratio: 280 / 90; /* Gleiches Seitenverhältnis wie Vorschau und PDF */
  min-height: 200px;
}

.signature-modal-footer {
  display: flex;
  gap: 12px;
  padding: 20px;
  border-top: 2px solid #e2e8f0;
  justify-content: flex-end;
}

.signature-modal-footer .btn {
  min-width: 100px;
}

.signature-modal-footer .btn-danger {
  background: #e53e3e;
  color: #fff;
  border: none;
}

.signature-modal-footer .btn-danger:hover {
  background: #c53030;
}

.signature-modal-footer .btn-success {
  background: #38a169;
  color: #fff;
  border: none;
}

.signature-modal-footer .btn-success:hover {
  background: #2f855a;
}

.signature-modal-footer .btn-disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* Confirm Modal */
.confirm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-modal.active {
  display: flex;
}

.confirm-modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.confirm-modal-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 2px solid #e2e8f0;
}

.confirm-modal-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}

.confirm-modal-body {
  padding: 24px;
}

.confirm-modal-message {
  margin-bottom: 16px;
  display: none;
}

.confirm-modal-message .message {
  margin: 0;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.confirm-modal-warning {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  display: none;
}

.confirm-modal-body p {
  font-size: 15px;
  line-height: 1.6;
  color: #4a5568;
  margin: 0;
}

.confirm-modal-question {
  margin-top: 16px;
}

.confirm-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px 24px 24px;
  border-top: 2px solid #e2e8f0;
  justify-content: flex-end;
}

.confirm-modal-footer .btn {
  min-width: 120px;
}

/* Footer Styles */
.footer {
  background: #2d3748;
  color: #e2e8f0;
  margin-top: auto;
  padding-top: 40px;
  padding-bottom: 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-bottom: 24px;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
}

.footer-text {
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5e0;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  color: #cbd5e0;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: white;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid #4a5568;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: #a0aec0;
}

@media (max-width: 1024px) {
  .referees-container {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Tablet: Zuordnung + Speichern nebeneinander lassen */
  .button-group {
    justify-content: flex-end;
  }

  .button-group-inner {
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    max-width: 100%;
  }

  .button-group-inner .btn {
    flex: 0 0 auto;
  }

  .button-group-inner .receipt-scope {
    flex: 0 1 auto;
    min-width: 0;
  }
}

@media (max-width: 968px) {
  .referees-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 15px 10px;
  }

  .container {
    padding: 18px;
  }

  /* Header Mobile */
  .header-container {
    padding: 10px 15px;
    flex-wrap: nowrap;
  }

  .logo-link {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    order: 2;
  }

  .logo {
    height: 40px;
  }

  .nav {
    order: 1;
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .nav-toggle {
    display: flex;
    margin-right: auto;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    width: 100%;
    background: white;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    gap: 0;
    margin-top: 8px;
    padding: 8px 0;
    z-index: 99;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 12px 16px;
    border-radius: 0;
  }

  .header-actions {
    order: 3;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .user-dropdown {
    right: 0;
    left: auto;
  }

  .btn-login {
    padding: 8px 16px;
    font-size: 13px;
  }

  /* Footer Mobile */
  .footer {
    padding-top: 32px;
    padding-bottom: 16px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 15px;
  }

  .footer-bottom {
    padding: 16px 15px;
  }

  /* Legal Pages Mobile */
  .legal-page h1 {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .legal-page h2 {
    font-size: 18px;
    margin-top: 24px;
  }

  .legal-page h3 {
    font-size: 15px;
    margin-top: 16px;
  }

  .legal-section {
    margin-bottom: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .button-group {
    flex-direction: column;
    align-items: stretch;
  }

  .button-group-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
  }

  .button-group-inner .btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 48px;
  }

  .button-group-inner .receipt-scope {
    width: auto;
    flex: 0 1 auto;
    min-width: 0;
  }

  /* Pagination Mobile */
  .pagination-controls {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .pagination-controls > div:first-child {
    order: 2;
  }

  .pagination-controls > div:last-child {
    order: 1;
  }

  .btn-link {
    order: 2;
  }

  .btn-secondary {
    order: 1;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    display: flex;
  }

  .page-header h1 {
    font-size: 20px;
    text-align: left;
    order: 2;
  }

  .page-type-badge {
    order: 1;
    align-self: flex-start;
  }

  .page-header .btn-clear-form {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .page-header .btn-dbb-games {
    order: 1;
    width: 100%;
    justify-content: center;
  }

  .btn-clear-form {
    width: 100%;
    justify-content: center;
  }

  .signature-container {
    flex-direction: column;
    align-items: stretch;
  }

  .signature-placeholder {
    width: calc(100% - 20px);
    padding: 8px;
    font-size: 13px;
  }

  .btn-clear {
    align-self: flex-start;
    margin-top: 8px;
  }

  .auto-calc-hint {
    position: static;
    display: block;
    margin-top: 5px;
    transform: none;
  }

  /* Modal auf mobilen Geräten - quer, voller Bildschirm */
  .signature-modal {
    padding: 0;
  }

  .signature-modal-content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .signature-modal-header {
    padding: 15px;
    flex-shrink: 0;
  }

  .signature-modal-body {
    flex: 1;
    padding: 15px;
    min-height: 0;
    overflow: hidden;
  }

  .signature-modal-canvas {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 280 / 90; /* Behalte das Seitenverhältnis bei - breit und flach wie ein normales Unterschriftsfeld */
    min-height: 160px;
    max-width: 100%;
  }

  .signature-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .signature-modal-footer {
    flex-direction: column;
    flex-shrink: 0;
    padding: 15px;
  }

  .signature-modal-footer .btn {
    width: 100%;
  }

  .confirm-modal {
    padding: 10px;
  }

  .confirm-modal-content {
    max-width: 100%;
  }

  .confirm-modal-header {
    padding: 20px 20px 12px 20px;
  }

  .confirm-modal-header h2 {
    font-size: 18px;
  }

  .confirm-modal-body {
    padding: 20px;
  }

  .confirm-modal-body p {
    font-size: 14px;
  }

  .confirm-modal-footer {
    flex-direction: column;
    padding: 12px 20px 20px 20px;
  }

  .confirm-modal-footer .btn {
    width: 100%;
    min-width: auto;
  }
}

/* Meine Belege Seite - Stats, Filter, Tabelle */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  padding: 20px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.stat-card h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #4a5568;
  font-weight: normal;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: bold;
  color: #2d3748;
}

.stat-card.pending .stat-value {
  color: #e53e3e;
}

.stat-card.processed .stat-value {
  color: #38a169;
}

.filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-weight: 500;
  color: #4a5568;
  font-size: 14px;
}

.filter-group select,
.filter-group .filter-input {
  font-family: inherit;
}

.filter-group .filter-input {
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 16px;
  background: white;
  cursor: text;
  min-width: 200px;
  min-height: 48px;
  box-sizing: border-box;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.filter-group .filter-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.18);
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bookings-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  min-width: 800px;
}

.bookings-table thead {
  background: #2d3748;
  color: white;
}

.bookings-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.bookings-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.bookings-table tbody tr {
  cursor: pointer;
  transition: background 0.2s;
}

.bookings-table tbody tr:hover {
  background: #f7fafc;
}

.bookings-table tbody tr.processed {
  opacity: 0.6;
  background: #f0fff4;
}

.status-cell {
  width: 150px;
}

.status-select {
  width: auto;
  min-width: 140px;
  font-weight: 500;
}

.status-select:hover {
  border-color: #a3bffa;
}

.status-select.pending {
  background-color: #fff5f5;
  border-color: #fc8181;
  color: #c53030;
}

.status-select.in_progress {
  background-color: #ebf8ff;
  border-color: #4299e1;
  color: #2b6cb0;
}

.status-select.processed {
  background-color: #f0fff4;
  border-color: #48bb78;
  color: #22543d;
}

.status-select.zahlung_erhalten {
  background-color: #c6f6d5;
  border-color: #48bb78;
  color: #22543d;
}

.status-select.rejected {
  background-color: #fff5f5;
  border-color: #f56565;
  color: #c53030;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Klickbare Zellen für Checkbox und Status */
.bookings-table td:first-child {
  cursor: pointer;
  user-select: none;
}

.bookings-table td:first-child:hover {
  background-color: #f7fafc;
}

.status-cell {
  cursor: pointer;
  user-select: none;
}

.status-cell:hover {
  background-color: #f7fafc;
}

.status-badge.pending {
  background: #fed7d7;
  color: #c53030;
}

.status-badge.in_progress {
  background: #bee3f8;
  color: #2b6cb0;
}

.status-badge.processed {
  background: #c6f6d5;
  color: #22543d;
}

.status-badge.zahlung_erhalten {
  background: #c6f6d5;
  color: #22543d;
}

.status-badge.rejected {
  background: #fed7d7;
  color: #c53030;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #718096;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.loading::before {
  content: '';
  border: 3px solid rgba(113, 128, 150, 0.3);
  border-top: 3px solid #718096;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Loading Spinner für Statistiken */
.loading-spinner-small {
  display: inline-block;
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-top: 2px solid #667eea;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  vertical-align: middle;
}

.stat-value .loading-spinner-small {
  margin: 0 auto;
  display: block;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #718096;
}

.empty-state h3 {
  margin-bottom: 10px;
  color: #4a5568;
}

/* Detail Modal */
.detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.detail-modal.active {
  display: flex;
}

.detail-modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.detail-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.detail-modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: #2d3748;
}

.btn-close-detail {
  background: none;
  border: none;
  cursor: pointer;
  color: #718096;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-close-detail:hover {
  background: #f7fafc;
  color: #2d3748;
}

.detail-modal-body {
  padding: 20px;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.detail-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 15px;
  margin-bottom: 12px;
  align-items: start;
}

.detail-label {
  font-weight: 500;
  color: #4a5568;
  font-size: 13px;
}

.detail-value {
  color: #2d3748;
  font-size: 14px;
}

.detail-signature {
  margin-top: 10px;
}

.detail-signature img {
  max-width: 200px;
  max-height: 65px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  margin-top: 5px;
}

.detail-status-select {
  width: auto;
  min-width: 150px;
  font-weight: 500;
}

.detail-status-select:hover {
  border-color: #a3bffa;
}

.detail-status-select.pending {
  background-color: #fff5f5;
  border-color: #fc8181;
  color: #c53030;
}

.detail-status-select.in_progress {
  background-color: #ebf8ff;
  border-color: #4299e1;
  color: #2b6cb0;
}

.detail-status-select.processed {
  background-color: #f0fff4;
  border-color: #48bb78;
  color: #22543d;
}

.detail-status-select.rejected {
  background-color: #fff5f5;
  border-color: #f56565;
  color: #c53030;
}

/* Responsive Design für Meine Belege Seite */
@media (max-width: 768px) {
  .stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .stat-card .stat-value {
    font-size: 28px;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group select {
    width: 100%;
  }

  .table-wrapper {
    margin: 0 -10px;
  }

  .bookings-table {
    font-size: 12px;
    min-width: 600px;
  }

  .bookings-table th,
  .bookings-table td {
    padding: 8px;
  }

  .detail-modal {
    padding: 10px;
  }

  .detail-modal-content {
    max-height: 95vh;
    border-radius: 8px;
  }

  .detail-modal-header {
    padding: 15px;
  }

  .detail-modal-body {
    padding: 15px;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .detail-label {
    font-weight: 600;
    margin-bottom: 4px;
  }

  .detail-status-select {
    width: 100%;
    min-width: auto;
  }
}

/* Tab System für Verein verwalten */
.tab-container {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
}

.tab-button {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  font-weight: 600;
  color: #718096;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.tab-button:hover {
  color: #667eea;
  background: #f7fafc;
}

.tab-button.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Verein wechseln: Vereinsauswahl */
.verein-wechseln-select-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}
.verein-wechseln-select-row .searchable-dropdown {
  flex: 1;
  min-width: 200px;
}
.btn-scan-qr {
  background: #667eea;
  color: white;
  white-space: nowrap;
}

.btn-create-club {
  background: #e2e8f0;
  color: #4a5568;
  box-shadow: none;
}

.btn-create-club:hover {
  background: #cbd5e0;
  color: #2d3748;
}
@media (max-width: 480px) {
  .verein-wechseln-select-row {
    flex-direction: column;
  }
  .verein-wechseln-select-row .searchable-dropdown {
    min-width: 100%;
  }
}

/* Verein verwalten: Tabs responsive */
@media (max-width: 768px) {
  .tab-container {
    flex-wrap: wrap;
    gap: 4px;
  }
  .tab-button {
    padding: 10px 12px;
    font-size: 13px;
    flex: 1 1 auto;
    min-width: 0;
  }
}
@media (max-width: 480px) {
  .tab-button {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* Verein verwalten: Beitritt-Link-Feld responsive */
.join-link-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.join-link-row input {
  flex: 1;
  min-width: 0;
}
.join-link-row .btn {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .join-link-row {
    flex-direction: column;
  }
  .join-link-row input,
  .join-link-row .btn {
    width: 100%;
  }
}

/* QR-Code Bereich (Verein verwalten – Beitritt-Tab) */
.qr-code-section {
  max-width: 100%;
}
.qr-code-container {
  text-align: center;
  padding: 30px;
  background: white;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  margin-bottom: 16px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.qr-code-container .qr-code-image {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 300px;
  display: block;
  margin: 0 auto;
}

/* Mitgliedschaftsanfragen-Karten (Verein verwalten) */
.request-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 12px;
  gap: 16px;
  flex-wrap: wrap;
}
.request-card-info {
  min-width: 0;
  flex: 1;
}
.request-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.request-card-actions .btn-approve-request,
.request-card-actions .btn-reject-request {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.request-card-actions .btn-approve-request {
  background: #c6f6d5;
  color: #22543d;
}
.request-card-actions .btn-reject-request {
  background: #fed7d7;
  color: #c53030;
}
@media (max-width: 600px) {
  .request-card {
    flex-direction: column;
    align-items: stretch;
  }
  .request-card-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .request-card-actions .btn-approve-request,
  .request-card-actions .btn-reject-request {
    flex: 1;
    min-width: 120px;
  }
}

/* E-Mail-Felder Styles */
.email-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.email-input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 16px;
  min-height: 48px;
  box-sizing: border-box;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.email-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.email-input.field-valid {
  border-color: #48bb78;
}

.email-input.field-invalid {
  border-color: #f56565;
}

.btn-remove-email {
  padding: 12px;
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 8px;
  cursor: pointer;
  color: #c33;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  min-width: 48px;
  min-height: 48px;
}

.btn-remove-email:hover {
  background: #fcc;
  border-color: #f99;
  color: #a00;
}

#addEmailBtn,
#addMyEmailBtn,
#addAnotherEmailBtn {
  padding: 12px 16px;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  box-sizing: border-box;
}

/* Pagination Styles */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 16px 0;
}

#pageInfo {
  color: #718096;
  font-size: 14px;
  font-weight: 500;
}

.btn-pagination {
  padding: 12px 18px;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #2d3748;
  transition: all 0.2s;
  font-family: inherit;
  min-height: 48px;
  box-sizing: border-box;
}

.btn-pagination:hover:not(:disabled) {
  background: #edf2f7;
  border-color: #cbd5e0;
  color: #1a202c;
}

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

#pageNumbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-number-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #4a5568;
  transition: all 0.2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-number-btn:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
  color: #2d3748;
}

.page-number-btn.active {
  background: #667eea;
  border-color: #667eea;
  color: #ffffff;
  font-weight: 600;
}

.page-number-btn.active:hover {
  background: #5568d3;
  border-color: #5568d3;
}

/* Welcome Modal Styles */
.welcome-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.welcome-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.welcome-modal-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.welcome-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #2d3748;
}

.welcome-modal-close {
  background: none;
  border: none;
  font-size: 32px;
  color: #718096;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
  line-height: 1;
}

.welcome-modal-close:hover {
  background: #f7fafc;
  color: #2d3748;
}

.welcome-modal-body {
  padding: 24px;
}

.welcome-modal-body p {
  margin: 0 0 16px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #4a5568;
}

.welcome-modal-body p:last-child {
  margin-bottom: 0;
}

.welcome-modal-footer {
  padding: 16px 24px 24px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.welcome-modal-footer .btn {
  min-width: 120px;
  margin: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .welcome-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .welcome-modal-header {
    padding: 20px 20px 12px 20px;
  }

  .welcome-modal-header h2 {
    font-size: 20px;
  }

  .welcome-modal-body {
    padding: 20px;
  }

  .welcome-modal-footer {
    padding: 12px 20px 20px 20px;
  }
}

/* Loading Overlay */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.loading-overlay.active {
  display: flex;
}

.loading-overlay-content {
  background: white;
  padding: 40px 50px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 400px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-overlay-text {
  font-size: 16px;
  font-weight: 500;
  color: #2d3748;
  margin: 0;
}

.loading-overlay-subtext {
  font-size: 14px;
  color: #718096;
  margin-top: 8px;
}

/* ===== Touch / Tablet-First (User-UI) ===== */
.btn-delete-receipt,
.btn-payment-received,
.btn-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  min-height: 44px;
  box-sizing: border-box;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-delete-receipt {
  background: #fed7d7;
  color: #c53030;
}

.btn-delete-receipt:hover {
  background: #feb2b2;
}

.btn-payment-received {
  background: #c6f6d5;
  color: #22543d;
}

.btn-payment-received:hover {
  background: #9ae6b4;
}

.bookings-table .actions-cell,
.bookings-table td.actions {
  white-space: nowrap;
}

.bookings-table .btn-delete-receipt,
.bookings-table .btn-payment-received {
  margin: 2px 4px 2px 0;
}

.email-search-input,
.searchable-email-dropdown .email-search-input {
  min-height: 48px !important;
  font-size: 16px !important;
  padding: 12px 14px !important;
  box-sizing: border-box;
}

.user-dropdown-item,
.user-menu-item,
.dropdown-item {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
  box-sizing: border-box;
}

.tab-button {
  min-height: 48px;
  font-size: 15px;
}

.filter-bar select,
.filters select,
#statusFilter,
#searchFilter {
  min-height: 48px;
  font-size: 16px;
}

@media (max-width: 1024px) {
  select {
    font-size: 17px;
    min-height: 48px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  option {
    font-size: 17px;
    padding: 14px 16px;
    min-height: 48px;
    line-height: 1.55;
  }

  .dropdown-selected {
    min-height: 52px;
    font-size: 17px;
    padding: 14px 16px;
  }

  .dropdown-menu {
    max-height: min(55vh, 420px);
    border-radius: 14px;
  }

  .dropdown-options {
    max-height: min(48vh, 360px);
  }

  .dropdown-option {
    min-height: 56px;
    font-size: 17px;
    padding: 16px 18px;
  }

  .dropdown-option-name {
    font-size: 17px;
  }

  .dropdown-option-role {
    font-size: 14px;
    padding: 7px 11px;
  }

  .dropdown-search input {
    min-height: 52px;
    font-size: 17px;
    padding: 14px 16px;
  }

  .role-select {
    min-height: 48px;
    font-size: 16px;
  }

  .signature-modal-canvas {
    min-height: 180px;
  }

  .signature-modal-footer {
    flex-wrap: wrap;
    gap: 10px;
  }

  .signature-modal-footer .btn {
    flex: 1 1 140px;
  }

  .main-content {
    padding: 18px 14px;
  }

  .button-group {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .button-group-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .button-group-inner .btn {
    width: 100%;
  }

  .button-group-inner .receipt-scope {
    width: 100%;
    justify-content: space-between;
  }

  /* Wrap bleibt inhaltbreit, sonst sitzt der Chevron rechts neben dem Select */
  .button-group-inner .select-wrap {
    flex: 0 1 auto;
    width: fit-content;
    max-width: calc(100% - 6.5rem);
  }

  .button-group-inner .select-wrap > select {
    width: auto;
    max-width: 100%;
  }
}
