/* =======================================================
   STYLE ORGANIZADO - Canal de Denúncias (ATUALIZADO)
   - Imagem lateral com width: 300px
   - Fade-in suave na imagem
   - Variáveis, estados, responsividade
======================================================= */

/* ---------------------------
   Variáveis (fácil ajuste)
   --------------------------- */
:root {
  --bg: #22252a;
  --text: #000000;
  --header-bg: #2d3035;
  --header-text: #c8c9cc;
  --card-bg: #c8c9cc;
  --muted: #666666;
  --primary-border: #000;
  --danger: #e5602f;
  --danger-soft: rgba(177, 1, 1, 0.08);
  --success: #03b338;
  --success-soft: rgb(6, 233, 74);
  --toggle-accent: rgb(238, 93, 9);
  --bg: #22252a;
  --tooltip-bg: #44474b;
  --image-width-desktop: 300px;
}

/* ------- fixes para header fixo e footer fixo ------- */
:root {
  --header-height: 85px;
}

body {
  padding-top: var(--header-height);
}

@media (min-width: 992px) {
  main {
    padding-bottom: 90px;
  }
}

html,
body {
  overflow-x: hidden;
}

main {
  max-width: 1200px;
  margin-left: center;
  margin-right: center;
  box-sizing: border-box;
}

/* =======================================================
   RESET & BASE
======================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.35;
}

/* =======================================================
   HEADER / LOGOS
======================================================= */
header {
  background: var(--header-bg);
  color: var(--header-text);
  display: flex;
  align-items: center;
  justify-content: CENTER;
  padding: 0 clamp(10px, 4vw, 30px);
  position: centered;
  top: 0;
  left: 0;
  right: 50;
  z-index: 1000;
  height: 85px;
  width: 100%;
  box-sizing: border-box;
}

header .logo-container {
  display: flex;
  gap: 14px;
  align-items: overlap;
}

header .logo-container img {
  height: 56px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

/* =======================================================
   MAIN / LAYOUT
======================================================= */
main {
  padding: 30px;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1 0 auto;
}

/* Card base */
.card.form-card {
  background: var(--card-bg);
  padding: 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: box-shadow .18s ease, border-color .18s ease, transform .12s ease;
}

/* States on card */
.card.form-card.form-invalid {
  border: 2px solid var(--danger);
  box-shadow: 0 8px 20px var(--danger-soft);
}

.card.form-card.form-valid {
  border: 2px solid var(--success);
  box-shadow: 0 8px 20px var(--success-soft);
}

/* shake animation */
@keyframes shakeX {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-8px);
  }

  40% {
    transform: translateX(8px);
  }

  60% {
    transform: translateX(-6px);
  }

  80% {
    transform: translateX(6px);
  }

  100% {
    transform: translateX(0);
  }
}

.card.form-card.shake {
  animation: shakeX .80s ease;
}

/* =======================================================
   SEÇÃO HOME / SEGURANÇA
======================================================= */
.seguranca {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background-color: #0b0b0b;
  color: #f5f5f5;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
  margin-top: 5%;
}

.texto {
  flex: 1 1 420px;
  max-width: 620px;
  min-width: 280px;
}

.texto h1 {
  font-size: 2.5rem;
  margin: 0 0 18px 0;
}

.imagem {
  flex: 0 0 auto;
  width: var(--image-width-desktop);
  max-width: 38%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.imagem img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  opacity: 0;
  transform: translateY(6px);
  animation: fadeInUp .45s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =======================================================
   FORM
======================================================= */
.form-row {
  margin-bottom: 18px;
}

.form-card label {
  display: block;
  font-weight: 700;
  color: #585555;
  margin-bottom: 8px;
}

.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  font-size: 15px;
  background: #fff;
}

.hidden {
  display: none !important;
}

/* =======================================================
   BUTTONS
======================================================= */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: all .12s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: #e5e5e5;
  color: #000;
  border-color: var(--primary-border);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: #000;
  color: #fff;
  border-color: #444;
}

.btn-secondary:hover {
  transform: translateY(-2px);
}

.btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* =======================================================
   TOGGLE SIM/NÃO
======================================================= */
.toggle-group {
  display: flex;
  gap: 12px;
  margin: 8px 0 18px 0;
}

.toggle-option {
  position: relative;
}

.toggle-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-option label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #f5f5f5;
  border-radius: 12px;
  font-weight: 700;
  color: var(--toggle-accent);
  border: 1px solid #494848;
  cursor: pointer;
  transition: all .15s ease;
}

.toggle-option input[type="radio"]:checked+label {
  background: #fff;
  color: var(--danger);
  border-color: rgba(177, 1, 1, 0.18);
  transform: translateY(-2px);
}

.dot {
  width: 18px;
  height: 18px;
  border: 2px solid var(--danger);
  border-radius: 50%;
}

.toggle-option input[type="radio"]:checked+label .dot {
  background: var(--danger);
}

/* =======================================================
   INFO ICON / TOOLTIP
======================================================= */
.label-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 700;
  color: rgb(16, 17, 19);
}

.info-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ccc;
  color: #333;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background .18s ease, color .18s ease;
}

.info-icon:hover,
.info-icon:focus {
  background: var(--danger);
  color: #fff;
}

.info-tooltip {
  position: absolute;
  top: 28px;
  left: 0;
  width: 260px;
  background: var(--tooltip-bg);
  color: #fff;
  padding: 12px 14px;
  font-size: .85rem;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.info-icon:hover .info-tooltip,
.info-icon:focus .info-tooltip {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* =======================================================
   TEXTAREA VALIDATION
======================================================= */
textarea {
  transition: border-color .18s ease, box-shadow .18s ease;
  min-height: 140px;
  resize: vertical;
}

textarea.invalid {
  border: 2px solid var(--danger) !important;
  box-shadow: 0 4px 12px var(--danger-soft);
}

textarea.valid {
  border: 2px solid var(--success) !important;
  box-shadow: 0 4px 12px var(--success-soft);
}

#desc-count {
  font-size: .95rem;
  color: var(--muted);
}

#desc-count.warn {
  color: #b36b00;
}

#desc-count.over {
  color: var(--danger);
}

.form-error {
  color: var(--danger);
  font-weight: 700;
  margin-top: 8px;
}

/* =======================================================
   FOOTER
======================================================= */
footer {
  width: 100%;
  background: var(--header-bg);
  color: var(--header-text);
  text-align: center;
  padding: 16px 12px;
  font-size: 0.95rem;
  box-sizing: border-box;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

footer p {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

@media (min-width: 992px) {
  footer {
    /* position: fixed; */
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
  }

  main {
    padding-bottom: 80px;
  }
}

@media (max-width: 991px) {
  footer {
    position: static;
  }

  main {
    padding-bottom: 20px;
  }
}

/* =======================================================
   RESPONSIVE EXTRAS
======================================================= */
@media (max-width: 900px) {
  .seguranca {
    padding: 22px;
  }

  .texto h1 {
    font-size: 1.8rem;
  }

  .imagem {
    width: 100%;
    max-width: 100%;
    margin-top: 18px;
    order: 2;
    flex: 1 1 100%;
  }
}

@media (max-width: 800px) {
  header .logo-container img {
    height: 44px;
  }

  main {
    padding: 18px;
  }

  .card.form-card {
    padding: 16px;
  }

  .info-tooltip {
    width: 220px;
    left: auto;
    right: 0;
  }
}

/* =======================================================
   TERMOS — NOVA ETAPA (mantendo padrão visual)
======================================================= */
.termo-intro {
  color: #444;
  margin-bottom: 14px;
}

.termo-lista {
  margin: 10px 0 18px 18px;
  color: #444;
}

.termo-alerta {
  background: #e5e5e5;
  border-left: 4px solid var(--danger);
  padding: 12px;
  border-radius: 8px;
  margin: 18px 0;
  font-size: .95rem;
}

.termo-checklist {
  margin: 10px 0 18px 18px;
  color: #333;
}

.termo-checklist li::-ms-check {
  content: "✔ ";
  color: var(--danger);
  font-weight: bold;
}

.termo-consent {
  margin: 18px 0;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fafafa;
}

.termo-consent input {
  margin-right: 8px;
}

/* ====== Comportamento padrão (demais páginas) ====== */
.titulo-site {
  text-align: left;
  margin: 2% 0 2px 0;
  color: #ccc;
  font-size: 40px;
}

/* ====== INDEX — comportamento exclusivo ====== */
body.home-index header {
  justify-content: center;
}

body.home-index .logo-container {
  justify-content: center;
}

body.home-index .titulo-index {
  text-align: center;
  margin-top: 14px;
  margin-bottom: 14px;
}

/* Página Termos — logos no centro e título à esquerda */
body.page-termos header {
  justify-content: center;
}

body.page-termos .logo-container {
  justify-content: center;
}

/* Título alinhado à esquerda */
body.page-termos .titulo-site,
body.page-termos header p,
body.page-termos h1 {
  text-align: left !important;
  margin-left: 0;
}


/* Checkbox após o texto (Termos) */
.termo-consent-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.termo-consent-inline input {
  width: 18px;
  height: 18px;
}

body.home-index .titulo-denuncia-index {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  /* opcional */
}

/* =======================================================
   ACTIONS ROW — empilha botões em telas pequenas
======================================================= */
.actions-row {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
}

/* =======================================================
   DENUNCIA CENTRAL — centraliza o card do formulário
======================================================= */
.denuncia-central {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-bottom: 20px;
}

.denuncia-central .form-card {
  max-width: 740px;
  width: 100%;
}

/* =======================================================
   INFO GRID — grid responsivo no modal de acompanhamento
======================================================= */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 0.92rem;
}

/* =======================================================
   ADMIN WRAP E CARDS
======================================================= */
.admin-wrap {
  max-width: 960px;
}

.card-admin {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e5e5;
}

.animate-fade {
  animation: fadeInCard 0.3s ease;
}

@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.88rem;
  background: #fff;
}

.card-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.card-admin-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* =======================================================
   MOBILE (≤ 640px)
======================================================= */
@media (max-width: 640px) {
  :root {
    --header-height: 68px;
  }

  header {
    height: 68px;
  }

  body {
    padding-top: 68px;
  }

  header .logo-container img {
    height: 40px;
  }

  .titulo-site {
    font-size: 24px;
    text-align: center;
    padding: 0 12px;
    margin: 10px 0 6px;
  }

  main {
    padding: 12px;
  }

  .card.form-card {
    padding: 14px 12px;
  }

  /* Home */
  .seguranca {
    flex-direction: column !important;
    padding: 14px 12px;
    margin-top: 6px;
    gap: 12px;
  }

  .texto {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .texto h1 {
    font-size: 1.4rem !important;
  }

  .texto ul {
    padding-left: 18px;
  }

  .imagem {
    width: 60% !important;
    max-width: 60% !important;
    margin: 0 auto;
    order: -1;
  }

  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  /* Actions row */
  .actions-row {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .actions-row>.btn,
  .actions-row>a.btn,
  .actions-row>button {
    width: 100% !important;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
  }

  /* Toggle group */
  .toggle-group {
    flex-direction: column !important;
  }

  .toggle-option label {
    width: 100%;
    box-sizing: border-box;
  }

  /* Info grid */
  .info-grid {
    grid-template-columns: 1fr !important;
  }

  /* Admin cards */
  .card-admin-header {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .card-admin-btns {
    width: 100%;
  }

  .card-admin-btns>* {
    flex: 1 1 calc(50% - 4px) !important;
    min-width: 0;
    text-align: center;
    justify-content: center;
    font-size: 0.82rem;
    padding: 7px 6px;
  }
}

/* =======================================================
   EXTRA SMALL (≤ 420px)
======================================================= */
@media (max-width: 420px) {
  :root {
    --header-height: 58px;
  }

  header {
    height: 58px;
  }

  body {
    padding-top: 58px;
  }

  header .logo-container img {
    height: 32px;
  }

  .titulo-site {
    font-size: 20px;
  }

  .texto h1 {
    font-size: 1.15rem !important;
  }

  .btn {
    padding: 9px 12px;
    font-size: 13px;
  }

  .imagem {
    width: 55% !important;
    max-width: 55% !important;
  }

  .card-admin-btns>* {
    flex: 1 1 100% !important;
  }
}