/* ===== Modal Overlay ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  width: 100%;
  max-width: 440px;
  padding: 48px 40px 40px;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.3s ease;
}
.modal-overlay.open .modal {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--rule-soft);
  color: var(--ink-3);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s;
}
.modal-close:hover {
  border-color: var(--rule);
  color: var(--ink);
}
.modal-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 10px;
}
.modal h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
  color: var(--ink);
}
.modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--rule-soft);
}
.modal-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-3);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 10px 0 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -1px;
}
.modal-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.modal-tab:hover:not(.active) {
  color: var(--ink-2);
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.form-group label .optional {
  color: var(--ink-3);
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
  font-size: 10px;
}
.form-group input {
  background: var(--bg-3);
  border: 1px solid var(--rule-soft);
  color: var(--ink);
  padding: 14px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.form-group input:focus {
  border-color: var(--rule);
}
.form-group input::placeholder {
  color: var(--ink-3);
}
.modal-error {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: #e05252;
  padding: 10px 14px;
  background: rgba(224, 82, 82, 0.08);
  border: 1px solid rgba(224, 82, 82, 0.2);
  display: none;
}
.modal-error.visible {
  display: block;
}
.modal-success {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: var(--gold);
  padding: 10px 14px;
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid var(--rule);
  display: none;
}
.modal-success.visible {
  display: block;
}
.modal-submit {
  background: var(--gold);
  color: var(--bg);
  padding: 16px 30px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
  border: none;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: all 0.25s;
  margin-top: 4px;
  width: 100%;
}
.modal-submit:hover {
  background: var(--gold-soft);
}
.modal-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Kundenkonto-Bereich ===== */
#kundenbereich {
  background: var(--bg-3);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.stempelkarte-wrap {
  max-width: 800px;
  margin: 0 auto;
}
.stempelkarte-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 60px;
  flex-wrap: wrap;
  gap: 24px;
}
.stempelkarte-header-left .eyebrow {
  display: block;
  margin-bottom: 12px;
}
.stempelkarte-header-left h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.stempelkarte-header-left h2 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}
.stempelkarte-user-info {
  text-align: right;
}
.stempelkarte-user-info .user-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}
.stempelkarte-user-info .user-since {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Birthday bonus badge */
.birthday-bonus {
  display: none;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(201,169,110,0.12), rgba(201,169,110,0.06));
  border: 1px solid var(--rule);
  padding: 16px 24px;
  margin-bottom: 32px;
}
.birthday-bonus.visible {
  display: flex;
}
.birthday-bonus-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.birthday-bonus-text {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.birthday-bonus-text strong {
  display: block;
  font-size: 13.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* QR Code area */
.qr-section {
  display: flex;
  gap: 64px;
  align-items: flex-start;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.qr-code-wrap {
  flex: 0 0 auto;
  cursor: pointer;
}
.qr-code-inner {
  background: #ffffff;
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 20px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
#qrCanvas, #qrCanvas canvas, #qrCanvas svg, #qrCanvas img {
  display: block;
  image-rendering: pixelated;
}
.qr-hint {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6f6a5f;
  text-align: center;
}
/* QR Fullscreen Overlay */
.qr-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10,10,10,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
}
.qr-fullscreen canvas, .qr-fullscreen svg {
  image-rendering: pixelated;
}
.qr-fullscreen-hint {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
@media (max-width:860px) {
  .qr-section {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
}

/* Stamp card visual */
.stamp-card-section {
  flex: 1;
  min-width: 260px;
}
.stamp-progress-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stamp-count {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
}
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.stamp-field {
  aspect-ratio: 1;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s;
}
.stamp-field.filled {
  background: var(--gold);
  border-color: var(--gold);
}
.stamp-field.filled svg {
  stroke: var(--bg);
}
.stamp-field.filled .scissor-icon {
  color: var(--bg);
}
.stamp-field:not(.filled) svg {
  stroke: var(--ink-3);
}
@keyframes stampBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.stamp-field.bounce {
  animation: stampBounce 0.4s ease;
}

/* Complete card banner */
.card-complete-banner {
  display: none;
  background: linear-gradient(135deg, rgba(201,169,110,0.18), rgba(201,169,110,0.08));
  border: 1px solid var(--gold);
  padding: 20px 24px;
  margin-bottom: 24px;
  text-align: center;
}
.card-complete-banner.visible {
  display: block;
}
.card-complete-banner .banner-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 4px;
}
.card-complete-banner .banner-sub {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* Cards history */
.cards-history {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
}
.cards-history .history-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  color: var(--gold);
  line-height: 1;
}
.cards-history .history-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Logout */
.stempelkarte-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  justify-content: flex-end;
}
.logout-btn {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-3);
  padding: 11px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}
.logout-btn:hover {
  border-color: var(--rule);
  color: var(--ink);
}

/* Login prompt — Loyalty Card Promo (logged-out state) */
.loyalty-card-promo {
  display: flex;
  gap: 64px;
  align-items: center;
  padding: 60px 0;
}
.loyalty-promo-visual {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.loyalty-stamp-preview {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 240px;
}
.loyalty-stamp {
  aspect-ratio: 1;
  border: 1px solid var(--rule);
  background: transparent;
  transition: all 0.3s;
}
.loyalty-stamp.filled {
  background: var(--gold);
  border-color: var(--gold);
}
.loyalty-stamp.free {
  border-color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,169,110,0.08);
}
.loyalty-promo-counter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
}
.loyalty-promo-content {
  flex: 1;
}
.loyalty-promo-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--ink);
}
.loyalty-promo-content h2 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}
.loyalty-promo-content p {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  color: var(--ink-2);
  margin: 0 0 28px;
  line-height: 1.7;
  max-width: 380px;
}
.loyalty-perks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.loyalty-perk {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--ink-2);
}
.loyalty-perk-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.login-prompt-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 32px;
  background: var(--gold);
  color: var(--bg);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
  border: none;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: all 0.25s;
}
.login-prompt-btn:hover {
  background: var(--gold-soft);
}
@media (max-width: 860px) {
  .loyalty-card-promo {
    flex-direction: column;
    gap: 36px;
    text-align: center;
    padding: 48px 0;
  }
  .loyalty-promo-content p {
    max-width: 100%;
  }
  .loyalty-perks {
    align-items: center;
  }
  .login-prompt-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== ADMIN PANEL ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* Sidebar */
.admin-sidebar {
  flex: 0 0 240px;
  background: var(--bg-2);
  border-right: 1px solid var(--rule-soft);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-brand {
  padding: 32px 28px 24px;
  border-bottom: 1px solid var(--rule-soft);
}
.admin-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}
.admin-brand-name em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}
.admin-brand-sub {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.admin-nav {
  padding: 20px 0;
  flex: 1;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}
.admin-nav-item:hover {
  color: var(--ink-2);
  background: rgba(255,255,255,0.02);
}
.admin-nav-item.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(201,169,110,0.05);
}
.admin-nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-nav-item[data-view="team"] {
  display: none;
}
.admin-nav-item[data-view="team"].visible {
  display: flex;
}
.admin-sidebar-bottom {
  padding: 20px 28px;
  border-top: 1px solid var(--rule-soft);
}
.admin-user-info {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.admin-user-info strong {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 2px;
  font-weight: 500;
  letter-spacing: 0;
}
.admin-logout {
  background: transparent;
  border: 1px solid var(--rule-soft);
  color: var(--ink-3);
  padding: 9px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.admin-logout:hover {
  border-color: var(--rule);
  color: var(--ink);
}

/* Admin Content */
.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 40px 48px;
}
.admin-view {
  display: none;
}
.admin-view.active {
  display: block;
}
.admin-view-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}
.admin-view-title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}
.admin-view-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}
.admin-divider {
  height: 1px;
  background: var(--rule-soft);
  margin: 28px 0 36px;
}

/* Scanner view */
.scanner-container {
  max-width: 560px;
  margin: 0 auto;
}
.scanner-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 280px;
  border: 1px solid var(--rule);
  background: var(--bg-3);
  overflow: hidden;
}
.scanner-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--bg-3);
  z-index: 2;
}
.scanner-placeholder.hidden {
  display: none;
}
.scanner-crosshair {
  opacity: 0.6;
  animation: scanPulse 2.5s ease-in-out infinite;
}
@keyframes scanPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
.scanner-placeholder-text {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.scanner-start-btn {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--gold);
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}
.scanner-start-btn:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
#qr-reader {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: hidden;
  background: #000 !important;
}
#qr-reader * {
  border-radius: 0 !important;
}
#qr-reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
#qr-reader__scan_region {
  background: transparent !important;
  min-height: 0 !important;
}
#qr-reader__dashboard { display: none !important; }
.scanner-fallback {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--rule-soft);
}
.scanner-fallback-label {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.scanner-fallback-row {
  display: flex;
  gap: 12px;
}
.scanner-fallback-row input {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--rule-soft);
  color: var(--ink);
  padding: 13px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
}
.scanner-fallback-row input:focus {
  border-color: var(--rule);
}
.scanner-fallback-row input::placeholder {
  color: var(--ink-3);
}
.scanner-search-btn {
  background: var(--gold);
  color: var(--bg);
  padding: 13px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.scanner-search-btn:hover {
  background: var(--gold-soft);
}

/* Customer detail card (after scan) */
.customer-card {
  display: none;
  margin-top: 32px;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  padding: 36px;
}
.customer-card.visible {
  display: block;
}
.customer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule-soft);
  gap: 24px;
  flex-wrap: wrap;
}
.customer-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.customer-card-meta {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.8;
}
.customer-card-meta a {
  color: var(--ink-3);
  text-decoration: none;
}
.customer-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  margin-bottom: 28px;
}
.customer-stat {
  background: var(--bg-2);
  padding: 16px 20px;
}
.customer-stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.customer-stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--ink);
  line-height: 1;
}
.customer-stat-value.gold {
  color: var(--gold);
}

/* Admin stamp grid */
.admin-stamp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 24px;
  max-width: 300px;
}
.admin-stamp-field {
  aspect-ratio: 1;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}
.admin-stamp-field.filled {
  background: var(--gold);
  border-color: var(--gold);
}
.admin-stamp-field.filled svg {
  stroke: var(--bg);
}
.admin-stamp-field:not(.filled) svg {
  stroke: var(--ink-3);
}

/* Service type select */
.service-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.service-select-label {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.service-select {
  background: var(--bg-3);
  border: 1px solid var(--rule-soft);
  color: var(--ink);
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  border-radius: 0;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236f6a5f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.service-select:focus {
  border-color: var(--rule);
}

/* Action buttons */
.stamp-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.btn-stamp-add {
  background: var(--gold);
  color: var(--bg);
  padding: 18px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
  border: none;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: all 0.25s;
  width: 100%;
  text-align: center;
}
.btn-stamp-add:hover {
  background: var(--gold-soft);
}
.btn-stamp-add:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-stamp-remove {
  background: transparent;
  color: var(--ink-3);
  padding: 13px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid var(--rule-soft);
  cursor: pointer;
  transition: all 0.25s;
  width: 100%;
  text-align: center;
}
.btn-stamp-remove:hover {
  border-color: var(--rule);
  color: var(--ink-2);
}
.btn-birthday-redeem {
  display: none;
  background: linear-gradient(135deg, rgba(201,169,110,0.15), rgba(201,169,110,0.05));
  color: var(--gold);
  padding: 13px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: all 0.25s;
  width: 100%;
  text-align: center;
}
.btn-birthday-redeem.visible {
  display: block;
}
.btn-birthday-redeem:hover {
  background: rgba(201,169,110,0.2);
}
.btn-delete-customer {
  background: transparent;
  color: #e05252;
  padding: 13px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid rgba(224,82,82,0.3);
  cursor: pointer;
  transition: all 0.25s;
  width: 100%;
  text-align: center;
  margin-top: 8px;
}
.btn-delete-customer:hover {
  border-color: #e05252;
  background: rgba(224,82,82,0.08);
}
.action-feedback {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  padding: 10px 14px;
  display: none;
  margin-top: 8px;
}
.action-feedback.success {
  display: block;
  color: var(--gold);
  background: rgba(201,169,110,0.08);
  border: 1px solid var(--rule);
}
.action-feedback.error {
  display: block;
  color: #e05252;
  background: rgba(224,82,82,0.08);
  border: 1px solid rgba(224,82,82,0.2);
}

/* Dashboard */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  margin-bottom: 40px;
}
.dash-stat {
  background: var(--bg-2);
  padding: 28px 32px;
}
.dash-stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.dash-stat-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.dash-stat-label-row .dash-stat-label {
  margin-bottom: 0;
}
.dash-period-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--rule-soft);
}
.dash-period-btn {
  background: transparent;
  border: none;
  border-right: 1px solid var(--rule-soft);
  color: var(--ink-3);
  padding: 3px 8px;
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.dash-period-btn:last-child {
  border-right: none;
}
.dash-period-btn.active {
  color: var(--gold);
  background: rgba(201,169,110,0.08);
}
.dash-period-btn:hover:not(.active) {
  color: var(--ink-2);
}
.dash-stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.dashboard-card {
  background: var(--bg-2);
  border: 1px solid var(--rule-soft);
  padding: 28px;
}
.dashboard-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 20px;
}
.dashboard-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.dashboard-card-title-row .dashboard-card-title {
  margin-bottom: 0;
}
.chart-period-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--rule-soft);
}
.chart-period-btn {
  background: transparent;
  border: none;
  border-right: 1px solid var(--rule-soft);
  color: var(--ink-3);
  padding: 4px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  letter-spacing: 0.14em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.chart-period-btn:last-child {
  border-right: none;
}
.chart-period-btn.active {
  color: var(--gold);
  background: rgba(201,169,110,0.08);
}
.chart-period-btn:hover:not(.active) {
  color: var(--ink-2);
}
.dashboard-card canvas {
  max-height: 220px;
}
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
  gap: 16px;
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-name {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}
.activity-action {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.activity-action.remove {
  color: var(--ink-3);
}
.activity-time {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}
.birthdays-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.birthday-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.birthday-item:last-child {
  border-bottom: none;
}
.birthday-item-name {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--ink-2);
}
.birthday-item-date {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.1em;
}

/* Customer list */
.customer-list-controls {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
  align-items: center;
}
.customer-search-input {
  flex: 1;
  max-width: 360px;
  background: var(--bg-2);
  border: 1px solid var(--rule-soft);
  color: var(--ink);
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
}
.customer-search-input:focus {
  border-color: var(--rule);
}
.customer-search-input::placeholder {
  color: var(--ink-3);
}
.customer-table-wrap {
  overflow-x: auto;
}
.customer-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}
.customer-table th {
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  white-space: nowrap;
  background: var(--bg-2);
  user-select: none;
}
.customer-table th:hover {
  color: var(--ink-2);
}
.customer-table th .sort-icon {
  color: var(--ink-3);
  margin-left: 4px;
}
.customer-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-2);
  vertical-align: middle;
}
.customer-table tr:hover td {
  background: rgba(255,255,255,0.01);
  color: var(--ink);
}
.customer-table .td-name {
  font-weight: 500;
  color: var(--ink);
}
.customer-table .td-stamps {
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
}
.btn-view-customer {
  background: transparent;
  border: 1px solid var(--rule-soft);
  color: var(--ink-3);
  padding: 6px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-view-customer:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Customer Detail Panel (inline in Kundenliste) */
.customer-detail-panel {
  margin-top: 24px;
  padding: 32px;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  position: relative;
}
.customer-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule-soft);
}
.customer-detail-close {
  background: transparent;
  border: 1px solid var(--rule-soft);
  color: var(--ink-3);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.customer-detail-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Staff management */
.staff-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--rule-soft);
  margin-bottom: 32px;
}
.staff-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule-soft);
  gap: 16px;
  flex-wrap: wrap;
}
.staff-item:last-child {
  border-bottom: none;
}
.staff-item-info .staff-name {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}
.staff-item-info .staff-email {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--ink-3);
}
.staff-role-badge {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 3px 10px;
  border: 1px solid var(--rule);
  color: var(--gold);
}
.staff-role-badge.admin {
  border-color: var(--gold);
  background: rgba(201,169,110,0.1);
}
.staff-role-badge.owner {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201,169,110,0.2), rgba(201,169,110,0.08));
  color: var(--gold);
}
.staff-role-badge.editor {
  border-color: rgba(75,160,180,0.45);
  color: #4ba0b4;
  background: rgba(75,160,180,0.08);
}
.staff-actions {
  display: flex;
  gap: 8px;
}
.btn-staff-action {
  background: transparent;
  border: 1px solid var(--rule-soft);
  color: var(--ink-3);
  padding: 6px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-staff-action:hover {
  border-color: var(--rule);
  color: var(--ink);
}
.new-staff-form {
  background: var(--bg-2);
  border: 1px solid var(--rule-soft);
  padding: 28px 32px;
}
.new-staff-form h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 24px;
}
.staff-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

/* Admin Login Screen */
.admin-login-screen {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-login-box {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
}

/* Mobile responsive admin */
.admin-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-2);
  border-top: 1px solid var(--rule-soft);
  justify-content: space-around;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
}
.admin-bottom-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--ink-3);
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}
.admin-bottom-bar-item.active {
  color: var(--gold);
}
.admin-bottom-bar-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-bottom-bar-item[data-view="team"] {
  display: none;
}
.admin-bottom-bar-item[data-view="team"].visible {
  display: flex;
}

@media (max-width: 768px) {
  .admin-sidebar {
    display: none;
  }
  .admin-bottom-bar {
    display: flex;
  }
  .admin-content {
    padding: 24px 20px 80px;
  }
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .customer-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-stamp-grid {
    max-width: 100%;
  }
  .staff-form-grid {
    grid-template-columns: 1fr;
  }
  .admin-view-title {
    font-size: 32px;
  }
}
@media (max-width: 860px) {
  .qr-section {
    flex-direction: column;
    gap: 36px;
  }
  .stempelkarte-header {
    flex-direction: column;
  }
  .stempelkarte-user-info {
    text-align: left;
  }
  .dash-stat-value {
    font-size: 38px;
  }
}

/* Offline error */
.offline-notice {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-2);
  border: 1px solid rgba(224,82,82,0.4);
  color: #e05252;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  z-index: 9999;
  white-space: nowrap;
}
.offline-notice.visible {
  display: block;
}

/* ===== TikTok Nav (hide/show wie Team) ===== */
.admin-nav-item[data-view="tiktok"] {
  display: none;
}
.admin-nav-item[data-view="tiktok"].visible {
  display: flex;
}
.admin-bottom-bar-item[data-view="tiktok"] {
  display: none;
}
.admin-bottom-bar-item[data-view="tiktok"].visible {
  display: flex;
}

/* ===== TikTok Upload Box ===== */
.tiktok-upload-box {
  background: var(--bg-2);
  border: 1px solid var(--rule-soft);
  padding: 28px 32px;
  margin-bottom: 40px;
}
.tiktok-upload-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 24px;
}
.tiktok-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 640px) {
  .tiktok-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== TikTok Video Liste ===== */
.tiktok-list-head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-soft);
}
.tiktok-video-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--rule-soft);
}
.tiktok-admin-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rule-soft);
  flex-wrap: wrap;
}
.tiktok-admin-card:last-child {
  border-bottom: none;
}
.tiktok-admin-card-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,169,110,0.08);
  border: 1px solid var(--rule);
}
.tiktok-admin-card-body {
  flex: 1;
  min-width: 0;
}
.tiktok-admin-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tiktok-admin-card-url {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: var(--ink-3);
  display: block;
  margin-bottom: 3px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.tiktok-admin-card-url:hover {
  color: var(--gold);
}
.tiktok-admin-card-meta {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}
.tiktok-admin-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.tiktok-vis-toggle {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}
.tiktok-vis-toggle.tiktok-vis-on {
  color: var(--gold);
  border-color: var(--rule);
}
.tiktok-vis-toggle.tiktok-vis-on:hover {
  background: rgba(201,169,110,0.08);
}
.tiktok-vis-toggle.tiktok-vis-off {
  color: var(--ink-3);
  border-color: var(--rule-soft);
}
.tiktok-vis-toggle.tiktok-vis-off:hover {
  border-color: var(--rule);
  color: var(--ink-2);
}
.tiktok-delete-btn {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid rgba(224,82,82,0.3);
  color: #e05252;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.tiktok-delete-btn:hover {
  border-color: #e05252;
  background: rgba(224,82,82,0.08);
}

/* ===== TikTok Frontend — Live-Karten ===== */
.tiktok-card-live {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  padding: 20px 14px;
  gap: 12px;
  position: relative;
  background: var(--bg-3);
  border: 1px solid var(--rule-soft);
  transition: border-color 0.3s, background 0.3s;
}
.tiktok-card-live:hover {
  border-color: var(--rule);
  background: rgba(201,169,110,0.04);
}
.tiktok-card-live .tiktok-live-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.18;
  transition: opacity 0.3s;
}
.tiktok-card-live:hover .tiktok-live-icon {
  opacity: 0.32;
}
.tiktok-card-live .tiktok-live-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}
.tiktok-card-live .tiktok-live-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 8px;
  font-weight: 500;
}
.tiktok-card-live .tiktok-live-cta {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
