/* ==========================================================================
   bilstein group partsfinder - Official Corporate Design System
   for 360° Mockup Studio & Creator
   ========================================================================== */

:root {
  /* Official bilstein group & febi Brand Colors */
  --pf-burgundy: #730842;          /* Signature bilstein group Burgundy Header */
  --pf-burgundy-dark: #540630;     /* Active / Darker Burgundy (Menu button) */
  --pf-burgundy-hover: #5d0735;
  --pf-burgundy-light: #8e1455;
  --pf-burgundy-subtle: rgba(115, 8, 66, 0.08);

  --pf-febi-red: #e20613;          /* febi Brand Red (CTA, highlights, badges) */
  --pf-febi-red-hover: linear-gradient(83deg, #95040c 0.41%, #e20613 62.78%);
  --pf-febi-red-active: #7c030a;

  /* Neutral & Slate Palette */
  --pf-slate-dark: #2c3539;        /* Text Primary / Dark Footer */
  --pf-slate-medium: #5e6a70;      /* Text Secondary / Icons / Inactive pills */
  --pf-slate-light: #777e82;       /* Subtle text / disabled */
  --pf-slate-subtle: #b6bbbd;

  /* Surfaces & Backgrounds */
  --pf-bg-body: #f4f5f6;           /* Main background */
  --pf-bg-sidebar: #eff0f1;        /* Iconic partsfinder Sidebar */
  --pf-bg-subbar: #e0e7eb;         /* Sub-navigation / Breadcrumb bar */
  --pf-surface: #ffffff;           /* Cards & Panels */
  --pf-surface-zebra: #f7f7f8;     /* Table zebra stripes */
  --pf-surface-hover: #f0f4f7;

  /* Borders */
  --pf-border-light: #dfe1e2;      /* Default divider / border */
  --pf-border-medium: #aeb4b7;     /* Input / pill borders */
  --pf-border-dark: #5e6a70;

  /* Functional Status */
  --pf-status-success: #35a833;    /* Freigabe grün */
  --pf-status-warning: #f29000;    /* Nacharbeit orange */
  --pf-status-danger: #e20613;     /* Ablehnen rot */
  --pf-status-info: #00a0e3;       /* Blue Print blue */

  /* Typography */
  --pf-font-main: "Neo Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pf-font-headings: "Neo Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --pf-font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Radii & Shadows */
  --pf-radius-xs: 2px;
  --pf-radius-sm: 4px;
  --pf-radius-md: 6px;
  --pf-radius-lg: 8px;
  --pf-radius-pill: 24px;          /* Signature partsfinder Pills */
  --pf-radius-full: 9999px;

  --pf-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);
  --pf-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
  --pf-shadow-febi: 0 4px 14px rgba(226, 6, 19, 0.28);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.pf-app-body {
  font-family: var(--pf-font-main);
  background-color: var(--pf-bg-body);
  color: var(--pf-slate-dark);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. The 360° Mockup Studio Top Header Bar (#730842)
   ========================================================================== */
.pf-header {
  background-color: var(--pf-burgundy);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 0;
  position: sticky;
  top: 0;
  z-index: 3000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.pf-header-left {
  display: flex;
  align-items: center;
  position: relative;
  height: 100%;
}

/* Hamburger Menu Button */
.pf-header-hamburger, .pf-burger-btn {
  background-color: var(--pf-burgundy-dark);
  color: #ffffff;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}
.pf-header-hamburger:hover, .pf-header-hamburger.active,
.pf-burger-btn:hover, .pf-burger-btn.active {
  background-color: #430426;
}

/* Brand & Title Area (360° Mockup Studio) */
.pf-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  text-decoration: none;
  flex-shrink: 0;
}

.pf-header-logo-text {
  font-size: 21px;
  font-weight: 300;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1;
}
.pf-header-logo-text strong {
  font-weight: 700;
}

/* Subline in Header */
.pf-header-app-tag {
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  padding-left: 12px;
  margin-left: 4px;
}

/* --------------------------------------------------------------------------
   Burger Navigation Dropdown (klappt oben links nach unten aus)
   -------------------------------------------------------------------------- */
.pf-burger-dropdown {
  position: absolute;
  top: 56px;
  left: 0;
  width: 310px;
  background: #ffffff;
  border: 1px solid var(--pf-border-light);
  border-top: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  border-radius: 0 0 var(--pf-radius-md) var(--pf-radius-md);
  z-index: 3100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  opacity: 1;
}

.pf-burger-dropdown.open {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  animation: pfDropdownSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pfDropdownSlide {
  from {
    transform: translateY(-8px);
    opacity: 0.9;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pf-dropdown-header {
  padding: 12px 18px;
  background: var(--pf-surface-zebra);
  border-bottom: 1px solid var(--pf-border-light);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--pf-slate-medium);
  letter-spacing: 0.8px;
}

.pf-dropdown-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: var(--pf-slate-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--pf-surface-zebra);
  transition: all 0.15s ease;
  cursor: pointer !important;
  user-select: none;
}

.pf-dropdown-link * {
  pointer-events: none;
}

.pf-dropdown-link:hover {
  background: var(--pf-surface-hover);
  color: var(--pf-burgundy);
  padding-left: 22px;
}

.pf-dropdown-link.active {
  background: rgba(115, 8, 66, 0.08);
  color: var(--pf-burgundy);
  border-left: 4px solid var(--pf-febi-red);
  font-weight: 700;
}

.pf-dropdown-link svg {
  color: var(--pf-slate-medium);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.pf-dropdown-link:hover svg, .pf-dropdown-link.active svg {
  color: var(--pf-febi-red);
}

.pf-dropdown-link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-dropdown-link-text strong {
  font-size: 14px;
  color: var(--pf-slate-dark);
}

.pf-dropdown-link-text small {
  font-size: 11.5px;
  color: var(--pf-slate-medium);
  font-weight: normal;
}

/* Lock / Unlock Koordinaten Schutz & Speichern Button */
.btn-save-burgundy, .btn-save-coord, .btn-lock-coord {
  padding: 6px 16px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  user-select: none !important;
}

/* Icons Sichtbarkeit über CSS */
.is-locked .lock-icon-closed {
  display: inline-block !important;
}
.is-locked .lock-icon-open {
  display: none !important;
}
.is-unlocked .lock-icon-closed {
  display: none !important;
}
.is-unlocked .lock-icon-open {
  display: inline-block !important;
}

/* Gesperrt (Sicherer Zustand, Koordinaten geschützt): Unaufdringlich & sauber */
.btn-lock-coord.is-locked, .btn-save-burgundy.is-clean, .btn-save-coord.is-clean {
  background-color: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15) !important;
}
.btn-lock-coord.is-locked:hover, .btn-save-burgundy.is-clean:hover, .btn-save-coord.is-clean:hover {
  background-color: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-1px) !important;
}

/* Entsperrt (Bearbeitungsmodus aktiv): Auffällig in febi Burgundy mit dezentem Glow */
.btn-lock-coord.is-unlocked, .btn-save-burgundy.is-dirty, .btn-save-coord.is-dirty {
  background-color: var(--pf-burgundy, #730842) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 0 14px rgba(115, 8, 66, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}
.btn-lock-coord.is-unlocked:hover, .btn-save-burgundy.is-dirty:hover, .btn-save-coord.is-dirty:hover {
  background-color: #8e1455 !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
  transform: translateY(-1px) !important;
}

.btn-lock-coord:active, .btn-save-burgundy:active {
  background-color: #540630 !important;
  transform: translateY(0) !important;
}


.pf-dropdown-divider {
  height: 1px;
  background: var(--pf-border-light);
  margin: 4px 0;
}

.pf-dropdown-footer {
  padding: 12px 18px;
  background: var(--pf-surface-zebra);
  border-top: 1px solid var(--pf-border-light);
  font-size: 11.5px;
  color: var(--pf-slate-medium);
  line-height: 1.4;
}
.pf-dropdown-footer strong {
  color: var(--pf-slate-dark);
  display: block;
}

.pf-dropdown-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 2500;
  display: none;
}
.pf-dropdown-backdrop.open {
  display: block;
}

/* Header Right Area */
.pf-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pf-header-icon-link {
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--pf-radius-full);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.pf-header-icon-link:hover {
  background: rgba(255, 255, 255, 0.15);
}

.pf-header-login-btn {
  background: #ffffff;
  color: var(--pf-burgundy);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 18px;
  border-radius: var(--pf-radius-pill);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: background-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.pf-header-login-btn:hover {
  background: #f4f5f6;
  transform: translateY(-1px);
}

/* ==========================================================================
   2. Sub-Header / Breadcrumbs Toolbar (#e0e7eb)
   ========================================================================== */
.pf-sub-bar {
  background-color: var(--pf-bg-subbar);
  border-bottom: 1px solid var(--pf-border-light);
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 250px; /* leaves room for sidebar */
  font-size: 12px;
  color: var(--pf-slate-medium);
  transition: padding-left 0.2s ease;
}

.pf-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pf-breadcrumbs a {
  color: var(--pf-slate-medium);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pf-breadcrumbs a:hover {
  color: var(--pf-burgundy);
  text-decoration: underline;
}
.pf-breadcrumbs .separator {
  color: var(--pf-border-medium);
}
.pf-breadcrumbs .current {
  color: var(--pf-slate-dark);
  font-weight: 700;
}

.pf-sub-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pf-sub-action-btn {
  background: none;
  border: none;
  color: var(--pf-slate-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: var(--pf-radius-xs);
  transition: all 0.15s ease;
}
.pf-sub-action-btn:hover {
  color: var(--pf-burgundy);
  background: rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   3. Main Page Layout (Sidebar + Content Area)
   ========================================================================== */
.pf-main-layout {
  display: flex;
  flex: 1;
  position: relative;
  min-height: calc(100vh - 96px);
}

/* Left Sidebar (#eff0f1) */
.pf-sidebar {
  width: 240px;
  background-color: var(--pf-bg-sidebar);
  border-right: 1px solid var(--pf-border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 12px 10px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  z-index: 90;
}

/* KBA Lookup Section at top of sidebar */
.pf-sidebar-kba {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid var(--pf-border-medium);
  border-radius: var(--pf-radius-xs);
  padding: 3px 4px;
}
.pf-kba-badge {
  background: var(--pf-slate-dark);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: var(--pf-radius-xs);
  text-transform: uppercase;
  flex-shrink: 0;
}
.pf-kba-input {
  width: 48px;
  border: 1px solid var(--pf-border-light);
  border-radius: var(--pf-radius-xs);
  padding: 3px 4px;
  font-size: 11px;
  text-align: center;
  font-family: var(--pf-font-mono);
  outline: none;
}
.pf-kba-input:focus {
  border-color: var(--pf-burgundy);
}
.pf-kba-submit {
  background: none;
  border: none;
  color: var(--pf-slate-medium);
  cursor: pointer;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-kba-submit:hover {
  color: var(--pf-burgundy);
}

/* Sidebar Nav Tree (Fahrzeug / Artikelgruppe) */
.pf-sidebar-tree {
  margin-bottom: 14px;
}
.pf-tree-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  color: var(--pf-slate-dark);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--pf-border-light);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.pf-tree-item:hover, .pf-tree-item.active {
  color: var(--pf-burgundy);
  background: rgba(115, 8, 66, 0.04);
}
.pf-tree-item svg {
  color: var(--pf-slate-medium);
}

/* Feature Navigation Pills (ALL AROUND THE WHEEL, FLUIDFINDER, etc.) */
.pf-sidebar-pills {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pf-sidebar-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--pf-border-medium);
  border-radius: var(--pf-radius-pill);
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pf-slate-medium);
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.15s ease;
  letter-spacing: 0.3px;
}
.pf-sidebar-pill svg {
  flex-shrink: 0;
  color: var(--pf-slate-medium);
  transition: color 0.15s ease;
}
.pf-sidebar-pill:hover {
  border-color: var(--pf-burgundy);
  color: var(--pf-burgundy);
}
.pf-sidebar-pill:hover svg {
  color: var(--pf-burgundy);
}
.pf-sidebar-pill.active {
  background: var(--pf-burgundy);
  border-color: var(--pf-burgundy);
  color: #ffffff;
}
.pf-sidebar-pill.active svg {
  color: #ffffff;
}
.pf-sidebar-pill.febi-highlight {
  border-color: var(--pf-febi-red);
  color: var(--pf-febi-red);
}
.pf-sidebar-pill.febi-highlight.active {
  background: var(--pf-febi-red);
  color: #ffffff;
}

/* Main Content Area */
.pf-content-area {
  flex: 1;
  padding: 24px;
  overflow-x: hidden;
  max-width: 1360px;
}

/* ==========================================================================
   4. partsfinder Hero Banner & Section Headers
   ========================================================================== */
.pf-hero-banner {
  background: #ffffff;
  border: 1px solid var(--pf-border-light);
  border-radius: var(--pf-radius-xs);
  padding: 22px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  box-shadow: var(--pf-shadow-card);
}

.pf-hero-text h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--pf-slate-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.pf-hero-triangle {
  color: var(--pf-febi-red);
  font-size: 20px;
  line-height: 1;
}

.pf-hero-text p {
  color: var(--pf-slate-medium);
  font-size: 13.5px;
  max-width: 780px;
}

.pf-hero-logos {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.pf-hero-febi-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

/* Section Header (Partsfinder Style) */
.pf-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--pf-border-light);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.pf-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--pf-slate-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pf-section-step-num {
  background: var(--pf-burgundy);
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: var(--pf-radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

/* ==========================================================================
   5. Article Catalog Cards (.gebinde-card)
   Partsfinder result-item 1:1 structure
   ========================================================================== */
.gebinde-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.gebinde-card {
  background: #ffffff;
  border: 1px solid var(--pf-border-light);
  border-radius: var(--pf-radius-xs);
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: var(--pf-shadow-card);
}

.gebinde-card:hover {
  border-color: var(--pf-burgundy);
  box-shadow: var(--pf-shadow-hover);
  transform: translateY(-2px);
}

.gebinde-card.selected {
  border: 2px solid var(--pf-febi-red);
  box-shadow: 0 4px 14px rgba(226, 6, 19, 0.2);
}

.gebinde-card .card-selected-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: var(--pf-radius-full);
  background: var(--pf-border-light);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.gebinde-card.selected .card-selected-icon {
  background: var(--pf-febi-red);
}

.gebinde-card-img-wrap {
  height: 180px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  padding: 8px;
}
.gebinde-card-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.gebinde-card:hover .gebinde-card-img {
  transform: scale(1.03);
}

.gebinde-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--pf-surface-zebra);
  padding-top: 10px;
}

.gebinde-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--pf-slate-dark);
}

.gebinde-card-subinfo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--pf-slate-medium);
}
.gebinde-card-artno {
  font-weight: 700;
  color: var(--pf-burgundy);
}

.gebinde-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.tag-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--pf-radius-pill);
}
.tag-badge.planar {
  background: rgba(115, 8, 66, 0.08);
  color: var(--pf-burgundy);
  border: 1px solid rgba(115, 8, 66, 0.2);
}
.tag-badge.cylinder {
  background: rgba(226, 6, 19, 0.08);
  color: var(--pf-febi-red);
  border: 1px solid rgba(226, 6, 19, 0.2);
}
.tag-badge.views {
  background: var(--pf-surface-zebra);
  color: var(--pf-slate-medium);
  border: 1px solid var(--pf-border-light);
}

/* ==========================================================================
   6. Upload Area & Criteria Controls (Step 2)
   ========================================================================== */
.step-card {
  background: #ffffff;
  border: 1px solid var(--pf-border-light);
  border-radius: var(--pf-radius-xs);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--pf-shadow-card);
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.step-badge {
  background: var(--pf-burgundy);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: var(--pf-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
.step-title-wrap h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--pf-slate-dark);
  margin-bottom: 4px;
}
.step-title-wrap p {
  color: var(--pf-slate-medium);
  font-size: 13px;
}

.upload-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.upload-card {
  background: var(--pf-surface-zebra);
  border: 1px solid var(--pf-border-light);
  border-radius: var(--pf-radius-xs);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.upload-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.upload-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--pf-slate-dark);
}
.upload-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--pf-radius-pill);
}
.upload-pill.vs {
  background: var(--pf-febi-red);
  color: #ffffff;
}
.upload-pill.rs {
  background: var(--pf-burgundy);
  color: #ffffff;
}

.drop-zone {
  background: #ffffff;
  border: 2px dashed var(--pf-border-medium);
  border-radius: var(--pf-radius-xs);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--pf-slate-medium);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--pf-febi-red);
  background: rgba(226, 6, 19, 0.02);
  color: var(--pf-febi-red);
}
.drop-zone-text strong {
  color: var(--pf-slate-dark);
}
.drop-zone-hint {
  font-size: 11.5px;
  color: var(--pf-slate-light);
}

.selected-file-badge {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--pf-border-light);
  border-radius: var(--pf-radius-xs);
  padding: 8px 12px;
  color: var(--pf-status-success);
}
.selected-file-badge.active {
  display: flex;
}
.selected-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--pf-slate-dark);
}
.btn-remove-file {
  background: none;
  border: none;
  color: var(--pf-slate-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}
.btn-remove-file:hover {
  color: var(--pf-febi-red);
}

.select-existing-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.select-existing-wrap label {
  font-size: 12px;
  color: var(--pf-slate-medium);
  font-weight: 600;
}
.m3-select, select.pf-select {
  width: 100%;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--pf-border-medium);
  border-radius: var(--pf-radius-xs);
  font-size: 13px;
  color: var(--pf-slate-dark);
  outline: none;
  cursor: pointer;
}
.m3-select:focus, select.pf-select:focus {
  border-color: var(--pf-burgundy);
}

.cylinder-disabled-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(239, 240, 241, 0.95);
  border-radius: var(--pf-radius-xs);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  gap: 8px;
  z-index: 10;
}
.disabled-for-cylinder .cylinder-disabled-overlay {
  display: flex;
}

.extra-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--pf-border-light);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--pf-slate-dark);
  font-weight: 500;
}
.checkbox-label input[type="checkbox"] {
  accent-color: var(--pf-febi-red);
  width: 16px;
  height: 16px;
}

.brightness-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--pf-slate-medium);
}
.brightness-slider-wrap input[type="range"] {
  accent-color: var(--pf-febi-red);
  cursor: pointer;
}

/* ==========================================================================
   7. Generate Action & Progress (Step 3)
   ========================================================================== */
.generate-action-bar {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.btn-generate-main, .btn-febi {
  background: var(--pf-febi-red);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 32px;
  border-radius: var(--pf-radius-pill);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--pf-shadow-febi);
  transition: all 0.18s ease;
  text-decoration: none;
}
.btn-generate-main:hover:not(:disabled), .btn-febi:hover:not(:disabled) {
  background: var(--pf-febi-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(226, 6, 19, 0.4);
}
.btn-generate-main:disabled, .btn-febi:disabled {
  background: var(--pf-border-medium);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.65;
}

.progress-container {
  display: none;
  width: 100%;
  max-width: 600px;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.progress-container.active {
  display: flex;
}
.progress-bar-track {
  width: 100%;
  height: 8px;
  background: var(--pf-border-light);
  border-radius: var(--pf-radius-full);
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: var(--pf-febi-red);
  border-radius: var(--pf-radius-full);
  transition: width 0.3s ease;
}
.progress-bar-fill.indeterminate {
  width: 40%;
  position: absolute;
  animation: indeterminate 1.5s infinite ease-in-out;
}
@keyframes indeterminate {
  0% { left: -40%; }
  100% { left: 100%; }
}
.progress-status-text {
  font-size: 13px;
  color: var(--pf-slate-medium);
  font-weight: 600;
}

/* ==========================================================================
   8. 360° Studio Viewer & Article Detail Stage (Step 4)
   ========================================================================== */
.result-section {
  display: none;
}
.result-section.active {
  display: block;
}

.result-actions-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 2px solid var(--pf-border-light);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.btn-download-zip {
  background: var(--pf-status-success);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: var(--pf-radius-pill);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(53, 168, 51, 0.3);
  transition: all 0.15s ease;
}
.btn-download-zip:hover {
  background: #2d8f2b;
  transform: translateY(-1px);
}

.viewer-card {
  background: #ffffff;
  border: 1px solid var(--pf-border-light);
  border-radius: var(--pf-radius-xs);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.viewer-viewport-wrap {
  width: 100%;
  max-width: 680px;
  height: 480px;
  background: radial-gradient(circle at 50% 55%, #ffffff 0%, #f7f8f9 70%, #eceff1 100%);
  border: 1px solid var(--pf-border-light);
  border-radius: var(--pf-radius-xs);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.04);
}
.viewer-viewport-wrap:active {
  cursor: grabbing;
}

.viewer-image {
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.22));
  transition: transform 0.05s ease-out;
}

.viewer-drag-overlay-hint {
  position: absolute;
  bottom: 14px;
  background: rgba(44, 53, 57, 0.75);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--pf-radius-pill);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.viewer-angle-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--pf-febi-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--pf-radius-pill);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.viewer-controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.viewer-btn {
  background: #ffffff;
  border: 1px solid var(--pf-border-medium);
  border-radius: var(--pf-radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pf-slate-dark);
  cursor: pointer;
  transition: all 0.15s ease;
}
.viewer-btn:hover {
  background: var(--pf-burgundy);
  border-color: var(--pf-burgundy);
  color: #ffffff;
}
.viewer-frame-counter {
  font-size: 13px;
  font-weight: 700;
  color: var(--pf-slate-medium);
  padding: 0 8px;
}

/* Thumbnail Strip (Partsfinder Gallery Style) */
.thumbnail-strip-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 20px;
  padding-bottom: 8px;
}
.thumbnail-strip {
  display: flex;
  gap: 8px;
  align-items: center;
}
.thumb-item {
  width: 64px;
  height: 64px;
  background: #ffffff;
  border: 1px solid var(--pf-border-light);
  border-radius: var(--pf-radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px;
  transition: all 0.15s ease;
}
.thumb-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.thumb-item:hover {
  border-color: var(--pf-burgundy);
}
.thumb-item.active {
  border: 2px solid var(--pf-febi-red);
  box-shadow: 0 2px 8px rgba(226, 6, 19, 0.25);
}

/* ==========================================================================
   9. Impressum & Copyright Footer
   ========================================================================== */
.pf-footer {
  background-color: var(--pf-slate-dark);
  color: #ffffff;
  padding: 24px 20px;
  margin-top: auto;
  border-top: 3px solid var(--pf-burgundy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  font-size: 13px;
}
.pf-footer-copyright {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  margin-bottom: 2px;
}
.pf-footer-author {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}
.pf-footer-role {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .pf-sidebar {
    display: none;
  }
  .pf-sub-bar {
    padding-left: 20px;
  }
  .pf-header-search-wrap {
    display: none;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  .pf-header {
    height: 52px !important;
    padding: 0 8px 0 0 !important;
    overflow: visible !important;
  }
  .pf-header-hamburger, .pf-burger-btn {
    width: 44px !important;
    height: 52px !important;
  }
  .pf-header-brand {
    padding-left: 8px !important;
    gap: 4px !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }
  .pf-header-logo-text {
    font-size: 15px !important;
    white-space: nowrap !important;
  }
  .pf-header-app-tag {
    display: none !important;
  }
  .save-btn-text {
    display: none !important;
  }
  .btn-save-coord, .btn-save-burgundy {
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    justify-content: center !important;
  }
  #btnToggleDrawer, .btn-toggle-drawer {
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    justify-content: center !important;
  }
  #btnToggleDrawer span, .btn-toggle-drawer span {
    display: none !important;
  }
  .m3-app-bar-end {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
}
