:root {
  --bg-dark: #e5e5e5;
  --bg: #f1f1f1;
  --bg-light: #ffffff;
  --text: #262626;
  --text-muted: #6e6e6e;
  --primary: #ff0000;
  --secondary: #00ff00;
}

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

body {
  font-family: sans-serif;
  background-color: var(--bg-dark);
  color: var(--text);
  padding: 1rem;
}

.container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.left, .right {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background-color: var(--bg);
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-light {
  background-color: var(--bg-light);
}

.card-dark {
  background-color: var(--bg-dark);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field-group label {
  font-size: 0.9rem;
  font-weight: normal;
}

.field-group input {
  padding: 0.5rem;
  border: none;
  background-color: var(--bg-light);
  border-radius: 0.5rem;
  font-size: 1rem;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.actions-row .card {
  flex: 1 1 45%;
}

.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-row span {
  font-size: 1rem;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--primary);
  color: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-size: 1.2rem;
  text-decoration: none;
}

.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.cards-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* VISITENKARTE */
.visitenkarte {
  background-color: var(--bg-light);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);

  width: 62mm;
  height: 92mm;
  padding: 6mm;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  border-radius: 0;
}

.visitenkarte.primary {
  background-color: var(--primary);
  color: white;
  justify-content: center;
  align-items: center;
}

.visitenkarte.primary img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.karte-inhalt {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.aktion {
  font-weight: 600;
  font-size: 1.1rem;
  max-width: 100%;
  text-align: center;
  word-break: break-word;
  hyphens: auto;
}

.datum {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn {
  background-color: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.qr {
  width: 110px;
  height: 110px;
}

.footer {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* MOBILE */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .left, .right {
    width: 100%;
  }

  .actions-row {
    flex-direction: column;
  }

  .actions-row .card {
    width: 100%;
  }

  .cards-preview {
    flex-direction: column;
    align-items: center;
  }
}

/* LADEANIMATION */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ccc;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#loading-overlay p {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: var(--text);
}