/* Painel de Moderação — V2 split layout */

.moderation-split {
  display: flex;
  height: calc(100vh - 54px);
  background: var(--bg);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  overflow: hidden;
}

/* ───── QUEUE ───── */
.moderation-queue {
  width: 360px;
  flex-shrink: 0;
  background: #FBFAF6;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.moderation-queue__header { padding: 1.1rem 1.25rem 0.75rem; }
.moderation-queue__header h1 {
  margin: 0; font-size: 1.05rem; font-weight: 700;
  letter-spacing: -0.01em; color: var(--ink);
}
.moderation-queue__header .muted { font-size: 0.78rem; color: var(--muted); margin: 4px 0 0; }

.moderation-queue__filters {
  display: flex; gap: 6px; padding: 0 1.25rem 0.75rem; flex-wrap: wrap;
}
.chip {
  padding: 0.25rem 0.65rem; border-radius: 999px;
  background: white; color: var(--ink);
  border: 1px solid var(--border);
  font-size: 0.74rem; font-weight: 600;
  text-decoration: none; transition: all 0.12s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip--active { background: var(--primary); color: white; border-color: var(--primary); }

.moderation-queue__list {
  flex: 1; overflow-y: auto;
  margin: 0; padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

/* ───── QUEUE ITEM ───── */
.queue-item {
  position: relative;
  border-bottom: 1px solid #F1ECDE;
  border-left: 4px solid transparent;
  transition: background 0.12s, box-shadow 0.12s;
}
.queue-item__link {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 0.75rem 1.25rem;
  text-decoration: none; color: inherit;
}
.queue-item:hover { background: rgba(0,0,0,0.02); }

.queue-item--selected {
  border-left-color: var(--primary);
  background: linear-gradient(90deg, #EEF2FF 0%, #F5F7FF 60%, white 100%);
  box-shadow: inset 0 0 0 1px #C7D2FE;
}
.queue-item__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.queue-item__body { min-width: 0; flex: 1; }
.queue-item__title {
  margin: 0 0 2px;
  font-size: 0.85rem; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-item__meta { margin: 0; font-size: 0.72rem; color: var(--muted); }
.queue-item__signals {
  margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  font-size: 0.68rem; font-weight: 700;
}
.queue-item__risk { letter-spacing: 0.04em; text-transform: uppercase; }
.queue-item__flags { color: #991b1b; background: #fef2f2; padding: 1px 6px; border-radius: 3px; }
.queue-item__reason { padding: 1px 6px; border-radius: 3px; background: #eef2ff; color: #3730a3; }
.queue-item__reason--word { background: #fff7ed; color: #9a3412; }
.queue-item__reason--link { background: #ecfeff; color: #155e75; }
.queue-item__reason--ai_unavailable { background: #f3f4f6; color: #374151; }

.review-reason {
  margin: 0.5rem 0 0.75rem; padding: 0.55rem 0.8rem; border-radius: 6px; font-size: 0.85rem;
  background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe;
}
.review-reason--word { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.review-reason--link { background: #ecfeff; color: #155e75; border-color: #a5f3fc; }
.review-reason--ai_unavailable { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }

.queue-item__images {
  color: var(--muted); font-weight: 500;
  display: inline-flex; align-items: center; gap: 3px;
}

/* ───── DETAIL ───── */
.moderation-detail { flex: 1; overflow-y: auto; background: var(--bg); display: block; }
.topic-detail { padding: 1.5rem 2rem; max-width: 860px; }
.topic-detail__crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--muted); margin-bottom: 1rem;
}
.topic-detail__crumbs strong { color: var(--ink); font-weight: 600; }
.topic-detail__nav { margin-left: auto; display: flex; gap: 4px; }

.mod-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.verdict-card__bar {
  padding: 0.55rem 1.25rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; border-bottom: 1px solid;
}
.verdict-card__dot { width: 8px; height: 8px; border-radius: 50%; }
.verdict-card__pct {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem; font-weight: 600; opacity: 0.8; text-transform: none; letter-spacing: 0;
}
.verdict-card__body { padding: 1.25rem; }
.verdict-card__body h1 {
  margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--ink);
  letter-spacing: -0.02em; line-height: 1.25;
}

.topic-detail__byline {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 10px 0 0; font-size: 0.83rem; color: var(--muted);
}
.topic-detail__byline strong { color: var(--ink); font-weight: 600; }
.badge--tl {
  padding: 1px 6px; background: #fef3c7; color: #92400e;
  border-radius: 3px; font-size: 0.68rem; font-weight: 700;
}

.topic-detail__actions {
  display: flex; gap: 8px; margin-top: 1rem; flex-wrap: wrap;
  padding-top: 1rem; border-top: 1px solid #F1ECDE;
  align-items: center;
}
.topic-detail__hotkeys { margin-left: auto; font-size: 0.78rem; color: var(--muted); }
kbd {
  padding: 1px 5px; background: #FBFAF6;
  border: 1px solid var(--border); border-radius: 3px;
  font-size: 0.7rem; font-family: "JetBrains Mono", monospace; font-weight: 600;
}

.mod-btn {
  padding: 0.5rem 1.1rem; border-radius: 6px; border: none;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; text-decoration: none; transition: all 0.12s;
}
.mod-btn--approve { background: #16a34a; color: white; }
.mod-btn--approve:hover { background: #15803d; }
.mod-btn--reject { background: white; color: #dc2626; border: 1px solid #fca5a5; }
.mod-btn--reject:hover { background: #fef2f2; }
.mod-btn--delete { background: #dc2626; color: white; }
.mod-btn--delete:hover { background: #b91c1c; }
.mod-btn--ghost { background: white; color: var(--ink); border: 1px solid var(--border); }
.mod-btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.mod-btn--sm { padding: 0.28rem 0.6rem; font-size: 0.74rem; }

/* ───── SCORE CARD ───── */
.mod-score-card__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 1.25rem 0;
}
.mod-score-card__head h2 { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.mod-score-card__head .muted { font-size: 0.72rem; color: var(--muted); }
.mod-score-card__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem; padding: 1rem 1.25rem 1.25rem;
}
.mod-score-bar { display: grid; grid-template-columns: 100px 1fr 54px; gap: 10px; align-items: center; }
.mod-score-bar__label {
  font-size: 0.82rem; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.mod-score-bar--flagged .mod-score-bar__label { color: #991b1b; font-weight: 700; }
.mod-score-bar__dot { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; }
.mod-score-bar__track { height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.mod-score-bar__fill { height: 100%; transition: width 0.4s ease; }
.mod-score-bar__value {
  font-family: "JetBrains Mono", monospace; font-size: 0.75rem;
  color: var(--muted); text-align: right;
}
.mod-score-bar--flagged .mod-score-bar__value { color: #991b1b; font-weight: 700; }

.mod-score-card__flag-summary {
  margin: 0 1.25rem 1.25rem;
  padding: 0.65rem 1rem;
  background: #fef2f2; border: 1px solid #fca5a5; border-radius: 6px;
  font-size: 0.83rem; color: #991b1b;
}

/* ───── CONTENT CARD ───── */
.content-card { padding: 1.25rem; }
.content-card h2 { margin: 0 0 0.75rem; font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.content-card__image {
  width: 100%; max-height: 280px; object-fit: contain;
  background: #0E1420; border-radius: 8px; margin-bottom: 1rem; display: block;
}
.content-card__body {
  font-size: 0.9rem; line-height: 1.7; color: #333;
}
.content-card__body p { margin: 0 0 0.75rem; }
.content-card__body p:last-child { margin-bottom: 0; }

/* ───── EMPTY ───── */
.empty-queue { padding: 4rem 2rem; text-align: center; color: var(--muted); }
.empty-queue h2 { color: var(--ink); margin-bottom: 0.5rem; font-size: 1.2rem; }

/* ───── PENDING NOTICE (topics without AI score) ───── */
.pending-notice {
  padding: 2rem; text-align: center; color: var(--muted);
  border: 1px dashed var(--border); border-radius: 8px; margin: 1.5rem 0;
}

/* Aba "Rejeitados" — depois das regras base de .review-reason/.chip */
.queue-item__reason--rejected { background: #fef2f2; color: #991b1b; }
.review-reason--rejected { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.chip--rejected.chip--active { background: #991b1b; border-color: #991b1b; }
