/* Stripe Configurator — Responsive Layout */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
}

body {
  background: #0a0a0a;
  color: #f0f0f0;
  font-family: 'DM Sans', sans-serif;
  height: 100%;
  overflow: hidden;
}

/* ── Header (kompakt) ── */
header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  height: 48px;
  border-bottom: 1px solid #1a1a1a;
  position: relative;
  flex-shrink: 0;
}
header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 5px;
  color: #fff;
  white-space: nowrap;
}
header p {
  display: none;
}
header .admin-link {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #555;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
header .admin-link:hover { color: #aaa; }

.theme-switcher {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  display: flex;
  gap: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
}
.theme-btn {
  padding: 4px 10px;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  background: #161616;
  color: #777;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s, color 0.15s;
}
.theme-btn + .theme-btn { border-left: 1px solid #2a2a2a; }
.theme-btn:hover { background: #222; color: #bbb; }
.theme-btn.active { background: #2a2a2a; color: #fff; }

/* Text-Ziehfläche (Cutout): beim Hover sichtbar machen */
.text-drag-handle rect { transition: fill 0.15s; }
.text-drag-handle:hover rect { fill: rgba(255,255,255,0.15); }

/* ── App-Shell: Header + Layout füllen Viewport ── */
body { display: flex; flex-direction: column; }
header { flex-shrink: 0; }

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 0;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  background: #0f0f0f;
  border-right: 1px solid #1a1a1a;
  padding: 10px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Einzelne Menübereiche: Karten-Optik für bessere Unterscheidung */
.sidebar-section {
  background: #161616;
  border: 1px solid #252525;
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.sidebar-section:hover {
  border-color: #333;
  background: #1a1a1a;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
}
.section-header .section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  flex: 1;
  color: #888;
}
.sidebar-section:hover .section-header .section-title {
  color: #aaa;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 3px;
  color: #444;
  margin-bottom: 7px;
  padding-bottom: 4px;
  border-bottom: 1px solid #1a1a1a;
}
/* Titel ohne Header (z. B. Karosseriefarbe) behalten Unterstreichung optional */
.section-title-inline {
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: #555;
  margin-top: 8px;
  margin-bottom: 4px;
}
body.theme-light .section-title-inline { color: #666; }

/* ── Fahrzeug-Picker ── */
.vehicle-picker {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.vc-item { position: relative; }
.vc-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: #161616;
  border: 1px solid #252525;
  border-radius: 4px;
  padding: 6px 9px;
  cursor: pointer;
  color: #777;
  font-size: 0.68rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: left;
  transition: border-color 0.15s, color 0.15s;
}
.vc-btn:hover { border-color: #3a3a3a; color: #bbb; }
.vc-item.active > .vc-btn { border-color: #ddd; color: #fff; background: #1e1e1e; }
.vc-swatch {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}
.vc-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-arrow { font-size: 0.75rem; opacity: 0.4; transition: transform 0.15s; }
.vc-item.open > .vc-btn .vc-arrow { transform: rotate(180deg); opacity: 1; }
.vc-popup {
  display: none;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px 9px;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-top: none;
  border-radius: 0 0 4px 4px;
  margin-top: -1px;
}
.vc-item.open > .vc-popup { display: flex; }
.vc-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.vc-dot:hover { transform: scale(1.2); border-color: rgba(255,255,255,0.4); }
.vc-dot.active { border-color: #fff; transform: scale(1.1); }
.vc-dot[data-light="1"] { border-color: rgba(0,0,0,0.25); }
.vc-dot[data-light="1"].active { border-color: #777; }

/* Fahrzeug „…“-Eintrag (7. Position) */
.vc-item-more .vc-btn-more { justify-content: space-between; }
.vc-more-dots { font-size: 1rem; letter-spacing: 2px; color: inherit; }
.vc-item-more .vc-btn .vc-arrow { flex-shrink: 0; }

/* ── Design Grid ── */
.design-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.design-group-block {
  grid-column: 1 / -1;
}
.design-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.design-group-title {
  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9a9a9a;
  margin: 4px 0 4px;
}
.design-group-gallery-btn {
  border: 1px solid #2f2f2f;
  background: #171717;
  color: #bdbdbd;
  border-radius: 4px;
  font-size: 0.58rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 6px;
  cursor: pointer;
}
.design-group-gallery-btn:hover { border-color: #4a4a4a; color: #e5e5e5; }
.design-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.design-btn {
  background: #161616;
  border: 1px solid #252525;
  border-radius: 3px;
  padding: 6px 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  color: #777;
  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.design-btn:hover { border-color: #3a3a3a; color: #bbb; }
.design-btn.active { border-color: #ddd; color: #fff; background: #1e1e1e; }
.design-btn .num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  display: block;
  color: inherit;
  line-height: 1;
  margin-bottom: 2px;
}
.design-btn-more .num { font-size: 1.4rem; margin-bottom: 0; }

/* ── Galerie-Modals (Fahrzeug / Design) ── */
.gallery-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.gallery-modal {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}
.gallery-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 3px;
  color: #ccc;
}
.gallery-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.gallery-close:hover { color: #fff; background: #222; }
.gallery-search {
  padding: 8px 12px;
  margin: 0 12px 10px;
  background: #161616;
  border: 1px solid #252525;
  border-radius: 4px;
  color: #f0f0f0;
  font-size: 0.85rem;
  width: calc(100% - 24px);
  max-width: 320px;
  align-self: center;
}
.gallery-search::placeholder { color: #666; }
.gallery-search:focus {
  outline: none;
  border-color: #444;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px 16px 16px;
  overflow-y: auto;
  min-height: 200px;
}

/* Fahrzeug-Galerie: Matrix mit quadratischen Karten wie bei Designs */
.gallery-modal-vehicles {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}
.gallery-modal-vehicles .gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}
.gallery-modal-vehicles .gallery-toolbar .gallery-search {
  margin: 0;
  flex: 1;
  min-width: 140px;
}
.gallery-modal-vehicles .gallery-grid-vehicles {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--vehicle-card-size, 180px));
  gap: 10px 12px;
  padding: 10px 12px 12px;
  overflow-y: auto;
  align-content: start;
}

/* Streifen-Galerie: gleiche Größe wie Live-Vorschau, Matrix aus Spalten und Reihen */
.gallery-modal-stripe {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}
.gallery-modal-stripe .gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}
.gallery-modal-stripe .gallery-toolbar .gallery-search {
  margin: 0;
  flex: 1;
  min-width: 140px;
}
.gallery-group-filter {
  min-width: 170px;
  max-width: 260px;
  padding: 7px 10px;
  border: 1px solid #2f2f2f;
  border-radius: 6px;
  background: #171717;
  color: #ddd;
  font-size: 0.78rem;
}
.gallery-size-slider-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #888;
  white-space: nowrap;
}
.gallery-size-slider-label span {
  color: #ccc;
  min-width: 2ch;
}
.gallery-size-slider-label input[type="range"] {
  width: 100px;
  accent-color: #fff;
}
.gallery-modal-stripe .gallery-grid-designs {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--stripe-card-width, 200px));
  grid-auto-rows: var(--stripe-card-height, 174px);
  gap: 10px 12px;
  padding: 10px 12px 12px;
  overflow-y: auto;
  align-content: start;
}
.gallery-item {
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #252525;
  background: #161616;
  transition: border-color 0.15s, background 0.15s;
}
.gallery-item:hover { border-color: #444; background: #1e1e1e; }
.gallery-item.active { border-color: #ddd; background: #222; }
/* Fahrzeug: quadratische Vorschau, Bild zentriert und sichtbar */
.gallery-item-vehicle .gallery-item-preview {
  display: block;
  aspect-ratio: 1;
  width: 100%;
  background: #ffffff;
  overflow: hidden;
  position: relative;
}
.gallery-item-vehicle .gallery-item-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  /* Fahrzeuge neutral grau auf hellem Hintergrund darstellen */
  filter: grayscale(1) brightness(1.05);
}
/* Design/Streifen-Galerie: Karte mit fester Größe, Streifen im Verhältnis 600:450, Matrix */
.gallery-item-design {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 6px;
  overflow: hidden;
}
.gallery-item-design .gallery-item-preview {
  display: block;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 600/450;
  background: #1a1a1a;
  overflow: hidden;
  position: relative;
}
.gallery-item-design .gallery-item-preview svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.gallery-item-design .gallery-item-preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #555;
}
.gallery-item-design .gallery-item-set-label {
  flex: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #1a1a1a;
  border-top: 1px solid #252525;
}
.gallery-item-design .gallery-item-group-label {
  flex: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px 2px;
  font-size: 0.58rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #a5a5a5;
  background: #141414;
  border-top: 1px solid #252525;
}
.gallery-item-label {
  padding: 6px 8px;
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #222;
  text-align: center;
}
.gallery-item-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  color: inherit;
  padding: 2px 0 0;
}

/* ── Farb-Dots ── */
/* Farbzeile nach Design-Grid im gleichen Abschnitt „Design & Farbe“ */
.sidebar-section .design-grid + .color-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
body.theme-light .sidebar-section .design-grid + .color-row {
  border-top-color: rgba(0,0,0,0.08);
}

.color-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Mehrfarb-Designs (Folie C1, C2, …) */
.color-row .foil-group-picker {
  width: 100%;
  margin-bottom: 10px;
}
.color-row .foil-group-picker:last-child {
  margin-bottom: 0;
}
.foil-group-label {
  display: block;
  font-size: 0.65rem;
  color: #888;
  margin-bottom: 4px;
}
body.theme-light .foil-group-label {
  color: #666;
}
.foil-group-picker .color-row-inner {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
#objectInspectorColorRow .foil-group-picker {
  margin-bottom: 8px;
}

/* ── Warenkorb / Zusammenfassung ── */
.cart-empty-hint {
  font-size: 0.72rem;
  color: #777;
  margin: 0 0 6px;
}
.cart-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  border-radius: 4px;
}
.cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.72rem;
}
.cart-item:last-child {
  border-bottom: none;
}
.cart-item-main {
  flex: 1;
  min-width: 0;
}
.cart-item-title {
  font-weight: 500;
  margin-bottom: 2px;
}
.cart-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #aaa;
}
.cart-item-meta span::before {
  content: "";
  margin-right: 0;
}
.cart-item-price {
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.75rem;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 4px 0 8px;
  font-size: 0.78rem;
}
.cart-total-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
}
.cart-total-value {
  font-weight: 600;
}
.color-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.active { border-color: #fff; }
.color-dot[data-light="1"] { border-color: #333; }
.color-dot[data-light="1"].active { border-color: #999; }

/* Glossy-Folie: dynamischer Glanz-Reflex wie im Demo */
.color-dot-glossy::after {
  content: "";
  position: absolute;
  /* Werte analog zur Demo aus glosy.html */
  width: 250%;
  height: 250%;
  top: -75%;
  left: -75%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,0.6) 45%,
    rgba(255,255,255,0.8) 50%,
    rgba(255,255,255,0.6) 55%,
    rgba(255,255,255,0) 70%
  );
  transform: rotate(25deg);
  pointer-events: none;
  animation: glossMove 4s linear infinite;
}

/* Gleiche Animation wie im Demo-Glossy-Sticker */
@keyframes glossMove {
  0%   { transform: translateX(-40%) rotate(25deg); }
  50%  { transform: translateX(40%) rotate(25deg); }
  100% { transform: translateX(-40%) rotate(25deg); }
}

/* Metallic-Folie: subtiler Metall-Effekt */
.color-dot-metallic::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
    rgba(255,255,255,0.45),
    rgba(255,255,255,0),
    rgba(255,255,255,0.5)
  );
  mix-blend-mode: screen;
  opacity: 0.7;
  pointer-events: none;
}


/* ── Slider ── */
.slider-group { display: flex; flex-direction: column; gap: 10px; }
.slider-row { display: flex; flex-direction: column; gap: 4px; }
.slider-with-input {
  display: flex;
  align-items: center;
  gap: 8px;
}
.slider-with-input input[type="range"] { flex: 1; min-width: 0; }
.slider-with-input input[type="number"] {
  width: 4.5em;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 0.8rem;
  text-align: right;
}
.slider-with-input .unit-suffix { font-size: 0.7rem; color: #888; }
.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #555;
}
.slider-label span { color: #999; font-size: 0.68rem; }
input[type="range"] {
  width: 100%;
  accent-color: #fff;
  height: 3px;
  cursor: pointer;
}

/* ── Preis ── */
.price-box .price-display { padding: 4px 0; }
.price-display strong { font-size: 1rem; color: #fff; }

/* ── Aktions-Buttons ── */
.btn-row { display: flex; flex-direction: column; gap: 6px; }
.btn {
  padding: 8px 12px;
  border-radius: 3px;
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid #2a2a2a;
  background: #161616;
  color: #888;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.btn:hover { background: #222; color: #fff; border-color: #444; }
.btn.primary {
  background: #fff;
  color: #000;
  border-color: #fff;
  font-weight: 600;
}
.btn.primary:hover { background: #e0e0e0; }
.btn-sm {
  font-size: 0.65rem;
  padding: 5px 9px;
}
.btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.btn-toggle .toggle-state {
  min-width: 30px;
  text-align: center;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #bbb;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
#btnPowerclip.active {
  background: #1a3a2a;
  border-color: #2d8a5e;
  color: #4dcc8a;
}
#btnPowerclip.active .toggle-state {
  background: rgba(59, 180, 116, 0.22);
  color: #85e9b7;
  border-color: rgba(64, 198, 126, 0.5);
}
#btnPowerclip.active:hover {
  background: #1e4530;
  border-color: #3aaa70;
}
body.theme-light #btnPowerclip.active {
  background: #d0f0e0;
  border-color: #2a8a5a;
  color: #155a30;
}
body.theme-light .btn-toggle .toggle-state {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
  border-color: rgba(0, 0, 0, 0.12);
}
body.theme-light #btnPowerclip.active .toggle-state {
  background: rgba(42, 138, 90, 0.16);
  color: #155a30;
  border-color: rgba(42, 138, 90, 0.42);
}
.btn.ghost {
  background: transparent;
  border-color: #333;
  color: #666;
}
.btn.ghost:hover {
  background: #181818;
  border-color: #555;
  color: #fff;
}
.onboarding-restart-row {
  margin-top: 8px;
}
.onboarding-restart-row .btn {
  width: 100%;
}
.save-status { font-size: 0.65rem; color: #5a5; margin-top: 2px; }
.save-status.error { color: #c55; }

/* ── Meine Vormerkungen (gespeicherte Konfigurationen) ── */
#savedConfigsSection { margin-top: 4px; }
.saved-configs-hint {
  font-size: 0.7rem;
  color: #555;
  margin-bottom: 8px;
  line-height: 1.3;
}
#savedConfigsSection .btn { margin-bottom: 10px; }
#savedConfigsSection .btn-sm { font-size: 0.65rem; padding: 4px 8px; }
.saved-configs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.saved-configs-empty {
  font-size: 0.7rem;
  color: #555;
  padding: 8px 0;
}
.saved-config-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #161616;
  border: 1px solid #252525;
  border-radius: 4px;
  font-size: 0.7rem;
}
.saved-config-name { flex: 1; min-width: 0; color: #ccc; font-weight: 500; }
.saved-config-date { color: #666; font-size: 0.65rem; }
.saved-config-actions { display: flex; gap: 4px; }

/* ── Namens-Eingabe-Modal (Vormerkung) ── */
.name-input-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.name-input-modal {
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 20px 24px;
  min-width: 280px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.name-input-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: #ccc;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a1a;
}
.name-input-field {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #fff;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  box-sizing: border-box;
}
.name-input-field:focus {
  outline: none;
  border-color: #555;
}
.name-input-field::placeholder {
  color: #666;
}
.name-input-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.name-input-actions .btn { margin-bottom: 0; }

/* ── Canvas-Bereich ── */
.canvas-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Wrapper: zentriert den Mockup vertikal+horizontal, füllt den verfügbaren Platz */
.canvas-area-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  overflow: hidden;
  position: relative;
}

/* Kleines Willkommensfenster (nur beim ersten Start, Cookie) */
.first-time-guide-backdrop {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.36);
}
.first-time-guide-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 21;
  width: min(420px, calc(100% - 24px));
  padding: 14px 16px 16px;
  background: rgba(40, 50, 55, 0.97);
  border: 1px solid #4a6a7a;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #e0e8ec;
  box-shadow: 0 12px 36px rgba(0,0,0,0.48);
}
.first-time-guide-title {
  display: block;
  font-weight: 600;
  color: #7ab8d0;
  margin-bottom: 10px;
}
.first-time-guide-list {
  margin: 0 0 12px 0;
  padding-left: 20px;
  line-height: 1.45;
}
.first-time-guide-dismiss {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #4a6a7a;
  border-radius: 4px;
  background: rgba(74, 106, 122, 0.3);
  color: #b0d0e0;
  font-size: 0.85rem;
  cursor: pointer;
}
.first-time-guide-dismiss:hover {
  background: rgba(74, 106, 122, 0.5);
  color: #fff;
}

/* Consent-Dialog (Erstaufruf) */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(7, 12, 18, 0.68);
}
.consent-dialog {
  width: min(560px, 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(24, 31, 38, 0.98), rgba(17, 22, 28, 0.98));
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.5);
  padding: 18px 18px 14px;
}
.consent-title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #f1f5fa;
}
.consent-text {
  margin: 0;
  color: #c7d0da;
  line-height: 1.45;
}
.consent-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

body.theme-light .consent-overlay {
  background: rgba(10, 20, 32, 0.28);
}
body.theme-light .consent-dialog {
  border-color: rgba(24, 58, 94, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 248, 253, 0.99));
  box-shadow: 0 16px 40px rgba(16, 42, 76, 0.22);
}
body.theme-light .consent-title {
  color: #1f2d3a;
}
body.theme-light .consent-text {
  color: #33495f;
}

/* Ansicht-Einstellungen: PowerClip, rechtsbündig zur Vorschau */
.view-settings-box {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  min-width: 160px;
  max-width: calc(100% - 24px);
  padding: 12px 16px;
  background: rgba(40, 40, 40, 0.95);
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #e0e0e0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.view-settings-title {
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-size: 0.7rem;
}
.view-settings-box .btn {
  width: 100%;
}
.zoom-controls {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 6px;
}
.zoom-controls .btn {
  width: 100%;
  min-height: 26px;
  padding: 4px 6px;
}
.view-undo-btn {
  margin-top: 8px;
}

/* Infobereich: Konfiguration + Preis, linksbündig zur Vorschau */
.config-info-box {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  min-width: 200px;
  max-width: calc(100% - 24px);
  padding: 12px 16px;
  background: rgba(40, 40, 40, 0.95);
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #e0e0e0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.config-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  line-height: 1.5;
}
.config-info-row + .config-info-row { margin-top: 4px; }
.config-info-price { margin-top: 8px; padding-top: 8px; border-top: 1px solid #444; }
.config-info-label {
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.config-info-price .config-info-label { color: #aaa; }
.config-info-price strong { color: #fff; font-size: 0.95rem; }
.config-info-checkout-btn {
  margin-top: 10px;
  display: block;
  width: 100%;
}
.config-info-scope-btn {
  margin-top: 10px;
  display: block;
  width: 100%;
}

.mockup-container {
  position: relative;
  /* Größe wird per JS ResizeObserver gesetzt */
  overflow: hidden;
  background: transparent;
  flex-shrink: 0;
}
.mockup-container.pan-enabled {
  cursor: grab;
}
.mockup-container.pan-enabled.pan-active {
  cursor: grabbing;
}
.mockup-zoom-layer {
  position: absolute;
  inset: 0;
  transform-origin: top left;
  will-change: transform;
}
.mockup-container img,
.mockup-container .vehicle-svg-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center; /* Bild oben halten → Skala-Streifen unten bleibt frei */
  display: block;
}
.mockup-container .preview-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: #ddd;
  background: rgba(0,0,0,0.35);
  z-index: 30;
  pointer-events: none;
}
/* Rahmen zum Verschieben des Designs (PNG-Modus): nur sichtbar bei Maus über Objekt */
.mockup-container .drag-frame {
  position: absolute;
  box-sizing: border-box;
  border: 2px dashed transparent;
  background: transparent;
  cursor: grab;
  z-index: 15;
  pointer-events: none;
  display: none;
  transition: border-color 0.15s, background 0.15s;
}
.mockup-container .drag-frame.visible {
  pointer-events: auto;
  display: block;
}
.mockup-container .drag-frame.visible:hover {
  border-color: rgba(255, 224, 64, 0.9);
  background: rgba(255, 210, 60, 0.08);
}
.mockup-container .drag-frame.visible:active {
  cursor: grabbing;
  border-color: rgba(255, 224, 64, 0.9);
  background: rgba(255, 210, 60, 0.08);
}
.mockup-container .drag-frame .frame-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 224, 64, 0.95);
  background: rgba(20, 20, 20, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  display: none;
}
.mockup-container .drag-frame.visible .frame-handle {
  display: block;
}
.mockup-container .drag-frame .frame-handle-scale {
  right: -8px;
  bottom: -8px;
  cursor: nwse-resize;
}
.mockup-container .drag-frame .frame-handle-rotate {
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
  cursor: grab;
}
.mockup-container .drag-frame .frame-handle-rotate::before {
  content: "⟳";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  color: rgba(255, 224, 64, 0.96);
  pointer-events: none;
}
.mockup-container .drag-frame .frame-rotate-line {
  position: absolute;
  left: 50%;
  top: -8px;
  width: 2px;
  height: 12px;
  background: rgba(255, 224, 64, 0.8);
  transform: translateX(-50%);
  display: none;
}
.mockup-container .drag-frame.visible .frame-rotate-line {
  display: block;
}
.mockup-container .text-drag-handle-png {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(120, 210, 255, 0.95);
  background: rgba(20, 45, 60, 0.9);
  color: #c8f0ff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  z-index: 16;
  cursor: move;
  user-select: none;
}
.mockup-container .text-drag-handle-png.visible {
  display: flex;
}
.mockup-container .text-drag-handle-png:hover {
  background: rgba(35, 70, 90, 0.95);
}
.mockup-container .text-drag-preview-frame {
  position: absolute;
  border: 1.5px dashed rgba(120, 210, 255, 0.95);
  background: rgba(120, 210, 255, 0.08);
  display: none;
  pointer-events: none;
  z-index: 15;
}
.mockup-container .text-drag-preview-frame.visible {
  display: block;
}
.mockup-container .drag-frame.selection-fade {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.mockup-container .drag-frame.visible:hover.selection-fade {
  opacity: 1;
  pointer-events: auto;
}
/* Hover-Rahmen: über nicht ausgewähltem Objekt (gestrichelt, Klick = auswählen) */
.mockup-container .drag-frame-hover.visible {
  border: 2px dashed rgba(255, 224, 64, 0.85);
  background: rgba(255, 210, 60, 0.06);
  cursor: pointer;
  pointer-events: auto;
}
.mockup-container .drag-frame-hover.visible:hover {
  border-color: rgba(255, 224, 64, 1);
  background: rgba(255, 210, 60, 0.12);
}
body.theme-light .mockup-container .drag-frame-hover.visible {
  border-color: rgba(212, 130, 10, 0.85);
  background: rgba(200, 120, 0, 0.06);
}
body.theme-light .mockup-container .drag-frame-hover.visible:hover {
  border-color: rgba(212, 130, 10, 1);
  background: rgba(200, 120, 0, 0.12);
}
body.theme-light .mockup-container .drag-frame.visible:hover,
body.theme-light .mockup-container .drag-frame.visible:active {
  border-color: rgba(212, 130, 10, 0.9);
  background: rgba(200, 120, 0, 0.08);
}
body.theme-light .mockup-container .drag-frame .frame-handle {
  border-color: rgba(212, 130, 10, 0.95);
  background: rgba(255, 255, 255, 0.95);
}
body.theme-light .mockup-container .drag-frame .frame-handle-rotate::before {
  color: rgba(168, 92, 8, 0.95);
}
body.theme-light .mockup-container .drag-frame .frame-rotate-line {
  background: rgba(212, 130, 10, 0.9);
}
body.theme-light .mockup-container .text-drag-handle-png {
  border-color: rgba(40, 120, 170, 0.95);
  background: rgba(210, 235, 250, 0.95);
  color: #0f4f72;
}
body.theme-light .mockup-container .text-drag-preview-frame {
  border-color: rgba(40, 120, 170, 0.95);
  background: rgba(40, 120, 170, 0.08);
}

/* Eigenes Bestaetigungs-Dialogfenster (ersetzt confirm()) */
.app-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 10, 14, 0.62);
}
.app-confirm-dialog {
  width: min(520px, 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(23, 29, 36, 0.98), rgba(17, 21, 27, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  padding: 18px 18px 14px;
}
.app-confirm-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #f2f5fa;
}
.app-confirm-message {
  margin: 0;
  white-space: pre-line;
  line-height: 1.45;
  color: #c9d3df;
}
.app-confirm-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.design-apply-dialog {
  width: min(560px, 100%);
}
.design-add-dialog {
  width: min(760px, 100%);
}
.design-add-preview {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  min-height: 260px;
  max-height: min(56vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.design-add-preview svg {
  width: 100%;
  max-width: 680px;
  max-height: calc(min(56vh, 520px) - 32px);
  display: block;
}
.design-add-preview-empty {
  font-size: 0.85rem;
  color: #9db0c4;
}
.design-apply-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  max-height: min(42vh, 260px);
  overflow: auto;
}
.design-apply-item {
  display: grid;
  grid-template-columns: 20px 90px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
.design-apply-item input[type="radio"] {
  grid-row: 1 / span 2;
  margin: 0;
}
.design-apply-item-thumb-wrap {
  grid-row: 1 / span 2;
  width: 84px;
  height: 63px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.design-apply-item-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.design-apply-item-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e6eef8;
}
.design-apply-item-sub {
  font-size: 0.73rem;
  color: #9db0c4;
}
.design-apply-item:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
}
.design-apply-btn-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.design-apply-btn-icon {
  display: inline-block;
  width: 1.1em;
  text-align: center;
  opacity: 0.9;
}

body.theme-light .app-confirm-overlay {
  background: rgba(8, 18, 30, 0.28);
}
body.theme-light .app-confirm-dialog {
  border: 1px solid rgba(25, 50, 80, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 252, 0.98));
  box-shadow: 0 14px 36px rgba(18, 42, 74, 0.22);
}
body.theme-light .app-confirm-title {
  color: #1f2d3a;
}
body.theme-light .app-confirm-message {
  color: #334a60;
}
body.theme-light .design-apply-item {
  border-color: rgba(25, 50, 80, 0.2);
  background: rgba(20, 40, 70, 0.03);
}
body.theme-light .design-apply-item-thumb-wrap {
  border-color: rgba(25, 50, 80, 0.2);
  background: rgba(20, 40, 70, 0.04);
}
body.theme-light .design-apply-item-title {
  color: #24384d;
}
body.theme-light .design-apply-item-sub {
  color: #4b6580;
}
body.theme-light .design-apply-item:hover {
  border-color: rgba(25, 50, 80, 0.35);
  background: rgba(20, 40, 70, 0.07);
}
body.theme-light .design-add-preview {
  border-color: rgba(25, 50, 80, 0.2);
  background: rgba(20, 40, 70, 0.03);
}
body.theme-light .design-add-preview-empty {
  color: #4b6580;
}

.mockup-container .vehicle-svg-container svg {
  width: 100%;
  height: 100%;
  display: block;
}
/* Unified SVG füllt den ganzen Container */
.mockup-container svg.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: grab;
  display: block;
}
.mockup-container svg.overlay:active { cursor: grabbing; }

/* Drag-Preview-Rahmen (während Ziehens sichtbar) */
.drag-preview-rect {
  stroke: #ffe040;
  fill: rgba(255, 210, 60, 0.07);
}
body.theme-light .drag-preview-rect {
  stroke: #d4820a;
  fill: rgba(200, 120, 0, 0.07);
}
#dragPreviewShadow {
  stroke: rgba(0, 0, 0, 0.5);
  fill: none;
}

/* ── Objektliste (nur Design-Vorschau, ohne Fahrzeug) ── */
.objects-section .object-list {
  list-style: none;
  margin: 8px 0 10px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.object-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.object-list-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #3a3a3a;
}
.object-list-item.selected {
  border-color: #d4820a;
  background: rgba(212, 130, 10, 0.12);
}
.object-list-thumb {
  width: 48px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
  background: #1a1a1a;
}
.object-list-label {
  flex: 1;
  font-size: 0.8rem;
  color: #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.object-list-item.selected .object-list-label { color: #f0f0f0; }
.object-list-remove {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(255, 80, 80, 0.2);
  color: #e66;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.object-list-remove:hover {
  background: rgba(255, 80, 80, 0.4);
  color: #fff;
}
body.theme-light .object-list-remove {
  background: rgba(200, 60, 60, 0.15);
  color: #c44;
}
body.theme-light .object-list-remove:hover {
  background: rgba(200, 60, 60, 0.3);
  color: #a00;
}
body.theme-light .object-list-item {
  background: rgba(0, 0, 0, 0.04);
  border-color: #ddd;
}
body.theme-light .object-list-item:hover { background: rgba(0, 0, 0, 0.06); }
body.theme-light .object-list-item.selected {
  border-color: #c47200;
  background: rgba(196, 114, 0, 0.1);
}
body.theme-light .object-list-label { color: #444; }
body.theme-light .object-list-item.selected .object-list-label { color: #222; }

/* ── Objekt-Inspektor (Sidebar) ── */
.object-inspector {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}
.object-inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.object-inspector-header .section-icon {
  flex-shrink: 0;
}
.object-inspector-header .section-title {
  margin-bottom: 0;
  border: none;
  padding: 0;
  flex: 1;
}
.object-inspector-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #888;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
}
.object-inspector-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.object-inspector-preview {
  width: 100%;
  aspect-ratio: 600/450;
  max-height: 120px;
  background: #1a1a1a;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.object-inspector-preview.preview-bg-dark {
  background: #1a1a1a;
}
.object-inspector-preview.preview-bg-light {
  background: #f2f5fa;
}
.object-inspector-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.object-inspector-design-name {
  font-size: 0.75rem;
  color: #aaa;
  margin-bottom: 10px;
}
.object-inspector-row {
  margin-bottom: 10px;
}
.object-inspector-row .slider-label { font-size: 0.75rem; }
.object-inspector-row input[type="range"] { width: 100%; }
.object-inspector-label {
  display: block;
  font-size: 0.7rem;
  color: #666;
  margin-bottom: 4px;
}
.object-inspector-hint {
  font-size: 0.68rem;
  color: #555;
  line-height: 1.35;
  margin-top: 10px;
}
/* Verschiebbares Dock-Fly-Window fuer Objekt + Wunschtext */
.object-dock-window {
  position: absolute;
  top: 72px;
  right: 12px;
  width: min(340px, calc(100% - 24px));
  max-height: calc(100% - 84px);
  display: flex;
  flex-direction: column;
  z-index: 34;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(20, 24, 30, 0.96);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}
.object-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  cursor: move;
  user-select: none;
}
.object-dock-title {
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #b8c5d4;
  font-weight: 700;
}
.object-dock-close {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd8e6;
  width: 22px;
  height: 22px;
  line-height: 1;
  font-size: 15px;
  cursor: pointer;
}
.object-dock-close:hover {
  background: rgba(255, 255, 255, 0.14);
}
.object-dock-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 10px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.object-dock-body .sidebar-section {
  margin: 0;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.object-dock-body .sidebar-section + .sidebar-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 8px;
  padding-top: 9px;
}
.object-dock-body .section-header { margin-bottom: 6px; }
.object-dock-body .section-title { font-size: 0.73rem; }
.object-dock-body .object-inspector-preview {
  min-height: 48px;
  max-height: 90px;
  padding: 6px;
}
.object-dock-body .object-inspector-design-name {
  margin-bottom: 6px;
  font-size: 0.72rem;
}
.object-dock-body .object-inspector-row { margin-bottom: 6px; }
.object-dock-body .slider-row { margin-bottom: 6px; }

.rotation-knob-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rotation-knob {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.18), rgba(255,255,255,0.04) 45%, rgba(0,0,0,0.2));
  position: relative;
  cursor: grab;
  flex: 0 0 auto;
}
.rotation-knob:active {
  cursor: grabbing;
}
.rotation-knob-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
  transform: translate(-50%, -50%);
  transform-origin: center;
}
body.theme-light .rotation-knob {
  border-color: rgba(30, 50, 74, 0.28);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.9), rgba(226,234,242,0.9) 45%, rgba(180,195,210,0.9));
}
body.theme-light .rotation-knob-dot {
  background: #1f2d3a;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.8);
}

body.theme-light .object-inspector {
  background: rgba(0, 0, 0, 0.04);
  border-color: #ddd;
}
body.theme-light .object-inspector-design-name { color: #555; }
body.theme-light .object-inspector-hint { color: #777; }
body.theme-light .object-dock-window {
  border-color: rgba(30, 50, 74, 0.22);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 30px rgba(25, 50, 80, 0.2);
}
body.theme-light .object-dock-header { border-bottom-color: rgba(30, 50, 74, 0.16); }
body.theme-light .object-dock-title { color: #42596f; }
body.theme-light .object-dock-close {
  border-color: rgba(40, 60, 90, 0.2);
  background: rgba(20, 40, 70, 0.06);
  color: #49627a;
}
body.theme-light .object-dock-body .sidebar-section + .sidebar-section {
  border-top-color: rgba(30, 50, 74, 0.12);
}

/* ── Drag-Hint ── */
.drag-hint {
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: none;
  color: #668;
  text-align: center;
  padding: 6px 8px;
  flex-shrink: 0;
}
body.theme-light .drag-hint { color: #557; }

.position-hint {
  font-size: 0.7rem;
  color: #667;
  margin: 6px 0 0;
  padding: 0;
}
body.theme-light .position-hint { color: #556; }

/* Firmenlogo „design by FOTOFOL“ unten rechts über der Vorschau */
.brand-logo {
  position: absolute;
  right: 12px;
  bottom: 8px;
  z-index: 25;
  pointer-events: none;
}
.brand-logo img {
  height: 28px;
  display: block;
  opacity: 0.9;
}


/* ── Onboarding / geführte Tour ── */
body.onboarding-active .layout *,
body.onboarding-active header * {
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.onb-highlight {
  position: relative;
  z-index: 11000;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.5), 0 0 40px rgba(0,0,0,0.9);
}
.onb-tooltip {
  position: fixed;
  z-index: 12000;
  max-width: 320px;
  background: #101010;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  padding: 14px 16px 12px;
  box-shadow: 0 14px 45px rgba(0,0,0,0.75);
  color: #f0f0f0;
  font-size: 0.8rem;
}
.onb-tooltip-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: #fff;
}
.onb-tooltip-text {
  font-size: 0.78rem;
  line-height: 1.4;
  color: #bbb;
  margin-bottom: 10px;
}
.onb-tooltip-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.onb-step-indicator {
  font-size: 0.7rem;
  color: #777;
  margin-right: auto;
}

/* ── Theme: Hell ── */
body.theme-light {
  background: #e8e8e8;
  color: #1a1a1a;
}
body.theme-light header {
  border-bottom-color: #ccc;
}
body.theme-light header h1 {
  color: #1a1a1a;
}
body.theme-light header .admin-link {
  color: #666;
}
body.theme-light header .admin-link:hover {
  color: #333;
}
body.theme-light .theme-switcher {
  border-color: #bbb;
}
body.theme-light .theme-btn {
  background: #f0f0f0;
  color: #555;
}
body.theme-light .theme-btn + .theme-btn {
  border-left-color: #bbb;
}
body.theme-light .theme-btn:hover {
  background: #e0e0e0;
  color: #333;
}
body.theme-light .theme-btn.active {
  background: #1a1a1a;
  color: #fff;
}
body.theme-light .sidebar {
  background: #f0f0f0;
  border-right-color: #ddd;
}
body.theme-light .sidebar-section {
  background: #fff;
  border-color: #e0e0e0;
}
body.theme-light .sidebar-section:hover {
  border-color: #ccc;
  background: #fafafa;
}
body.theme-light .section-icon {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.1);
}
body.theme-light .section-header .section-title {
  color: #555;
}
body.theme-light .sidebar-section:hover .section-header .section-title {
  color: #333;
}
body.theme-light .section-title {
  color: #555;
  border-bottom-color: #ddd;
}
body.theme-light .vc-btn {
  background: #fff;
  border-color: #ccc;
  color: #444;
}
body.theme-light .vc-btn:hover {
  border-color: #999;
  color: #222;
}
body.theme-light .vc-item.active > .vc-btn {
  border-color: #333;
  color: #111;
  background: #e8e8e8;
}
body.theme-light .vc-popup {
  background: #fff;
  border-color: #ccc;
}
body.theme-light .vc-dot[data-light="1"] {
  border-color: rgba(0,0,0,0.2);
}
body.theme-light .vc-dot[data-light="1"].active {
  border-color: #333;
}
body.theme-light .design-btn {
  background: #fff;
  border-color: #ccc;
  color: #444;
}
body.theme-light .design-btn:hover {
  border-color: #999;
  color: #222;
}
body.theme-light .design-btn.active {
  border-color: #333;
  color: #111;
  background: #e8e8e8;
}
body.theme-light .color-dot.active {
  border-color: #333;
}
body.theme-light .color-dot[data-light="1"].active {
  border-color: #555;
}
body.theme-light #inputCustomText {
  background: #fff !important;
  color: #111 !important;
  border-color: #ccc !important;
}
body.theme-light .slider-label {
  color: #555;
}
body.theme-light .slider-label span {
  color: #444;
}
body.theme-light input[type="range"] {
  accent-color: #333;
}
body.theme-light .slider-with-input input[type="number"] {
  background: #fff;
  color: #111;
  border-color: #ccc;
}
body.theme-light .price-display strong {
  color: #111;
}
body.theme-light .btn {
  border-color: #bbb;
  background: #fff;
  color: #555;
}
body.theme-light .btn:hover {
  background: #e8e8e8;
  color: #111;
  border-color: #999;
}
body.theme-light .btn.primary {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}
body.theme-light .btn.primary:hover {
  background: #333;
  border-color: #333;
}
body.theme-light .btn.ghost {
  border-color: #bbb;
  color: #666;
}
body.theme-light .btn.ghost:hover {
  background: #e8e8e8;
  border-color: #999;
  color: #111;
}
body.theme-light .saved-configs-hint,
body.theme-light .saved-configs-empty {
  color: #555;
}
body.theme-light .saved-config-item {
  background: #fff;
  border-color: #ddd;
}
body.theme-light .saved-config-name {
  color: #222;
}
body.theme-light .saved-config-date {
  color: #666;
}
body.theme-light .name-input-overlay {
  background: rgba(0,0,0,0.4);
}
body.theme-light .name-input-modal {
  background: #f5f5f5;
  border-color: #ccc;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
body.theme-light .name-input-title {
  color: #333;
  border-bottom-color: #ddd;
}
body.theme-light .name-input-field {
  color: #111;
  background: #fff;
  border-color: #ccc;
}
body.theme-light .name-input-field:focus {
  border-color: #666;
}
body.theme-light .name-input-field::placeholder {
  color: #888;
}
body.theme-light .first-time-guide-hint {
  background: rgba(248,248,248,0.98);
  border-color: #bbb;
  color: #333;
}
body.theme-light .first-time-guide-backdrop {
  background: rgba(18, 22, 26, 0.26);
}
body.theme-light .first-time-guide-title {
  color: #2a6a8a;
}
body.theme-light .first-time-guide-dismiss {
  border-color: #bbb;
  background: #e8e8e8;
  color: #444;
}
body.theme-light .first-time-guide-dismiss:hover {
  background: #ddd;
  color: #111;
}
body.theme-light .view-settings-box {
  background: rgba(248,248,248,0.95);
  border-color: #bbb;
  color: #333;
}
body.theme-light .view-settings-title { color: #666; }

body.theme-light .config-info-box {
  background: rgba(248,248,248,0.95);
  border-color: #bbb;
  color: #333;
}
body.theme-light .config-info-row + .config-info-row {
  border-top-color: transparent;
}
body.theme-light .config-info-price {
  border-top-color: #ccc;
}
body.theme-light .config-info-label {
  color: #666;
}
body.theme-light .config-info-price .config-info-label {
  color: #444;
}
body.theme-light .config-info-price strong {
  color: #111;
}
body.theme-light .config-info-checkout-btn {
  border-color: rgba(25, 50, 80, 0.25);
}
body.theme-light .mockup-container {
  background: transparent;
}
body.theme-light .drag-hint {
  color: #555;
}
body.theme-light .thumb-label {
  background: rgba(0,0,0,0.6);
  color: #ddd;
}
body.theme-light .onb-tooltip {
  background: #f5f5f5;
  border-color: #bbb;
  box-shadow: 0 14px 45px rgba(0,0,0,0.2);
  color: #222;
}
body.theme-light .onb-tooltip-title {
  color: #111;
}
body.theme-light .onb-tooltip-text {
  color: #444;
}
body.theme-light .onb-step-indicator {
  color: #666;
}
body.theme-light .onb-highlight {
  box-shadow: 0 0 0 2px rgba(0,0,0,0.4), 0 0 40px rgba(0,0,0,0.25);
}
/* Galerie/Modals im hellen Theme */
body.theme-light .gallery-overlay {
  background: rgba(0,0,0,0.45);
}
body.theme-light .gallery-modal {
  background: #f5f5f5;
  border-color: #ccc;
}
body.theme-light .gallery-header {
  border-bottom-color: #ddd;
}
body.theme-light .gallery-title {
  color: #333;
}
body.theme-light .gallery-close {
  color: #555;
}
body.theme-light .gallery-close:hover {
  color: #111;
  background: #e0e0e0;
}
body.theme-light .gallery-search {
  background: #fff;
  border-color: #ccc;
  color: #222;
}
body.theme-light .gallery-search::placeholder {
  color: #888;
}
body.theme-light .gallery-item {
  background: #fff;
  border-color: #ccc;
}
body.theme-light .gallery-item:hover {
  background: #f0f0f0;
  border-color: #999;
}
body.theme-light .gallery-item.active {
  border-color: #333;
  background: #e8e8e8;
}
body.theme-light .gallery-item-label {
  color: #555;
}
body.theme-light .gallery-item-design .gallery-item-set-label {
  background: #e8e8e8;
  border-top-color: #ccc;
  color: #333;
}

/* Text-Darstellung (Wunschtext) */
.text-render-mode-radios {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  line-height: 1.35;
}
.text-render-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #ddd;
}
.text-render-label input {
  flex-shrink: 0;
}
body.theme-light .text-render-label {
  color: #333;
}

/* Schriftarten-Liste (Wunschtext) */
.font-gallery {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 3px;
}
.font-select-hidden {
  display: none !important;
}
.font-gallery-item {
  appearance: none;
  width: 100%;
  border: 1px solid #303843;
  border-radius: 6px;
  background: #12171c;
  color: #d7dee6;
  text-align: left;
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.font-gallery-item:hover {
  border-color: #5a6776;
  background: #192029;
}
.font-gallery-item.active {
  border-color: #89a8c0;
  background: #202a35;
}
.font-gallery-item:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.font-listbox-item {
  display: grid;
  grid-template-columns: minmax(96px, 128px) 1fr;
  align-items: center;
  gap: 10px;
}
.font-listbox-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #9aa7b5;
}
.font-listbox-preview {
  display: block;
  font-size: 1rem;
  line-height: 1.25;
  color: #f2f6fb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.font-gallery-empty {
  font-size: 0.75rem;
  color: #888;
}
.font-gallery-open-btn {
  width: 100%;
  margin-top: 6px;
}
.text-input-inline-row {
  display: block;
  width: 100%;
}
.text-input-inline-row #inputCustomText {
  width: 100%;
  min-width: 0;
}
#customTextSection.no-text-mode #inputCustomText {
  color: #7f8a96 !important;
  background: #0f1318 !important;
  border-color: #3a434f !important;
}
#customTextSection.no-text-mode #inputCustomText::placeholder {
  color: #6f7783 !important;
}
.text-enabled-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #c4cfdb;
  user-select: none;
}
.text-enabled-toggle.is-disabled span {
  color: #8492a0;
}
.text-enabled-toggle #toggleTextEnabled {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.font-gallery-more {
  margin-top: 6px;
  max-height: 180px;
  border-top: 1px dashed rgba(140, 156, 174, 0.35);
  padding-top: 6px;
}
body.theme-light .font-gallery-item {
  background: #fff;
  border-color: #c9d3dd;
  color: #333;
}
body.theme-light .font-gallery-item:hover {
  background: #f4f8fb;
  border-color: #9eb0c3;
}
body.theme-light .font-gallery-item.active {
  background: #e8f1f8;
  border-color: #5f7f9b;
}
body.theme-light .font-listbox-label {
  color: #607184;
}
body.theme-light .font-listbox-preview {
  color: #111;
}
body.theme-light .font-gallery-empty {
  color: #666;
}
body.theme-light .font-gallery-open-btn {
  border-color: #b7c5d3;
}
body.theme-light .text-enabled-toggle {
  color: #405569;
}
body.theme-light .text-enabled-toggle.is-disabled span {
  color: #94a2b0;
}
body.theme-light #customTextSection.no-text-mode #inputCustomText {
  color: #7b8896 !important;
  background: #eef2f6 !important;
  border-color: #c7d2dd !important;
}
body.theme-light #customTextSection.no-text-mode #inputCustomText::placeholder {
  color: #93a0ad !important;
}
body.theme-light .font-gallery-more {
  border-top-color: rgba(97, 127, 155, 0.35);
}

.gallery-grid-fonts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 2px;
}

/* ── Responsive: unter 700px → Sidebar oben ── */
@media (max-width: 700px) {
  body { overflow: auto; }
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow: visible;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid #1a1a1a;
    overflow-y: visible;
    max-height: none;
  }
  body.theme-light .sidebar {
    border-bottom-color: #ddd;
  }
  .canvas-area { min-height: 55vw; }
  .mockup-container {
    flex: none;
    aspect-ratio: 16/9;
  }
  .object-dock-window {
    top: 8px;
    right: 8px;
    width: min(320px, calc(100% - 16px));
    max-height: calc(100% - 16px);
  }
}
