.fgc-calculator {
  max-width: 900px;
  margin: 24px auto;
  padding: 22px;
  border: 1px solid #dfe5ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  font-family: Arial, sans-serif;
}

.fgc-calculator h3 {
  text-align: center;
  margin-top: 0;
}

.fgc-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fgc-calculator label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

.fgc-calculator input,
.fgc-calculator select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px;
  margin-top: 5px;
}

.fgc-calculator button {
  background: #0073aa;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 26px;
  cursor: pointer;
  margin-top: 8px;
}

.fgc-result {
  display: none;
  margin-top: 18px;
}

.fgc-table-wrap {
  overflow-x: auto;
}

.fgc-result table {
  width: 100%;
  border-collapse: collapse;
}

.fgc-result th,
.fgc-result td {
  border: 1px solid #e5e7eb;
  padding: 9px;
  text-align: left;
}

.fgc-result th {
  background: #f8fafc;
}

.fgc-green {
  color: green;
}

.fgc-red,
.fgc-alert {
  color: #c62828;
}

.fgc-alert {
  background: #fff8e1;
  border: 1px solid #f0c36d;
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
}

.fgc-muted {
  font-size: 0.8em;
  color: #004b9a;
  background: #f0f8ff;
  border-left: 4px solid #004b9a;
  padding: 6px 10px;
  border-radius: 4px;
  font-style: italic;
  line-height: 1.3;
  margin: 10px 0;
}

.fgc-muted.alerted {
  font-size: .82em;
  color: #ff0202;
  background: #ffe5cd;
  border-left: 4px solid #ff3604;
  padding: 6px 10px;
  border-radius: 4px;
  font-style: italic;
  margin: 10px 0;
  line-height: 1.4;
}

.fgc-loading {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
}

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

/* IRPF/13º moderno */
.fgc-modern {
  max-width: 980px;
  padding: 28px;
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}

.fgc-form-title {
  text-align: center;
  margin-bottom: 22px;
}

.fgc-form-title span {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #eef6ff;
  color: #005f99;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.fgc-form-title h3 {
  font-size: clamp(26px, 3vw, 36px);
  margin: 8px 0 6px;
}

.fgc-form-title p {
  max-width: 720px;
  margin: 0 auto;
  color: #64748b;
  font-size: 17px;
}

.fgc-modern label {
  font-size: 18px;
}

.fgc-modern input,
.fgc-modern select {
  min-height: 48px;
  font-size: 18px;
  padding: 12px 14px;
}

.fgc-toggle {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.fgc-toggle-btn {
  background: #fff !important;
  color: #005f99 !important;
  border: 1px solid #8ec5ff !important;
  box-shadow: none !important;
}

.fgc-toggle-btn.active {
  background: #005f99 !important;
  color: #fff !important;
}

.fgc-result-head {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 14px;
}

.fgc-result-head span {
  color: #94a3b8;
  margin: 0 6px;
}

.fgc-irpf-comparison {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fgc-irpf-comparison h3 {
  grid-column: 1 / -1;
  text-align: center;
  margin: 0;
  padding: 10px;
  border-radius: 12px;
  background: #eef6ff;
  color: #005f99;
}

.fgc-irpf-option {
  position: relative;
  padding: 20px 16px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.fgc-irpf-option.best {
  border-color: #16a34a;
  background: #f5fff7;
}

.fgc-best-badge {
  display: none;
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.fgc-irpf-option.best .fgc-best-badge {
  display: inline-block;
}

.fgc-irpf-option h4 {
  text-align: center;
  margin: 0 0 10px;
  color: #005f99;
  font-size: 19px;
}

.fgc-irpf-option div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e5e7eb;
  padding: 9px 0;
}

.fgc-irpf-option div:last-child {
  border-bottom: 0;
}

.fgc-irpf-option strong {
  text-align: right;
  white-space: nowrap;
}

.fgc-irpf-tax {
  color: #005f99;
  font-size: 1.08em;
}

@media (max-width: 760px) {
  .fgc-irpf-comparison,
  .fgc-row {
    grid-template-columns: 1fr;
  }

  .fgc-toggle {
    flex-direction: column;
  }
}


/* Resultado detalhado do 13º salário */
.fgc-decimo-panel {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.fgc-decimo-head {
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.fgc-decimo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 12px 16px;
}

.fgc-decimo-grid > div:first-child {
  border-right: 1px solid #e5e7eb;
  padding-right: 16px;
}

.fgc-decimo-grid > div:last-child {
  padding-left: 16px;
}

.fgc-decimo-table-area {
  padding: 0 16px 16px;
}

.fgc-decimo-table-area hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 12px 0;
}

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

.fgc-decimo-table th,
.fgc-decimo-table td {
  padding: 8px;
  border-bottom: 1px solid #eef2f7;
}

.fgc-decimo-table th {
  background: #f1f5f9;
  text-align: center;
}

.fgc-decimo-table td:nth-child(2),
.fgc-decimo-table td:nth-child(3) {
  text-align: center;
}

.fgc-decimo-table td:nth-child(4),
.fgc-decimo-table td:nth-child(5) {
  text-align: right;
}

.fgc-decimo-total-row {
  background: #f8fafc;
  font-weight: 700;
}

.fgc-decimo-parcelas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fgc-decimo-parcela {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f1f1f1;
}

@media (max-width: 760px) {
  .fgc-decimo-grid,
  .fgc-decimo-parcelas {
    grid-template-columns: 1fr;
  }

  .fgc-decimo-grid > div:first-child {
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
    padding-right: 0;
    padding-bottom: 12px;
  }

  .fgc-decimo-grid > div:last-child {
    padding-left: 0;
    padding-top: 12px;
  }

  .fgc-decimo-table {
    min-width: 760px;
  }
}
