:root {
  --v-navy-950: #07111e;
  --v-navy-900: #0b192c;
  --v-navy-800: #0c2340;
  --v-navy-700: #153258;
  --v-gold-500: #cca459;
  --v-gold-600: #b38e44;
  --v-gold-100: #fdfbf7;
  --v-border: #e2e8f0;
  --v-border-dark: #214169;
  --v-bg-light: #f8fafc;
  --v-text-dark: #0f172a;
  --v-text-muted: #64748b;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--v-bg-light);
  color: var(--v-text-dark);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 30px;
}

.app-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(12, 35, 64, 0.08);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

/* HEADER */
.top-header-title {
  background: #ffffff;
  padding: 16px 24px;
  border-bottom: 2px solid var(--v-navy-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-title-text {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--v-navy-800);
  text-transform: uppercase;
}

.brand-sub-badge {
  background: #eef5fc;
  border: 1px solid #c2dbf1;
  color: #14497a;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.header-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.print-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1e40af;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.print-btn:hover {
  background: #eff6ff;
}

/* ABAS PRINCIPAIS */
.main-module-tabs {
  display: flex;
  background: #091a2e;
  border-bottom: 2px solid #b38e44;
  padding: 6px 12px 0;
  gap: 8px;
  overflow-x: auto;
}

.module-tab-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 18px 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.25;
}

.module-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.module-tab-btn.active {
  background: #ffffff;
  color: #0c2340;
  border-color: #b38e44;
  border-bottom: 2px solid #ffffff;
  margin-bottom: -2px;
  font-weight: 700;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}

.module-tab-btn .tab-icon {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.module-tab-btn .tab-text {
  font-weight: 700;
  font-size: 0.92rem;
}

.module-tab-btn .tab-sub {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.module-tab-btn.active .tab-sub {
  color: #8c6d23;
  font-weight: 600;
}

/* ==========================================================================
   MÓDULO 1: CNPJ (CONSULTA RECEITA FEDERAL)
   ========================================================================== */
.cnpj-module-wrapper {
  padding: 24px;
  background: #f8fafc;
  color: #1e293b;
}

.cnpj-hero-box {
  background: linear-gradient(135deg, #07111e 0%, #0c2340 50%, #153258 100%);
  color: #ffffff;
  padding: 22px 26px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 5px solid #cca459;
  box-shadow: 0 4px 14px rgba(7, 17, 30, 0.12);
}

.cnpj-hero-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #cca459;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cnpj-hero-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #e2e8f0;
  max-width: 960px;
}

.cnpj-search-wrapper {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cnpj-search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cnpj-input-field {
  flex: 1;
  min-width: 260px;
  padding: 12px 16px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1.05rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #0c2340;
  outline: none;
  transition: border-color 0.2s;
}

.cnpj-input-field:focus {
  border-color: #0c2340;
  box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.15);
}

.cnpj-submit-btn {
  background: #0c2340;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.cnpj-submit-btn:hover {
  background: #cca459;
  color: #0c2340;
}

.cnpj-quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #64748b;
}

.cnpj-test-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0c2340;
  cursor: pointer;
  transition: all 0.15s;
}

.cnpj-test-chip:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #0369a1;
}

.cnpj-loading-msg {
  display: none;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 12px 16px;
  color: #0369a1;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

.cnpj-company-header-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-top: 4px solid #0c2340;
}

.cnpj-company-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0c2340;
  margin-bottom: 4px;
}

.cnpj-company-fantasy {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 12px;
}

.cnpj-badges-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.cnpj-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.cnpj-meta-item {
  display: flex;
  flex-direction: column;
}

.cnpj-meta-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cnpj-meta-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

.cnpj-activities-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .cnpj-activities-grid {
    grid-template-columns: 1fr;
  }
}

.cnpj-cnae-principal-card {
  background: #ffffff;
  border: 2px solid #0c2340;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cnpj-cnae-secundarios-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cnpj-sec-scroll-area {
  max-height: 460px;
  overflow-y: auto;
  padding-right: 6px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cnpj-sec-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
  transition: all 0.15s;
}

.cnpj-sec-item:hover {
  border-color: #0c2340;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* ==========================================================================
   MÓDULO 2: CNAE & SIMPLES NACIONAL
   ========================================================================== */
.cnae-module-wrapper {
  padding: 20px 24px;
  background: #f8fafc;
  color: #1e293b;
}

.cnae-hero-box {
  background: linear-gradient(135deg, #0c2340 0%, #153258 100%);
  color: #ffffff;
  padding: 20px 24px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #cca459;
  box-shadow: 0 4px 12px rgba(12, 35, 64, 0.08);
}

.cnae-hero-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #cca459;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cnae-hero-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e2e8f0;
  max-width: 960px;
}

.cnae-search-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.cnae-search-box {
  display: flex;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: border-color 0.2s ease;
}

.cnae-search-box:focus-within {
  border-color: #0c2340;
  box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.12);
}

.cnae-search-box input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  color: #0f172a;
}

.cnae-search-btn {
  background: #0c2340;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cnae-search-btn:hover {
  background: #cca459;
  color: #0c2340;
}

.cnae-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  margin-top: 2px;
}

.cnae-dropdown-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cnae-dropdown-item:hover {
  background: #f8fafc;
}

.cnae-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.cnae-item-code {
  font-weight: 800;
  color: #0c2340;
  font-size: 0.92rem;
}

.cnae-item-desc {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.35;
}

.cnae-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  align-items: center;
}

.cnae-quick-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  margin-right: 4px;
}

.cnae-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.cnae-pill:hover {
  background: #0c2340;
  color: #ffffff;
  border-color: #0c2340;
}

.cnae-diag-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .cnae-diag-grid {
    grid-template-columns: 1fr;
  }
}

.cnae-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.cnae-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0c2340;
  margin-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.diag-field {
  margin-bottom: 12px;
}

.diag-field-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.diag-field-val {
  font-size: 0.92rem;
  color: #0f172a;
  line-height: 1.4;
}

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pill-green { background: #dcfce7; color: #166534; }
.pill-blue { background: #e0f2fe; color: #075985; }
.pill-gold { background: #fef3c7; color: #92400e; }
.pill-gray { background: #f1f5f9; color: #475569; }
.pill-red { background: #fee2e2; color: #991b1b; }

.badge-alerta-is {
  display: inline-block;
  background: #fee2e2;
  color: #991b1b;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge-isento-is {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* FAIXAS SIMPLES E FATOR R */
.simples-faixas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 10px;
  border: 1px solid #e2e8f0;
}

.simples-faixas-table th {
  background: #0c2340;
  color: #ffffff;
  padding: 8px 10px;
  font-weight: 700;
  text-align: left;
}

.simples-faixas-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.simples-faixas-table tr:nth-child(even) {
  background: #f8fafc;
}

.simples-faixas-table tr.active-faixa-row {
  background: #f0fdf4 !important;
  box-shadow: inset 4px 0 0 #16a34a;
  font-weight: 700;
}

.simples-faixas-table tr.active-faixa-row td {
  color: #0f172a !important;
}

.fator-r-card {
  background: #ffffff;
  border: 2px solid #b38e44;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(179, 142, 68, 0.12);
}

.fator-r-calc-box {
  background: #fdfbf7;
  border: 1px solid #f3e8d2;
  border-radius: 6px;
  padding: 16px;
  margin-top: 12px;
}

.fator-r-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 700px) {
  .fator-r-controls {
    grid-template-columns: 1fr;
  }
}

.fator-r-result-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.fator-r-pct-big {
  font-size: 1.8rem;
  font-weight: 900;
  color: #0c2340;
  font-family: 'JetBrains Mono', monospace;
}

/* SIMULADOR DE REGIMES (E-AUDITORIA STYLE) */
.sim-container {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.sim-head {
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.sim-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0c2340;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
}

.sim-controls-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: #f8fafc;
  padding: 18px;
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
}

@media (max-width: 960px) {
  .sim-controls-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .sim-controls-grid {
    grid-template-columns: 1fr;
  }
}

.sim-ctrl-group {
  display: flex;
  flex-direction: column;
}

.sim-ctrl-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-ctrl-input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0c2340;
  background: #ffffff;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sim-ctrl-input:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.sim-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  margin-top: 8px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.sim-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0c2340;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.1s ease, background 0.1s ease;
}

.sim-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #0284c7;
}

.sim-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0c2340;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.sim-client-profile-bar {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.sim-radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.sim-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
}

.sim-regimes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 992px) {
  .sim-regimes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .sim-regimes-grid {
    grid-template-columns: 1fr;
  }
}

.sim-regime-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.2s ease;
}

.sim-regime-card.card-recommended {
  border-color: #cca459;
  background: #fffdfa;
  box-shadow: 0 4px 14px rgba(204, 164, 89, 0.25);
  transform: translateY(-2px);
}

.reco-badge-tag {
  display: none;
  position: absolute;
  top: -10px;
  right: 12px;
  background: #cca459;
  color: #0c2340;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.reco-badge-tag.tag-b2b-shield {
  background: #0284c7;
  color: #ffffff;
}

.reco-badge-tag.tag-b2b-risk {
  background: #f59e0b;
  color: #0c2340;
}

.reco-badge-tag.tag-b2c-win {
  background: #16a34a;
  color: #ffffff;
}

.reco-badge-tag.tag-b2c-danger {
  background: #e11d48;
  color: #ffffff;
}

/* BADGES DE CRÉDITO NOS CARDS */
.regime-card-cred {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  line-height: 1.35;
  display: block;
}

.cred-badge-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.cred-badge-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.cred-badge-neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.cred-badge-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* PAINEL DE ANÁLISE COMERCIAL B2B / B2C */
.b2b-analysis-panel {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.08);
}

.b2b-analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.b2b-analysis-header h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #92400e;
  margin: 0;
}

.b2b-analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

@media (max-width: 700px) {
  .b2b-analysis-grid {
    grid-template-columns: 1fr;
  }
}

.b2b-col-card {
  background: #ffffff;
  border-radius: 6px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
}

.b2b-col-card.warning {
  border-left: 4px solid #f59e0b;
}

.b2b-col-card.success {
  border-left: 4px solid #10b981;
}

.b2b-col-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0c2340;
  display: block;
  margin-bottom: 4px;
}

.b2b-col-val {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
  display: block;
}

.b2b-col-desc {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.35;
}

.b2b-callout-footer {
  font-size: 0.82rem;
  color: #78350f;
  line-height: 1.45;
  background: rgba(254, 243, 199, 0.6);
  padding: 8px 12px;
  border-radius: 6px;
}

.b2c-analysis-panel {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.b2c-analysis-panel h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #166534;
  margin: 0 0 4px 0;
}

.b2c-analysis-panel p {
  font-size: 0.82rem;
  color: #14532d;
  margin: 0;
  line-height: 1.45;
}

.regime-card-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0c2340;
  margin-bottom: 8px;
}

.regime-card-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0c2340;
  margin-bottom: 4px;
}

.card-recommended .regime-card-val {
  color: #92400e;
}

.regime-card-aliq {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
}

.regime-card-obs {
  font-size: 0.75rem;
  line-height: 1.35;
  color: #475569;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  margin-top: auto;
}

.sim-veredicto-banner {
  background: #0c2340;
  color: #ffffff;
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.45;
  border-left: 4px solid #cca459;
}

.cnae-timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 800px) {
  .cnae-timeline-grid {
    grid-template-columns: 1fr;
  }
}

.timeline-year-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
}

.year-box-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0c2340;
  margin-bottom: 4px;
}

.year-box-desc {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.35;
}

/* ==========================================================================
   MÓDULO 3: BENS E SERVIÇOS (NCM / NBS / IS)
   ========================================================================== */
.nav-search-bar {
  background: #0f2744;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-buttons-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  background: #14355a;
  color: #ffffff;
  border: 1px solid #1f4775;
  padding: 6px 16px;
  border-radius: 3px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.nav-btn:hover { background: #1a4473; }
.nav-btn.active { background: #18487d; border-color: #3470b1; }

.dropdown-relative {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #ffffff;
  min-width: 250px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  z-index: 100;
  border: 1px solid #cbd5e1;
  overflow: hidden;
}

.dropdown-content.show { display: block; }

.dropdown-item {
  display: block;
  padding: 9px 14px;
  color: #1e293b;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #eef5fc;
  color: #0f2744;
  font-weight: 600;
}

.search-form-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 500px;
  margin-left: auto;
}

.search-input-field {
  width: 100%;
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #0f2744;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
}

.search-input-field:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

.search-submit-btn {
  background: #d97706;
  border: 1px solid #b45309;
  color: #ffffff;
  padding: 7px 18px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.search-submit-btn:hover { background: #b45309; }

.presets-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 11.5px;
}

.preset-label {
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.05em;
}

.preset-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 3px 9px;
  border-radius: 12px;
  color: #1e3a5f;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.preset-chip:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

.preset-chip.active-chip {
  background: #0f2744;
  color: #ffffff;
  border-color: #0f2744;
}

.main-content-area {
  padding: 20px;
  background: #f8fafc;
}

.banner-result-header {
  background: linear-gradient(135deg, #0c2340 0%, #1c6aa6 100%) !important;
  color: #ffffff !important;
  padding: 12px 18px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  border-radius: 8px 8px 0 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  border: 1px solid #1c6aa6 !important;
  border-bottom: none !important;
}

.banner-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.banner-right-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.select-fiscal-year {
  background: #ffffff;
  color: #0c2340;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.info-grid-top {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

.info-grid-bottom {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .info-grid-top,
  .info-grid-bottom {
    grid-template-columns: 1fr;
  }
}

.card-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(15, 39, 68, 0.05);
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 14px;
  font-size: 13.5px;
  font-weight: 800;
  color: #0c2340;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table tr {
  border-bottom: 1px solid #f1f5f9;
}

.data-table tr:last-child {
  border-bottom: none;
}

.data-table .td-label {
  padding: 8px 8px 8px 0;
  font-weight: 700;
  color: #64748b;
  width: 155px;
  vertical-align: top;
  font-size: 12px;
}

.data-table .td-val {
  padding: 8px 0;
  color: #0f172a;
  vertical-align: top;
  line-height: 1.45;
}

.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-bold { font-weight: 700; }
.text-navy { color: #0c2340; }

.rates-display-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.rate-card-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}

.rate-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.rate-number {
  font-size: 24px;
  font-weight: 900;
  color: #0c2340;
  line-height: 1.1;
  margin-bottom: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.rate-subtext {
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.25;
}

.rate-total-item {
  grid-column: span 2;
  background: #0c2340;
  color: #ffffff;
  border: 1px solid #cca459;
}

.rate-total-item .rate-label {
  color: #cca459;
  font-weight: 800;
}

.rate-total-item .rate-number.rate-highlight {
  color: #ffffff;
  font-size: 28px;
}

.rate-total-item .rate-subtext {
  color: #cbd5e1;
}

.tcu-note-box {
  background: #eff6ff;
  border-left: 3px solid #1c6aa6;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: #1e3a8a;
  line-height: 1.45;
  margin-top: 10px;
}

.badge-blue {
  background: #1c6aa6;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-red {
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-green {
  background: #16a34a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.is-base-badge {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

/* SIMULADOR IS VEÍCULOS */
.simulator-wrapper {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 14px;
}

.simulator-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #0c2340;
}

.sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.sim-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sim-label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
}

.sim-select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 11.5px;
  color: #0f172a;
  font-family: inherit;
  outline: none;
}

.checkbox-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}

.cb-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #334155;
  cursor: pointer;
}

.sim-result-box {
  background: #0c2340;
  color: #ffffff;
  border-radius: 6px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-left: 4px solid #cca459;
  margin-top: 10px;
}

.sim-result-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #cbd5e1;
  display: block;
  margin-bottom: 2px;
}

.sim-result-value {
  font-size: 20px;
  font-weight: 900;
  color: #cca459;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.1;
  margin-bottom: 2px;
}

.sim-result-formula {
  font-size: 11px;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  display: block;
}

.sim-result-right { text-align: right; }

.is-total-load-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #cbd5e1;
  margin-bottom: 2px;
}

.is-total-load-num {
  font-size: 22px;
  font-weight: 900;
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.1;
}

.is-total-subtext {
  font-size: 10.5px;
  color: #94a3b8;
}

/* CASHBACK */
.cashback-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
}

.cashback-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid #cbd5e1;
}

.cashback-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.cb-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}

.cb-100 { background: #dcfce7; color: #166534; }
.cb-20 { background: #e0f2fe; color: #0369a1; }

/* FOOTER */
.app-footer {
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.app-footer-brand {
  font-weight: 700;
  color: #0f2744;
}

.whatsapp-consult-btn {
  background: #25d366;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.whatsapp-consult-btn:hover {
  background: #1eb855;
}

/* MODAIS */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}

.modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 760px;
  border-radius: 6px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.modal-head {
  background: #0f2744;
  color: #ffffff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head h3 {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 20px;
  max-height: 75vh;
  overflow-y: auto;
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
}

.modal-footer {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   TEMA EXECUTIVO VISSECHI (QUANDO ATIVADO O TOGGLE)
   ========================================================================== */
body.vissechi-theme {
  background-color: #07111e;
  color: #f1f5f9;
}

body.vissechi-theme .app-wrapper {
  background: #0b192c;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(204, 164, 89, 0.25);
}

body.vissechi-theme .top-header-title {
  background: #07111e;
  border-bottom: 2px solid #cca459;
}

body.vissechi-theme .brand-title-text {
  color: #cca459;
}

body.vissechi-theme .card-box,
body.vissechi-theme .cnae-card,
body.vissechi-theme .sim-container,
body.vissechi-theme .cnpj-search-wrapper,
body.vissechi-theme .cnpj-company-header-card,
body.vissechi-theme .cnpj-cnae-principal-card,
body.vissechi-theme .cnpj-cnae-secundarios-card,
body.vissechi-theme .fator-r-card {
  background: #0f1f35 !important;
  border-color: #214169 !important;
  color: #f1f5f9 !important;
}

body.vissechi-theme .card-title-row,
body.vissechi-theme .cnae-card-title,
body.vissechi-theme .cnpj-company-title {
  color: #cca459 !important;
  border-color: #214169 !important;
}

body.vissechi-theme .data-table .td-label,
body.vissechi-theme .diag-field-label,
body.vissechi-theme .cnpj-meta-lbl {
  color: #94a3b8 !important;
}

body.vissechi-theme .data-table .td-val,
body.vissechi-theme .diag-field-val,
body.vissechi-theme .cnpj-meta-val {
  color: #f8fafc !important;
}

body.vissechi-theme .rate-card-item,
body.vissechi-theme .simulator-wrapper,
body.vissechi-theme .cnpj-meta-grid,
body.vissechi-theme .cnpj-sec-item,
body.vissechi-theme .timeline-year-box {
  background: #0b192c !important;
  border-color: #214169 !important;
  color: #f1f5f9 !important;
}

body.vissechi-theme .rate-number {
  color: #cca459 !important;
}

body.vissechi-theme .app-footer {
  background: #07111e;
  border-color: #1a3250;
  color: #94a3b8;
}

body.vissechi-theme .app-footer-brand {
  color: #cca459;
}

/* IMPRESSÃO */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
  }
  .nav-search-bar, .presets-bar, .theme-toggle-btn, .print-btn, .app-footer, .main-module-tabs {
    display: none !important;
  }
  .app-wrapper {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
  }
}