/* =====================================================================
   SINE MODULE CORE – Gemeinsame Komponenten fuer alle Module

   Dieses Stylesheet enthaelt wiederverwendbare UI-Komponenten,
   die in allen 48 SINE-Modulen verwendet werden.

   Verwendung:
   1. In module.njk Layout einbinden (vor modul-spezifischem CSS)
   2. Module nutzen diese Klassen direkt
   3. Modul-spezifisches CSS nur fuer Farben/Theme-Overrides
   ===================================================================== */

/* =====================================================================
   SECTION 1: CSS Custom Properties (Phase Colors)
   ===================================================================== */

:root {
  /* Phase-Farben (verwendet in Modul-Headers und Akzenten) */
  --phase-01-color: #3b82f6;  /* Standort - Blau */
  --phase-02-color: #8b5cf6;  /* Werte - Violett */
  --phase-03-color: #06b6d4;  /* Vision - Cyan */
  --phase-04-color: #10b981;  /* Ziele - Gruen */
  --phase-05-color: #f59e0b;  /* Strategie - Amber */
  --phase-06-color: #ec4899;  /* Systeme - Pink */
  --phase-07-color: #6366f1;  /* Kompetenzen - Indigo */
  --phase-08-color: #14b8a6;  /* Stakeholder - Teal */
  --phase-09-color: #f97316;  /* Exekution - Orange */
  --phase-10-color: #84cc16;  /* Integration - Lime */
  --phase-11-color: #ef4444;  /* Abschluss - Rot */

  /* Modul-Komponenten */
  --mod-section-bg: #ffffff;
  --mod-section-border: #e5e7eb;
  --mod-section-radius: 18px;
  --mod-section-shadow: 0 16px 32px rgba(0,0,0,0.04);

  --mod-input-border: #d1d5db;
  --mod-input-radius: 6px;
  --mod-input-radius-pill: 999px;

  --mod-table-header-bg: #f3f4f6;
  --mod-table-border: #e5e7eb;

  /* Dynamische Phase-Farbe (wird per Modul gesetzt) */
  --mod-phase-color: var(--phase-01-color);
}

/* =====================================================================
   SECTION 2: Module Shell & Container
   ===================================================================== */

/* module.njk Layout Wrapper */
.module-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.module-header {
  margin-bottom: 1.5rem;
}

.module-breadcrumb {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.module-breadcrumb a {
  color: #6b7280;
  text-decoration: none;
}

.module-breadcrumb a:hover {
  color: #111;
  text-decoration: underline;
}

.module-breadcrumb .sep {
  margin: 0 0.4rem;
  color: #9ca3af;
}

.module-breadcrumb .current {
  color: #374151;
}

.module-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: #111;
}

.module-intro {
  margin: 0;
  font-size: 0.95rem;
  color: #6b7280;
}

.module-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Legacy class alias */
.mod-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

/* =====================================================================
   SECTION 3: Section Cards
   ===================================================================== */

.mod-section {
  padding: 1.25rem 1.5rem;
  border-radius: var(--mod-section-radius);
  background: var(--mod-section-bg);
  border: 1px solid var(--mod-section-border);
  box-shadow: var(--mod-section-shadow);
  overflow: hidden; /* Verhindert Überlauf bei breiten Tabellen */
}

.mod-section h2,
.mod-section h3 {
  margin: 0 0 0.6rem 0;
  font-weight: 600;
  color: #111;
}

.mod-section h2 {
  font-size: 1.1rem;
}

.mod-section h3 {
  font-size: 1rem;
}

.mod-section p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 0.8rem 0;
}

.mod-section-intro {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0 0 1.25rem 0;
}

/* Collapsed/Expandable Sections */
.mod-section[data-collapsed="true"] .mod-section-content {
  display: none;
}

.mod-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.mod-section-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #6b7280;
}

/* =====================================================================
   SECTION 4: Pills / Tags / Badges
   ===================================================================== */

.mod-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #d4d4d4;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
  background: #f9fafb;
}

.mod-pill.primary {
  background: var(--mod-phase-color);
  color: #fff;
  border-color: var(--mod-phase-color);
}

.mod-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mod-badge.green { background: #dcfce7; color: #166534; }
.mod-badge.amber { background: #fef3c7; color: #92400e; }
.mod-badge.red { background: #fee2e2; color: #991b1b; }
.mod-badge.blue { background: #dbeafe; color: #1e40af; }
.mod-badge.gray { background: #f3f4f6; color: #4b5563; }

/* =====================================================================
   SECTION 5: Chips (selectable tags)
   ===================================================================== */

.mod-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mod-chip {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #d4d4d4;
  background: #f9fafb;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mod-chip:hover {
  border-color: #9ca3af;
}

.mod-chip.selected,
.mod-chip.is-selected {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.mod-chip.selected-phase,
.mod-chip.is-selected-phase {
  background: var(--mod-phase-color);
  color: #ffffff;
  border-color: var(--mod-phase-color);
}

/* =====================================================================
   SECTION 6: Form Inputs
   ===================================================================== */

.mod-input,
.mod-select {
  width: 100%;
  border-radius: var(--mod-input-radius-pill);
  border: 1px solid var(--mod-input-border);
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
}

.mod-input:focus,
.mod-select:focus {
  outline: none;
  border-color: var(--mod-phase-color);
}

.mod-input.rounded {
  border-radius: var(--mod-input-radius);
}

.mod-textarea {
  width: 100%;
  min-height: 80px;
  border-radius: 12px;
  border: 1px solid var(--mod-input-border);
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  resize: vertical;
}

.mod-textarea:focus {
  outline: none;
  border-color: var(--mod-phase-color);
}

/* Form Groups */
.mod-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mod-form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
}

.mod-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

/* =====================================================================
   SECTION 7: Tables
   ===================================================================== */

.mod-table-wrap {
  overflow-x: auto;
  margin: 0.5rem 0;
}

.mod-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.mod-table th,
.mod-table td {
  border: 1px solid var(--mod-table-border);
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.mod-table th {
  background: var(--mod-table-header-bg);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #374151;
}

.mod-table td {
  background: #fff;
}

/* Table inputs */
.mod-table input,
.mod-table select,
.mod-table textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 0.25rem 0.4rem;
  font: inherit;
  font-size: 0.8rem;
}

.mod-table textarea {
  min-height: 50px;
  resize: vertical;
}

.mod-table .num-cell {
  width: 60px;
  text-align: center;
}

.mod-table .num-cell input {
  text-align: center;
}

/* Row actions */
.mod-table .row-actions {
  white-space: nowrap;
}

.mod-table .btn-remove {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1rem;
}

/* =====================================================================
   SECTION 8: Grids
   ===================================================================== */

.mod-grid {
  display: grid;
  gap: 1rem;
}

.mod-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mod-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mod-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .mod-grid.cols-2,
  .mod-grid.cols-3,
  .mod-grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .mod-grid.cols-2-mobile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =====================================================================
   SECTION 9: Buttons
   ===================================================================== */

.mod-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.mod-btn.primary {
  background: #111111;
  color: #ffffff;
}

.mod-btn.primary:hover {
  background: #333333;
}

.mod-btn.phase {
  background: var(--mod-phase-color);
  color: #ffffff;
}

.mod-btn.phase:hover {
  filter: brightness(1.1);
}

.mod-btn.ghost {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
}

.mod-btn.ghost:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.mod-btn.danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.mod-btn.danger:hover {
  background: #fecaca;
}

.mod-btn.sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
}

.mod-btn.lg {
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
}

/* Button Groups */
.mod-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* =====================================================================
   SECTION 10: Cards
   ===================================================================== */

.mod-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 1.3rem 1.5rem;
  box-shadow: 0 16px 32px rgba(0,0,0,0.04);
}

.mod-card.selectable {
  cursor: pointer;
  transition: all 0.15s ease;
}

.mod-card.selectable:hover {
  border-color: #9ca3af;
}

.mod-card.selectable.selected {
  border-color: var(--mod-phase-color);
  box-shadow: 0 0 0 2px rgba(var(--mod-phase-color), 0.2);
}

.mod-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.mod-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111;
  margin: 0;
}

.mod-card-body {
  font-size: 0.85rem;
  color: #6b7280;
}

/* =====================================================================
   SECTION 11: Info/Tip Boxes
   ===================================================================== */

.mod-info-box {
  background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.mod-info-box.success {
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 100%);
  border-color: #a7f3d0;
  border-left-color: #10b981;
}

.mod-info-box.warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
  border-color: #fde68a;
  border-left-color: #f59e0b;
}

.mod-info-box.danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
  border-color: #fecaca;
  border-left-color: #ef4444;
}

.mod-info-box h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.mod-info-box p {
  margin: 0;
  font-size: 0.875rem;
  color: #4b5563;
}

.mod-info-box ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
}

.mod-info-box li {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

/* =====================================================================
   SECTION 12: Definition of Done (DoD)
   ===================================================================== */

.mod-dod {
  background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}

.mod-dod-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.mod-dod-title {
  font-weight: 600;
  font-size: 1rem;
  color: #111;
  margin: 0;
}

.mod-dod-progress {
  font-size: 0.8rem;
  color: #6b7280;
}

.mod-dod-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.mod-dod-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mod-phase-color), #10b981);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.mod-dod-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mod-dod-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
}

.mod-dod-item input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--mod-phase-color);
}

.mod-dod-item.completed {
  text-decoration: line-through;
  color: #9ca3af;
}

/* =====================================================================
   SECTION 13: Bubble Breaker (Minimal Variant)
   ===================================================================== */

.mod-bubble-breaker {
  background: linear-gradient(135deg, #fef3c7 0%, #fff 100%);
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.mod-bubble-breaker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.mod-bubble-breaker-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #92400e;
  margin: 0;
}

.mod-bubble-breaker-trigger {
  font-size: 0.8rem;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
}

.mod-bubble-breaker-content {
  font-size: 0.85rem;
  color: #78350f;
}

/* Bubble Breaker Modal */
.mod-bubble-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.mod-bubble-modal.active {
  display: flex;
}

.mod-bubble-modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
}

.mod-bubble-modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
}

/* =====================================================================
   SECTION 14: Sliders / Range Inputs
   ===================================================================== */

.mod-slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mod-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.mod-slider-label span:last-child {
  font-weight: 600;
  color: var(--mod-phase-color);
}

.mod-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  outline: none;
}

.mod-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mod-phase-color);
  cursor: pointer;
}

.mod-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mod-phase-color);
  cursor: pointer;
  border: none;
}

/* =====================================================================
   SECTION 15: Checkboxes with Labels
   ===================================================================== */

.mod-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mod-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.mod-checkbox-item input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--mod-phase-color);
}

.mod-checkbox-item label {
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}

/* =====================================================================
   SECTION 16: Radio Card Selection
   ===================================================================== */

.mod-radio-cards {
  display: grid;
  gap: 0.75rem;
}

.mod-radio-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mod-radio-card:hover {
  border-color: #9ca3af;
}

.mod-radio-card.selected {
  border-color: var(--mod-phase-color);
  background: linear-gradient(135deg, rgba(var(--mod-phase-color), 0.05) 0%, #fff 100%);
}

.mod-radio-card input[type="radio"] {
  margin-top: 0.15rem;
  accent-color: var(--mod-phase-color);
}

.mod-radio-card-content {
  flex: 1;
}

.mod-radio-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111;
  margin: 0 0 0.25rem 0;
}

.mod-radio-card-desc {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}

/* =====================================================================
   SECTION 17: Timeline / Steps
   ===================================================================== */

.mod-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mod-timeline-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
}

.mod-timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mod-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mod-phase-color);
  flex-shrink: 0;
}

.mod-timeline-line {
  width: 2px;
  flex: 1;
  background: #e5e7eb;
  margin-top: 0.25rem;
}

.mod-timeline-item:last-child .mod-timeline-line {
  display: none;
}

.mod-timeline-content {
  flex: 1;
  padding-bottom: 0.5rem;
}

.mod-timeline-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111;
  margin: 0 0 0.25rem 0;
}

.mod-timeline-desc {
  font-size: 0.85rem;
  color: #6b7280;
}

/* =====================================================================
   SECTION 18: Export / Action Bar
   ===================================================================== */

.mod-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 12px;
  margin-top: 1rem;
}

.mod-action-bar.sticky {
  position: sticky;
  bottom: 1rem;
  z-index: 10;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
}

/* =====================================================================
   SECTION 19: Empty States
   ===================================================================== */

.mod-empty-state {
  text-align: center;
  padding: 2rem;
  color: #9ca3af;
}

.mod-empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.mod-empty-state-text {
  font-size: 0.9rem;
}

/* =====================================================================
   SECTION 20: Loading States
   ===================================================================== */

.mod-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.mod-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--mod-phase-color);
  border-radius: 50%;
  animation: mod-spin 0.8s linear infinite;
}

@keyframes mod-spin {
  to { transform: rotate(360deg); }
}

/* =====================================================================
   SECTION 21: Responsive Utilities
   ===================================================================== */

@media (max-width: 640px) {
  .mod-shell {
    padding: 1rem;
  }

  .mod-section {
    padding: 1rem;
  }

  .mod-hide-mobile {
    display: none !important;
  }
}

@media (min-width: 641px) {
  .mod-hide-desktop {
    display: none !important;
  }
}

/* =====================================================================
   SECTION 22: Print Styles
   ===================================================================== */

@media print {
  .mod-shell {
    max-width: none;
    padding: 0;
  }

  .mod-section {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .mod-btn,
  .mod-action-bar,
  .mod-bubble-breaker {
    display: none !important;
  }

  .mod-table {
    font-size: 10pt;
  }
}

/* =====================================================================
   SECTION: Modul 1.1 Standort – Spezifische Styles
   ===================================================================== */

/* Scoring-Intro Box */
.mod11-scoring-intro {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Tabellen-Spalten-Gruppen (visuell trennen) */
.mod11-col-group-a {
  background-color: rgba(59, 130, 246, 0.05);
}

.mod11-col-group-b {
  background-color: rgba(34, 197, 94, 0.05);
}

/* Tabellen-Header Tooltips mit Custom-Popup */
.mod11-th-tooltip {
  cursor: help;
  position: relative;
}

.mod11-th-tooltip::after {
  content: " ⓘ";
  font-size: 0.7rem;
  color: #6b7280;
  vertical-align: super;
}

/* Custom Tooltip-Popup (statt nativer title) */
.mod11-th-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.6rem 0.85rem;
  background: #1f2937;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 8px;
  white-space: normal;
  width: max-content;
  max-width: 300px;
  text-align: left;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Pfeil unter dem Tooltip */
.mod11-th-tooltip::after {
  content: " ⓘ";
  font-size: 0.7rem;
  color: #6b7280;
  vertical-align: super;
}

.mod11-th-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Tabellen-Wrapper mit horizontalem Scroll für breite Tabellen */
.mod-table-wrap {
  overflow-x: auto;
  position: relative;
  max-width: 100%;
}

.mod-table thead {
  position: relative;
  z-index: 10;
}

.mod-table thead th {
  overflow: visible;
}

.mod11-th-hint {
  font-weight: 400;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Heat-Liste Energie-Badge */
.mod-heat-energy {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: 0.4rem;
  padding: 0.1rem 0.35rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: ui-monospace, monospace;
  cursor: help;
}

/* Confidence-Warnung in Heat-Liste */
.mod-heat-conf-warn {
  margin-left: 0.3rem;
  padding: 0.05rem 0.25rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #b45309;
  cursor: help;
}

/* Radar-Legende */
.mod11-radar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 0.75rem;
  margin-top: 0.5rem;
  background: #f9fafb;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #6b7280;
}

.mod11-radar-legend .legend-line {
  display: inline-block;
  width: 20px;
  height: 3px;
  background: #111827;
  vertical-align: middle;
  margin-right: 0.3rem;
}

.mod11-radar-legend .legend-line-dashed {
  display: inline-block;
  width: 20px;
  height: 0;
  border-top: 2px dashed #9ca3af;
  vertical-align: middle;
  margin-right: 0.3rem;
}

.mod11-radar-legend .legend-target {
  display: inline-block;
  width: 18px;
  height: 10px;
  background: rgba(59, 130, 246, 0.15);
  border: 1.5px dashed rgba(59, 130, 246, 0.5);
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 0.3rem;
}

/* Confidence-Select Dropdown */
.mod11-conf-select {
  width: 100%;
  min-width: 60px;
  padding: 0.35rem 0.4rem;
  font-size: 0.85rem;
  border: 1px solid var(--mod-input-border);
  border-radius: var(--mod-input-radius);
  background: #fff;
  cursor: pointer;
}

.mod11-conf-select:focus {
  outline: none;
  border-color: var(--mod-phase-color, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* Gap-Karten */
.mod11-gap-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem;
}

/* Pill-Varianten für Gaps */
.mod-pill-warn {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca;
}

.mod-pill-caution {
  background: #fffbeb !important;
  color: #92400e !important;
  border: 1px solid #fde68a;
}

.mod-pill-ok {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border: 1px solid #bbf7d0;
}

/* Badge-Varianten für Heat-Liste */
.mod-badge-warn {
  background: #fef2f2;
  color: #991b1b;
}

.mod-badge-ok {
  background: #f0fdf4;
  color: #166534;
}

/* DoD-Checklist */
.mod11-dod-section {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.mod11-dod-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mod11-dod-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.mod11-dod-item:hover {
  border-color: #d1d5db;
  background: #fafafa;
}

.mod11-dod-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #22c55e;
  cursor: pointer;
}

.mod11-dod-item input[type="checkbox"]:checked + span,
.mod11-dod-item:has(input:checked) {
  color: #6b7280;
}

/* DoD Status-Anzeige */
.mod11-dod-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  font-weight: 500;
  text-align: center;
}

.dod-status-incomplete {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.dod-status-almost {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.dod-status-complete {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* =====================================================================
   SECTION 14: Module Actions Footer
   ===================================================================== */

.module-actions {
  margin-top: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--mod-section-border, #e5e7eb);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

#module-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
}

#module-reset-btn:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

#module-reset-btn svg {
  flex-shrink: 0;
}
