/* =====================================================================
   Paket 11 — Auswertung-Tab (Funnel + Trend + Top-Performer)
   ===================================================================== */

.aw-root {
  padding: 18px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.aw-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 4px;
}

.aw-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.aw-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.aw-filters select,
.aw-filters button {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 14px;
  background: white;
  color: #1f2937;
  cursor: pointer;
}

.aw-filters select { padding-right: 28px; }

.aw-filters button.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.aw-filters .aw-btn-group {
  display: inline-flex;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
}
.aw-filters .aw-btn-group button {
  border: none;
  border-radius: 0;
  border-right: 1px solid #d1d5db;
}
.aw-filters .aw-btn-group button:last-child { border-right: none; }

/* ─── KPI-Zeile ─────────────────────────────────────────────────────── */
.aw-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.aw-kpi {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aw-kpi .v { font-size: 22px; font-weight: 700; color: #0f172a; }
.aw-kpi .l { font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; }
.aw-kpi.highlight { background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%); border-color: #bfdbfe; }
.aw-kpi.win       { background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%); border-color: #a7f3d0; }

/* ─── Grid für Funnel + Trend ───────────────────────────────────────── */
.aw-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1.2fr);
  gap: 18px;
}
@media (max-width: 1100px) {
  .aw-grid { grid-template-columns: 1fr; }
}

.aw-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 20px 22px;
}
.aw-card h3 {
  margin: 0 0 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}
.aw-card h3 .meta {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
  margin-left: auto;
}

/* ─── Funnel-Balken ─────────────────────────────────────────────────── */
.aw-funnel-list { display: flex; flex-direction: column; gap: 10px; }
.aw-fn-row {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  gap: 10px;
  align-items: center;
}
.aw-fn-stufe {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}
.aw-fn-bar {
  position: relative;
  height: 26px;
  background: #f3f4f6;
  border-radius: 6px;
  overflow: hidden;
}
.aw-fn-fill {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: white;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: width .3s ease;
}
.aw-fn-fill.s0 { background: #3b82f6; }
.aw-fn-fill.s1 { background: #0ea5e9; }
.aw-fn-fill.s2 { background: #8b5cf6; }
.aw-fn-fill.s3 { background: #ec4899; }
.aw-fn-fill.s4 { background: #10b981; }

.aw-fn-pct {
  text-align: right;
  font-weight: 600;
  font-size: 13px;
  color: #111827;
}
.aw-fn-pct .sub { font-size: 11px; color: #9ca3af; font-weight: 400; display: block; }

/* ─── Trend-Chart (SVG) ─────────────────────────────────────────────── */
.aw-trend {
  width: 100%;
  height: 240px;
}
.aw-trend svg { width: 100%; height: 100%; display: block; }
.aw-legend { display: flex; gap: 14px; font-size: 12px; color: #4b5563; margin-top: 8px; }
.aw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.aw-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

/* ─── Top-Performer-Tabelle ─────────────────────────────────────────── */
.aw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.aw-table thead th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: #6b7280;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.aw-table tbody td {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
}
.aw-table tbody tr:last-child td { border-bottom: none; }
.aw-table tbody tr:hover { background: #f9fafb; }
.aw-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.aw-table .rank { width: 40px; text-align: center; font-weight: 700; font-size: 16px; }
.aw-table .medal { font-size: 20px; }
.aw-table .muted { color: #9ca3af; }

/* ─── Leer-/Lade-Zustände ───────────────────────────────────────────── */
.aw-empty {
  padding: 30px;
  color: #6b7280;
  text-align: center;
  font-size: 14px;
  background: #f9fafb;
  border-radius: 8px;
}
.aw-loading {
  padding: 40px 20px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}
