/* ═══════════════════════════════════════════════
   SISTEMA DE REVISÃO FTM — overlay genérico
   Importado via <link> em cada página da versão review.
   ═══════════════════════════════════════════════ */

.rv-bar {
  position: fixed; top: 0; left: 0; right: 0;
  background: #212e60; color: white;
  z-index: 9999;
  padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-family: Inter, sans-serif;
  font-size: 13px;
}
.rv-bar .rv-left { display: flex; align-items: center; gap: 16px; font-weight: 600; }
.rv-bar .rv-badge { background: #f37323; color: white; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.rv-bar .rv-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 5px 12px; border-radius: 4px;
  font-size: 12px; width: 230px;
  font-family: inherit;
}
.rv-bar .rv-input::placeholder { color: rgba(255,255,255,0.5); }
.rv-bar .rv-input:focus { outline: none; border-color: #f37323; }
.rv-bar .rv-right { display: flex; align-items: center; gap: 10px; }
.rv-bar button {
  background: #f37323; color: white;
  border: none; padding: 7px 16px;
  border-radius: 6px; font-weight: 700; font-size: 12px;
  cursor: pointer; font-family: inherit;
}
.rv-bar button:hover { filter: brightness(1.1); }
.rv-bar button.rv-secondary { background: rgba(255,255,255,0.1); }
.rv-bar button.rv-secondary:hover { background: rgba(255,255,255,0.2); }

body { padding-top: 48px !important; }

/* Botão flutuante "Comentar nesta página" */
.rv-fab {
  position: fixed; bottom: 1.5rem; left: 1.5rem;
  background: #f37323; color: white;
  border: none; padding: 12px 20px;
  border-radius: 999px; font-weight: 700; font-size: 13px;
  cursor: pointer; font-family: Inter, sans-serif;
  box-shadow: 0 4px 14px rgba(243,115,35,0.4);
  z-index: 9998;
  display: flex; align-items: center; gap: 8px;
}
.rv-fab:hover { filter: brightness(1.1); transform: translateY(-2px); }
.rv-fab.rv-has { background: #15803d; }
.rv-fab .rv-count {
  background: rgba(255,255,255,0.25);
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px;
}

/* Modal */
.rv-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  font-family: Inter, sans-serif;
}
.rv-modal.rv-open { display: flex; }
.rv-modal-card {
  background: white;
  border-radius: 12px;
  width: 540px; max-width: 92vw;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.rv-modal-card h3 { color: #212e60; margin: 0 0 4px; font-size: 20px; font-family: inherit; }
.rv-modal-card .rv-subtitle { color: #71717a; font-size: 13px; margin-bottom: 18px; }
.rv-modal-card label { display: block; font-size: 13px; font-weight: 700; color: #212e60; margin-bottom: 6px; margin-top: 12px; font-family: inherit; }
.rv-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rv-type-btn {
  padding: 10px 8px; border-radius: 6px;
  border: 1.5px solid #e4e4e7;
  background: white;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.rv-type-btn.rv-active.rv-ajustar { background: #eab308; border-color: #eab308; color: white; }
.rv-type-btn.rv-active.rv-aprovar { background: #15803d; border-color: #15803d; color: white; }
.rv-type-btn.rv-active.rv-duvida { background: #2563eb; border-color: #2563eb; color: white; }
.rv-type-btn.rv-active.rv-remover { background: #dc2626; border-color: #dc2626; color: white; }
.rv-modal-card textarea {
  width: 100%;
  border: 1.5px solid #e4e4e7;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 110px;
  box-sizing: border-box;
}
.rv-modal-card textarea:focus { outline: none; border-color: #f37323; }
.rv-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.rv-actions button {
  padding: 9px 20px; border-radius: 6px;
  font-weight: 700; font-size: 13px;
  cursor: pointer; font-family: inherit;
  border: none;
}
.rv-btn-primary { background: #f37323; color: white; }
.rv-btn-cancel { background: #e4e4e7; color: #18181b; }

/* Painel lateral */
.rv-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9990;
  display: none;
}
.rv-panel-overlay.rv-open { display: block; }
.rv-panel {
  position: fixed; top: 0; right: -480px;
  width: 460px; max-width: 92vw;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 9991;
  transition: right 0.3s;
  display: flex; flex-direction: column;
  font-family: Inter, sans-serif;
}
.rv-panel.rv-open { right: 0; }
.rv-panel-header {
  padding: 16px 20px;
  background: #212e60; color: white;
  display: flex; justify-content: space-between; align-items: center;
}
.rv-panel-header h3 { margin: 0; font-size: 16px; font-family: inherit; }
.rv-panel-header button {
  background: rgba(255,255,255,0.1); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  color: white; cursor: pointer; font-size: 18px;
}
.rv-panel-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
}
.rv-group {
  margin-bottom: 18px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  overflow: hidden;
}
.rv-group-header {
  background: #fafafa;
  padding: 10px 14px;
  font-size: 13px; font-weight: 700;
  color: #212e60;
  border-bottom: 1px solid #e4e4e7;
}
.rv-comment {
  padding: 12px 14px;
  border-bottom: 1px solid #e4e4e7;
}
.rv-comment:last-child { border-bottom: none; }
.rv-tag {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.rv-tag.rv-ajustar { background: #fef3c7; color: #92400e; }
.rv-tag.rv-aprovar { background: #dcfce7; color: #15803d; }
.rv-tag.rv-duvida { background: #dbeafe; color: #1e40af; }
.rv-tag.rv-remover { background: #fee2e2; color: #991b1b; }
.rv-comment .rv-text { font-size: 13px; color: #18181b; line-height: 1.5; }
.rv-comment .rv-meta { display: flex; justify-content: space-between; margin-top: 6px; align-items: center; }
.rv-comment .rv-date { font-size: 11px; color: #71717a; }
.rv-comment .rv-del { background: none; border: none; color: #71717a; cursor: pointer; font-size: 14px; padding: 0 4px; }
.rv-comment .rv-del:hover { color: #dc2626; }
.rv-empty { text-align: center; color: #71717a; padding: 40px 20px; font-size: 13px; }

@media print {
  .rv-bar, .rv-fab, .rv-modal, .rv-panel-overlay, .rv-panel { display: none !important; }
  body { padding-top: 0 !important; }
}
