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

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  background: linear-gradient(145deg, #080e1a, #0f1b30, #0b1526);
  color: #dce4f0;
  font-size: 14px;
}

/* ── Header ── */
.header {
  background: linear-gradient(90deg, #0b1526, #162d50, #0b1526);
  border-bottom: 2px solid #1e3a5f;
  padding: 14px 20px;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 34px; width: auto; }
.logo-text h1 { font-size: 18px; font-weight: 700; color: #f0f4fa; }
.logo-text p  { font-size: 11px; color: #7a96b8; margin-top: 2px; }
.badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: #6dd897;
  background: rgba(109,216,151,0.08);
  padding: 5px 13px; border-radius: 16px;
  border: 1px solid rgba(109,216,151,0.15);
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #6dd897;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ── Layout ── */
.main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }

/* ── Alerta ── */
.alerta {
  display: none; align-items: center; gap: 10px;
  background: rgba(255, 90, 90, 0.12);
  border: 1px solid rgba(255,90,90,0.3);
  color: #ff9a9a; border-radius: 8px;
  padding: 12px 16px; margin-bottom: 20px;
  font-size: 13px;
}

/* ── Step indicator ── */
.wizard-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 32px; flex-wrap: wrap;
}
.step-item {
  display: flex; align-items: center; gap: 0;
}
.step-dot {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.12);
  color: #5a7a9a; cursor: default;
  transition: all .25s;
}
.step-dot.active {
  background: #1e3a5f; border-color: #93bbfc; color: #93bbfc;
}
.step-dot.done {
  background: rgba(109,216,151,0.15); border-color: #6dd897; color: #6dd897;
}
.step-label {
  font-size: 11px; color: #5a7a9a; margin: 0 6px;
  white-space: nowrap;
}
.step-item.active-item .step-label { color: #93bbfc; }
.step-connector {
  width: 40px; height: 2px;
  background: rgba(255,255,255,0.08);
  margin: 0 2px;
}
@media (max-width: 600px) {
  .step-connector { width: 20px; }
  .step-label     { display: none; }
}

/* ── Cards (formulário) ── */
.card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: 22px 20px;
  margin-bottom: 20px;
}
.card-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.card-icon { font-size: 18px; }
.card-title { font-size: 15px; font-weight: 600; color: #c0d0e4; }
.card-subtitle { font-size: 12px; color: #5a7a9a; margin-top: 2px; }

/* ── Grid campos ── */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.field-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px; font-weight: 700; color: #7a96b8;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 14px;
  border-radius: 8px; font-size: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  color: #e8edf5; outline: none;
  font-family: inherit;
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(147,187,252,0.4);
}
.field select {
  cursor: pointer;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2393bbfc' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-color: rgba(0,0,0,0.35);
}
.field select option { background: #14233d; color: #e8edf5; }
.field .hint { font-size: 10.5px; color: #5a7a9a; }

.field-full { grid-column: 1 / -1; }

/* ── Seção tarifas ── */
.section-divider {
  font-size: 11px; font-weight: 700; color: #5a7a9a;
  text-transform: uppercase; letter-spacing: 1px;
  margin: 20px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,0.06);
}

/* ── Checkbox ── */
.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; cursor: pointer;
  margin-top: 8px;
}
.checkbox-row input[type=checkbox] {
  width: 16px; height: 16px; cursor: pointer;
  accent-color: #6dd897;
}
.checkbox-row span {
  font-size: 13px; color: #c0d0e4;
}

/* ── Tabela histórico ── */
.table-wrap { overflow-x: auto; }
.table-hist {
  width: 100%; border-collapse: collapse;
  font-size: 13px; min-width: 620px;
}
.table-hist th, .table-hist td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}
.table-hist th {
  font-size: 11px; font-weight: 700; color: #7a96b8;
  text-transform: uppercase; letter-spacing: 0.4px;
  background: rgba(0,0,0,0.25);
}
.table-hist th.col-ponta  { color: #93bbfc; }
.table-hist th.col-fp     { color: #6dd897; }
.table-hist th.col-atual  { color: #f0ac3a; }
.table-hist td.mes-label  { color: #c0d0e4; font-weight: 600; text-align: left; white-space: nowrap; }
.table-hist tr:hover td   { background: rgba(255,255,255,0.025); }

.inp-num {
  width: 90px; padding: 7px 10px;
  border-radius: 6px; font-size: 13px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.3);
  color: #e8edf5; outline: none;
  text-align: right; font-family: inherit;
  transition: border-color .2s;
}
.inp-num:focus { border-color: rgba(147,187,252,0.4); }

.btn-replicar {
  margin-top: 12px; font-size: 12px;
  padding: 7px 14px;
}

/* ── Botões de navegação ── */
.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; font-family: inherit; transition: all .2s;
}
.btn-primary {
  background: linear-gradient(135deg, #1a4a8a, #2b5faa);
  color: #f0f4fa;
  box-shadow: 0 4px 14px rgba(43,95,170,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(43,95,170,0.4); }
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: #c0d0e4;
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-success {
  background: linear-gradient(135deg, #1a6a4a, #228855);
  color: #f0f4fa;
  box-shadow: 0 4px 14px rgba(34,136,85,0.3);
}
.btn-success:hover { transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: #7a96b8;
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-outline:hover { border-color: #93bbfc; color: #93bbfc; }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* ── Resultados ── */
.result-header {
  text-align: center; margin-bottom: 28px;
}
.result-header h2 { font-size: 22px; color: #f0f4fa; margin-bottom: 4px; }
.result-header p  { color: #7a96b8; font-size: 13px; }

/* Cards de resumo */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px; margin-bottom: 20px;
}
.summary-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 18px 20px;
}
.summary-card.verde-card { border-color: rgba(109,216,151,0.2); }
.summary-card.azul-card  { border-color: rgba(147,187,252,0.2); }
.sc-label {
  font-size: 10px; font-weight: 700; color: #5a7a9a;
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.sc-main {
  font-size: 20px; font-weight: 700; color: #f0f4fa;
  margin-bottom: 4px;
}
.sc-sub { font-size: 13px; color: #c0d0e4; margin-bottom: 8px; }
.card-econ {
  font-size: 13px; font-weight: 600; display: inline-flex;
  align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 12px;
}
.card-econ.positiva { background: rgba(109,216,151,0.12); color: #6dd897; }
.card-econ.negativa { background: rgba(255,100,100,0.12); color: #ff8080; }

/* Card recomendação */
.rec-card {
  background: rgba(43,95,170,0.12);
  border: 1px solid rgba(147,187,252,0.2);
  border-radius: 12px; padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px; flex-wrap: wrap;
  font-size: 14px; color: #c0d0e4; line-height: 1.6;
}
.rec-badge {
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 6px;
}
.rec-badge.verde { background: rgba(109,216,151,0.15); color: #6dd897; border: 1px solid rgba(109,216,151,0.3); }
.rec-badge.azul  { background: rgba(147,187,252,0.15); color: #93bbfc; border: 1px solid rgba(147,187,252,0.3); }

/* ── Tabs ── */
.tabs-nav {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 9px 16px; border-radius: 8px 8px 0 0;
  font-size: 12px; font-weight: 600; cursor: pointer;
  color: #7a96b8; background: transparent;
  border: none; font-family: inherit;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.tab-btn:hover { color: #c0d0e4; }
.tab-btn.active { color: #93bbfc; border-bottom-color: #93bbfc; }
.tab-pane { display: none; }
.tab-pane:first-of-type { display: block; }

/* ── Tabelas de resultados ── */
.result-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}
.result-table th, .result-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: right;
}
.result-table th {
  font-size: 10px; font-weight: 700; color: #7a96b8;
  text-transform: uppercase; background: rgba(0,0,0,0.25);
  text-align: right;
}
.result-table th:first-child, .result-table td:first-child { text-align: center; }
.result-table tr.ideal-row td { color: #6dd897; font-weight: 700; }
.result-table tr.total-row td { color: #f0ac3a; font-weight: 700; border-top: 1px solid rgba(255,255,255,0.12); }
.result-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Gráficos ── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}
.chart-card {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 16px;
}
.chart-wrap { position: relative; height: 260px; }

/* ── TOP 10 grid ── */
.top10-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.top10-card-title {
  font-size: 12px; font-weight: 700; color: #7a96b8;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* ── Parecer técnico ── */
.parecer-wrap { position: relative; }
.parecer-wrap textarea {
  width: 100%; min-height: 360px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 12px; color: #c8d8e8;
  resize: vertical; outline: none;
  line-height: 1.6;
}
.parecer-actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px;
}

/* ── Info box ── */
.info-box {
  background: rgba(147,187,252,0.06);
  border: 1px solid rgba(147,187,252,0.15);
  border-radius: 8px; padding: 12px 16px;
  font-size: 12px; color: #93bbfc;
  margin-bottom: 16px; line-height: 1.5;
}

/* ── Verificação (auditoria de cálculo) ── */
.vr-bloco {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 18px 20px;
  margin-bottom: 16px; font-size: 13px;
}
.vr-titulo {
  font-size: 14px; font-weight: 700; color: #c0d0e4;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.vr-secao {
  font-size: 10px; font-weight: 700; color: #5a7a9a;
  text-transform: uppercase; letter-spacing: 0.8px;
  margin: 12px 0 6px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.vr-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 3px 0; color: #c0d0e4;
}
.vr-row span:first-child { color: #7a96b8; }
.vr-row small { font-size: 10px; color: #5a7a9a; margin-left: 6px; }
.vr-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; padding-top: 10px;
  border-top: 2px solid rgba(109,216,151,0.3);
  font-size: 14px; font-weight: 700; color: #6dd897;
}

/* ── Responsividade ── */
@media (max-width: 700px) {
  .summary-grid { grid-template-columns: 1fr; }
  .charts-grid  { grid-template-columns: 1fr; }
  .top10-grid   { grid-template-columns: 1fr; }
}
