/* ══════════════════════════════
   sinal.css — Página Enviar Sinal
   Herda: style.css · nav.css
   Não repete variáveis nem reset
══════════════════════════════ */

/* ── Body: trava altura total, flex coluna ── */
body.page-sinal {
  height: 100dvh;
  overflow: hidden;
  padding: 0;
  background: #f3f5f7;
  display: flex;
  flex-direction: column;
}

/* Espaçador que empurra conteúdo para baixo da navbar fixa */
body.page-sinal::before {
  content: '';
  display: block;
  flex-shrink: 0;
  height: 64px;
}

/* ══ LAYOUT DUAS COLUNAS 50/50 ══ */
.sinal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 28px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Coluna formulário ── */
.sinal-form-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  padding-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.sinal-form-col::-webkit-scrollbar { width: 5px; }
.sinal-form-col::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ── Coluna preview ── */
.sinal-preview-col {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.sinal-preview-col::-webkit-scrollbar { width: 5px; }
.sinal-preview-col::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ── Cabeçalho do formulário ── */
.sinal-form-header { margin-bottom: 22px; }

.sinal-tag {
  display: inline-block;
  background: var(--verde-light);
  color: var(--verde-sicredi);
  font-family: var(--font-principal);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 8px;
}

.sinal-title {
  font-family: var(--font-principal);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.25;
  margin-bottom: 8px;
}

.sinal-desc {
  font-family: var(--font-secundaria);
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Blocos de seção ── */
.sinal-block {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 14px;
  padding: 16px 18px 18px;
  margin-bottom: 14px;
}

.sinal-block-title {
  font-family: var(--font-principal);
  font-size: .82rem;
  font-weight: 800;
  color: #1a3a5c;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Form groups ── */
.form-group { display: flex; flex-direction: column; }

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.14);
  font-family: var(--font-secundaria);
  font-size: .88rem;
  color: var(--text-primary);
  background: var(--bg-input);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--verde-sicredi);
  box-shadow: 0 0 0 3px rgba(63,161,16,.10);
}

.form-group textarea { resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

.field-hint {
  display: block;
  font-size: .74rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Range empilhado ── */
.range-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.range-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.range-wrap label {
  margin: 0;
  min-width: 90px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-heading);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.range-wrap input[type="range"] { flex: 1; cursor: pointer; }

.range-wrap span {
  min-width: 52px;
  text-align: right;
  font-weight: 800;
  color: var(--verde-sicredi);
  font-family: var(--font-principal);
  font-size: .82rem;
}

/* ── Bloco fieldset ── */
.form-block {
  background: #f9fafb;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 12px 12px 14px;
  margin-top: 8px;
}

/* ── Pills ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.pill-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  color: #334155;
  font-family: var(--font-principal);
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease,
              border-color .2s ease, box-shadow .2s ease;
  user-select: none;
}

.pill:hover {
  transform: translateY(-1px);
  border-color: rgba(63,161,16,.35);
  box-shadow: 0 4px 14px rgba(0,0,0,.07);
}

.pill-group input[type="radio"]:checked + label.pill {
  background: rgba(63,161,16,.12);
  border-color: rgba(63,161,16,.55);
  color: var(--verde-county);
  box-shadow: inset 0 0 0 2px rgba(63,161,16,.10);
}

.pill-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9);
  flex-shrink: 0;
}

/* ── Links grid ── */
.links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.btn-mini {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #111827;
  color: #fff;
  font-family: var(--font-principal);
  font-weight: 800;
  font-size: .82rem;
  cursor: pointer;
  transition: background .2s ease;
  white-space: nowrap;
}

.btn-mini:hover { background: #0b1220; }

.links-preview {
  list-style: none;
  margin-top: 10px;
  padding: 0;
  display: grid;
  gap: 7px;
}

.links-preview li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid rgba(0,0,0,.06);
}

.links-preview a {
  color: #1a7acc;
  text-decoration: none;
  font-weight: 700;
  font-size: .83rem;
  line-height: 1.3;
}

.links-preview a:hover { text-decoration: underline; }

.link-meta {
  font-size: .76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.link-remove {
  margin-left: auto;
  background: rgba(239,68,68,.10);
  color: #b91c1c;
  border: 1px solid rgba(239,68,68,.22);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-weight: 800;
  font-family: var(--font-principal);
  font-size: .76rem;
  flex-shrink: 0;
  transition: background .2s ease;
}

.link-remove:hover { background: rgba(239,68,68,.20); }

/* ── Submit bar ── */
.submit-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Botão Enviar Sinal ── */
.d-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: var(--verde-sicredi);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-principal);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(63,161,16,.28);
}

.d-cta:hover {
  background: var(--verde-escuro);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(63,161,16,.36);
}

.d-cta:active { transform: translateY(0); box-shadow: none; }

.d-cta:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ══ PREVIEW LABEL ══ */
.preview-label {
  font-family: var(--font-principal);
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: sticky;
  top: 0;
  background: #f3f5f7;
  padding: 4px 0 8px;
  z-index: 2;
}

/* ── Preview card ── */
.preview-card {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 32px rgba(0,0,0,.14);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
}

/* ── Hero placeholder ── */
.hero-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #146E37, #3FA110 50%, #003815);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img-placeholder svg {
  width: 72px;
  height: 72px;
  opacity: .32;
}

/* ── card-body ── */
.card-body { padding: 18px 20px 20px; }

.card-section { margin-bottom: 16px; padding: 1px; }
.card-section:last-child { margin-bottom: 0; }

/* ── Badge row ── */
.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.steep-badge--acao {
  background: rgba(22,163,74,.10) !important;
  color: var(--verde-escuro) !important;
  border: 1px solid rgba(22,163,74,.28) !important;
}

/* ── Links na preview ── */
.link-source {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 2px;
  word-break: break-all;
}

/* ── Progresso horizontal (preview) ── */
.progress-item { margin-bottom: 10px; }
.progress-track { display: flex; gap: 4px; margin-top: 4px; }

/* ── Chart wrap ── */
.chart-wrap { position: relative; width: 100%; }

/* ══════════════════════════════
   ESTILOS DO DRAWER usados no preview
   (evita dependência de radar.css)
══════════════════════════════ */
.counter-line {
  display: block;
  font-family: var(--font-principal);
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.finding-context {
  font-family: var(--font-secundaria);
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.finding-context strong { color: var(--verde-sicredi); }

.finding-title {
  font-family: var(--font-principal);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 4px;
}

.block-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--font-principal);
  font-size: .78rem;
  font-weight: 800;
  color: #1a3a5c;
  margin-bottom: 8px;
}

.description {
  font-family: var(--font-secundaria);
  font-size: .86rem;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-line;
}

.committee-text {
  font-family: var(--font-secundaria);
  font-size: .86rem;
  color: var(--text-secondary);
  line-height: 1.75;
  white-space: pre-line;
}

.steep-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-principal);
  font-size: .76rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.steep-badge {
  background: #e8f0fb;
  color: #1a3a5c;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .75rem;
  font-weight: 700;
  font-family: var(--font-principal);
  border: 1px solid transparent;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 14px 0;
}

.trl-track {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  margin-top: 6px;
}

.trl-seg {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: #e2e8f0;
}

.trl-seg.filled { background: var(--verde-sicredi); }

.trl-numbers {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.progress-seg {
  flex: 1;
  height: 12px;
  border-radius: 4px;
  background: #e2e8f0;
}

.progress-seg.filled-sgreen { background: #44e980; }
.progress-seg.filled-green  { background: #16a34a; }

.links-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

.links-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid rgba(0,0,0,.06);
}

.links-list a {
  color: #1a7acc;
  text-decoration: none;
  font-weight: 700;
  font-size: .84rem;
}

.links-list a:hover { text-decoration: underline; }

.link-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* ══ RESPONSIVO ══ */
@media (max-width: 1024px) {
  body.page-sinal {
    height: auto;
    overflow: visible;
  }
  body.page-sinal::before { height: 64px; }
  .sinal-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
    padding-bottom: 40px;
    flex: none;
  }
  .sinal-form-col,
  .sinal-preview-col {
    height: auto;
    min-height: unset;
    overflow: visible;
    padding-right: 0;
  }
  .sinal-preview-col { order: -1; }
}

@media (max-width: 720px) {
  .form-row    { grid-template-columns: 1fr; }
  .links-grid  { grid-template-columns: 1fr; }
  .sinal-layout { padding: 0 14px; }
  .hero-img-placeholder { height: 140px; }
}