/* ═══════════════════════════════════════════════════════════════════════════
   feedback.css — Dashboard de feedback (FeedbackModal.js)
   Prefijo: fbk-
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── KPIs ──────────────────────────────────────────────────────────────────── */
.fbk-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .fbk-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .fbk-kpis { grid-template-columns: 1fr 1fr; }
}

.fbk-kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fbk-kpi-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.fbk-kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}
.fbk-kpi-value--green  { color: #22c55e; }
.fbk-kpi-value--amber  { color: #f59e0b; }
.fbk-kpi-value--red    { color: #ef4444; }
.fbk-kpi-sub {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 300;
}

/* NPS gauge — barra de progreso coloreada */
.fbk-nps-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  margin-top: 6px;
  overflow: hidden;
}
.fbk-nps-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s;
}

/* ── Toolbar (periodo + pendientes) ─────────────────────────────────────────── */
.fbk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.fbk-periodo-select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.fbk-pendientes-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #c2410c;
}
[data-theme="dark"] .fbk-pendientes-badge {
  background: rgba(194,65,12,0.15);
  border-color: rgba(194,65,12,0.3);
  color: #fb923c;
}

/* ── Layout principal: radar + lista ────────────────────────────────────────── */
.fbk-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .fbk-body { grid-template-columns: 1fr; }
}

/* ── Panel radar ─────────────────────────────────────────────────────────────── */
.fbk-radar-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 16px;
  position: sticky;
  top: 0;
}
.fbk-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}
.fbk-radar-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 240px;
  margin: 0 auto 16px;
}
.fbk-cat-list {
  list-style: none;
}
.fbk-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 12px;
  gap: 8px;
}
.fbk-cat-item:last-child { border-bottom: none; }
.fbk-cat-name {
  color: var(--color-text-muted);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fbk-cat-score {
  font-weight: 700;
  color: var(--color-text);
  flex-shrink: 0;
}
.fbk-cat-score--na { color: var(--color-text-muted); font-weight: 400; }
.fbk-cat-bar {
  width: 48px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.fbk-cat-bar-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 2px;
  transition: width 0.3s;
}

/* ── Lista de feedback ───────────────────────────────────────────────────────── */
.fbk-list-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}
.fbk-list-header {
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.fbk-list-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ── Ficha de feedback ───────────────────────────────────────────────────────── */
.fbk-ficha {
  border-bottom: 1px solid var(--color-border);
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.1s;
}
.fbk-ficha:last-child { border-bottom: none; }
.fbk-ficha:hover { background: var(--color-bg); }
.fbk-ficha.expanded { background: var(--color-bg); }

.fbk-ficha-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  justify-content: space-between;
}
.fbk-ficha-info { flex: 1; min-width: 0; }
.fbk-ficha-nombre {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fbk-ficha-fecha {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.fbk-ficha-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Estrellas en ficha */
.fbk-ficha-stars {
  color: #f59e0b;
  font-size: 13px;
  letter-spacing: 1px;
}
.fbk-ficha-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}

/* Badges de ficha */
.fbk-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}
.fbk-badge--comment {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.fbk-badge--reply {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
[data-theme="dark"] .fbk-badge--comment {
  background: rgba(29,78,216,0.15);
  border-color: rgba(29,78,216,0.3);
  color: #93c5fd;
}
[data-theme="dark"] .fbk-badge--reply {
  background: rgba(194,65,12,0.15);
  border-color: rgba(194,65,12,0.3);
  color: #fb923c;
}

/* Detalle expandido */
.fbk-ficha-detail {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
}
.fbk-ficha.expanded .fbk-ficha-detail { display: block; }

.fbk-detail-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
@media (max-width: 560px) {
  .fbk-detail-scores { grid-template-columns: repeat(2, 1fr); }
}
.fbk-detail-score-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
}
.fbk-detail-score-label {
  color: var(--color-text-muted);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fbk-detail-score-val {
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 4px;
}
.fbk-detail-score-stars { color: #f59e0b; font-size: 11px; }
.fbk-detail-nps {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.fbk-detail-nps strong { color: var(--color-text); }
.fbk-detail-comment {
  background: var(--color-bg);
  border-left: 3px solid #22c55e;
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 8px;
  white-space: pre-wrap;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.fbk-trad-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  margin-top: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.fbk-trad-btn:hover:not(:disabled) { color: #22c55e; border-color: #22c55e; }
.fbk-trad-btn:disabled { opacity: 0.5; cursor: default; }
.fbk-detail-reply {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #c2410c;
  font-weight: 500;
}
[data-theme="dark"] .fbk-detail-reply { color: #fb923c; }
.fbk-detail-email-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}
.fbk-detail-email-link:hover { text-decoration: underline; }

/* ── Sin datos ───────────────────────────────────────────────────────────────── */
.fbk-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-text-muted);
}
.fbk-empty i {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  color: var(--color-border);
}
.fbk-empty p { font-size: 14px; line-height: 1.6; }
