/* =========================================================
   VARIÁVEIS
========================================================= */
:root{
  --blue-900:#223447;
  --blue-800:#2b3f55;
  --blue-700:#33506c;

  --accent:#2f6fb3;
  --accent-2:#1f5ea1;

  --text:#0f172a;
  --muted:#516070;
  --border: rgba(15,23,42,.14);

  --bg:#eef3f8;
  --card-radius: 14px;
}

/* =========================================================
   BASE
========================================================= */
body{
  color: var(--text);
  background:
    radial-gradient(1000px 600px at 10% 0%, rgba(47,111,179,.10), transparent 60%),
    radial-gradient(1000px 600px at 90% 10%, rgba(34,52,71,.12), transparent 55%),
    var(--bg);
  min-height: 100vh;
}

.page-shell{
  max-width: 1100px;
}

/* =========================================================
   CARTÃO PRINCIPAL
========================================================= */
.card-form{
  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--card-radius);
  box-shadow: 0 14px 34px rgba(15,23,42,.12);
  overflow: hidden;
  background: #fff;
}

/* =========================================================
   HEADER
========================================================= */
.form-header{
  background: linear-gradient(180deg, var(--blue-900), var(--blue-800));
  color:#fff;
  padding: 18px 22px;
  border-bottom: 4px solid rgba(255,255,255,.12);
}

.form-header .brand-row{
  display:flex;
  align-items:center;
  gap: 25px;
  flex-wrap: nowrap;
}

.form-header .brand-logo{
  flex: 0 0 auto;
  background: #fff;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.20);
}

.form-header .brand-logo img{
  height: 80px;
  width: auto;
  display:block;
  object-fit: contain;
}

.form-header .flex-grow-1{
  min-width: 0;
}

.brand-title{
  margin:0;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .2px;
}

.brand-sub{
  margin-top: 6px;
  opacity: .88;
  line-height: 1.35;
  max-width: 900px;
}

.sec-badge{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.20);
  color:#fff;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15,23,42,.18);
}

.sec-badge i{
  font-size: 1rem;
}

.sec-badge-text{
  font-size: .8rem;
}

/* =========================================================
   HEADER — MOBILE
========================================================= */
@media (max-width: 576px){
  .form-header .brand-row{
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }

  .form-header .brand-logo img{
    height: 70px;
  }

  .form-header .flex-grow-1 > .d-flex{
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .form-header .sec-badge{
    align-self: flex-start !important;
    margin: 0 auto;
  }

  .brand-sub{
    max-width: 100%;
  }
}

/* =========================================================
   CORPO
========================================================= */
.form-body{
  background: linear-gradient(180deg, rgba(34,52,71,.06), rgba(34,52,71,0) 140px);
  padding: 22px;
}

@media (min-width: 768px){
  .form-body{
    padding: 30px;
  }
}

.stack > * + *{
  margin-top: 14px;
}

.hint{
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.45;
}

/* =========================================================
   AVISO INICIAL
========================================================= */
.notice{
  border: 1px solid rgba(47,111,179,.18);
  background: rgba(47,111,179,.06);
  border-radius: 12px;
  padding: 12px 14px;
}

.notice-legend{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  color: #516070;
  margin-top: 6px;
}

/* =========================================================
   SEÇÕES
========================================================= */
.form-section{
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  box-shadow: 0 4px 14px rgba(15,23,42,.06);
  margin-bottom: 28px;
  position: relative;
  overflow: visible;
}

.form-section:last-of-type{
  margin-bottom: 0;
}

.form-section:last-of-type::after{
  display:none;
}

.section-topline{
  height: 6px;
  background: linear-gradient(90deg, rgba(47,111,179,.45), rgba(47,111,179,.12));
}

.section-inner{
  padding: 18px;
  overflow: visible;
}

@media (min-width: 768px){
  .section-inner{
    padding: 20px 22px;
  }
}

/* =========================================================
   OPÇÕES
========================================================= */
.option-row{
  display:flex;
  align-items:center;
  gap:.55rem;
  padding: 7px 0;
}

.form-check-input{
  margin: 0 !important;
  cursor: pointer;
}

.option-label{
  cursor: pointer;
  line-height: 1.35;
  margin: 0;
  color: var(--text);
}

.option-row:hover .option-label{
  color: var(--accent);
}

.form-check-input:checked{
  border-color: var(--accent);
  background-color: var(--accent);
}

.form-check-input:checked + .option-label{
  color: var(--accent-2);
  font-weight: 600;
}

/* =========================================================
   INPUTS
========================================================= */
.form-control{
  border-radius: 12px;
  border-color: rgba(15,23,42,.18);
  padding: 12px;
}

.form-control:focus{
  border-color: rgba(47,111,179,.55);
  box-shadow: 0 0 0 .25rem rgba(47,111,179,.14);
}

/* =========================================================
   ANEXOS
========================================================= */
.file-drop{
  border: 2px dashed rgba(47,111,179,.30);
  border-radius: 12px;
  padding: 14px;
  background: rgba(47,111,179,.05);
}

.file-drop.dragover{
  border-color: rgba(47,111,179,.75);
  background: rgba(47,111,179,.10);
}

/* =========================================================
   BOTÕES
========================================================= */
.btn.btn-brand{
  background: var(--accent);
  border: 1px solid rgba(15,23,42,.18);
  color: #fff !important;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: .2px;
  padding: 11px 22px;
  box-shadow: 0 8px 16px rgba(15,23,42,.12);
  transition: background-color .12s ease, transform .12s ease, box-shadow .12s ease;
}

.btn.btn-brand:hover{
  background: var(--accent-2);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15,23,42,.14);
}

.btn.btn-brand:active{
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(15,23,42,.12);
}

.btn.btn-brand:focus-visible{
  outline: none;
  box-shadow: 0 0 0 .25rem rgba(47,111,179,.25), 0 10px 18px rgba(15,23,42,.14);
}

.btn.btn-brand:disabled,
button[data-loading="1"]:disabled,
input[type="submit"][data-loading="1"]:disabled{
  cursor: not-allowed;
  opacity: .75;
}

#denunciaForm .btn.btn-brand{
  min-width: 140px;
}

a[data-loading="1"].disabled{
  pointer-events: none;
  opacity: .75;
  cursor: wait;
}

/* =========================================================
   RODAPÉ
========================================================= */
.form-footer{
  background: linear-gradient(180deg, #2b3f55, #223447);
  color: rgba(255,255,255,.85);
  padding: 12px 18px;
  text-align: center;
}

.form-footer .small{
  font-size: .78rem;
}

/* =========================================================
   ASTERISCO OBRIGATÓRIO + TOOLTIP
========================================================= */
.req{
  position: relative;
  color:#b42318;
  font-weight: 700;
  margin-left: .25rem;
  cursor: help;
  display: inline-block;
}

.req::after{
  content: "Questão de resposta obrigatória.";
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #223447;
  color: #fff;
  font-size: .75rem;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  z-index: 9999;
}

.req::before{
  content:"";
  position:absolute;
  top: calc(100% + 4px);
  left:50%;
  transform: translateX(-50%);
  border-width:6px;
  border-style:solid;
  border-color: transparent transparent #223447 transparent;
  opacity:0;
  transition: opacity .15s ease;
  z-index: 9998;
}

.req:hover::after,
.req:hover::before{
  opacity:1;
}

@media (max-width: 768px){
  .req{
    cursor: default;
  }

  .req::after,
  .req::before{
    display:none;
  }
}

/* =========================================================
   AÇÕES DO FORMULÁRIO
========================================================= */
.form-actions{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 18px;
  gap: 12px;
}

.form-actions .hint{
  max-width: 760px;
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
}

/* =========================================================
   LOADING GLOBAL — FORMULÁRIOS / BOTÕES / LINKS
========================================================= */
.canal-loading-active{
  cursor: progress;
}

.submit-overlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.submit-overlay.d-none{
  display: none !important;
}

.submit-box{
  width: min(520px, 100%);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
  padding: 1.4rem;
  text-align: center;
  border: 1px solid rgba(15,23,42,.12);
}

.submit-box-title{
  font-weight: 800;
  color: #172033;
  margin-top: .75rem;
  margin-bottom: .4rem;
}

.submit-box-text{
  color: #475569;
  font-size: .94rem;
  margin-bottom: 0;
}