/* =============================================
   inflacao.css
   ============================================= */

.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-hint);
  text-decoration: none;
  margin-bottom: 20px;
  transition: color .2s;
}
.back-link:hover { color: var(--text-primary); }

/* ===== MODOS ===== */
.modos-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modo-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-secondary);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 18px;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

.modo-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.modo-btn.active {
  background: rgba(108,58,255,0.2);
  border-color: rgba(108,58,255,0.5);
  color: #fff;
}

.modo-icon  { font-size: 18px; }
.modo-label { white-space: nowrap; }

/* ===== FORMULÁRIO ===== */
.inf-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  max-width: 760px;
  margin-bottom: 32px;
}

.inf-form-header { margin-bottom: 24px; }

.form-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.inf-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  margin-bottom: 28px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s;
}
.input-wrap:focus-within { border-color: var(--c1); }

.input-prefix,
.input-suffix {
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  align-self: stretch;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.input-prefix { border-right: 1px solid var(--border); }
.input-suffix  { border-left:  1px solid var(--border); }

.input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  padding: 12px 14px;
  width: 100%;
}
.input-wrap input::placeholder { color: var(--text-placeholder); }

.input-group select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  padding: 12px 16px;
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
}
.input-group select:focus { border-color: var(--c1); }

.btn-calcular {
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 15px;
  padding: 14px 40px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 0 24px rgba(108,58,255,0.35);
}
.btn-calcular:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(108,58,255,0.55);
}

/* ===== RESULTADOS ===== */
.inf-results {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-card.highlight {
  border-color: rgba(108,58,255,0.5);
  background: rgba(108,58,255,0.1);
}

.result-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.result-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.result-card.highlight .result-value { color: var(--c2); }

/* ===== DIAGNÓSTICO ===== */
.diagnostico {
  border-radius: 16px;
  padding: 18px 24px;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid;
}
.diagnostico.positivo { background: rgba(58,255,163,0.08);  border-color: rgba(58,255,163,0.25);  color: var(--c5); }
.diagnostico.atencao  { background: rgba(255,179,71,0.08);  border-color: rgba(255,179,71,0.25);  color: var(--c4); }
.diagnostico.negativo { background: rgba(255,94,143,0.08);  border-color: rgba(255,94,143,0.25);  color: var(--c3); }
.diagnostico strong   { font-weight: 600; }

/* ===== COMPARATIVO ÍNDICES ===== */
.comparativo-indices {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.indices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}

.indice-item {
  padding: 20px 24px;
  border-right: 1px solid var(--border);
}
.indice-item:last-child { border-right: none; }

.indice-nome  { font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; }
.indice-taxa  { font-size: 12px; color: var(--text-hint); margin-bottom: 10px; }
.indice-valor { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 700; color: var(--c3); }
.indice-perda { font-size: 12px; color: var(--text-hint); margin-top: 4px; }

/* ===== GRÁFICO ===== */
.chart-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.chart-header .table-title { margin: 0; }

.chart-legend {
  display: flex;
  gap: 20px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.chart-container {
  padding: 20px 24px 24px;
  height: 300px;
}

/* ===== TABELA ===== */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.table-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.table-scroll {
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }

thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(20,20,32,0.98);
}

thead th {
  padding: 13px 18px;
  text-align: right;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
thead th:first-child { text-align: center; }

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background .15s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.03); }

tbody td {
  padding: 12px 18px;
  text-align: right;
  color: var(--text-secondary);
  white-space: nowrap;
}
tbody td:first-child { text-align: center; color: var(--text-hint); font-size: 13px; }
td.perda-col  { color: var(--c3); }
td.valor-col  { font-weight: 500; color: var(--text-primary); }
td.acum-col   { color: var(--c4); }

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
  .modos-wrap       { gap: 6px; }
  .modo-btn         { font-size: 13px; padding: 10px 14px; }
  .inf-form-grid    { grid-template-columns: 1fr; }
  .result-cards     { grid-template-columns: 1fr 1fr; }
  .indices-grid     { grid-template-columns: 1fr; }
  .indice-item      { border-right: none; border-bottom: 1px solid var(--border); }
  .indice-item:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
  .result-cards { grid-template-columns: 1fr; }
  .modo-label   { display: none; }
  .modo-btn     { padding: 10px 12px; }
}

/* ===== CONTEÚDO EDITORIAL SEO ===== */
.seo-content, .seo-faq { max-width: 900px; }

.seo-content h2, .seo-faq h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 14px;
  color: var(--text-primary);
}
.seo-content h2:first-child { margin-top: 0; }

.seo-content p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.seo-content strong { color: var(--text-primary); }

.formula-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--c1);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 16px 0;
  font-size: 17px;
  text-align: center;
}
.formula-box p {
  font-size: 13px;
  margin-top: 10px;
  margin-bottom: 0;
  text-align: center;
  color: var(--text-secondary);
}

.seo-list { padding-left: 20px; margin-bottom: 16px; }
.seo-list li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.seo-list li strong { color: var(--text-primary); }

.faq-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.faq-item h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.faq-item p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}