/* public.css — Estilos das páginas públicas (index, registrar, sucesso, consultar, login) */

/* ===========================
   TEMA PRETO/BRANCO — PÁGINAS PÚBLICAS
   Sobrescreve a cor primária azul para o tema neutro do canal público
   =========================== */
body.page-home,
body.page-registrar,
body.page-consultar,
body.page-sucesso {
  background: #fff;
  --color-primary:       #111111;
  --color-primary-dark:  #000000;
  --color-primary-light: #f4f4f4;
  --color-secondary:     #111111;
  --color-secondary-dark:#000000;
  --color-border-focus:  #111111;
}

body.page-login,
body.page-redefinir-senha {
  --color-primary:       #111111;
  --color-primary-dark:  #000000;
  --color-primary-light: #f4f4f4;
  --color-border-focus:  #111111;
}

/* ===========================
   HEADER PÚBLICO
   =========================== */
.public-header {
  background: #111111;
  color: #fff;
  padding: 0.875rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.pub-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: opacity 150ms;
  white-space: nowrap;
}
.brand-link:hover { opacity: 0.8; text-decoration: none; }

.brand-logo-text {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  white-space: nowrap;
  padding-right: 0.5rem;
  border-right: 1px solid rgba(255,255,255,0.3);
}

.login-brand-empresa {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.pub-back-link,
.pub-area-link {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms;
}
.pub-back-link:hover,
.pub-area-link:hover { color: #fff; text-decoration: none; }

/* ===========================
   FOOTER PÚBLICO
   =========================== */
.public-footer {
  margin-top: 5rem;
  padding: 1.5rem 0;
  border-top: 1px solid #f0f0f0;
  text-align: center;
  font-size: 0.8125rem;
  color: #c0c0c0;
}

/* ===========================
   BOTÕES PÚBLICOS — TEMA PRETO
   =========================== */
body.page-home .btn-primary,
body.page-registrar .btn-primary,
body.page-consultar .btn-primary,
body.page-sucesso .btn-primary {
  background: #111;
  color: #fff;
  border: 2px solid #111;
  border-radius: 6px;
}
body.page-home .btn-primary:hover:not(:disabled),
body.page-registrar .btn-primary:hover:not(:disabled),
body.page-consultar .btn-primary:hover:not(:disabled),
body.page-sucesso .btn-primary:hover:not(:disabled) {
  background: #000;
  border-color: #000;
  color: #fff;
  text-decoration: none;
}

body.page-home .btn-secondary,
body.page-sucesso .btn-secondary {
  background: #fff;
  color: #111;
  border: 2px solid #111;
  border-radius: 6px;
}
body.page-home .btn-secondary:hover:not(:disabled),
body.page-sucesso .btn-secondary:hover:not(:disabled) {
  background: #111;
  color: #fff;
  text-decoration: none;
}

body.page-home .btn-ghost,
body.page-consultar .btn-ghost {
  background: #fff;
  color: #111;
  border: 1.5px solid #ddd;
  border-radius: 6px;
}
body.page-home .btn-ghost:hover:not(:disabled),
body.page-consultar .btn-ghost:hover:not(:disabled) {
  background: #f4f4f4;
  color: #111;
  text-decoration: none;
}

/* ===========================
   HOME
   =========================== */
.hero {
  max-width: 660px;
  margin: 4.5rem auto 2.5rem;
  text-align: center;
  padding: 0 1.25rem;
}

.hero h2 {
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #111;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.hero p {
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.6rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.home-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2.75rem auto;
  max-width: 560px;
  padding: 0 1.25rem;
}

.home-actions .btn {
  padding: 0.8rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.home-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
}

.info-card {
  background: #f9fafb;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.info-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.5rem;
}
.info-card p {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.65;
}

/* ===========================
   FORMULÁRIO PÚBLICO — REGISTRAR
   =========================== */
.form-wrapper {
  max-width: 740px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.25rem;
}

.form-wrapper > h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.form-intro {
  color: #6b7280;
  margin-bottom: 2rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Seções do formulário — estilo canal-denúncias */
fieldset.form-section {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
  background: #fff;
}

fieldset.form-section legend {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 0 0.5rem;
}

.section-desc {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.contato-aviso {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #1e40af;
  margin-bottom: 1rem;
  line-height: 1.55;
}

/* Input de arquivo estilizado */
.file-input-area {
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
  position: relative;
  display: block;
}
.file-input-area:hover { border-color: #111; background: #fafafa; }
.file-input-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.file-input-text { color: #6b7280; font-size: 0.875rem; pointer-events: none; }
.file-input-text strong { color: #111; }
.file-input-hint { font-size: 0.75rem; color: #9ca3af; margin-top: 0.25rem; }

.file-list { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; }
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  gap: 0.5rem;
}
.file-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.file-item-size { color: #9ca3af; white-space: nowrap; flex-shrink: 0; font-size: 0.8rem; }
.file-item-remove {
  background: none; border: none;
  color: #9ca3af; font-size: 1rem; padding: 0 0.2rem;
  flex-shrink: 0; line-height: 1; transition: color 150ms;
}
.file-item-remove:hover { color: #dc2626; }

/* Botão submit */
.page-registrar .btn-primary.btn-lg {
  background: #111;
  color: #fff;
  border: 2px solid #111;
  padding: 0.875rem 2.25rem;
  font-size: 1rem;
  border-radius: 6px;
  font-weight: 700;
}
.page-registrar .btn-primary.btn-lg:hover:not(:disabled) {
  background: #000;
  border-color: #000;
}

/* ===========================
   SUCESSO
   =========================== */
.sucesso-wrapper {
  max-width: 580px;
  margin: 3rem auto 4rem;
  padding: 0 1.25rem;
}

.sucesso-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
}

.sucesso-icon {
  width: 56px;
  height: 56px;
  background: #111;
  color: #fff;
  font-size: 1.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-weight: 700;
}

.sucesso-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.75rem;
}
.sucesso-card p { color: #6b7280; margin-bottom: 0.5rem; font-size: 0.9375rem; }

.protocolo-box {
  margin: 1.75rem 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
}

.protocolo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  gap: 0.75rem;
}
.protocolo-item:last-child { border-bottom: none; }
.protocolo-item.destaque { background: #f9f9f9; }

.protocolo-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  flex-shrink: 0;
  min-width: 130px;
}

.protocolo-value {
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: #111;
  flex: 1;
}
.protocolo-value.chave { color: #111; }

.btn-copy {
  background: #f4f4f4;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  border-radius: 4px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 150ms, color 150ms, border-color 150ms;
}
.btn-copy:hover { background: #111; color: #fff; border-color: #111; }

.alerta-chave {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #92400e;
  text-align: left;
  margin-bottom: 1.75rem;
  line-height: 1.55;
}

.sucesso-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================
   CONSULTAR
   =========================== */
.consulta-page-wrapper {
  max-width: 500px;
  margin: 3.5rem auto 4rem;
  padding: 0 1.25rem;
}

.consulta-intro { margin-bottom: 1.75rem; }

.consulta-intro h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 0.4rem;
  letter-spacing: -0.025em;
}

.consulta-lead {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.6;
}

.consulta-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 2rem 1.75rem;
}

/* manter compatibilidade com o id existente */
#painel-consulta.consulta-page-wrapper { }

.alerta-bloqueio {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  font-size: 0.875rem;
  color: #dc2626;
}

.resultado-wrapper {
  max-width: 700px;
  margin: 3rem auto 4rem;
  padding: 0 1.25rem;
}

.resultado-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.resultado-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
}

.resultado-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.resultado-row {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  gap: 1rem;
}
.resultado-row:last-child { border-bottom: none; }

.resultado-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9ca3af;
  min-width: 140px;
  flex-shrink: 0;
}
.resultado-value { font-weight: 500; color: #111; }

.mensagens-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
}
.mensagens-section h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 1rem;
}
.mensagens-lista { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.sem-mensagens { color: #9ca3af; font-size: 0.875rem; font-style: italic; }

.mensagem-item {
  padding: 0.85rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  border: 1px solid #e5e7eb;
  line-height: 1.55;
}
.mensagem-item.do-conselho { background: #f9fafb; }
.mensagem-item.do-denunciante { background: #fff; }
.mensagem-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.35rem;
}

.resposta-form {
  margin-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 1.25rem;
}
.resposta-form h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.75rem;
}

/* ===========================
   CONSULTAR — RESULTADO V2
   =========================== */
.resultado-header-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.resultado-header-v2 h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
}

/* Info rows — label: valor na mesma linha */
.resultado-info-row {
  display: flex;
  align-items: baseline;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.resultado-info-row:last-child { border-bottom: none; }

.resultado-info-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  flex-shrink: 0;
}
.resultado-info-value {
  font-size: 0.875rem;
  color: #111;
}

/* Mensagem do Canal */
.canal-msg-card {
  background: #f5f5f5;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.canal-msg-titulo {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.4rem;
}
.canal-msg-texto {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.55;
}

/* Histórico Público */
.historico-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.historico-heading {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 1rem;
}
.historico-lista { display: flex; flex-direction: column; gap: 0.75rem; }
.historico-item {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}
.historico-dot {
  width: 10px;
  height: 10px;
  background: #111;
  border-radius: 50%;
  margin-top: 0.25rem;
  flex-shrink: 0;
}
.historico-conteudo { flex: 1; }
.historico-data {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.15rem;
}
.historico-titulo {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111;
}
.historico-desc {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.2rem;
}

/* Mensagens — sender label acima do texto */
.mensagem-item { border-left: 3px solid #e5e7eb; }
.mensagem-item.do-denunciante { border-left-color: #9ca3af; }
.mensagem-item.do-conselho { border-left-color: #2563eb; }
.mensagem-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.25rem;
}
.mensagem-item.do-conselho .mensagem-meta { color: #2563eb; }
.mensagem-conteudo {
  font-size: 0.875rem;
  color: #111;
  line-height: 1.55;
}

/* Contador de caracteres */
.char-counter-row {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.4rem;
}

/* Ações inferiores */
.resultado-bottom-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-bottom: 1rem;
}

/* ===========================
   LOGIN / REDEFINIR SENHA
   =========================== */
.page-login,
.page-redefinir-senha {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  padding: 1rem;
}

.login-wrapper { width: 100%; display: flex; justify-content: center; }

.login-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111;
  line-height: 1.25;
}

.login-brand-divider {
  width: 28px;
  height: 2px;
  background: #111;
  margin: 0.85rem auto;
  border-radius: 1px;
}

.login-brand-sub {
  font-size: 0.8125rem;
  color: #9ca3af;
}

.login-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.25rem;
}
.login-desc {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.page-login .btn-primary,
.page-redefinir-senha .btn-primary {
  background: #111;
  color: #fff;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
}
.page-login .btn-primary:hover:not(:disabled),
.page-redefinir-senha .btn-primary:hover:not(:disabled) {
  background: #000;
}

.login-links {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.875rem;
}
.login-links a { color: #6b7280; }
.login-links a:hover { color: #111; text-decoration: underline; }

.login-footer-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: #9ca3af;
  border-top: 1px solid #f0f0f0;
  padding-top: 1.25rem;
}
.login-footer-link a { color: #6b7280; }
.login-footer-link a:hover { color: #111; text-decoration: underline; }
