/* ── Auswertung (Evaluation) Styles ── */

/* Dashboard cards */
.eval-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.eval-card-header {
  font-family: 'Roboto Slab', serif;
  font-size: 18px;
  font-weight: 700;
  color: #e5007e;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5007e;
}

/* Stat numbers */
.eval-stat {
  font-size: 2rem;
  font-weight: 700;
  color: #212a59;
  line-height: 1.1;
}

.eval-stat-label {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 4px;
}

.eval-stat-card {
  text-align: center;
  padding: 16px 12px;
}

/* Stat row (3-column) */
.eval-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

/* Comparison table */
.eval-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.eval-table th {
  background-color: #212a59;
  color: #fff;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

/* thead-th-Override gegen die in app.css definierte
   `.eval-table thead th { color: var(--wabeo-secondary) }`-Regel
   (höhere Spezifität, geladen vorher) — sonst rendern die Header
   in dunkelblauer Schrift auf dunkelblauem Hintergrund = unsichtbar. */
.eval-table thead th {
  background-color: #212a59;
  color: #fff;
  border-bottom: none;
  text-transform: none;
  letter-spacing: 0;
  font-family: inherit;
  font-size: 13px;
}

.eval-table th:last-child,
.eval-table td:last-child {
  text-align: right;
}

.eval-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #dee2e6;
  color: #212a59;
  vertical-align: middle;
}

.eval-table tbody tr:hover {
  background-color: #f8f9fa;
}

.eval-table .text-right {
  text-align: right;
}

.eval-table .text-center {
  text-align: center;
}

/* Deviation indicators */
.dev-ok {
  color: #198754;
}

.dev-minor {
  color: #fd7e14;
}

.dev-major {
  color: #dc3545;
}

.dev-ok-bg {
  background-color: #d1e7dd;
}

.dev-minor-bg {
  background-color: #fff3cd;
}

.dev-major-bg {
  background-color: #f8d7da;
}

/* SVG chart container */
.eval-chart {
  width: 100%;
  overflow-x: auto;
  margin: 12px 0;
}

.eval-chart-svg {
  width: 100%;
  max-width: 600px;
  height: auto;
  font-family: 'Titillium Web', sans-serif;
}

/* Protocol list */
.eval-protocol-row {
  cursor: pointer;
  transition: background 0.15s;
}

.eval-protocol-row:hover {
  background-color: #dcedf9 !important;
}

/* Status badges */
.eval-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.eval-badge-ok {
  background: #d1e7dd;
  color: #0f5132;
}

.eval-badge-warning {
  background: #fff3cd;
  color: #664d03;
}

.eval-badge-error {
  background: #f8d7da;
  color: #842029;
}

.eval-badge-info {
  background: #dcedf9;
  color: #212a59;
}

/* Back button */
.eval-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #212a59;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
  cursor: pointer;
}

.eval-back:hover {
  color: #e5007e;
}

/* Violation list */
.eval-violation-item {
  background: #f8f9fa;
  border-left: 4px solid #e5007e;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 0 6px 6px 0;
}

.eval-violation-number {
  font-weight: 700;
  color: #e5007e;
  margin-right: 8px;
}

.eval-violation-section {
  font-size: 0.8rem;
  color: #6c757d;
}

.eval-violation-followup {
  font-size: 0.85rem;
  color: #495057;
  margin-top: 6px;
  font-style: italic;
}

/* Top violations ranking */
.eval-top-violation {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.eval-top-violation-rank {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e5007e;
  min-width: 28px;
  text-align: right;
}

.eval-top-violation-text {
  flex: 1;
  font-size: 14px;
  color: #212a59;
}

.eval-top-violation-pct {
  font-weight: 700;
  font-size: 14px;
  color: #212a59;
  min-width: 50px;
  text-align: right;
}

/* Subtotal and total rows in protocol table */
.eval-subtotal-row {
  background: #f0f4f8;
  border-top: 1px solid #c8d6e5;
}

.eval-subtotal-row td {
  font-size: 13px;
  color: #495057;
}

.eval-total-row {
  background: #f8f9fa;
  border-top: 2px solid #212a59;
}

.eval-total-row td {
  font-weight: 700;
}

/* Placeholder badge for simulated data */
.eval-placeholder-badge {
  display: inline-block;
  background: #e2e3f1;
  color: #5a5b8a;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  vertical-align: middle;
  cursor: help;
}

.eval-placeholder {
  color: #6c757d;
}

/* Summary text for section headers */
.eval-summary-text {
  font-size: 15px;
  color: #212a59;
  margin-bottom: 16px;
}

/* Sample size warning */
.eval-sample-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  color: #664d03;
  margin: 16px 0;
}

/* Filter controls */
.eval-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.eval-filter-select {
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

/* Section header with magenta underline (Stephanies app-2-Erwartung).
   Bootstrap-Reset für <h4> würde sonst alle margin-tops auf 0 setzen
   und font-weight auf 500 — explizit überschreiben. */
.eval-section-title {
  font-family: 'Roboto Slab', serif;
  font-size: 22px;
  font-weight: 700;
  color: #212a59;
  margin: 24px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--wabeo-primary, #e5007e);
}

/* Loading spinner */
.eval-loading {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

/* No-data state */
.eval-empty {
  text-align: center;
  padding: 40px;
  color: #6c757d;
  font-size: 16px;
}

/* Progress bar for coverage */
.eval-progress {
  height: 10px;
  background: #e9ecef;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 8px;
}

.eval-progress-bar {
  height: 100%;
  background: #e5007e;
  border-radius: 5px;
  transition: width 0.6s ease;
}

/* Responsive */
@media (max-width: 575.98px) {
  .eval-stat {
    font-size: 1.5rem;
  }

  .eval-card {
    padding: 12px;
  }

  .eval-stats-row {
    grid-template-columns: 1fr;
  }

  .eval-chart-svg {
    max-width: 100%;
  }

  .eval-table {
    font-size: 12px;
  }

  .eval-table th,
  .eval-table td {
    padding: 4px 6px;
  }
}

@media (max-width: 767.98px) {
  .eval-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Einspruch / Awareness ── */

/* View-Header für Auswertungs-Sichten — H1 links, Einspruch-Pill rechts.
   Ersetzt den früheren pink Pill-Button im Top-Nav, der mit dem
   Header-Umbau (Logo | Titel | Abmelden) entfallen ist. */
.eval-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--wabeo-primary, #e5007e);
}
.eval-view-header h1 {
  font-family: 'Roboto Slab', serif;
  font-size: 22px;
  color: #212a59;
  flex: 1;
}
@media (max-width: 575.98px) {
  .eval-view-header { flex-wrap: wrap; gap: 8px; }
  .eval-view-header h1 { font-size: 18px; }
}

/* Pink Einspruch pill button — heute in der View-Action-Bar
   (eval-view-header), vorher im Top-Nav. */
.nav-tab-einspruch {
  display: inline-flex;
  align-items: center;
  background-color: #e5007e;
  color: #fff !important;
  border-radius: 12px;
  padding: 4px 14px;
  font-weight: 600;
  font-size: .8rem;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-tab-einspruch:hover {
  background-color: #c4006b;
}

.nav-tab-einspruch.active {
  background-color: #b00060;
  box-shadow: 0 0 0 2px rgba(229, 0, 126, 0.25);
}

/* Disabled bottom nav tab */
.nav-link.disabled {
  color: #adb5bd;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}

/* Awareness letter preview */
.awareness-letter-preview {
  border: 1px solid #dee2e6;
  padding: 24px;
  font-size: 14px;
  line-height: 1.6;
}

.awareness-letter-preview table {
  margin: 12px 0;
}

@media (max-width: 575.98px) {
  .awareness-letter-preview {
    padding: 12px;
    font-size: 13px;
  }
}
