/* =========================================
   ACATARINENSE – Formulário de Ocorrência
   Paleta: Azul marinho #0A1F44, Vermelho #C0392B,
           Branco #FFFFFF, Cinza claro #F4F6FA
   Fonte: Barlow + Barlow Condensed
   ========================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #0A1F44;
  --navy-mid:  #122d60;
  --navy-light:#1a3f7c;
  --red:       #C0392B;
  --red-dark:  #a93226;
  --white:     #FFFFFF;
  --off-white: #F4F6FA;
  --gray-100:  #EEF1F7;
  --gray-200:  #DDE2EE;
  --gray-400:  #9AAAC4;
  --gray-600:  #5A6A8A;
  --gray-800:  #2C3A52;
  --success:   #1a7a4a;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(10,31,68,.08);
  --shadow:    0 4px 20px rgba(10,31,68,.12);
  --shadow-lg: 0 8px 40px rgba(10,31,68,.18);
  --transition: .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  color: var(--gray-800);
  background: var(--off-white);
  line-height: 1.6;
}

/* ========== HEADER ========== */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,.3);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo-link { text-decoration: none; display: flex; flex-direction: column; }
.logo-text { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 800; line-height: 1; }
.logo-a { color: var(--red); }
.logo-cat { color: var(--white); }
.logo-sub { font-size: 9px; letter-spacing: 2.5px; color: var(--gray-400); text-transform: uppercase; margin-top: 2px; }
.header-nav { display: flex; align-items: center; gap: 28px; }
.header-nav a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: color var(--transition);
}
.header-nav a:hover { color: var(--white); }
.btn-boleto {
  background: var(--red) !important;
  color: var(--white) !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-sm) !important;
  transition: background var(--transition) !important;
}
.btn-boleto:hover { background: var(--red-dark) !important; }

/* ========== HERO ========== */
.hero-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, #1a3f7c 100%);
  padding: 56px 24px 72px;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-shape {
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 40px;
  background: var(--off-white);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero-content h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.1;
  margin-bottom: 14px;
}
.hero-content p {
  font-size: 16px;
  color: rgba(255,255,255,.75);
  max-width: 560px;
  margin: 0 auto;
}

/* ========== STEPS BAR ========== */
.steps-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 24px;
  position: sticky;
  top: 68px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}
.steps-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: .4;
  transition: opacity .3s;
}
.step.active { opacity: 1; }
.step.done { opacity: .75; }
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2.5px solid var(--gray-200);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  color: var(--gray-400);
  transition: all .3s;
  flex-shrink: 0;
}
.step.active .step-num {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}
.step.done .step-num {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.step span { font-size: 12px; font-weight: 600; color: var(--gray-600); white-space: nowrap; }
.step.active span { color: var(--navy); }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  min-width: 24px;
  max-width: 60px;
}

/* ========== FORM WRAPPER ========== */
.form-wrapper {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* ========== FORM STEP ========== */
.form-step { display: none; animation: fadeSlide .35s ease; }
.form-step.active { display: block; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========== SECTION HEADER ========== */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--gray-100);
}
.section-icon {
  width: 52px; height: 52px;
  background: var(--navy);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.section-header h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 2px;
}
.section-header p { font-size: 13px; color: var(--gray-600); }

/* ========== SUB SECTION ========== */
.sub-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.sub-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
}

/* ========== FORM GRID ========== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 4px;
}

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group.col-1 { grid-column: span 1; }
.field-group.col-2 { grid-column: span 2; }

.field-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  letter-spacing: .3px;
}
.req { color: var(--red); }

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  color: var(--gray-800);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(26,63,124,.12);
}
.field-group input::placeholder,
.field-group textarea::placeholder { color: var(--gray-400); }
.field-group input.error,
.field-group select.error { border-color: var(--red); }
.field-group textarea { resize: vertical; min-height: 80px; }
.field-group select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A6A8A' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field-group small { font-size: 11px; color: var(--gray-600); }

/* ========== RADIO & CHECKBOX ========== */
.radio-group, .checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 2px;
}
.checkbox-grid { gap: 8px; }

.radio-option, .check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 9px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: all var(--transition);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-800);
  user-select: none;
}
.radio-option:hover, .check-option:hover { border-color: var(--navy-light); background: var(--gray-100); }
.radio-option input, .check-option input { accent-color: var(--navy); cursor: pointer; }
.radio-option input:checked ~ span, .check-option input:checked ~ span { color: var(--navy); font-weight: 600; }

.declaracao-check {
  border-color: var(--navy-light);
  background: rgba(10,31,68,.03);
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
  align-items: flex-start;
}

/* ========== UPLOAD AREA ========== */
.upload-info { font-size: 12px; color: var(--gray-600); margin-bottom: 10px; }
.upload-area {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
}
.upload-area:hover { border-color: var(--navy-light); background: var(--gray-100); }
.upload-icon { font-size: 36px; margin-bottom: 8px; }
.upload-text { font-weight: 600; color: var(--navy); font-size: 14px; }
.upload-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gray-100);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--gray-800);
}
.file-item .file-remove {
  background: none; border: none; cursor: pointer;
  color: var(--red); font-size: 16px; padding: 0 4px;
}

/* ========== TERCEIRO CARD ========== */
.terceiro-card {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.terceiro-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--navy);
  margin-bottom: 14px;
}
.btn-add-terceiro {
  background: none;
  border: 2px dashed var(--navy-light);
  border-radius: var(--radius);
  color: var(--navy);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
  transition: all var(--transition);
}
.btn-add-terceiro:hover { background: var(--gray-100); }

/* ========== STEP ACTIONS ========== */
.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-100);
}

.btn-next, .btn-back, .btn-submit {
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  letter-spacing: .5px;
}
.btn-next {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(10,31,68,.25);
}
.btn-next:hover { background: var(--navy-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(10,31,68,.3); }
.btn-back {
  background: var(--white);
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
}
.btn-back:hover { background: var(--gray-100); color: var(--navy); border-color: var(--navy-light); }
.btn-submit {
  background: var(--red);
  color: var(--white);
  font-size: 15px;
  padding: 14px 36px;
  box-shadow: 0 4px 16px rgba(192,57,43,.3);
}
.btn-submit:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* ========== SUCCESS MESSAGE ========== */
.success-message {
  text-align: center;
  padding: 60px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-width: 560px;
  margin: 40px auto;
}
.success-icon { font-size: 56px; margin-bottom: 16px; }
.success-message h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.success-message p { color: var(--gray-600); margin-bottom: 12px; }
.protocol-box {
  background: var(--navy);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 3px;
  padding: 18px 32px;
  border-radius: var(--radius);
  display: inline-block;
  margin: 16px 0 20px;
}
.btn-home {
  display: inline-block;
  margin-top: 16px;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background var(--transition);
}
.btn-home:hover { background: var(--navy-light); }

/* ========== FOOTER ========== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 48px 24px 0;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-logo { margin-bottom: 8px; }
.footer-logo .logo-cat { color: rgba(255,255,255,.8); }
.footer-brand p { font-size: 13px; line-height: 1.6; max-width: 300px; }
.footer-contact h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--white); margin-bottom: 12px;
}
.footer-contact p { font-size: 13px; margin-bottom: 6px; }
.footer-bottom {
  text-align: center;
  padding: 16px 0;
  font-size: 11px;
  color: rgba(255,255,255,.4);
}

/* ========== UTILITIES ========== */
.hidden { display: none !important; }

/* ========== ERROR TOOLTIP ========== */
.field-error {
  font-size: 11px;
  color: var(--red);
  font-weight: 500;
  margin-top: 2px;
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(10,31,68,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}
.loading-spinner {
  background: var(--white);
  padding: 32px 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-spinner p { font-weight: 600; color: var(--navy); }

/* ========== DRAG & DROP ========== */
.upload-area.drag-over {
  border-color: var(--navy);
  background: rgba(10,31,68,.04);
  transform: scale(1.01);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  .header-nav { display: none; }
  .steps-bar { top: 68px; }
  .steps-inner { gap: 0; }
  .step span { display: none; }
  .step-line { min-width: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-group.col-2 { grid-column: span 1; }
  .step-actions { flex-direction: column-reverse; }
  .btn-next, .btn-back, .btn-submit { width: 100%; justify-content: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-banner { padding: 40px 20px 60px; }
}

@media (max-width: 440px) {
  .radio-group { flex-direction: column; }
  .radio-option, .check-option { width: 100%; }
}


/* FIX UPLOAD ONLINE: o input fica invisível por cima da área inteira.
   Assim o clique abre a janela de arquivos mesmo em servidores/navegadores
   que bloqueiam click() via JavaScript ou label com input display:none. */
.upload-area { position: relative; overflow: hidden; user-select: none; }
.upload-area .upload-icon,
.upload-area .upload-text,
.upload-area .upload-hint { position: relative; z-index: 1; pointer-events: none; }
.file-input-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}
