/* ============================================================
   ArtDepot — Einheitliches Design-System
   Fondation Beyeler · Lagerverwaltung
   
   Konsolidierte, professionelle Stildatei für Desktop & Mobile.
   Ersetzt: main.css, desktop-new.css, mobile-new.css,
            mobile-perfect.css, breadcrumb-fix.css
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS / CSS VARIABLEN
   ============================================================ */
:root {
  /* ── Primärfarben ── */
  --color-primary:        #3498db;
  --color-primary-hover:  #2980b9;
  --color-primary-light:  rgba(52, 152, 219, 0.12);
  --color-primary-rgb:    52, 152, 219;

  /* ── Statusfarben ── */
  --color-success:        #27ae60;
  --color-success-light:  rgba(39, 174, 96, 0.12);
  --color-danger:         #c0392b;
  --color-danger-light:   rgba(192, 57, 43, 0.12);
  --color-warning:        #f39c12;
  --color-warning-light:  rgba(243, 156, 18, 0.12);
  --color-info:           #6b8299;
  --color-info-light:     rgba(107, 130, 153, 0.12);

  /* ── Dark-Theme Oberflächen ── */
  --bg-body:              #121212;
  --bg-surface:           #1a1a1a;
  --bg-surface-hover:     #222222;
  --bg-elevated:          #1f1f1f;
  --bg-input:             #242424;
  --bg-navbar:            #151515;

  /* ── Texte ── */
  --text-primary:         #f0f0f0;
  --text-secondary:       #a0a0a0;
  --text-muted:           #707070;
  --text-on-primary:      #ffffff;

  /* ── Rahmen ── */
  --border-color:         rgba(255, 255, 255, 0.08);
  --border-color-light:   rgba(255, 255, 255, 0.12);
  --border-color-strong:  rgba(255, 255, 255, 0.18);

  /* ── Abrundungen ── */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-pill: 50px;

  /* ── Abstände ── */
  --space-xs:    4px;
  --space-sm:    8px;
  --space-md:    16px;
  --space-lg:    24px;
  --space-xl:    32px;
  --space-2xl:   48px;

  /* ── Schatten ── */
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg:   0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-xl:   0 16px 48px rgba(0, 0, 0, 0.4);

  /* ── Übergänge ── */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* ── Typografie ── */
  --font-family:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 15px;
  --line-height:    1.6;

  /* ── Kompatibilität mit alten Variablen ── */
  --dark-bg:               var(--bg-body);
  --dark-card-bg:          var(--bg-surface);
  --dark-card-bg-lighter:  var(--bg-surface-hover);
  --dark-card-hover:       var(--bg-surface-hover);
  --dark-card-header:      var(--bg-elevated);
  --dark-card-active:      #333333;
  --dark-border-color:     var(--border-color-strong);
  --dark-text-color:       var(--text-primary);
  --dark-text-muted:       var(--text-secondary);
  --dark-input-bg:         var(--bg-input);
  --primary-color:         var(--color-primary);
  --primary-color-hover:   var(--color-primary-hover);
  --primary-color-light:   var(--color-primary-light);
  --primary-color-lighter: rgba(52, 152, 219, 0.06);
  --accent-color:          var(--color-primary);
  --accent-color-hover:    var(--color-primary-hover);
  --secondary-color:       #444444;
  --secondary-color-hover: #555555;
  --status-active:         var(--color-success);
  --status-inactive:       #9E9E9E;
  --status-warning:        var(--color-warning);
  --status-danger:         var(--color-danger);
  --info-color:            var(--color-info);
  --info-color-light:      var(--color-info-light);
}


/* ============================================================
   2. RESET & GRUNDLAGEN
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-color: var(--bg-body);
  z-index: -1;
}

main {
  flex: 1 0 auto;
}

img, video, iframe, svg {
  max-width: 100%;
  height: auto;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: #4a4a4a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #5a5a5a; }


/* ============================================================
   3. TYPOGRAFIE
   ============================================================ */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

h1, .h1 { font-size: 2.25rem; font-weight: 700; }
h2, .h2 { font-size: 1.75rem; font-weight: 700; }
h3, .h3 { font-size: 1.5rem; }
h4, .h4 { font-size: 1.25rem; }
h5, .h5 { font-size: 1.125rem; }
h6, .h6 { font-size: 1rem; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.text-muted {
  color: var(--text-secondary) !important;
}

.text-dark {
  color: var(--text-primary) !important;
}

p {
  margin-bottom: 0.75rem;
}

small, .small {
  font-size: 0.8125rem;
}


/* ============================================================
   4. NAVIGATION — Header & Navbar
   ============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: var(--bg-navbar);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border-color);
}

.navbar {
  background-color: var(--bg-navbar);
  padding: 0.75rem 0;
  border: none;
}

.navbar-brand {
  color: var(--text-primary);
  font-size: 1.6rem;
}

.brand-text {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav-Links */
.navbar-nav .nav-link {
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
}

.navbar-nav .nav-link:hover {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
}

.navbar-nav .nav-link.active {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
}

.navbar-nav .nav-link i {
  color: inherit;
}

/* Hamburger / Toggler */
.navbar-toggler {
  border: 1px solid var(--border-color-light);
  color: var(--text-primary);
  padding: 0.4rem 0.75rem;
}

.navbar-toggler-icon {
  background-image: none;
  width: 12px;
  height: 12px;
  display: block;
  border-right: 2px solid rgba(255,255,255,0.8);
  border-bottom: 2px solid rgba(255,255,255,0.8);
  transform: rotate(45deg);
  transition: all var(--transition-base);
  margin-top: -3px;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
  transform: rotate(-135deg);
  margin-top: 3px;
}

/* Mobile Menü-Button */
.mobile-menu-button {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-color-light);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  height: 36px;
  transition: var(--transition-base);
}

.mobile-menu-button:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.97);
}

.menu-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
}

/* Navbar Collapse */
.navbar-collapse {
  background-color: var(--bg-surface);
}

/* Dropdown-Menüs */
.dropdown-menu {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: var(--shadow-lg);
}

.dropdown-item {
  color: var(--text-primary);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
}

.dropdown-item i {
  color: var(--text-secondary);
  width: 22px;
  margin-right: 0.65rem;
  text-align: center;
  transition: color var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dropdown-item:hover i,
.dropdown-item:focus i {
  color: #fff;
}

.dropdown-item:active {
  background-color: var(--color-primary-light);
  color: white;
}

.dropdown-item.active {
  background-color: var(--color-primary);
  color: white;
}

.dropdown-divider {
  border-top: 1px solid var(--border-color);
  margin: 0.35rem 0;
}

/* Dropdown-Submenüs */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  display: none;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

/* Aktive Menüpunkte */
.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--color-primary);
}


/* ============================================================
   5. KARTEN (Cards)
   ============================================================ */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
  overflow: hidden;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-header {
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) var(--space-lg);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
  margin-bottom: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  background-color: var(--bg-surface);
  padding: var(--space-lg);
  color: var(--text-primary);
}

.card-body h4 {
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-color);
}

.card-footer {
  background-color: var(--bg-elevated);
  border-top: 1px solid var(--border-color);
  padding: var(--space-md) var(--space-lg);
}

/* Cards mit Inline-Gradients respektieren */
.card[style*="background:"],
.card[style*="background: "],
.feature-card[style*="background"] {
  background-color: transparent;
}

.card[style*="border: none"],
.card[style*="border:none"] {
  border: none;
  box-shadow: var(--shadow-md);
}


/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  min-height: 40px;
}

.btn:active {
  transform: scale(0.97);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn i {
  font-size: 0.9em;
  color: inherit;
}

/* Primary */
.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: 0 2px 6px rgba(var(--color-primary-rgb), 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: white;
  box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), 0.3);
}

.btn-primary:active,
.btn-primary.active {
  background-color: #2471a3;
  border-color: #2471a3;
  color: white;
}

/* Outline Primary */
.btn-outline-primary {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Secondary */
.btn-secondary {
  background-color: #3a3a3a;
  border-color: #3a3a3a;
  color: var(--text-primary);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #4a4a4a;
  border-color: #4a4a4a;
  color: white;
}

/* Outline Secondary */
.btn-outline-secondary {
  background-color: transparent;
  border-color: var(--border-color-strong);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color-light);
  color: white;
}

/* Success */
.btn-success {
  background-color: var(--color-success);
  border-color: var(--color-success);
  color: white;
  box-shadow: 0 2px 6px rgba(39, 174, 96, 0.25);
}

.btn-success:hover,
.btn-success:focus {
  background-color: #219a52;
  border-color: #219a52;
  color: white;
}

/* Danger */
.btn-danger {
  background-color: var(--color-danger);
  border-color: var(--color-danger);
  color: white;
  box-shadow: 0 2px 6px rgba(192, 57, 43, 0.25);
}

.btn-danger:hover,
.btn-danger:focus {
  background-color: #a93226;
  border-color: #a93226;
  color: white;
}

/* Outline Danger */
.btn-outline-danger {
  background-color: transparent;
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background-color: var(--color-danger-light);
  color: var(--color-danger);
}

/* Warning */
.btn-warning {
  background-color: var(--color-warning);
  border-color: var(--color-warning);
  color: white;
}

.btn-warning:hover,
.btn-warning:focus {
  background-color: #e67e22;
  border-color: #e67e22;
  color: white;
}

/* Info */
.btn-info {
  background-color: var(--color-info);
  border-color: var(--color-info);
  color: white;
}

/* Light */
.btn-light {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #333333;
}

.btn-light:hover,
.btn-light:focus {
  background-color: #f0f0f0;
  border-color: #f0f0f0;
  color: #222222;
}

/* Outline Light */
.btn-outline-light {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
}

/* Button Sizes */
.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  min-height: 32px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  min-height: 48px;
  border-radius: var(--radius-lg);
}

/* Close Button */
.btn-close {
  min-height: auto;
  padding: 4px;
  width: auto;
  filter: invert(1);
}


/* ============================================================
   7. FORMULARE
   ============================================================ */
.form-label {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.form-control,
.form-select {
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 16px; /* Verhindert Zoom auf iOS */
  padding: 0.6rem 0.85rem;
  min-height: 42px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}

.form-control:focus,
.form-select:focus {
  background-color: #2a2a2a;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
  color: var(--text-primary);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

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

/* Select */
.form-select,
select.form-control,
select.form-select {
  padding-right: 36px;
}

select option {
  background-color: var(--bg-input);
  color: var(--text-primary);
}

/* Input Groups */
.input-group {
  flex-wrap: nowrap;
}

.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group .btn,
.input-group .input-group-text {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-group-text {
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color-light);
  color: var(--text-secondary);
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
}

/* Checkboxen & Radios */
.form-check {
  padding: 0.5rem 0;
  padding-left: 1.75em;
}

.form-check-input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  margin-left: -1.75em;
  margin-right: 8px;
  border: 2px solid var(--border-color-strong);
  background-color: var(--bg-input);
  border-radius: var(--radius-xs);
  cursor: pointer;
  float: left;
}

.form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.form-check-label {
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* Form Text / Hints */
.form-text,
small.text-muted {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.invalid-feedback {
  font-size: 0.75rem;
  margin-top: 4px;
}


/* ============================================================
   8. TABELLEN
   ============================================================ */
.table {
  color: var(--text-primary);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table th {
  background-color: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  padding: 0.85rem 0.75rem;
  border-bottom: 2px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}

.table th a {
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.table th a:hover {
  color: var(--color-primary);
}

.table th a .sort-icon {
  margin-left: 0.25rem;
  font-size: 0.7rem;
  color: inherit;
}

.table td {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  font-size: 0.875rem;
}

/* Bootstrap table-striped Dark Mode Override */
.table {
  --bs-table-color: var(--text-primary);
  --bs-table-bg: var(--bg-surface);
  --bs-table-striped-color: var(--text-primary);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-hover-color: #ffffff;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-color-type: var(--text-primary);
  --bs-table-bg-type: rgba(255, 255, 255, 0.03);
  color: var(--text-primary) !important;
  box-shadow: none !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
}

.table-striped > tbody > tr:nth-of-type(even) > * {
  color: var(--text-primary) !important;
}

.table-hover tbody tr {
  transition: background-color var(--transition-fast);
}

.table-hover tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Striped-Override: Hover muss auch auf odd-Zeilen die td-Hintergründe überschreiben */
.table-striped.table-hover > tbody > tr:hover > * {
  background-color: rgba(255, 255, 255, 0.08) !important;
  --bs-table-bg-type: rgba(255, 255, 255, 0.08);
  box-shadow: none !important;
}

.table-hover tbody tr:hover td,
.table-hover tbody tr:hover td *,
.table-hover tbody tr:hover td small,
.table-hover tbody tr:hover td .text-muted,
.table-hover tbody tr:hover td em.text-muted,
.table-hover tbody tr:hover td strong,
.table-hover tbody tr:hover td .font-monospace {
  color: #ffffff !important;
}

/* Klickbare Tabellenzeilen */
tr[data-href] {
  cursor: pointer;
}

.table-responsive {
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
}

.table-responsive .table {
  margin-bottom: 0;
}

/* Objekttabelle Spaltenbreiten */
.objects-table th:nth-child(1),
.objects-table td:nth-child(1) { width: 7%; text-align: center; }
.objects-table th:nth-child(2),
.objects-table td:nth-child(2) { width: 20%; font-weight: 600; }
.objects-table th:nth-child(3),
.objects-table td:nth-child(3) { width: 12%; }
.objects-table th:nth-child(4),
.objects-table td:nth-child(4) { width: 12%; }
.objects-table th:nth-child(5),
.objects-table td:nth-child(5) { width: 12%; }
.objects-table th:nth-child(6),
.objects-table td:nth-child(6) { width: 10%; }
.objects-table th:nth-child(7),
.objects-table td:nth-child(7) { width: 12%; }
.objects-table th:nth-child(8),
.objects-table td:nth-child(8) { width: 5%; text-align: center; }
.objects-table th:nth-child(9),
.objects-table td:nth-child(9) { width: 10%; }


/* ============================================================
   9. BADGES
   ============================================================ */
.badge {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.badge.bg-info,
.bg-info {
  background-color: var(--color-info) !important;
  color: white !important;
}

.badge.bg-info.text-dark {
  color: white !important;
}

.badge.bg-success {
  background-color: var(--color-success) !important;
}

.badge.bg-danger {
  background-color: var(--color-danger) !important;
}

.badge.bg-warning {
  background-color: var(--color-warning) !important;
  color: white !important;
}

.badge.bg-primary {
  background-color: var(--color-primary) !important;
}

.badge.bg-secondary {
  background-color: #555 !important;
}

.text-info { color: var(--color-info) !important; }
.border-info { border-color: var(--color-info) !important; }


/* ============================================================
   10. ALERTS
   ============================================================ */
.alert {
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
  border: none;
  border-left: 4px solid;
}

.alert-success {
  background-color: var(--color-success-light);
  color: #5dd39e;
  border-left-color: var(--color-success);
}

.alert-danger {
  background-color: var(--color-danger-light);
  color: #e88c84;
  border-left-color: var(--color-danger);
}

.alert-warning {
  background-color: var(--color-warning-light);
  color: #f5c563;
  border-left-color: var(--color-warning);
}

.alert-info {
  background-color: var(--color-info-light);
  color: #8fb0cc;
  border-left-color: var(--color-info);
}

.alert .btn-close {
  padding: 0.85rem;
  min-height: auto;
}


/* ============================================================
   11. BREADCRUMBS
   ============================================================ */
.breadcrumb {
  background-color: transparent;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  margin-bottom: var(--space-md);
}

.breadcrumb-item {
  color: var(--text-secondary);
  font-weight: 500;
}

.breadcrumb-item a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
}


/* ============================================================
   12. MODALS
   ============================================================ */
.modal-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  color: var(--text-primary);
}

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


/* ============================================================
   13. PAGINATION
   ============================================================ */
.pagination {
  gap: 3px;
}

.page-link {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.page-link:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-color-light);
  color: var(--color-primary);
}

.page-item.active .page-link {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.page-item.disabled .page-link {
  background-color: var(--bg-body);
  color: var(--text-muted);
}


/* ============================================================
   14. FOOTER
   ============================================================ */
footer {
  background-color: var(--bg-navbar);
  border-top: 1px solid var(--border-color);
  padding: var(--space-xl) 0;
  margin-top: auto;
  color: var(--text-secondary);
  position: relative;
  width: 100%;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-primary) 20%, var(--color-primary) 80%, transparent);
  opacity: 0.5;
}

footer .container {
  background-color: transparent;
  position: relative;
  z-index: 1;
}

footer hr {
  display: none;
}

.footer-brand {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.footer-brand h5 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: var(--space-xs);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.footer-brand p {
  text-align: center;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.footer-links {
  margin-bottom: var(--space-md);
  text-align: center;
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
  padding: var(--space-xs);
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-slow);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-copyright,
.copyright-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-md);
  opacity: 0.8;
}

footer .col-md-4,
footer .col-md-8 {
  text-align: center;
  width: 100%;
  flex: 0 0 100%;
  max-width: 100%;
}

footer .text-md-end {
  text-align: center;
}

footer .row {
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* ============================================================
   15. HERO-BEREICH (Startseite)
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('https://images.unsplash.com/photo-1561214115-f2f134cc4912?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80') center/cover;
  border-radius: var(--radius-xl);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
  border-radius: inherit;
}

.hero .container {
  position: relative;
  z-index: 1;
  background: transparent;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.hero-content {
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-text-card {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 2rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: left;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.hero p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
}

.hero .btn {
  background-color: white;
  color: #333;
  border: none;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.hero .btn:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}


/* ============================================================
   16. FEATURE-KARTEN (Startseite)
   ============================================================ */
.feature-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.feature-card:hover {
  transform: translateY(-6px);
}

.feature-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.feature-card .card-text {
  flex-grow: 1;
}

.feature-card .d-grid,
.feature-card .d-flex {
  margin-top: auto;
}

.feature-icon {
  font-size: 2.75rem;
  margin-bottom: 1.25rem;
  color: var(--color-primary);
  transition: transform var(--transition-slow);
}

.feature-card:hover .feature-icon {
  transform: scale(1.15);
}


/* ============================================================
   17. STATISTIK-KARTEN
   ============================================================ */
.stats-section {
  background: linear-gradient(135deg, #1a1a1a, #252525);
  border-radius: var(--radius-lg);
  padding: 2.5rem 0;
  margin: 2.5rem 0;
  border: 1px solid var(--border-color);
}

.stat-item {
  text-align: center;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(40, 40, 40, 0.9));
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid var(--border-color-light);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--color-primary), transparent);
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Dashboard Stat Cards */
.stat-card {
  background-color: var(--bg-surface-hover);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  height: 100%;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--color-primary);
}

.stat-card .stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Stats Cards (kompakte Variante) */
.stats-card {
  background: var(--bg-input);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
  border: 1px solid var(--border-color);
}

.stats-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.stats-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}


/* ============================================================
   18. USAGE TYPES / NUTZUNGSTYPEN
   ============================================================ */
.usage-type-checkbox {
  background-color: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  transition: background-color var(--transition-fast);
  border: 1px solid var(--border-color);
}

.usage-type-checkbox:hover {
  background-color: var(--bg-surface-hover);
}

.usage-type-checkbox .form-check-label {
  color: var(--text-primary);
  font-weight: 500;
}

.border.rounded.p-3 {
  background-color: transparent;
  border-color: var(--border-color) !important;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}


/* ============================================================
   19. QR-CODE SEKTION
   ============================================================ */
.qr-code-section {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: var(--space-lg);
}

.qr-code-section h4 {
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-color);
}


/* ============================================================
   20. BILDERGALERIE
   ============================================================ */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.image-container .card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.image-container .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.image-container img {
  height: 160px;
  object-fit: contain;
  padding: 0.75rem;
  background-color: var(--bg-input);
}

.image-container .card-body {
  padding: 1rem;
}

.image-container .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.image-container .card-text {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.image-thumbnail {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-slow);
}

.image-thumbnail:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.image-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

.image-delete {
  background-color: rgba(192, 57, 43, 0.8);
  color: #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
}


/* ============================================================
   21. ADMIN - Dashboard & Verwaltung
   ============================================================ */
.dashboard-section {
  margin-bottom: 2.5rem;
}

.dashboard-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.65rem;
}


/* ============================================================
   22. BOTTOM NAVIGATION (Mobile)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: var(--bg-navbar);
  border-top: 1px solid var(--border-color);
  display: flex;
  height: 60px;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 6px 4px;
  transition: color var(--transition-fast);
  position: relative;
  gap: 2px;
}

.bottom-nav-item i {
  font-size: 1.15rem;
  color: inherit;
  transition: color var(--transition-fast);
}

.bottom-nav-item span {
  color: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.bottom-nav-item.active {
  color: var(--color-primary);
}

.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 0 0 2px 2px;
}

.bottom-nav-item:active {
  background: rgba(255, 255, 255, 0.05);
}


/* ============================================================
   23. PROFIL-SEITE
   ============================================================ */
.profile-header {
  background: linear-gradient(135deg, #1a1a1a, #252525);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border-color);
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  border: 3px solid var(--color-primary);
}

.profile-avatar i {
  font-size: 2.5rem;
  color: var(--color-primary);
}

.profile-info-item {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}


/* ============================================================
   24. FILTER-BUTTONS
   ============================================================ */
.filter-btn,
[class*="filter-btn-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color-strong);
  background: transparent;
  color: var(--text-secondary);
  margin: 3px;
  transition: all var(--transition-fast);
  min-height: 32px;
  white-space: nowrap;
  line-height: 1.3;
}

.filter-btn:hover,
[class*="filter-btn-"]:hover {
  border-color: var(--border-color-light);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.filter-btn.active,
[class*="filter-btn-"].active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}


/* ============================================================
   25. AUFTRAGS-DETAIL
   ============================================================ */
.item-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: background-color var(--transition-fast);
}

.item-row.picked {
  background: rgba(39, 174, 96, 0.08);
  border-color: rgba(39, 174, 96, 0.2);
}

.pick-checkbox {
  width: 22px;
  height: 22px;
  margin-right: 10px;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.info-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.info-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.quantity-input {
  width: 65px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.8125rem;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color-light);
  border-radius: var(--radius-sm);
  text-align: center;
}

/* Order Info */
.order-info-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}


/* ============================================================
   26. QR-SCANNER
   ============================================================ */
.camera-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

#qrScanner,
#qrScannerMobile {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}


/* ============================================================
   27. ANIMATIONS
   ============================================================ */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

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


/* ============================================================
   28. SONSTIGE DARK-MODE ÜBERSCHREIBUNGEN
   ============================================================ */

/* Helle Elemente -> Dunkle Schrift */
.bg-white, .bg-light,
.btn-light, .btn-light * {
  color: #333333 !important;
}

/* Icons Farbvererbung */
.fas, .far, .fab, i[class*="fa-"] {
  color: inherit;
}

/* Entferne ungewollte blaue Hintergründe */
.main-content, main,
[class*="bg-primary"]:not(.badge):not(.btn):not(.alert):not(.bg-gradient),
[class*="bg-info"]:not(.badge):not(.btn):not(.alert),
[class*="bg-blue"] {
  background-color: var(--bg-body);
  background-image: none;
}


/* ============================================================
   29. DESKTOP-SPEZIFISCHE STILE (≥992px)
   ============================================================ */
@media (min-width: 992px) {
  .container {
    max-width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  /* Startseite schmaler */
  .hero + .container,
  .hero ~ .container,
  .hero .container {
    max-width: 1140px;
    margin: 0 auto;
  }

  .hero {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Navigation – kompakt */
  .navbar { padding: 0.45rem 0; }
  .navbar-brand { font-size: 1.3rem; }
  .navbar-nav { gap: 0.1rem; }

  .navbar-nav .nav-link {
    padding: 0.35rem 0.55rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
  }

  .navbar-nav .nav-link i {
    font-size: 0.8rem;
  }

  .navbar-nav .nav-link:hover {
    transform: translateY(-1px);
  }

  /* Dropdown */
  .dropdown-menu {
    margin-top: 0.5rem;
    min-width: 220px;
  }

  .dropdown-item {
    margin: 2px 0;
  }

  .dropdown-item:hover {
    transform: translateX(2px);
  }

  /* Karten */
  .card { border-radius: var(--radius-xl); }

  /* Buttons */
  .btn {
    padding: 0.65rem 1.35rem;
  }

  /* Tabellen */
  .table td { padding: 0.9rem 0.85rem; }
  .table th { padding: 1rem 0.85rem; font-size: 0.78rem; }

  /* Formulare */
  .form-control, .form-select {
    border-radius: var(--radius-md);
    padding: 0.65rem 0.9rem;
  }

  /* Modals */
  .modal-dialog { max-width: 600px; }

  /* Bildergalerie */
  .image-gallery {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
  }

  .image-container img {
    height: 180px;
    padding: 1rem;
  }

  /* Hero */
  .hero { padding: 0; border-radius: var(--radius-xl); }
  .hero::before { border-radius: var(--radius-xl); }
  .hero h1 { font-size: 3rem; font-weight: 800; }
  .hero p { font-size: 1.2rem; }

  /* Footer */
  footer { padding: 2.5rem 0; }

  footer .row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  footer .col-md-4 {
    text-align: left;
    flex: 0 0 33.333%;
    max-width: 33.333%;
  }

  footer .col-md-8 {
    text-align: right;
    flex: 0 0 66.667%;
    max-width: 66.667%;
  }

  .footer-brand { text-align: left; }
  .footer-brand h5, .footer-brand p { text-align: left; }
  .footer-links { justify-content: flex-end; }
  .footer-copyright, .copyright-text { text-align: right; }

  /* Dashboard */
  .stat-card { padding: 2rem; }
  .stat-card .stat-value { font-size: 2.5rem; }
  .stat-card .stat-icon { font-size: 3rem; }

  /* Nutzungstypen als breites Grid */
  .border.rounded.p-3 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.85rem;
    padding: 1.25rem;
  }

  .usage-type-checkbox:hover {
    transform: translateY(-2px);
  }
}


/* ============================================================
   30. MOBILE-SPEZIFISCHE STILE (≤991px)
   ============================================================ */
@media (max-width: 991px) {
  /* ── Grundlagen ── */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  body {
    font-size: 15px;
    line-height: 1.55;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Scrollbars auf Mobile ausblenden */
  ::-webkit-scrollbar { width: 0; height: 0; display: none; }
  * { scrollbar-width: none; }

  /* Container */
  .container, .container-fluid {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
    max-width: 100%;
    overflow-x: hidden;
  }

  .row {
    margin-left: -8px;
    margin-right: -8px;
  }

  .row > * {
    padding-left: 8px;
    padding-right: 8px;
  }

  /* ── Typografie ── */
  h1, .h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
  h2, .h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
  h3, .h3 { font-size: 1.15rem; }
  h4, .h4 { font-size: 1.05rem; }
  h5, .h5 { font-size: 0.95rem; }
  h6, .h6 { font-size: 0.875rem; }

  /* ── Header & Navigation ── */
  header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
  }

  .navbar {
    padding: 0.5rem 0;
    min-height: 56px;
  }

  .navbar-brand { font-size: 1.3rem; margin-right: auto; }

  .brand-text {
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  /* Fullscreen-Menü */
  .navbar-collapse {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-md);
    overflow-y: auto;
    z-index: 1050;
    margin-top: 0;
    border-radius: 0;
  }

  .navbar-collapse.collapsing {
    height: 100vh;
  }

  .navbar-collapse.show {
    display: block !important;
  }

  /* Nav-Items */
  .navbar-nav { gap: 6px; padding: 0; }
  .nav-item { margin: 0; }

  .nav-link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
    transition: var(--transition-base);
    height: auto;
    min-height: 48px;
  }

  .nav-link:hover, .nav-link:focus {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: none;
  }

  .nav-link:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.98);
  }

  .nav-link.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
  }

  .nav-link i {
    width: 24px;
    font-size: 1rem;
    margin-right: 10px;
    text-align: center;
    color: inherit;
  }

  /* Hervorgehobene Mobile-Links */
  .mobile-highlight-link {
    background: rgba(52, 152, 219, 0.15);
    color: var(--color-primary);
    font-weight: 600;
    border: 1px solid rgba(52, 152, 219, 0.2);
    box-shadow: none;
    height: auto;
  }

  .mobile-highlight-link:hover, .mobile-highlight-link:focus {
    background: rgba(52, 152, 219, 0.25);
    color: white;
  }

  /* Mobile Dropdowns */
  .dropdown-menu {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px 0 4px 12px;
    margin: 0;
    width: 100%;
  }

  .dropdown-item {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 2px 0;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    height: auto;
    min-height: 44px;
  }

  .dropdown-item:hover, .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: none;
  }

  .dropdown-item:active {
    background: var(--color-primary-light);
    color: white;
  }

  .dropdown-item i {
    width: 22px;
    margin-right: 10px;
    font-size: 0.9rem;
    text-align: center;
    color: inherit;
  }

  .dropdown-divider {
    border-top: 1px solid var(--border-color);
    margin: 6px 0;
    display: block;
    height: 0;
    padding: 0;
  }

  /* Admin Submenu */
  .admin-submenu {
    padding: 0;
    border: none;
    background: transparent;
  }

  .admin-submenu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 2px 0;
    min-height: 44px;
    height: auto;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition-base);
  }

  .admin-submenu-item:hover, .admin-submenu-item:focus {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: none;
  }

  /* Body offset für Header */
  body {
    padding-top: 56px;
  }

  main.container, main.container-fluid {
    margin-top: 0;
    padding-top: var(--space-md);
  }

  /* ── Karten ── */
  .card {
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
    transition: none;
    transform: none;
  }

  .card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }

  .card-header {
    padding: 14px 16px;
  }

  .card-body {
    padding: var(--space-md);
  }

  .card-header h1, .card-header h2, .card-header h3,
  .card-header h4, .card-header h5, .card-header h6 {
    font-size: 1rem;
  }

  /* ── Buttons ── */
  .btn {
    padding: 10px 18px;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    min-height: 44px;
    width: auto;
    margin-bottom: 0;
  }

  .btn:active { transform: scale(0.97); }
  .btn:hover { transform: none; box-shadow: none; }

  .btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-height: 36px;
  }

  .btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
    min-height: 52px;
  }

  /* Button Container */
  .d-flex.justify-content-between {
    flex-direction: column;
    gap: 8px;
  }

  .d-flex.justify-content-between .btn {
    width: 100%;
  }

  .d-flex.gap-2 { flex-wrap: wrap; }

  .btn-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    width: 100%;
  }

  .btn-group .btn { flex: 1; }

  .d-flex.flex-column .btn,
  .d-grid .btn {
    width: 100%;
  }

  .btn-close { min-height: auto; padding: 4px; width: auto; }

  /* ── Formulare ── */
  .form-label {
    font-size: 0.8125rem;
    margin-bottom: 6px;
  }

  .form-control, .form-select {
    padding: 10px 14px;
    min-height: 44px;
    border-radius: var(--radius-md);
  }

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

  .input-group {
    flex-wrap: nowrap;
    border: none;
    padding: 0;
    background-color: transparent;
  }

  .input-group .btn,
  .input-group .input-group-text {
    min-width: 44px;
    flex-shrink: 0;
    width: auto;
    margin-bottom: 0;
  }

  .form-check { padding: 8px 0; padding-left: 1.75em; min-height: auto; }

  .form-check-input {
    min-height: auto;
    min-width: 20px;
    margin-left: -1.75em;
    float: left;
  }

  .mb-3 { margin-bottom: 14px; }

  /* ── Tabellen ── */
  .table-responsive {
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
  }

  .table { font-size: 0.8125rem; }

  .table th {
    padding: 10px 8px;
    font-size: 0.7rem;
  }

  .table td {
    padding: 10px 8px;
    font-size: 0.8125rem;
  }

  /* ── Alerts ── */
  .alert {
    padding: 12px 16px;
    font-size: 0.85rem;
  }

  /* ── Breadcrumbs ── */
  .breadcrumb {
    font-size: 0.8rem;
    padding: 6px 0;
    margin-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .breadcrumb::-webkit-scrollbar { display: none; }

  /* ── Pagination ── */
  .pagination { flex-wrap: wrap; gap: 2px; }

  .pagination .page-link {
    padding: 6px 10px;
    font-size: 0.75rem;
    min-height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ── Badges ── */
  .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  /* ── Filter Buttons ── */
  .filter-btn, [class*="filter-btn-"] {
    padding: 6px 14px;
    font-size: 0.75rem;
    min-height: 32px;
    width: auto;
  }

  /* ── Bildergalerie ── */
  .image-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .image-container img {
    height: 120px;
    padding: 0.5rem;
  }

  .image-container .card-body { padding: 8px; }
  .image-container .card-title { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .image-container .card-text { font-size: 0.7rem; max-height: 2em; overflow: hidden; }

  /* ── Stats ── */
  .stat-card { padding: 1.25rem; }
  .stat-card:hover { transform: none; }
  .stat-card .stat-value { font-size: 1.75rem; }
  .stat-card .stat-label { font-size: 0.8rem; }

  .stat-item { padding: 1.25rem; }
  .stat-value { font-size: 1.75rem; }
  .stat-label { font-size: 0.8rem; }

  /* ── Footer ── */
  footer {
    padding: 1.5rem 0;
    margin-top: 2rem;
    text-align: center;
  }

  .footer-brand h5 { font-size: 1.2rem; margin-bottom: 4px; }
  .footer-brand p { font-size: 0.8rem; }

  .footer-links a { font-size: 0.8rem; }

  .footer-copyright, .copyright-text {
    font-size: 0.7rem;
  }

  /* ── Nutzungstypen ── */
  .border.rounded.p-3 {
    padding: 8px;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .usage-type-checkbox {
    padding: 10px 12px;
    margin-bottom: 0;
  }

  /* ── QR-Scanner ── */
  .camera-container { width: 100%; max-width: none; }

  #qrScanner, #qrScannerMobile {
    width: 100%;
    height: 250px;
  }

  /* ── Seiten-Layout ── */
  .d-flex.justify-content-between.align-items-center.mb-3 {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .d-flex.justify-content-between.align-items-center.mb-3 .btn {
    width: 100%;
  }

  .d-flex.justify-content-between.align-items-start {
    flex-direction: column;
    gap: 12px;
  }

  .d-flex.justify-content-between.align-items-start .d-flex.gap-2 {
    width: 100%;
    flex-direction: column;
  }

  .d-flex.justify-content-between.align-items-start .d-flex.gap-2 .btn {
    width: 100%;
  }

  /* Spalten auf volle Breite */
  .col-md-6, .col-md-4, .col-md-3, .col-md-8,
  .col-lg-4, .col-lg-6, .col-lg-8 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  /* Ausnahme: Stats Grid bleibt 2-spaltig */
  .row.mb-3 > .col-6,
  .row.mb-2 > .col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    width: 50%;
  }

  /* Card-Header flex */
  .card-header.d-flex.justify-content-between {
    flex-direction: column;
    gap: 8px;
  }

  .card-header.d-flex.justify-content-between .btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Auftrags-Detail ── */
  .item-row {
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
  }

  .item-info .d-flex { flex-wrap: wrap; gap: 4px; }

  .col-lg-8, .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  /* ── Performance & Touch ── */
  .card, .btn, .nav-link {
    will-change: auto;
    backface-visibility: visible;
  }

  a, button, [role="button"], input[type="submit"], input[type="button"] {
    min-height: 44px;
  }

  /* ── Mobile User Select ── */
  body.mobile-device { -webkit-user-select: none; user-select: none; }
  body.mobile-device input,
  body.mobile-device textarea,
  body.mobile-device .selectable,
  body.mobile-device .card-body p,
  body.mobile-device .modal-body {
    -webkit-user-select: text;
    user-select: text;
  }
  body.mobile-device img { -webkit-touch-callout: none; }

  /* ── Admin Dropdown Arrow ── */
  .admin-dropdown-arrow {
    font-size: 0.8rem;
    transition: transform var(--transition-base);
  }

  .admin-link[aria-expanded="true"] .admin-dropdown-arrow {
    transform: rotate(180deg);
  }

  .admin-submenu.show-admin-menu {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Kleine Smartphones (≤767px) ── */
@media (max-width: 767px) {
  /* Bottom Navigation Platz */
  body { padding-bottom: 60px; }
  body.has-bottom-nav { padding-bottom: 60px; }
  footer { margin-bottom: 60px; padding-bottom: 80px; }
  main.container, main.container-fluid {
    margin-bottom: 20px;
    padding-bottom: var(--space-md);
  }

  /* Hero */
  .hero {
    margin: calc(-1 * var(--space-md)) calc(-1 * var(--space-md)) var(--space-md) calc(-1 * var(--space-md));
    border-radius: 0;
    min-height: auto;
  }

  .hero-content { padding: 2.5rem 1.25rem; text-align: left; }
  .hero h1 { font-size: 1.75rem; text-align: left; }
  .hero p { font-size: 0.9rem; text-align: left; }
  .hero .btn { width: auto; display: inline-flex; }

  .hero-text-card {
    padding: 1.5rem;
    margin: 0;
    backdrop-filter: blur(8px);
  }

  /* Modals */
  .modal-dialog {
    margin: 8px;
    max-width: calc(100% - 16px);
  }

  .modal-content { border-radius: var(--radius-lg); }
  .modal-header { padding: var(--space-md); }
  .modal-body { padding: var(--space-md); }
  .modal-footer { padding: 12px 16px; gap: 8px; }
  .modal-footer .btn { flex: 1; }

  body.modal-open { overflow: hidden; padding-right: 0 !important; }

  /* Profil */
  .profile-header {
    padding: 1.5rem 0;
    margin: calc(-1 * var(--space-md)) calc(-1 * var(--space-md)) var(--space-md) calc(-1 * var(--space-md));
    border-radius: 0;
  }

  .profile-avatar { width: 80px; height: 80px; }
  .profile-avatar i { font-size: 2.25rem; }
  .profile-header h1 { font-size: 1.5rem; }

  /* Buchung Buttons */
  .card-body .d-flex.gap-2,
  .card-body .d-flex.gap-3 {
    display: flex;
    gap: 8px;
  }

  .card-body .d-flex.gap-2 .btn,
  .card-body .d-flex.gap-3 .btn {
    flex: 1;
    width: auto;
  }

  /* Stats Section */
  .stats-section {
    padding: 1.5rem 0;
    margin: 1.5rem calc(-1 * var(--space-md));
    border-radius: 0;
  }

  /* Tabellen Text-Wrap */
  .table td, .table th {
    white-space: normal;
    word-break: break-word;
  }
}

/* ── Sehr kleine Geräte (≤480px) ── */
@media (max-width: 480px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  h1, .h1 { font-size: 1.35rem; }
  h2, .h2 { font-size: 1.15rem; }

  .btn { font-size: 0.8rem; padding: 8px 14px; }
  .card-body { padding: 0.75rem; }

  .image-gallery { grid-template-columns: 1fr; }
  .image-container img { height: 180px; }

  .border.rounded.p-3 { grid-template-columns: 1fr; }

  .hide-xs { display: none; }
}


/* ============================================================
   31. TOUCH-OPTIMIERUNGEN
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
  .card:hover { transform: none; box-shadow: var(--shadow-sm); }
  .btn:hover { transform: none; }
  .feature-card:hover { transform: none; }
  .stat-card:hover { transform: none; }
  .image-thumbnail:hover { transform: none; }
  .table-hover tbody tr:hover td { background-color: transparent; }

  a, button, input, select, textarea {
    min-height: 44px;
    min-width: 44px;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ============================================================
   32. IOS-SPEZIFISCHE FIXES
   ============================================================ */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 991px) {
    body {
      -webkit-overflow-scrolling: touch;
    }

    .bottom-nav {
      padding-bottom: env(safe-area-inset-bottom, 0);
    }

    body.mobile-device .navbar,
    body.mobile-device .bottom-nav {
      position: fixed;
      width: 100%;
    }
  }
}

@media (display-mode: standalone) {
  body.mobile-device {
    padding-top: env(safe-area-inset-top);
  }

  .navbar {
    top: env(safe-area-inset-top);
  }
}


/* ============================================================
   33. BARRIEREFREIHEIT
   ============================================================ */
@media (max-width: 991px) {
  *:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }
}


/* ============================================================
   34. UTILITY-KLASSEN
   ============================================================ */
@media (max-width: 991px) {
  .mobile-only  { display: block; }
  .desktop-only { display: none; }
}

@media (min-width: 992px) {
  .mobile-only  { display: none; }
  .desktop-only { display: block; }
}