/* ============================================================================
   Simulador Tributário — estilos específicos (complementa ../../assets/css/style.css)
   Mantém os tokens e a identidade EasyGestor.
   ========================================================================== */

/* faixa de tópicos do hero */
.eg-hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.eg-hero-pills span {
  background: #eaf4ff; color: var(--eg-title); font-weight: 700; font-size: 12px;
  border-radius: 999px; padding: 7px 13px; border: 1px solid #d6e8ff;
}

/* selo de reforma no mockup */
.eg-reform-badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--eg-yellow);
  color: var(--eg-navy); font-weight: 900; font-size: 12px; border-radius: 999px;
  padding: 6px 12px; margin-bottom: 14px;
}

/* ---- seção de regimes (cards comparativos) ---- */
.eg-regime-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.eg-regime-card {
  background: #fff; border: 1px solid var(--eg-border); border-radius: 18px; padding: 22px;
  position: relative; box-shadow: 0 12px 28px rgba(0,20,64,.08); transition: transform .15s ease;
}
.eg-regime-card:hover { transform: translateY(-3px); }
.eg-regime-card .eg-regime-nome { color: var(--eg-muted); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; }
.eg-regime-card .eg-regime-total { display: block; color: var(--eg-title); font-size: 1.7rem; font-weight: 900; margin: 8px 0 2px; }
.eg-regime-card .eg-regime-pct { color: var(--eg-muted); font-weight: 700; font-size: 13px; }
.eg-regime-card.is-winner { background: var(--eg-navy); border-color: var(--eg-navy); box-shadow: 0 18px 40px rgba(0,20,64,.28); }
.eg-regime-card.is-winner .eg-regime-nome { color: rgba(255,255,255,.7); }
.eg-regime-card.is-winner .eg-regime-total { color: #fff; }
.eg-regime-card.is-winner .eg-regime-pct { color: var(--eg-yellow); }
.eg-winner-tag {
  position: absolute; top: -11px; left: 18px; background: var(--eg-yellow); color: var(--eg-navy);
  font-weight: 900; font-size: 11px; border-radius: 999px; padding: 4px 12px; text-transform: uppercase;
}
.eg-regime-card.is-out { opacity: .72; }
.eg-regime-card.is-out .eg-regime-total { color: var(--eg-muted); font-size: 1.1rem; }

/* destaque de economia */
.eg-economia {
  background: linear-gradient(135deg, #0074fc 0%, #1040d4 100%); color: #fff;
  border-radius: 20px; padding: 26px 28px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 18px; box-shadow: 0 18px 40px rgba(0,116,252,.26);
}
.eg-economia .eg-economia-val { font-size: 2.1rem; font-weight: 900; color: var(--eg-yellow); display: block; line-height: 1.1; }
.eg-economia p { color: rgba(255,255,255,.86) !important; margin: 0; }

/* ---- detalhamento (tabelas por regime) ---- */
.eg-detalhe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.eg-detalhe-card { background: #fff; border: 1px solid var(--eg-border); border-radius: 18px; padding: 22px; box-shadow: 0 10px 24px rgba(0,20,64,.06); }
.eg-detalhe-card h3 { color: var(--eg-title); font-weight: 900; font-size: 1.1rem; margin-bottom: 4px; }
.eg-detalhe-card .eg-detalhe-sub { color: var(--eg-muted); font-size: 12px; font-weight: 700; }
.eg-linha { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--eg-border); font-size: 14px; }
.eg-linha:last-of-type { border-bottom: 0; }
.eg-linha span { color: var(--eg-text); }
.eg-linha strong { color: var(--eg-navy); font-weight: 800; white-space: nowrap; }
.eg-linha.neg strong { color: var(--eg-red); }
.eg-linha-total { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 14px; border-top: 2px solid var(--eg-navy); }
.eg-linha-total span { color: var(--eg-navy); font-weight: 900; }
.eg-linha-total strong { color: var(--eg-blue); font-weight: 900; font-size: 1.15rem; }
.eg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.eg-chips em { font-style: normal; background: #eaf4ff; color: var(--eg-title); font-weight: 800; font-size: 11px; border-radius: 999px; padding: 4px 10px; }

/* ---- projeção (tabs + tabela + gráfico) ---- */
.eg-tabs { display: inline-flex; background: #eef2f8; border-radius: 999px; padding: 5px; gap: 4px; margin-bottom: 22px; }
.eg-tabs button { border: 0; background: transparent; font-weight: 800; font-size: 13px; color: var(--eg-muted); padding: 9px 18px; border-radius: 999px; cursor: pointer; }
.eg-tabs button.active { background: #fff; color: var(--eg-blue); box-shadow: 0 6px 16px rgba(0,20,64,.10); }

.eg-proj-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--eg-border); }
.eg-proj-table { width: 100%; border-collapse: collapse; min-width: 720px; background: #fff; }
.eg-proj-table th, .eg-proj-table td { padding: 13px 14px; text-align: right; font-size: 13.5px; border-bottom: 1px solid var(--eg-border); white-space: nowrap; }
.eg-proj-table thead th { background: var(--eg-navy); color: #fff; font-weight: 800; position: sticky; top: 0; }
.eg-proj-table tbody th { text-align: left; color: var(--eg-navy); font-weight: 800; background: var(--eg-offwhite); position: sticky; left: 0; }
.eg-proj-table td.best { background: #eafaf0; color: #0b7a42; font-weight: 900; border-radius: 6px; }
.eg-proj-table tr.eg-proj-best th { background: #eaf4ff; color: var(--eg-blue); }
.eg-proj-table tr.eg-proj-best td { color: var(--eg-blue); font-weight: 900; }

.eg-chart-card { background: #fff; border: 1px solid var(--eg-border); border-radius: 18px; padding: 22px; box-shadow: 0 10px 24px rgba(0,20,64,.06); }
.eg-sim-chart { width: 100%; height: auto; display: block; }
.eg-chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.eg-chart-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--eg-text); }
.eg-chart-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* ---- linha do tempo da reforma ---- */
.eg-timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.eg-timeline .eg-tl {
  background: #fff; border: 1px solid var(--eg-border); border-top: 4px solid var(--eg-blue);
  border-radius: 14px; padding: 18px; box-shadow: 0 10px 24px rgba(0,20,64,.06);
}
.eg-timeline .eg-tl.is-full { border-top-color: #13a85b; }
.eg-timeline .eg-tl.is-hibrido { border-top-color: var(--eg-yellow); }
.eg-tl strong { display: block; color: var(--eg-title); font-size: 1.25rem; font-weight: 900; }
.eg-tl p { margin: 6px 0 0; font-size: 13px; color: var(--eg-muted); line-height: 1.5; }

/* ---- consulta CST / cClassTrib ---- */
.eg-cst-search { position: relative; margin-bottom: 18px; }
.eg-cst-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--eg-blue); }
.eg-cst-search input { padding-left: 44px; }
.eg-cst-list { display: grid; gap: 10px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.eg-cst-item { background: #fff; border: 1px solid var(--eg-border); border-radius: 14px; padding: 16px 18px; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.eg-cst-item:hover { border-color: var(--eg-blue); box-shadow: 0 8px 22px rgba(0,116,252,.12); }
.eg-cst-item.open { border-color: var(--eg-blue); box-shadow: 0 10px 26px rgba(0,116,252,.16); }
.eg-cst-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.eg-cst-code { background: var(--eg-blue); color: #fff; font-weight: 900; font-size: 13px; border-radius: 8px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.eg-cst-cst { background: var(--eg-navy); color: #fff; font-weight: 800; font-size: 11px; border-radius: 8px; padding: 4px 9px; }
.eg-cst-nome { font-weight: 800; color: var(--eg-navy); flex: 1; min-width: 0; }
.eg-cst-tipo { font-size: 11px; font-weight: 800; color: var(--eg-muted); }
.eg-cst-body { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--eg-border); }
.eg-cst-body p { font-size: 13.5px; color: var(--eg-text); line-height: 1.55; margin: 0 0 10px; }
.eg-cst-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.eg-cst-meta span { font-size: 11.5px; font-weight: 800; background: #eef2f8; color: var(--eg-navy); border-radius: 999px; padding: 5px 11px; }
.eg-cst-meta a { font-size: 11.5px; font-weight: 800; color: var(--eg-blue); }
.eg-cst-count { color: var(--eg-muted); font-size: 13px; font-weight: 700; margin-bottom: 12px; }

/* ---- premissas auditáveis ---- */
.eg-prem-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.eg-prem-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.eg-prem-table caption { text-align: left; font-weight: 900; color: var(--eg-title); padding-bottom: 8px; }
.eg-prem-table th, .eg-prem-table td { padding: 8px 10px; border-bottom: 1px solid var(--eg-border); text-align: left; }
.eg-prem-table td:last-child { text-align: right; font-weight: 800; color: var(--eg-navy); white-space: nowrap; }
.eg-prem-table thead th { color: var(--eg-muted); font-size: 11px; text-transform: uppercase; }

/* responsivo */
@media (max-width: 991.98px) {
  .eg-regime-grid { grid-template-columns: repeat(2, 1fr); }
  .eg-detalhe-grid { grid-template-columns: 1fr; }
  .eg-timeline { grid-template-columns: repeat(2, 1fr); }
  .eg-prem-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .eg-regime-grid { grid-template-columns: 1fr; }
  .eg-timeline { grid-template-columns: 1fr; }
  .eg-economia { flex-direction: column; align-items: flex-start; }
}
