/* ... existing styles ... */
/* Appends to previous content (I'll re-write full file to be safe, including new styles) */

/* === SPORTBIER B2B Portal Styles === */
:root {
  --bg: #1a1a1a;
  --bg-elevated: #252525;
  --bg-hover: #333333;
  --text: #f5f5f5;
  --text-muted: #a0a0a0;
  --accent: #e8b923;
  --accent-hover: #cfa41e;
  --danger: #ff453a;
  --success: #30d158;
  --border: #383838;
  
  --radius: 12px;
  --radius-sm: 8px;
  --header-height: 64px;
  --sidebar-width: 244px;
  
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  /* Verhindert horizontales "Wackeln" beim Ein-/Ausblenden der Scrollbar (z.B. FAQ auf/zu) */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Fallback für Browser ohne scrollbar-gutter */
  overflow-y: scroll;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

/* Tooltip-Hinweis: gepunktete Unterstreichung */
.has-tooltip {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: help;
}

/* Custom Tooltip Popup (z. B. für Heatmap) – sofort sichtbar, größer, runde Ecken */
.has-tooltip-wrapper {
  position: relative;
  display: inline;
}
.has-tooltip-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: 320px;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}
.has-tooltip-wrapper:hover .has-tooltip-popup {
  opacity: 1;
  visibility: visible;
}
.has-tooltip-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-elevated);
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--text);
  font-weight: 700;
}

h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-muted);
}

/* === Components === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #000;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--text);
  background-color: rgba(255,255,255,0.05);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

.btn-outline.text-danger,
button.btn-outline.text-danger,
.btn-outline.btn-danger {
  color: var(--danger);
  border-color: var(--danger);
}
.btn-outline.text-danger:hover,
button.btn-outline.text-danger:hover,
.btn-outline.btn-danger:hover {
  background-color: rgba(255, 69, 58, 0.15);
  border-color: var(--danger);
  color: var(--danger);
}

.card {
  background-color: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--border);
}

/* === SPORTBIER Marke: IMMER in Farben & Schrift – global für B2B === */
.brand-logo,
.app-title,
.app-title-inline {
  font-weight: 700;
  letter-spacing: 0.2em;
}
.brand-logo,
.app-title {
  margin: 0;
  font-size: clamp(1.25rem, 5vw, 1.6rem);
  line-height: 1.2;
  color: var(--text);
}
.app-title-inline {
  display: inline;
}
.brand-logo .app-title-muted,
.brand-logo .app-title-prefix,
.app-title-muted,
.app-title-prefix {
  color: var(--text-muted);
  opacity: 0.9;
  font-weight: 700;
  letter-spacing: 0.2em;
}
.brand-logo .app-title-main,
.brand-logo .app-title-bier,
.brand-logo span.app-title-main,
.app-title-main,
.app-title-bier {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.2em;
}

/* === Utility === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.pt-3 { padding-top: 1rem; }
.pt-4 { padding-top: 1.5rem; }
.gap-2 { gap: 0.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.hidden { display: none !important; }

/* === Dashboard Layout === */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: #151515;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 10;
  overflow: hidden;
}

.sidebar-header {
  height: var(--header-height);
  min-height: var(--header-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* Wie App-Slogan „Verdien dir dein Bier!“ (app-header-subtitle) */
.sidebar-header-sub {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  opacity: 0.85;
}

.sidebar-nav {
  padding: 1rem 0.7rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.58rem 0.78rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  margin-bottom: 0.12rem;
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.93rem;
}

.nav-item:hover {
  background-color: rgba(255,255,255,0.05);
  color: var(--text);
}

.nav-item.active {
  background-color: var(--accent);
  color: #000;
  font-weight: 600;
}

.nav-icon {
  margin-right: 0.55rem;
  font-size: 1.05rem;
  width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.nav-group {
  margin-bottom: 0.16rem;
}

.nav-group-header {
  display: flex;
  align-items: center;
  padding: 0.58rem 0.78rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-size: 0.93rem;
}

.nav-group-header:hover {
  background-color: rgba(255,255,255,0.05);
  color: var(--text);
}

.nav-group-chevron {
  margin-left: auto;
  font-size: 0.65rem;
  opacity: 0.7;
  transition: transform 0.2s;
}

.nav-group.expanded .nav-group-chevron {
  transform: rotate(0deg);
}

.nav-group:not(.expanded) .nav-group-chevron {
  transform: rotate(-90deg);
}

.nav-group-items {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease-out;
}

.nav-group.expanded .nav-group-items {
  max-height: 520px;
}

.nav-sub-item {
  padding-left: 1.9rem;
  font-size: 0.86rem;
  white-space: nowrap;
}

.nav-sub-item .nav-icon {
  font-size: 0.92rem;
}

.nav-group + .nav-group {
  margin-top: 0.12rem;
}

.nav-optional-label {
  font-size: 0.75rem;
  font-weight: normal;
  opacity: 0.8;
  color: var(--text-muted, #888);
}

.nav-package-hint {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent, #e8b923);
  background: rgba(232, 185, 35, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.25rem;
}

.nav-item.nav-requires-aktiv {
  opacity: 0.92;
}
.nav-item.nav-requires-aktiv .nav-package-hint {
  opacity: 1;
}

/* Pipeline-Nav-Badge Status-Varianten */
.nav-pipeline-badge.nav-pipeline-badge--running { background: #fc9403; color: #fff; }
.nav-pipeline-badge.nav-pipeline-badge--passed { background: #1aaa55; color: #fff; }
.nav-pipeline-badge.nav-pipeline-badge--failed { background: #db3b21; color: #fff; }

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.user-profile {
  display: flex;
  align-items: center;
  padding: 0.5rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  background-color: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  font-weight: bold;
  color: var(--accent);
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.user-info {
  flex: 1;
  font-size: 0.85rem;
}

.user-name {
  color: var(--text);
  font-weight: 600;
  display: block;
}

.user-role {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  margin-top: 0;
  padding-top: 0;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.top-bar {
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background-color: rgba(26,26,26,0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.content-header {
  height: var(--header-height);
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.page-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.content-area {
  padding: 2rem 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Vollbild-Modus (z. B. Deutschlandkarte): volle Höhe und Breite */
.content-area.content-area-fullbleed {
  padding: 0;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

/* === Dashboard Widgets === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.stat-change {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* === Forms === */
.form-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.75rem;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-input:focus {
  border-color: var(--accent);
  outline: none;
}

/* === Profil: Passwort ändern === */
.profile-change-pw {
  background: var(--bg-elevated);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.profile-change-pw__title {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.profile-change-pw__hint {
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.profile-change-pw__fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 320px;
}

.profile-change-pw__fields .form-group {
  margin-bottom: 0;
}

.profile-change-pw__actions {
  margin-top: 1.25rem;
}

.profile-change-pw__actions .btn {
  min-width: 160px;
}

.profile-change-pw__message {
  font-size: 0.85rem;
}

/* === Dropzone (Bild-Upload) === */
.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  padding: 1rem 1.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.15);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.dropzone:hover {
  border-color: var(--accent);
  background: rgba(232,185,35,0.08);
  color: var(--text);
}

.dropzone.dropzone-dragover {
  border-color: var(--accent);
  background: rgba(232,185,35,0.12);
  color: var(--text);
}

.dropzone-hint {
  pointer-events: none;
}

.dropzone input[type="file"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}

/* Abstand Dropzone → Thumb, Layout-Stabilität beim Bild einfügen */
.image-preview-area {
  margin-top: 1rem;
  min-height: 0;
  display: block;
}
.image-preview-area img {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* === Tables === */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  font-size: 0.9rem;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* === Review Queue: kompakte Tabelle, alles auf einen Blick + Freigabe === */
.review-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.review-queue-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}
.review-queue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.review-queue-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  white-space: nowrap;
}
.review-queue-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.review-queue-table tbody tr:last-child td {
  border-bottom: none;
}
.review-queue-table tbody tr:hover {
  background: var(--bg-hover);
}
.review-queue-preview {
  width: 56px;
  padding-right: 0.75rem !important;
}
.review-queue-preview img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}
.review-queue-partner { min-width: 140px; }
.review-queue-asset { color: var(--text-muted); white-space: nowrap; }
.review-queue-date { color: var(--text-muted); white-space: nowrap; }
.review-queue-actions {
  white-space: nowrap;
}
.review-queue-actions .btn {
  margin-right: 0.35rem;
  margin-bottom: 0.2rem;
}
.review-queue-actions .btn:last-child { margin-right: 0; }

/* Produkttabelle: ausreichend Spaltenbreite, Status und Aktionen voll sichtbar */
.products-table {
  table-layout: fixed;
  width: 100%;
  min-width: 1010px;
}

.products-table th,
.products-table td {
  vertical-align: middle;
  padding: 0.75rem 1rem;
}

.products-table td:nth-child(2),
.products-table td:nth-child(4) {
  overflow: hidden;
}

.products-table .product-desc-cell,
.products-table .product-tags-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  max-width: 100%;
}

.products-table .product-name-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}

.products-table td .flex.gap-2 {
  min-width: 0;
}

/* Status-Spalte: Saisonal-Badge mit Datum nicht abschneiden */
.products-table-status-cell {
  vertical-align: middle;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.products-table .status-badge-saisonal {
  white-space: normal;
  line-height: 1.35;
  text-align: center;
  display: inline-block;
  max-width: 100%;
  word-break: break-word;
}

.products-table .products-table-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
}

.products-table .products-table-actions .btn {
  flex-shrink: 0;
}

.products-table-card {
  overflow-x: auto;
}

.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-active { background: rgba(48, 209, 88, 0.2); color: var(--success); }
.status-draft { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }
.status-onboarding { background: rgba(232, 185, 35, 0.25); color: var(--accent); }
.status-inactive { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }
.status-blocked { background: rgba(255, 59, 48, 0.2); color: #ff3b30; }

/* Pipeline-Log (God-Mode): Farben & Lesbarkeit (Inline-Panel + Modal) */
.pl-log-formatted .pl-tag { color: #64b5f6; font-weight: 600; }
.pl-log-formatted .pl-run { color: #90caf9; }
.pl-log-formatted .pl-stage { color: #ce93d8; font-weight: 500; }
.pl-log-formatted .pl-commit { color: #81c784; font-weight: 600; }
.pl-log-formatted .pl-docker { color: #a5d6a7; }
.pl-log-formatted .pl-done { color: #66bb6a; font-weight: 600; }
.pl-log-formatted .pl-image { color: #4dd0e1; }
.pl-log-formatted .pl-container { color: #ffb74d; }
.pl-log-formatted .pl-file { color: #b0bec5; }
.pl-log-formatted .pl-err { color: #ef5350; font-weight: 600; }
.pl-log-formatted .pl-cleanup { color: #78909c; }

/* === Preview Device (iPhone 12 Mini Auflösung: 375×812 pt), vergrößert für bessere Lesbarkeit === */
.preview-pane {
  position: fixed;
  right: 0;
  top: var(--header-height);
  bottom: 0;
  width: 520px;
  background: #000;
  border-left: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 20;
  overflow-y: auto;
}

/* iPhone 12 Mini: 375×812 logical px Viewport – Rahmen 12px, ~1.2× Skalierung */
.device-mockup {
  box-sizing: border-box;
  width: 479px;   /* (375 + 12*2) * 1.2 */
  height: 1004px; /* (812 + 12*2) * 1.2 */
  min-width: 479px;
  min-height: 1004px;
  padding: 0;
  border: 12px solid #1c1c1e;
  border-radius: 56px; /* Increased slightly to match inner 44px + 12px border */
  /* overflow: hidden; Removed to show notch/shadow correctly, but added back in specific way if needed */
  position: relative;
  background: transparent; /* Changed from #000 to transparent so no rectangle behind */
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.device-screen {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border-radius: 46px; /* Slightly tighter than parallel to account for bezel visual */
  overflow: hidden;
  background: #111;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* iframe: exakt 375×812 px = iPhone-12-Mini-Viewport für native Darstellung */
.device-mockup iframe {
  display: block;
  border: none;
  width: 100%;
  height: 100%;
}

/* iPhone-Notch (Dynamic Island-Stil, zentriert am oberen Bildschirmrand) */
.device-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 37px;
  background: #000;
  border-radius: 20px;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Kleine einheitliche Mockup-Größe für Brauerei-Previews – Höhe begrenzt, damit es zur Spalte passt */
.device-mockup-sm {
  box-sizing: border-box;
  position: relative;
  width: 340px;
  max-width: 100%;
  aspect-ratio: 340/720;
  max-height: 500px;
  min-width: 240px;
  padding: 0;
  border: 7px solid #1c1c1e;
  border-radius: 31px;
  background: transparent;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}
.device-mockup-sm .device-screen {
  position: absolute;
  top: 7px;
  left: 7px;
  right: 7px;
  bottom: 7px;
  border-radius: 26px;
  overflow: hidden;
  background: #111;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  aspect-ratio: 326/706;
}
.device-mockup-sm .device-screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}
.device-mockup-sm .device-notch {
  top: 7px;
  width: 70px;
  height: 21px;
  border-radius: 11px;
}

/* iframe Scroll-Isolation: Host nicht mitscrollen, wenn in App-Preview gescrollt wird */
html.portal-iframe-scroll-lock,
body.portal-iframe-scroll-lock {
  overflow: hidden;
  overscroll-behavior: none;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  overflow-y: auto;
}
.modal-overlay.is-hidden { display: none; }
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 { margin: 0; font-size: 1.25rem; }
.modal-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.modal-btn-icon {
  background: none; border: none; color: var(--text-muted); font-size: 1.1rem;
  cursor: pointer; padding: 0.25rem 0.4rem; border-radius: 4px;
}
.modal-btn-icon:hover { color: var(--text); background: var(--bg-elevated); }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 2rem; padding-bottom: 1.5rem; }
.modal-footer {
  padding: 1.5rem 2rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
.status-running { background: rgba(48, 209, 88, 0.2); color: var(--success); }
.status-planned { background: rgba(232, 185, 35, 0.2); color: var(--accent); }
.status-ended { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

/* Branding: Karte groß, Platz optimal genutzt */
.branding-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .branding-layout { grid-template-columns: 1fr; }
  /* Preview oben, damit sie sofort sichtbar ist (nicht unter den langen Tabellen versteckt) */
  .branding-layout .preview-pane-static { order: -1; }
}
.branding-main { min-width: 0; }

/* Tabellen (Motivationen/Celebrations) genug Platz: horizontal scrollen statt abschneiden */
.form-section > div:has(.data-table) {
  overflow-x: auto;
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}
.form-section > div:has(.data-table) .data-table {
  min-width: 880px;
}
.form-section-map {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.targeting-map {
  min-height: min(680px, calc(100vh - 280px));
  height: min(680px, calc(100vh - 280px));
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: crosshair;
}
.preview-pane-static {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Karten: Fullscreen-Wrapper */
.map-wrapper {
  position: relative;
}
/* Deutschland anzeigen – prominent neben dem Vollbild-Button */
.map-fit-germany-btn {
  position: absolute;
  top: 0.5rem;
  right: 4.25rem;
  z-index: 1000;
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: filter 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.map-fit-germany-btn:hover {
  filter: brightness(1.1);
  color: white;
}
.map-wrapper:fullscreen .map-fit-germany-btn,
.map-wrapper:-webkit-full-screen .map-fit-germany-btn {
  top: 1rem;
  right: 5rem;
}
.admin-karte-panel-controls .map-fit-germany-btn {
  position: static;
  right: auto;
  top: auto;
  margin-right: 0.5rem;
}

.map-fullscreen-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1000;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.7);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.2s;
}
.map-fullscreen-btn:hover {
  background: rgba(0,0,0,0.9);
  color: var(--accent);
}

/* Alle Regionen anzeigen – floating links unten auf allen Karten */
.map-fit-regions-btn {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  z-index: 999;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.75);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}
.map-fit-regions-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  color: var(--accent);
}
.map-wrapper:fullscreen .map-fit-regions-btn,
.map-wrapper:-webkit-full-screen .map-fit-regions-btn {
  bottom: 1rem;
  left: 1rem;
}
.map-wrapper:fullscreen .map-fullscreen-btn,
.map-wrapper:-webkit-full-screen .map-fullscreen-btn {
  top: 1rem;
  right: 1rem;
  background: rgba(0,0,0,0.6);
}

/* Schwebende Buttons auf der Karte (Demo, Alle Kunden), auch im Vollbild */
.map-floating-actions {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.map-floating-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.75);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.map-floating-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  color: var(--accent);
}
.map-floating-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.map-wrapper:fullscreen .map-floating-actions,
.map-wrapper:-webkit-full-screen .map-floating-actions {
  top: 1rem;
  left: 1rem;
}
.map-wrapper:fullscreen .map-floating-btn,
.map-wrapper:-webkit-full-screen .map-floating-btn {
  background: rgba(0, 0, 0, 0.6);
}

/* Landkarte + Kampagnen: Layer-Toggles im Vollbild (oben links) */
.landkarte-fs-toggles,
.campaign-fs-toggles {
  display: none;
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 999;
  background: rgba(26, 26, 26, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.map-wrapper:fullscreen .landkarte-fs-toggles,
.map-wrapper:-webkit-full-screen .landkarte-fs-toggles,
.map-wrapper:fullscreen .campaign-fs-toggles,
.map-wrapper:-webkit-full-screen .campaign-fs-toggles {
  display: flex;
}

/* Vollbild: Regionen-Overlay rechts */
.map-fullscreen-overlay {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 35%;
  background: rgba(26, 26, 26, 0.95);
  border-left: 1px solid var(--border);
  padding: 1rem;
  padding-top: 3rem;
  overflow-y: auto;
  z-index: 999;
}
.map-wrapper:fullscreen .map-fullscreen-overlay,
.map-wrapper:-webkit-full-screen .map-fullscreen-overlay {
  display: block;
}
.map-overlay-panel { padding: 0.5rem 0; }
.map-overlay-title { font-size: 1rem; margin: 0 0 0.25rem; }
.map-overlay-count { margin: 0 0 0.75rem; }
.map-overlay-list { display: flex; flex-direction: column; gap: 0.5rem; }
.map-overlay-region-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem; background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

/* Regionen-Liste (Hotspots): klare Outline um Einträge */
.hotspot-item {
  border: 1px solid var(--border);
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}
.hotspot-item:hover {
  border-color: rgba(232, 185, 35, 0.35);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

/* Regionen-Karten: 2 pro Zeile (Platz sparen) */
.targeting-hotspots-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.targeting-hotspots-list .hotspot-item {
  margin-bottom: 0 !important; /* mb-3 aus dem Markup neutralisieren */
}
@media (max-width: 900px) {
  .targeting-hotspots-list {
    grid-template-columns: 1fr;
  }
}
.map-overlay-region-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.map-overlay-region-label { flex: 1; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-overlay-focus-btn {
  padding: 0.2rem 0.4rem; font-size: 0.85rem; background: transparent; border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); cursor: pointer; flex-shrink: 0;
}
.map-overlay-focus-btn:hover { background: rgba(255,255,255,0.08); color: var(--accent); }

/* Suchergebnisse im Ortssuche-Modal */
.loc-search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  text-align: left;
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.loc-search-result-item:hover {
  border-color: rgba(232, 185, 35, 0.4);
  background: rgba(255, 255, 255, 0.03);
}
.loc-search-result-icon {
  flex-shrink: 0;
  font-size: 1rem;
}
.loc-search-result-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.loc-search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.loc-search-result-details {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.map-wrapper:fullscreen .targeting-map,
.map-wrapper:fullscreen .campaign-minimap,
.map-wrapper:-webkit-full-screen .targeting-map,
.map-wrapper:-webkit-full-screen .campaign-minimap {
  height: 100% !important;
  min-height: 100% !important;
}
.map-wrapper:fullscreen.analytics-map-placeholder,
.map-wrapper:-webkit-full-screen.analytics-map-placeholder {
  height: 100% !important;
  min-height: 100% !important;
}

.map-wrapper:fullscreen .analytics-map-inner,
.map-wrapper:-webkit-full-screen .analytics-map-inner {
  height: 100% !important;
  min-height: 100% !important;
}

/* Kampagnen-Minikarten */
.campaign-minimap {
  height: 380px;
  min-height: 380px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #111;
}

/* Statistik: Heatmap-Platzhalter größer */
.analytics-map-placeholder {
  background: #222;
  min-height: 420px;
  height: min(420px, 50vh);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Landkarte: größere Karte, nutzt verfügbaren Platz */
.landkarte-map.analytics-map-placeholder,
.deutschlandkarte-map.analytics-map-placeholder,
.admin-kundenkarte-map.analytics-map-placeholder {
  min-height: 100%;
  height: 100%;
}

/* God-Mode Kundenkarte: kompletten verbleibenden Platz nutzen */
.admin-kundenkarte-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.admin-kundenkarte-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.admin-kundenkarte-title {
  margin: 0;
  font-size: 1.1rem;
}

.admin-kundenkarte-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-kundenkarte-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  padding: 0 1rem 1rem;
}

.admin-kundenkarte-map {
  position: relative;
  height: 100%;
  min-height: 300px; /* Mindesthöhe für Fullscreen-API */
  min-width: 0;
}

.admin-kundenkarte-map .map-fit-germany-btn {
  top: 0.5rem;
  right: calc(min(35%, 280px) + 4rem); /* links neben Fullscreen-Button, mehr Abstand */
  z-index: 1100;
}
.admin-kundenkarte-map .map-fullscreen-btn {
  top: 0.5rem;
  right: calc(min(35%, 280px) + 0.5rem); /* rechts oben auf der Karte, links neben Sidebar */
  z-index: 1100; /* über Leaflet-Karten-Ebenen */
}
.map-wrapper:fullscreen .admin-kundenkarte-map .map-fullscreen-btn,
.map-wrapper:-webkit-full-screen .admin-kundenkarte-map .map-fullscreen-btn {
  right: 1rem; /* im Vollbild ohne Sidebar wieder ganz rechts */
}

/* Nutzerkarte der Brauer (Landkarte): Buttons rechts oben auf der Karte, links neben Sidebar – analog Admin-Nutzerkarte */
.landkarte-map .map-fit-germany-btn {
  top: 0.5rem;
  right: calc(min(35%, 280px) + 4rem);
  z-index: 1100;
}
.landkarte-map .map-fullscreen-btn {
  top: 0.5rem;
  right: calc(min(35%, 280px) + 0.5rem);
  z-index: 1100;
}
.map-wrapper:fullscreen .landkarte-map .map-fit-germany-btn,
.map-wrapper:-webkit-full-screen .landkarte-map .map-fit-germany-btn {
  right: 5rem;
}
.map-wrapper:fullscreen .landkarte-map .map-fullscreen-btn,
.map-wrapper:-webkit-full-screen .landkarte-map .map-fullscreen-btn {
  right: 1rem;
}

/* Fallback-Vollbild (wenn native Fullscreen-API fehlschlägt) */
.map-fullscreen-overlay-fallback {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.map-fullscreen-overlay-fallback .map-fullscreen-overlay-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.map-fullscreen-overlay-fallback .map-wrapper {
  flex: 1;
  min-height: 0;
  height: 100%;
}
.map-fullscreen-overlay-fallback .analytics-map-inner {
  height: 100% !important;
  min-height: 100% !important;
}

.admin-kundenkarte-map .analytics-map-inner {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

/* Timecode-Overlay: Uhrzeit des Playbacks groß rechts oben auf der Karte (links der Sidebar) */
.map-timecode-overlay {
  position: absolute;
  top: 1rem;
  right: calc(280px + 1rem); /* links neben dem Kunden-Panel (280px) */
  z-index: 800;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  pointer-events: none;
  line-height: 1.2;
}
.map-wrapper:fullscreen .map-timecode-overlay,
.map-wrapper:-webkit-full-screen .map-timecode-overlay {
  right: 1rem; /* Vollbild: keine Sidebar, also ganz rechts */
}

/* Rechtes Panel als Overlay ÜBER der Karte (Seiten- und Vollbildansicht) */
.map-panel-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 35%;
  background: rgba(26, 26, 26, 0.95);
  border-left: 1px solid var(--border);
  padding: 1rem;
  overflow-y: auto;
  z-index: 999;
  display: flex;
  flex-direction: column;
}
.admin-kundenkarte-sidebar {
  margin: 0;
  border-radius: 0;
  border: none;
  border-left: 1px solid var(--border);
  background: rgba(26, 26, 26, 0.95);
}
.map-wrapper:fullscreen .admin-kundenkarte-sidebar,
.map-wrapper:-webkit-full-screen .admin-kundenkarte-sidebar {
  display: none;
}
.map-wrapper:fullscreen #admin-map-fullscreen-overlay,
.map-wrapper:-webkit-full-screen #admin-map-fullscreen-overlay {
  display: block !important;
}
#admin-map-fullscreen-overlay .map-overlay-panel {
  padding: 0;
}

/* Fullscreen-Karte: rechtes Panel aus-/einklappen */
.admin-map-fs-panel-wrap {
  overflow: visible;
  transition: width 0.25s ease, min-width 0.25s ease;
}
.admin-map-fs-panel-content {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.25s ease;
  position: relative;
}
.admin-map-fs-panel-wrap.admin-map-fs-panel--collapsed .admin-map-fs-panel-content {
  transform: translateX(100%);
}
.admin-map-fs-panel-toggle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 24px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: rgba(26, 26, 26, 0.95);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2);
}
.admin-map-fs-panel-toggle:hover {
  color: var(--text);
  background: rgba(40, 40, 40, 0.98);
}
.admin-map-fs-panel-tab {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  width: 28px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: rgba(26, 26, 26, 0.95);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2);
}
.admin-map-fs-panel-tab:hover {
  color: var(--text);
  background: rgba(40, 40, 40, 0.98);
}
.admin-map-fs-panel-wrap.admin-map-fs-panel--collapsed .admin-map-fs-panel-tab {
  display: flex;
}
.admin-map-fs-panel-wrap.admin-map-fs-panel--collapsed .admin-map-fs-panel-toggle {
  display: none;
}
.admin-map-fs-panel-wrap.admin-map-fs-panel--collapsed {
  width: 32px;
  min-width: 32px;
  max-width: 32px;
}

.admin-kundenkarte-list {
  margin-top: 0.5rem;
}

.admin-kundenkarte-count {
  font-size: 0.85rem;
  margin: 0 0 0.75rem 0;
}

/* God-Mode: Fullscreen-Toggles (wie Landkarte) nur im Vollbild sichtbar */
.admin-karte-fs-toggles {
  display: none;
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 999;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.map-wrapper:fullscreen .admin-karte-fs-toggles,
.map-wrapper:-webkit-full-screen .admin-karte-fs-toggles {
  display: flex;
}

.admin-map-fs-panel {
  padding-top: 0.5rem;
}

/* Button-Gruppe unten in Sidebar und Vollbild-Panel (Demo, Zeitraum, Fit) */
.admin-karte-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, rgba(0,0,0,0.1));
}
.admin-karte-panel-actions .btn {
  width: 100%;
  justify-content: center;
}

.admin-karte-event-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.admin-karte-event-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.2rem 0;
  line-height: 1.3;
}
.admin-karte-event-row:hover {
  color: var(--text);
}
.admin-karte-event-row input[type="checkbox"] {
  flex-shrink: 0;
}
.admin-karte-event-row span {
  flex: 1;
}

/* Live-Aktivitäts-Marker auf der Kundenkarte (SSE) – ohne Rahmen/Outline */
.live-activity-div-icon {
  background: none !important;
  border: none !important;
  outline: none !important;
}
.admin-kundenkarte-map .leaflet-marker-icon,
.admin-kundenkarte-map .leaflet-marker-shadow { outline: none !important; }
.admin-kundenkarte-map .leaflet-pane { overflow: visible !important; }
.admin-kundenkarte-map .leaflet-map-pane { overflow: visible !important; }
.live-activity-marker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  background: none;
  border: none;
  box-shadow: none;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  animation: live-activity-appear 0.3s ease-out;
  position: relative;
}
.live-activity-emoji {
  font-size: 1rem;
  line-height: 1;
}
.live-activity-text {
  color: var(--text, #111);
}
.live-activity-bottles-strip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.live-activity-bottle-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Sequenz wie im Grid: erster Effekt nach 600ms, dann alle 400ms */
  --i: 0;
  --baseDelay: calc(600ms + var(--i) * 400ms);
}
.live-activity-bottle-wrap .live-activity-bottle-img {
  opacity: 0.55;
  filter: grayscale(1) saturate(0.6);
  transform: scale(0.92);
  animation: live-bottle-activate 180ms ease-out forwards;
  animation-delay: var(--baseDelay);
  will-change: transform, filter, opacity;
}
@keyframes live-bottle-activate {
  to { opacity: 1; filter: none; transform: scale(1); }
}
.live-activity-bottle-img {
  width: 18px;
  height: 26px;
  object-fit: contain;
  border-radius: 0;
  border: none;
  background: none;
}
.live-activity-brewery {
  font-size: 0.7em;
  color: var(--text-muted, #666);
  font-weight: normal;
}
/* Heartbeat: nur Herz + Name, kein Hintergrund */
.live-activity-marker--heartbeat {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.15rem 0.25rem;
}
.live-activity-marker--heartbeat .live-activity-emoji {
  transform-origin: center;
  animation: live-heartbeat-pulse 900ms ease-in-out infinite;
}
.live-activity-marker--heartbeat .live-activity-text {
  color: var(--text, #111);
  font-size: 0.7rem;
}
@keyframes live-heartbeat-pulse {
  0% { transform: scale(1); }
  20% { transform: scale(1.25); }
  40% { transform: scale(0.98); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* Mini-Konfetti für "Flasche verdient" */
.mini-confetti {
  position: absolute;
  inset: -6px -6px auto auto;
  width: 26px;
  height: 20px;
  pointer-events: none;
  --baseDelay: 0ms;
}
.mini-confetti .confetti-piece {
  position: absolute;
  width: 4px;
  height: 6px;
  border-radius: 1px;
  opacity: 0;
  transform: translate(0, 0) rotate(0deg);
  animation: mini-confetti-burst 700ms ease-out forwards;
  animation-delay: calc(var(--baseDelay) + var(--d, 0ms));
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.5);
}
.mini-confetti .confetti-piece:nth-child(1) { left: 2px; top: 2px; background: #e8b923; --d: 0ms; box-shadow: 0 0 8px 2px rgba(232, 185, 35, 0.8); }
.mini-confetti .confetti-piece:nth-child(2) { left: 8px; top: 0px; background: #ff5a5f; --d: 20ms; }
.mini-confetti .confetti-piece:nth-child(3) { left: 14px; top: 2px; background: #4dd0e1; --d: 40ms; }
.mini-confetti .confetti-piece:nth-child(4) { left: 20px; top: 0px; background: #7c4dff; --d: 60ms; }
.mini-confetti .confetti-piece:nth-child(5) { left: 4px; top: 10px; background: #66bb6a; --d: 80ms; }
.mini-confetti .confetti-piece:nth-child(6) { left: 10px; top: 12px; background: #ffa726; --d: 100ms; }
.mini-confetti .confetti-piece:nth-child(7) { left: 16px; top: 10px; background: #26a69a; --d: 120ms; }
.mini-confetti .confetti-piece:nth-child(8) { left: 22px; top: 12px; background: #ef5350; --d: 140ms; }

@keyframes mini-confetti-burst {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.8); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(-6px, -10px) rotate(160deg) scale(1); }
}

/* Flaschenkarte: Einzel-Flasche als Marker (earned / consumed / inactive) */
.map-single-bottle-div-icon {
  background: none !important;
  border: none !important;
  outline: none !important;
}
.map-single-bottle-marker {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.map-single-bottle-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-single-bottle-img {
  display: block;
  width: 56px;
  height: 72px;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 0;
  border: none;
  background: none;
  transition: opacity 0.4s ease, filter 0.4s ease;
}
.map-single-bottle-marker--earned .map-single-bottle-img {
  /* Visuelles "Aktivieren" wie im Grid (Glow + kleiner Pop) – ohne Rahmen/Background */
  animation: map-single-bottle-earned 1500ms ease-out;
  will-change: transform, filter;
}
@keyframes map-single-bottle-earned {
  0% { transform: scale(0.92); filter: none; }
  18% { transform: scale(1.06); filter: drop-shadow(0 0 10px rgba(232, 185, 35, 0.85)); }
  55% { transform: scale(1.02); filter: drop-shadow(0 0 14px rgba(232, 185, 35, 0.55)); }
  100% { transform: scale(1); filter: none; }
}
.map-single-bottle-marker--inactive .map-single-bottle-img {
  opacity: 0.5;
  filter: grayscale(0.8) saturate(0.5);
}
.map-single-bottle-marker--consumed .map-single-bottle-img {
  opacity: 0.45;
  filter: grayscale(0.7);
}
.map-single-bottle-wrap .grid-bottle-consumed-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 0.5rem;
  padding: 0.08em 0.25em;
  white-space: nowrap;
}
/* Konfetti an Einzel-Flasche auf der Karte: größer, Farben wie iOS-Grid (#e8b923, #ffffff, #f0f0f0) */
.map-single-bottle-confetti {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 40px;
  pointer-events: none;
}
.map-single-bottle-confetti .confetti-piece {
  width: 8px;
  height: 10px;
  border-radius: 2px;
  animation: map-single-bottle-confetti-burst 700ms ease-out forwards;
  animation-delay: calc(var(--baseDelay, 0ms) + var(--d, 0ms));
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.6);
}
.map-single-bottle-confetti .confetti-piece:nth-child(1),
.map-single-bottle-confetti .confetti-piece:nth-child(4),
.map-single-bottle-confetti .confetti-piece:nth-child(6) {
  box-shadow: 0 0 12px 3px rgba(232, 185, 35, 0.9);
}
.map-single-bottle-confetti .confetti-piece:nth-child(1) { left: 4px; top: 4px; background: #e8b923; --d: 0ms; }
.map-single-bottle-confetti .confetti-piece:nth-child(2) { left: 16px; top: 0; background: #ffffff; --d: 20ms; }
.map-single-bottle-confetti .confetti-piece:nth-child(3) { left: 28px; top: 4px; background: #f0f0f0; --d: 40ms; }
.map-single-bottle-confetti .confetti-piece:nth-child(4) { left: 40px; top: 0; background: #e8b923; --d: 60ms; }
.map-single-bottle-confetti .confetti-piece:nth-child(5) { left: 8px; top: 20px; background: #ffffff; --d: 80ms; }
.map-single-bottle-confetti .confetti-piece:nth-child(6) { left: 20px; top: 24px; background: #e8b923; --d: 100ms; }
.map-single-bottle-confetti .confetti-piece:nth-child(7) { left: 32px; top: 20px; background: #f0f0f0; --d: 120ms; }
.map-single-bottle-confetti .confetti-piece:nth-child(8) { left: 44px; top: 24px; background: #ffffff; --d: 140ms; }
@keyframes map-single-bottle-confetti-burst {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.8); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(-10px, -18px) rotate(160deg) scale(1); }
}

/* Admin-Karte: Bier-Grid direkt auf der Karte, skaliert mit Zoom (zoomend/zoom) */
.map-grid-marker-icon {
  background: none !important;
  border: none !important;
}
.map-grid-marker-icon .map-grid-marker-wrap {
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  background: none;
  border: none;
}
.map-grid-marker-icon .map-bottle-grid-popup {
  padding: 0.25rem 0;
  font-size: 0.8rem;
}
.map-grid-marker-icon .map-bottle-grid-title { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
.map-grid-marker-icon .map-bottle-grid-scroll { max-height: 100px; }
.map-grid-marker-icon .map-bottle-grid-popup .grid-bottle-wrap { width: 28px; height: 34px; }

/* Admin-Karte: Bier-Grid-Popup (Leaflet) */
.map-bottle-popup.leaflet-popup .leaflet-popup-content-wrapper {
  background: var(--bg-elevated, #252525);
  border: 1px solid var(--border, #383838);
  border-radius: var(--radius, 12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  padding: 0;
  overflow: hidden;
}
.map-bottle-popup.leaflet-popup .leaflet-popup-content {
  margin: 0;
  min-width: 200px;
}
.map-bottle-grid-popup {
  padding: 0.35rem 0;
}
.map-bottle-grid-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text, #f5f5f5);
  padding: 0.3rem 0.6rem 0.4rem;
  text-align: center;
  border-bottom: 1px solid var(--border, #383838);
}
/* Celebration-Nachricht wie in der App (Titel + Text) + Konfetti */
.map-bottle-celebration-msg {
  position: relative;
  padding: 0.4rem 0.6rem 0.5rem;
  background: linear-gradient(135deg, rgba(232,185,35,0.2) 0%, rgba(232,185,35,0.08) 100%);
  border-bottom: 1px solid var(--border, #383838);
  text-align: center;
}
.map-bottle-celebration-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary, #e8b923);
}
.map-bottle-celebration-text {
  font-size: 0.8rem;
  color: var(--text-muted, #b0b0b0);
  margin-top: 0.15rem;
  line-height: 1.3;
}
.map-bottle-confetti {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 20px;
  pointer-events: none;
}
/* Scrollbarer Bereich für das Bier-Grid in der Karte – kleinere Anzeige */
.map-bottle-grid-scroll {
  max-height: 140px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 2px;
}
.map-bottle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px 6px;
  align-content: start;
}
/* Kleinere Flaschen im Karten-Popup */
.map-bottle-grid-popup .grid-bottle-wrap {
  width: 32px;
  height: 38px;
}
.map-bottle-grid-popup .grid-bottle-consumed-label {
  font-size: 0.5rem;
  padding: 0.1em 0.3em;
}
/* Karten-Grid: „getrunken“-Label an kleine Flaschenzelle anpassen */
.map-grid-marker-icon .grid-bottle-consumed-label {
  font-size: 0.35rem;
  padding: 0.05em 0.2em;
  top: 55%;
  letter-spacing: 0.02em;
  border-radius: 2px;
}
/* Phone-Preview / Sidebar: Flaschen nur Anzeige */
.map-phone-preview .grid-bottle-cell,
.map-phone-preview .map-bottle-grid {
  pointer-events: none;
  user-select: none;
}
/* Auf der Karte (Marker): Flaschen klickbar für getrunken umschalten */
.map-grid-marker-icon .grid-bottle-cell.grid-bottle-full,
.map-grid-marker-icon .grid-bottle-cell.grid-bottle-consumed {
  cursor: pointer;
  pointer-events: auto;
}
.map-grid-marker-icon .grid-bottle-cell.grid-bottle-inactive {
  pointer-events: none;
}
.map-grid-marker-icon .map-bottle-leergut {
  pointer-events: auto;
}
/* Leergut-Zeile unter dem Grid */
.map-bottle-leergut {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted, #999);
  border-top: 1px solid var(--border, #383838);
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.map-bottle-leergut:hover,
.map-bottle-leergut:focus {
  background: rgba(0, 0, 0, 0.25);
  color: var(--text, #eee);
  outline: none;
}
.map-bottle-leergut-icon {
  font-size: 1rem;
  line-height: 1;
}

/* Mehrere Phone-Previews auf der Karte (schlank = HTML, optional iframe) */
.map-phone-previews {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  justify-content: flex-end;
  max-width: calc(100% - 24px);
  pointer-events: none;
}
.map-phone-previews .map-phone-preview {
  pointer-events: auto;
}

/* Karten-Timeline / Zeitmaschine (Progressbar, Play/Pause, Scrub, Speed) */
.map-timeline-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.6));
  padding: 0.5rem 0.75rem 0.6rem;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.map-timeline-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.map-timeline-btn {
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border, #383838);
  border-radius: 4px;
  background: var(--bg-elevated, #252525);
  color: var(--text, #f5f5f5);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-timeline-btn:hover {
  background: var(--bg-hover, #333);
}
.map-timeline-progress-wrap {
  flex: 1;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.map-timeline-scrub {
  width: 100%;
  height: 8px;
  accent-color: var(--primary, #e8b923);
  cursor: pointer;
}
.map-timeline-event-markers {
  position: relative;
  width: 100%;
  height: 8px;
  min-height: 8px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}
.map-timeline-event-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 8px;
  min-width: 4px;
  background: var(--primary, #e8b923);
  border-radius: 2px;
  opacity: 1;
}
.map-timeline-speed {
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
  background: var(--bg-elevated, #252525);
  border: 1px solid var(--border, #383838);
  border-radius: 4px;
  color: var(--text, #f5f5f5);
  min-width: 4rem;
}
.map-timeline-time {
  font-size: 0.85rem;
  color: var(--text-muted, #b0b0b0);
  min-width: 4ch;
}
.map-timeline-range {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.map-timeline-range-label {
  font-size: 0.8rem;
  color: var(--text-muted, #b0b0b0);
  margin: 0;
}
.map-timeline-range-preset {
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
  background: var(--bg-elevated, #252525);
  border: 1px solid var(--border, #383838);
  border-radius: 4px;
  color: var(--text, #f5f5f5);
}
.map-timeline-load {
  width: auto;
  padding: 0 0.5rem;
  font-size: 0.8rem;
}

.map-timeline-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted, #b0b0b0);
  min-width: 4ch;
}
.map-timeline-status--loading {
  color: var(--text-muted, #b0b0b0);
}
.map-timeline-loading-text {
  margin-right: 0.25rem;
}
.map-timeline-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border, #383838);
  border-top-color: var(--primary, #e8b923);
  border-radius: 50%;
  animation: map-timeline-spin 0.7s linear infinite;
}
@keyframes map-timeline-spin {
  to { transform: rotate(360deg); }
}
.map-timeline-status--empty .map-timeline-empty-text {
  color: var(--text-muted, #b0b0b0);
  font-size: 0.85rem;
}
.map-timeline-status--error .map-timeline-error-msg {
  color: var(--danger, #e57373);
  font-size: 0.85rem;
}
.map-timeline-retry {
  margin-left: 0.25rem;
  width: auto;
  padding: 0 0.5rem;
  font-size: 0.8rem;
}
.map-timeline-btn:disabled,
.map-timeline-scrub:disabled,
.map-timeline-speed:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.map-timeline-btn:focus-visible,
.map-timeline-scrub:focus-visible,
.map-timeline-speed:focus-visible,
.map-timeline-load:focus-visible,
.map-timeline-retry:focus-visible {
  outline: 2px solid var(--primary, #e8b923);
  outline-offset: 2px;
}
.map-timeline-range-preset:focus-visible {
  outline: 2px solid var(--primary, #e8b923);
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .map-timeline-controls {
    flex-wrap: wrap;
  }
  .map-timeline-btn {
    min-width: 44px;
    min-height: 44px;
  }
  .map-timeline-scrub {
    min-height: 12px;
  }
}
.map-wrapper:fullscreen .map-timeline-overlay,
.map-wrapper:-webkit-full-screen .map-timeline-overlay {
  padding: 0.75rem 1rem 0.8rem;
}

.map-phone-preview {
  position: relative;
  width: 120px;
  flex-shrink: 0;
  background: var(--bg-elevated, #252525);
  border: 1px solid var(--border, #383838);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: map-phone-preview-in 0.25s ease-out;
}
@keyframes map-phone-preview-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.map-phone-preview-close {
  position: absolute;
  top: 2px;
  right: 4px;
  z-index: 2;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-phone-preview-close:hover {
  background: rgba(0, 0, 0, 0.7);
}
.map-phone-preview-device {
  position: relative;
  width: 100%;
  padding-top: 8px;
  padding-left: 6px;
  padding-right: 6px;
  padding-bottom: 10px;
}
.map-phone-preview-screen {
  width: 100%;
  height: 0;
  padding-bottom: 210%;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg, #1a1a1a);
}
.map-phone-preview-screen--html {
  padding-bottom: 0;
  height: auto;
  max-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.map-phone-preview-screen--html .map-bottle-grid-popup {
  padding: 0.2rem 0;
  font-size: 0.75rem;
}
.map-phone-preview-screen--html .map-bottle-grid-title { font-size: 0.7rem; padding: 0.2rem 0.4rem; }
.map-phone-preview-screen--html .map-bottle-grid-scroll { max-height: 90px; }
.map-phone-preview-screen--html .map-bottle-grid-popup .grid-bottle-wrap { width: 22px; height: 28px; }
.map-phone-preview-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

.grid-bottle-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  min-width: 0;
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.grid-bottle-wrap {
  position: relative;
  width: 48px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.grid-bottle-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.grid-bottle-inactive {
  opacity: 0.35;
  filter: grayscale(80%);
}
.grid-bottle-full {
  opacity: 1;
  filter: none;
}
.grid-bottle-consumed .grid-bottle-wrap img {
  opacity: 0.4;
  filter: grayscale(80%);
}
.grid-bottle-consumed-label {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  color: #e53935;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 0 2px #000, 0 1px 2px rgba(0, 0, 0, 0.8);
  background: rgba(180, 30, 30, 0.5);
  border: 1px solid rgba(180, 30, 30, 0.85);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}
.grid-bottle-cell.grid-bottle-celebrating {
  animation: grid-celebrate 1.5s ease-out;
}
.grid-bottle-cell.grid-bottle-celebrating .grid-bottle-wrap {
  animation: grid-celebrate-scale 1.5s ease-out;
}
@keyframes grid-celebrate {
  0%, 100% { filter: none; }
  15% { filter: drop-shadow(0 0 8px rgba(232, 185, 35, 0.8)); }
  50% { filter: drop-shadow(0 0 12px rgba(232, 185, 35, 0.6)); }
  100% { filter: none; }
}
@keyframes grid-celebrate-scale {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.08); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes live-activity-appear {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Heartbeat: kurzes schlagendes Herz */
.live-heartbeat {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--border, #ddd);
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  transform: translateZ(0);
  animation: heartbeat-pop 1200ms ease-out forwards;
  font-size: 16px;
  line-height: 1;
}
@keyframes heartbeat-pop {
  0% { opacity: 0; transform: scale(0.6); }
  10% { opacity: 1; transform: scale(1.05); }
  25% { transform: scale(0.92); }
  40% { transform: scale(1.08); }
  60% { transform: scale(0.98); }
  100% { opacity: 0; transform: scale(0.9); }
}

/* Kleines Phone-Icon: App im Vordergrund */
.live-activity-foreground-phone-icon {
  background: none !important;
  border: none !important;
}
.live-activity-foreground-phone {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--border, #ccc);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  font-size: 14px;
  line-height: 1;
  animation: live-activity-appear 0.25s ease-out;
}

/* Celebration-Popup bei „Flasche verdient“ */
.live-activity-celebration .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(232,185,35,0.4);
}
.live-activity-celebration .leaflet-popup-content {
  margin: 0;
  min-width: 160px;
}
.live-activity-celebration-content {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #e8b923 0%, #f0c830 100%);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  animation: live-activity-celebration-pulse 0.5s ease-out, live-activity-celebration-pulse 0.5s ease-in 0.5s infinite alternate;
}
@keyframes live-activity-celebration-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

/* Karten mit gelbem Akzentbalken: alle Ecken eckig, rechte Kante der gelben Linie gerade */
.campaign-card.card,
.accent-border-left {
  border-radius: 0;
}

/* Preismodell: Prominente Darstellung – Fokus auf Pakete */
.pricing-hero {
  background: linear-gradient(180deg, rgba(232,185,35,0.06) 0%, transparent 100%);
  border: 1px solid rgba(232,185,35,0.25);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}
.pricing-hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1.5rem 0;
  text-align: center;
  letter-spacing: 0.02em;
}
.pricing-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}
.pricing-package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem !important;
  border: 1px solid var(--border) !important;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.pricing-package-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.pricing-package-card.package-active {
  border-color: rgba(232,185,35,0.5) !important;
  box-shadow: 0 0 0 2px rgba(232,185,35,0.2), 0 8px 24px rgba(0, 0, 0, 0.2);
}
.pricing-package-card.package-active:hover {
  box-shadow: 0 0 0 2px rgba(232,185,35,0.3), 0 12px 32px rgba(0, 0, 0, 0.25);
}
.pricing-package-card .pricing-card-body {
  flex: 1;
}
.pricing-package-card .pricing-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  min-height: 8rem;
  border-top: 1px solid var(--border);
}
.pricing-package-card .pricing-card-footer .btn,
.pricing-package-card .pricing-card-footer span[class*="btn"] {
  min-width: 10.5rem;
  display: inline-block;
  text-align: center;
}
.pricing-package-card h4 {
  min-height: 2.2em;
  font-size: 1.25rem;
}
.pricing-package-card strong {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pricing-card-price {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
  margin-bottom: 0.25rem !important;
}
.pricing-card-price-unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}
.pricing-package-card.package-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--accent);
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
/* Unterstützende Inhalte unter den Paketen – dezenter */
.billing-support-section {
  opacity: 0.92;
}
.billing-support-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.testimonial-carousel.billing-support-card {
  background: rgba(232,185,35,0.06);
  border-color: rgba(232,185,35,0.2);
}
/* Dynamische, motivierende Zitate – Einblend-Animation */
.testimonial-carousel .testimonial-inner-enter {
  animation: testimonial-enter 0.5s ease-out;
}
@keyframes testimonial-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.testimonial-carousel.quote-motivating {
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(232,185,35,0.12) 0%, rgba(232,185,35,0.04) 100%);
}
.testimonial-carousel.quote-motivating cite {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Max. Monatsbudget (Spending Limit) */
.budget-meter {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.budget-meter-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.budget-meter-bar-notice { background: rgba(232,185,35,0.9); }
.budget-meter-bar-warn { background: rgba(255,159,10,0.95); }
.budget-meter-bar-hit { background: rgba(255,69,58,0.9); }
.budget-meter-bar-ok,
.budget-meter-bar-none { background: rgba(48,209,88,0.75); }

/* Budget-Karte: Header-Zeile mit Titel + „IM RAHMEN“-Badge – kein Überlappen, sauber ausgerichtet */
.budget-limit-card {
  overflow: hidden;
}
.budget-limit-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  min-height: 1.5rem;
}
.budget-limit-card__title {
  font-size: 1rem;
  margin: 0;
  flex: 1;
  min-width: 0;
}
.budget-limit-card__header .budget-badge {
  flex-shrink: 0;
  align-self: center;
}

.budget-badge {
  white-space: nowrap;
}
.budget-badge-ok { background: rgba(48, 209, 88, 0.2); color: var(--success); }
.budget-badge-notice { background: rgba(232,185,35,0.18); color: var(--accent); }
.budget-badge-warn { background: rgba(255,159,10,0.18); color: #ff9f0a; }
.budget-badge-hit { background: rgba(255,69,58,0.18); color: var(--danger); }
.budget-badge-none { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }
/* Zitate-Layout: feste Höhe für längere Zitate, kein Abschneiden */
.testimonial-quote-box {
  min-height: 6.5rem;
  height: 6.5rem;
  padding: 0.875rem 1rem 0.875rem 1.125rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.testimonial-quote-box .testimonial-inner {
  flex: 1;
  min-width: 0;
}
.testimonial-quote-box p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}
.testimonial-quote-box cite {
  margin-top: 0.35rem;
  font-size: 0.8rem;
}
/* Layout-Stabilität: Preismodell-Bereich */
.pricing-intro-grid {
  contain: layout;
}
.pricing-quotes-column {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 0.75rem;
  min-height: 13.75rem;
}
@media (max-width: 768px) {
  .pricing-intro-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 700px) {
  .campaign-stats-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  .contact-layout { grid-template-columns: 1fr !important; }
}

/* FAQ Accordion */
.faq-list { list-style: none; padding: 0; margin: 0; }
.faq-list > li { margin-bottom: 0.5rem; }
.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-list details[open] {
  border-color: rgba(232, 185, 35, 0.3);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.faq-list summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  color: var(--text);
  transition: background 0.2s;
}
.faq-list summary:hover { background: rgba(255, 255, 255, 0.03); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1;
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-list details[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}
.faq-list .faq-answer {
  padding: 1.25rem 1.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}
.faq-list .faq-answer p {
  margin: 0 0 1rem;
  max-width: 65ch;
}
.faq-list .faq-answer p:last-of-type { margin-bottom: 0; }
/* FAQ-Tabelle: klare Struktur, bessere Lesbarkeit */
.faq-list .faq-answer table {
  width: 100%;
  font-size: 0.9rem;
  margin-top: 1rem;
  margin-bottom: 0;
  border-collapse: collapse;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.faq-list .faq-answer th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
}
.faq-list .faq-answer td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
.faq-list .faq-answer tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}
.faq-list .faq-answer tr:first-child th:first-child { border-top-left-radius: var(--radius-sm); }
.faq-list .faq-answer tr:first-child th:last-child { border-top-right-radius: var(--radius-sm); }
.faq-list .faq-answer td:first-child { font-weight: 500; color: var(--text); }
@media (max-width: 640px) {
  .faq-list .faq-answer table { display: block; }
  .faq-list .faq-answer thead { display: none; }
  .faq-list .faq-answer tr { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
  .faq-list .faq-answer tr:last-child { border-bottom: none; }
  .faq-list .faq-answer td { display: block; padding: 0.25rem 0 0.5rem; border: none; }
  .faq-list .faq-answer td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 0.25rem;
  }
  .faq-list .faq-answer td:first-child { font-weight: 600; font-size: 0.95rem; }
  .faq-list .faq-answer td:first-child::before { content: 'Asset'; }
  .faq-list .faq-answer td:nth-child(2)::before { content: 'Format'; }
  .faq-list .faq-answer td:nth-child(3)::before { content: 'Empf. Größe'; }
  .faq-list .faq-answer td:nth-child(4)::before { content: 'Hinweis'; }
}

/* Map Tooltips (Hover-Popup) */
.leaflet-div-icon.poi-marker {
  background: none !important;
  border: none !important;
}

.leaflet-tooltip.map-point-tooltip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.leaflet-tooltip.map-point-tooltip::before {
  border-top-color: var(--bg-elevated);
}

/* Admin: Service-Status (Backend, SQLite, InfluxDB) */
.admin-services-status .admin-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.admin-service-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.admin-service-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.admin-service-item.status-ok .admin-service-dot { background: #30d158; }
.admin-service-item.status-error .admin-service-dot { background: #ff453a; }
.admin-service-item.status-warn .admin-service-dot { background: #ffd60a; }
.admin-service-label { font-weight: 500; }
.admin-service-value {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.admin-service-item.status-ok .admin-service-value { color: #30d158; }
.admin-service-item.status-error .admin-service-value { color: #ff453a; }
.admin-service-item.status-warn .admin-service-value { color: #ffd60a; }

/* Admin Dashboard: Insight-Karten (Bier-Trails, Gruppen, Churn, Fraud) */
.admin-insight-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0) 70%),
    var(--bg-elevated);
}
.admin-insight-title {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.admin-insight-lead {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 80ch;
}
.admin-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}
.admin-community-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.02);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.admin-community-item:hover {
  border-color: rgba(232, 185, 35, 0.35);
  background: rgba(255, 255, 255, 0.035);
  transform: translateY(-1px);
}
.admin-community-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.admin-community-value {
  color: var(--text);
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.admin-community-hint {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}
.admin-community-bar-wrap {
  margin-top: auto;
}
.admin-community-bar-bg {
  height: 8px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.admin-community-bar-fg {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8b923 0%, #30d158 100%);
  transition: width 0.25s ease;
}
.admin-community-bar-label {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}
@media (max-width: 920px) {
  .admin-insight-grid {
    grid-template-columns: 1fr;
  }
  .admin-community-item {
    min-height: 0;
  }
}

/* Bier-Trails Admin: Zeilenauswahl */
.admin-trails-row:hover { background: var(--bg-elevated); }
.admin-trails-row-selected { background: rgba(232, 185, 35, 0.15); }

#admin-brevo-range-selector .btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* === Pipeline (GitLab-ähnliche Optik) === */
.pipeline-card { border-radius: var(--radius); }
.pipeline-pagination .btn.pipeline-runs-pagesize.active,
.pipeline-pagination .btn.pipeline-artifacts-pagesize.active,
.pipeline-pagination .btn.cron-runs-pagesize.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.pipeline-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.pipeline-tabs {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.pipeline-tab {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: default;
  border-radius: 6px;
}
.pipeline-tab.active {
  color: var(--text);
  font-weight: 500;
  background: var(--bg-hover);
}
.pipeline-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.pipeline-filter-input {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  min-width: 200px;
}
.pipeline-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.pipeline-table th {
  text-align: left;
  padding: 0.35rem 0.6rem;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  white-space: nowrap;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Feste Spaltenbreiten: keine Überlappung, Pipeline-Spalte mit Platz für Pills */
.pipeline-th-status { width: 160px; min-width: 160px; }
.pipeline-th-pipeline { width: 28%; min-width: 200px; }
.pipeline-th-stages { width: 240px; min-width: 200px; }
.pipeline-th-progress { width: 110px; min-width: 100px; }
.pipeline-th-downtime { width: 80px; min-width: 70px; }
.pipeline-th-actions { width: 90px; min-width: 90px; padding-right: 1rem; }
.pipeline-cell-status { width: 160px; }
.pipeline-cell-pipeline { width: 28%; min-width: 200px; overflow: visible; }
.pipeline-cell-stages { width: 240px; min-width: 0; }
.pipeline-cell-progress { width: 110px; }
.pipeline-cell-downtime { width: 80px; white-space: nowrap; }
.pipeline-cell-actions { width: 90px; }
.pipeline-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.pipeline-row:hover { background: rgba(255,255,255,0.03); }
.pipeline-cell-status,
.pipeline-cell-pipeline,
.pipeline-cell-stages,
.pipeline-cell-progress,
.pipeline-cell-downtime,
.pipeline-cell-actions {
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
}
.pipeline-cell-status {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}
.pipeline-cell-pipeline {
  overflow: visible;
}
.pipeline-cell-stages {
  min-width: 0;
}
.pipeline-cell-progress {
  white-space: nowrap;
}
.pipeline-cell-actions {
  padding-right: 1rem;
  vertical-align: top;
}
.pipeline-actions-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-height: 2rem;
  justify-content: flex-start;
}
.pipeline-progress-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.pipeline-status-cell {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
.pipeline-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  width: fit-content;
  white-space: nowrap;
}
.pipeline-status-passed { background: #1aaa55; color: #fff; }
.pipeline-status-failed { background: #db3b21; color: #fff; }
.pipeline-status-running { background: #fc9403; color: #fff; }
.pipeline-status-pending { background: var(--bg-hover); color: var(--text-muted); }
.pipeline-status-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.pipeline-meta-item {
  white-space: nowrap;
  padding: 0.05rem 0;
}
.pipeline-title {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.85rem;
}
.pipeline-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  margin-top: 0.1rem;
}
.pipeline-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-size: 0.72rem;
  background: rgba(59, 130, 246, 0.28);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.5);
  white-space: nowrap;
  flex-shrink: 0;
}
.pipeline-pill-latest {
  background: rgba(34, 197, 94, 0.25);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.4);
}
.pipeline-stages-flow {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}
.pipeline-stage-item {
  flex-shrink: 0;
}
.pipeline-stage-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: bold;
  flex-shrink: 0;
}
.pipeline-stage-success { background: #1aaa55; color: #fff; }
.pipeline-stage-failed { background: #db3b21; color: #fff; }
.pipeline-stage-running {
  background: transparent;
  border: 2px solid #fc9403;
  color: #fc9403;
  animation: pipeline-spin 1s linear infinite;
}
.pipeline-stage-pending {
  background: var(--border);
  color: var(--text-muted);
}
.pipeline-stage-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 0 2px;
}
.pipeline-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin-right: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
.pipeline-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}
@keyframes pipeline-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Docker-Seite: Logs + Exec-Aktionen */
.docker-actions-cell a {
  color: var(--accent);
  text-decoration: none;
}
.docker-actions-cell a:hover {
  text-decoration: underline;
}
