.header-controls {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  transition: background-color 120ms ease, border-color 120ms ease;
}


.header-controls .btn-icon {
  color: var(--bs-body-color);
  border: none;
  padding: 6px 10px;
  border-radius: 999px;
}

.header-controls .divider {
  width: 1px;
  height: 20px;
  background: var(--bs-border-color);
}

.header-controls:hover,
.header-controls:focus-within {
  background-color: rgba(13, 110, 253, 0.08);
  /* Bootstrap Primary */
  border-color: rgba(13, 110, 253, 0.25);
}

.header-controls .btn-icon:hover,
.header-controls .btn-icon:focus-visible {
  background-color: rgba(13, 110, 253, 0.12);
}


[data-bs-theme="dark"] .header-controls {
  border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .header-controls .btn-icon {
  color: rgba(255, 255, 255, 0.85);
}

/* Dropdown-Caret + Pfeil */
[data-bs-theme="dark"] .header-controls .dropdown-toggle {
  color: rgba(255, 255, 255, 0.85);
}


[data-bs-theme="dark"] .header-controls:hover,
[data-bs-theme="dark"] .header-controls:focus-within {
  background-color: rgba(13, 110, 253, 0.18);
  border-color: rgba(13, 110, 253, 0.4);
}



/* ✅ NEUE PILL FÜR INFO + TEAM */

.header-pill {
  border: 1px solid rgba(13, 110, 253, 0.25);
  border-radius: 999px;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 4px;

  background-color: rgba(13, 110, 253, 0.05);
  transition: background 0.15s, border-color 0.15s;
}



.header-pill:hover {
  background-color: rgba(13, 110, 253, 0.12);
  border-color: rgba(13, 110, 253, 0.35);
}


.header-pill .divider {
  width: 1px;
  height: 20px;
  /* 🔥 exakt gleich wie andere Pill */
  background: var(--bs-border-color);
}


/* ✅ BUTTON INSIDE PILL */

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: none;
  background: transparent;
  border-radius: 999px;

  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);

  gap: 5px;
  line-height: 1;
}



.btn-pill:hover {
  background-color: rgba(13, 110, 253, 0.18);
}



.btn-pill i {
  display: block;
  font-size: 0.95rem;
  opacity: 0.85;
  line-height: 1;
}


.btn-pill:hover i {
  opacity: 1;
}




@media (max-width: 768px) {
  .btn-pill .btn-label {
    display: none !important;
  }
}



.lang-dropdown-toggle {
  padding: 0.2rem 0.35rem;
  min-width: auto;
  min-height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-flag {
  display: block;
  width: 20px;
  height: auto;
  border-radius: 2px;
  overflow: hidden;
}

.lang-dropdown-menu {
  min-width: auto !important;
  width: auto !important;
  padding: 0.2rem !important;
}

.lang-dropdown-menu .dropdown-item {
  padding: 0.25rem 0.35rem;
  width: auto;
  min-width: 0;
  justify-content: center;
}

.lang-dropdown-menu .dropdown-item img.lang-flag {
  margin: 0 auto;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#currentLangFlag {
  display: block;
  width: 20px;
}

.tab-header-row {
  gap: 0.75rem;
}


/* =========================
   CONTACT MODAL
========================= */
.contact-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;

  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-card:hover {
  border-color: #0d6efd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.contact-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;

  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;

}

.contact-link {
  display: inline-block;
  margin-top: 6px;
  color: #0d6efd;
  font-size: 1.1rem;
}

/* =========================
   INFO MODAL
========================= */

/* Video */
.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.video-container iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* Info Cards */
.info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;

  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.info-card:hover {
  border-color: #0d6efd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.info-card i {
  font-size: 1.2rem;
  color: #0d6efd;
  opacity: 0.9;
}

.info-card:hover i {
  opacity: 1;
}





[data-bs-theme="dark"] .nav-tabs .nav-link.disabled {
  color: rgba(255, 255, 255, 0.75) !important;
  opacity: 1 !important;
  /* Bootstrap-Dimming aufheben */
  background-color: transparent;
  cursor: not-allowed;
}

/* Icons in disabled Tabs */
[data-bs-theme="dark"] .nav-tabs .nav-link.disabled i {
  color: rgba(255, 255, 255, 0.75);
}





.history-nav-button {
  white-space: nowrap;
}

.history-section {
  background-color: rgba(255, 255, 255, 0.95);
}

.history-list .card {
  border-color: rgba(13, 110, 253, 0.15);
}

.history-list .card .card-body {
  padding: 0.55rem;
}

.history-list .card .text-truncate {
  max-width: 220px;
}

.modal-body .history-list {
  max-height: 60vh;
  overflow-y: auto;
}

.history-list .card {
  width: 100%;
}

.history-list .restore-history-btn {
  white-space: nowrap;
}


#historyModal .modal-header #clearHistoryBtn {
  margin-left: 0.75rem;
}



/* CTA Button */
.cta-button {
  background: #00466b;
  color: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;

  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 4px 8px rgba(0, 0, 0, 0.04);

  transition: background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.2s ease;
}

.cta-button:hover {
  background: var(--bg-primary);
  border-color: #0d6efd;
  color: #0d6efd;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.12);
}


/* Links */
.links-row a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 4px;
  transition: color 0.3s ease;
}

.links-row a:hover {
  color: #0d6efd;
}

.links-row {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

/* Footer & Logo Positioning */
.bottom-left-footer,
.bottom-right-footer {
  margin: 0;
  padding: 0;
}

footer {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

footer a {
  color: var(--text-primary) !important;
}

footer a:hover {
  color: #0d6efd !important;
}


.alert i {
  font-size: 1.1em;
  vertical-align: middle;
}


.bottom-left-footer {
  bottom: 0;
  left: 0;
  max-width: 150px;
  height: auto;
  filter: var(--logo-filter);
  transition: filter 0.3s ease;
}

.bottom-right-footer {
  bottom: 0;
  right: 0;
  max-width: 150px;
  height: auto;
  filter: var(--logo-filter);
  transition: filter 0.3s ease;
}


.ea-badge {
  background-color: #007bff;
  color: white;
  padding: 4px 10px;
  border-radius: 0.375rem;
  font-size: 0.6em;
  font-weight: 600;
  margin-left: 10px;
  vertical-align: middle;
  display: inline-block;
}


.ea-link {
  text-decoration: none;
  color: #0d6efd;
  font-weight: 600;
}

.ea-link:hover {
  color: #0a58ca;
}


.input-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 4px 8px rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  margin: 0 auto;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}


.info-link {
  text-decoration: none;
  color: inherit;
  display: block;
}


.info-link-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 4px 8px rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-muted);
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.info-link-box:hover {
  background: var(--bg-primary);
  border-color: #0d6efd;
  text-decoration: none;
  color: #0d6efd;
}


.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  max-width: 850px;
  margin: 0 auto;
  width: 100%;

}


.logo-row img {
  height: clamp(40px, 10vw, 120px);
  width: auto;
  max-width: min(100%, 40vw);
  object-fit: contain;
  filter: var(--logo-filter);
  transition: filter 0.3s ease;
}


.logo-row img.no-invert {
  filter: none !important;
}


.logo-sponsor {
  border-radius: 12px;
}


.logo-link {
  display: inline-block;
  text-decoration: none;
}

.logo-link .logo-row {
  background: var(--bg-primary);
  border: 1px solid var(--bg-primary);
  border-radius: 12px;
  padding: 8px 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

/* Hover wie info-link-box */
.logo-link:hover .logo-row {
  background: var(--bg-primary);
  border-color: #0d6efd;
}


.logo-small {
  height: clamp(40px, 6vw, 120px);
  width: auto;
  object-fit: contain;
}

/* Monospace für technische MTM-Spalten */
.uas-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Kode extra betonen */
.uas-code {
  font-weight: 700;
}

/* Summenzeile */
.uas-sum-row td {
  font-weight: 700;
  border-top: 2px solid var(--text-primary);
  background-color: var(--border-color);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}






/* Feintuning für sehr kleine Geräte */
@media (max-width: 576px) {
  .logo-row {
    gap: 12px;
  }

  .logo-row img,
  .logo-small {
    height: clamp(36px, 14vw, 60px);
    /* etwas kleiner auf XS */
    max-width: 100%;
  }
}





#workInstruction::placeholder {
  color: #b6b6b6;
}





/* Dark Mode CSS Variables */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #212529;
  --text-muted: #6c757d;
  --border-color: #e0e0e0;
  --logo-filter: none;
}

[data-bs-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #121212;
  --text-primary: #f0f0f0;
  --text-muted: #b0b0b0;
  --border-color: #404040;
  --logo-filter: brightness(0) invert(1);
}

[data-bs-theme="dark"] footer {
  background-color: #000000 !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] footer a {
  color: #ffffff !important;
}

html,
body {
  min-height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Sticky Header */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-content {
  max-width: 100%;
  padding: 0.75rem 1rem;
}

.header-logo {
  flex-shrink: 0;
}

.logo-header {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: var(--logo-filter);
  transition: filter 0.3s ease;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  color: #0d6efd;
}

/* Main Area */
.main-area {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

.logo-small {
  height: clamp(40px, 10vw, 120px);
  width: auto;
  object-fit: contain;
  filter: var(--logo-filter);
  transition: filter 0.3s ease;
}


:root {
  --table-bg: #ffffff;
  --table-header-bg: #f1f3f5;
  --table-row-even-bg: #fff7ed;
  --table-hover-bg: rgba(251, 146, 60, 0.22);
  --table-text: #212529;
  --table-border: #e6e6e6;
}

.table-container {
  background-color: var(--table-bg);
  border: 1px solid var(--table-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}

.uas-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.uas-table thead {
  background-color: var(--table-header-bg);
}

.uas-table thead th {
  color: var(--table-text);
  font-weight: 700;
  border: none;
  padding: 1rem 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.uas-table tbody td {
  color: var(--table-text);
  border-color: var(--table-border);
  padding: 1rem 1rem;
  font-size: 0.95rem;
}

.uas-table tbody tr:nth-child(even) {
  background-color: var(--table-row-even-bg);
}

.uas-table tbody tr {
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.uas-table tbody tr:hover td {
  background-color: var(--table-hover-bg);
  transform: translateX(1px);
  cursor: pointer;
}

.uas-sum-row td {
  background-color: #f1f3f5;
}


#wi-form {
  max-width: 850px;
  width: 100%;
  margin: 0 auto;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

/* Form Titel */
.form-title {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin-bottom: 0.5rem !important;
  transition: color 0.3s ease;
  letter-spacing: -0.5px;
}

.form-control,
.form-control:focus {
  background-color: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-primary);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.text-muted {
  color: var(--text-muted) !important;
  transition: color 0.3s ease;
}


footer {
  background-color: var(--bg-primary);
}



/* Responsive adjustments for xs and sm */
@media (max-width: 576px) {
  body {
    overflow-y: auto;
  }

  .tab-content {
    max-height: none;
  }

  footer {
    margin-top: 1rem;
  }

  .bottom-left-footer,
  .bottom-right-footer {
    display: none;
  }

  .table-container {
    overflow-x: auto;
    max-width: 100%;
  }

  .uas-table {
    font-size: 0.75rem;
  }

  .uas-table thead th,
  .uas-table tbody td {
    padding: 0.5rem;
  }
}

/* Verstecke Tab-Text auf kleinen Bildschirmen */
@media (max-width: 768px) {

  .tab-text,
  .history-text {
    display: none;
  }

}