.funnel-input-section {
  background: var(--surface, #1a1a1a);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.funnel-progress {
  background: var(--surface, #1a1a1a);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.progress-bar {
  background: #222;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  background: #56c178;
  width: 0%;
  transition: width 0.4s ease;
}
.progress-meta { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--muted, #888); }

.funnel-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-5);
  align-items: start;
}
.funnel-filters {
  background: var(--surface, #1a1a1a);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  position: sticky;
  top: var(--sp-4);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.funnel-filters h3 { font-size: var(--fs-sm); text-transform: uppercase; color: var(--muted, #888); margin: 0 0 var(--sp-3) 0; }

.funnel-results { min-width: 0; }

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.kpi-strip .kpi {
  background: var(--surface, #1a1a1a);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
}
.kpi-strip .kpi.pass .kpi-value { color: #b8f0c8; }
.kpi-strip .kpi.reject .kpi-value { color: #ffb4b4; }

.funnel-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface, #1a1a1a);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: var(--fs-sm);
}
.funnel-table th, .funnel-table td {
  padding: var(--sp-2) var(--sp-3);
  text-align: left;
  border-bottom: 1px solid #222;
}
.funnel-table th { font-weight: 600; color: var(--muted, #888); text-transform: uppercase; font-size: var(--fs-xs); cursor: default; }
.funnel-table th.sortable { cursor: pointer; user-select: none; }
.funnel-table th.sortable.sort-asc::after { content: ' ▲'; }
.funnel-table th.sortable.sort-desc::after { content: ' ▼'; }
.funnel-table tbody tr { cursor: pointer; }
.funnel-table tbody tr:hover { background: #222; }
.funnel-table tbody td img { width: 60px; height: 40px; object-fit: cover; border-radius: 4px; }

.funnel-drawer {
  position: fixed;
  right: 0; top: 0;
  width: min(620px, 100vw);
  height: 100vh;
  background: var(--bg, #0a0a0a);
  border-left: 1px solid var(--border, #2a2a2a);
  z-index: 30;
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(0,0,0,0.5);
}
.drawer-head {
  position: sticky; top: 0;
  background: var(--bg, #0a0a0a);
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border, #2a2a2a);
  z-index: 1;
}
.drawer-body { padding: var(--sp-4); }

@media (max-width: 900px) {
  .funnel-body { grid-template-columns: 1fr; }
  .funnel-filters { position: static; max-height: none; }
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .funnel-table { font-size: var(--fs-xs); }
  .funnel-table tbody td img { width: 40px; height: 28px; }
  .funnel-drawer { width: 100vw; }
}
