/* ============================================================
   AmortizaPro — style.css
   Paleta: Azul Marinho #003f87 + Verde Esmeralda #27ae60
   Tipografia: Montserrat (títulos) + Poppins (corpo)
   ============================================================ */
/* RESET & BASE */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --navy: #003f87;
  --navy-dark: #002d61;
  --navy-light: #0056b3;
  --green: #27ae60;
  --green-dark: #1e8449;
  --green-light: #2ecc71;
  --red: #e74c3c;
  --red-light: #fdecea;
  --teal: #1abc9c;
  --accent: #f39c12;
  --white: #ffffff;
  --bg: #f0f4f8;
  --card-bg: #ffffff;
  --border: #dde3ed;
  --text: #1a2540;
  --text-muted: #6b7a9a;
  --shadow-sm: 0 2px 8px rgba(0, 63, 135, .08);
  --shadow-md: 0 6px 24px rgba(0, 63, 135, .12);
  --shadow-lg: 0 12px 40px rgba(0, 63, 135, .16);
  --radius: 14px;
  --radius-sm: 8px;
  --transition: .25s cubic-bezier(.4, 0, .2, 1);
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 14px;
}
h1,
h2,
h3,
h4 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.3;
}
/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #004fa0 100%);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .25);
}
.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: -0.5px;
}
.logo-accent {
  color: var(--green-light);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
}
.logo-sub {
  display: block;
  font-size: .7rem;
  color: rgba(255, 255, 255, .55);
  font-weight: 400;
  letter-spacing: .3px;
  margin-top: -4px;
}
.badge-free {
  background: var(--green);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: .3px;
}
/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.content-col {
  min-width: 0;
}
/* ============================================================
   FORM CARD
   ============================================================ */
.form-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--green));
}
.form-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.form-card-header h2 {
  font-size: 1.1rem;
  color: var(--navy);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-group label svg {
  opacity: .7;
  flex-shrink: 0;
}
.optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: .75rem;
}
.hint {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: 2px;
}
/* Inputs */
.input-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafd;
  transition: border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.input-wrapper:focus-within {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(0, 63, 135, .1);
  background: #fff;
}
.input-wrapper input,
.input-wrapper input[type="date"] {
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: .88rem;
  color: var(--text);
  width: 100%;
  outline: none;
  min-width: 0;
}
.input-wrapper input[type="date"] {
  cursor: pointer;
}
.prefix,
.suffix {
  padding: 0 10px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  white-space: nowrap;
  flex-shrink: 0;
}
.prefix {
  border-right: 1.5px solid var(--border);
}
.suffix {
  border-left: 1.5px solid var(--border);
}
/* Rate type toggle */
.form-group-taxa {
  position: relative;
}
.taxa-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.taxa-label-row>label {
  margin-bottom: 0;
}
.rate-type-toggle {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.rate-option {
  cursor: pointer;
  user-select: none;
}
.rate-option input[type="radio"] {
  display: none;
}
.rate-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .3px;
  border: 1.5px solid var(--border);
  background: #f8fafd;
  color: var(--text-muted);
  transition: all var(--transition);
  line-height: 1.3;
}
.rate-option input:checked~.rate-pill {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  box-shadow: 0 2px 8px rgba(0, 63, 135, .25);
}
.rate-option:hover .rate-pill {
  border-color: var(--navy-light);
}
.rate-input input {
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: .5px;
}
.rate-equivalent {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
  font-style: italic;
  min-height: 1.2em;
  transition: opacity var(--transition);
}
.rate-equivalent:empty {
  display: none;
}
/* Select */
.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.select-wrapper select {
  width: 100%;
  appearance: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafd;
  padding: 10px 40px 10px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: .88rem;
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.select-wrapper select:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(0, 63, 135, .1);
  background: #fff;
}
.select-arrow {
  position: absolute;
  right: 12px;
  pointer-events: none;
  color: var(--text-muted);
}
/* Buttons */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 28px;
  font-family: 'Poppins', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(0, 63, 135, .3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 63, 135, .4);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--green-dark);
  border: 1.5px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-family: 'Poppins', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--green);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 174, 96, .3);
}
.btn-secondary:disabled {
  opacity: .45;
  cursor: not-allowed;
}
/* ============================================================
   HEADER NAV LINK
   ============================================================ */
.header-nav-link {
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.header-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}
/* ============================================================
   AD BANNER 728x90
   ============================================================ */
.ad-banner-horizontal {
  margin-top: 20px;
  width: 100%;
  height: 90px;
  background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
  border: 1.5px dashed #ccc;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ad-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #bbb;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.ad-inner.vertical {
  flex-direction: column;
  text-align: center;
}
/* ============================================================
   SIDEBAR AD 300x600
   ============================================================ */
.sidebar-ad {
  position: sticky;
  top: 80px;
  width: 300px;
  min-height: 600px;
  background: linear-gradient(180deg, #f0f0f0, #e8e8e8);
  border: 1.5px dashed #ccc;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* ============================================================
   RESULTS SECTION
   ============================================================ */
.results-section {
  margin-top: 28px;
}
.kpi-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.kpi-header h2 {
  font-size: 1.1rem;
  color: var(--navy);
}
/* KPI CARDS */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}
.kpi-card {
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.kpi-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: .12;
  background: currentColor;
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.kpi-danger {
  background: #fdecea;
  color: var(--red);
  border-color: #f5c6cb;
}
.kpi-success {
  background: #eafaf1;
  color: var(--green-dark);
  border-color: #b2dfca;
}
.kpi-blue {
  background: #e8f0fb;
  color: var(--navy);
  border-color: #b8d0f0;
}
.kpi-accent {
  background: #fef9e7;
  color: #c0811a;
  border-color: #fde9a0;
}
.kpi-teal {
  background: #e8faf6;
  color: #148f77;
  border-color: #a2dec8;
}
.kpi-fgts {
  background: #fff3e0;
  color: #e65100;
  border-color: #ffcc80;
}
.kpi-refi {
  background: #f3e5f5;
  color: #7b1fa2;
  border-color: #ce93d8;
}
.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.kpi-label {
  font-size: .7rem;
  font-weight: 600;
  opacity: .8;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.kpi-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 2px;
  word-break: break-word;
}
.kpi-helper {
  font-size: 0.6rem;
  opacity: 0.85;
  margin-top: 4px;
  font-weight: 500;
}
.kpi-card.highlight {
  border: 2px solid #82b1ff;
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(130, 177, 255, 0.25);
}
.kpi-card.highlight:hover {
  transform: scale(1.04) translateY(-3px);
  box-shadow: 0 6px 20px rgba(130, 177, 255, 0.35);
}
/* ============================================================
   CHARTS
   ============================================================ */
.charts-section {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.chart-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.chart-card h3 {
  font-size: .9rem;
  color: var(--navy);
  margin-bottom: 16px;
  font-weight: 700;
}
.chart-wrapper {
  position: relative;
}
.chart-bar-full {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.chart-bar-full h3 {
  font-size: .9rem;
  color: var(--navy);
  margin-bottom: 16px;
  font-weight: 700;
}
.chart-bar-wrapper {
  height: 260px;
  position: relative;
}
/* Freedom Gauge */
.freedom-card {
  background: linear-gradient(160deg, var(--navy-dark), var(--navy));
  border-radius: var(--radius);
  padding: 24px 20px;
  color: #fff;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.freedom-card h3 {
  font-size: .82rem;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.freedom-gauge-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.freedom-gauge-wrapper canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}
.freedom-center-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}
.freedom-pct {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.freedom-label-small {
  font-size: .65rem;
  color: rgba(255, 255, 255, .6);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 2px;
}
.freedom-desc {
  font-size: .75rem;
  color: rgba(255, 255, 255, .7);
  margin-top: 12px;
  line-height: 1.5;
}
/* ============================================================
   TABLE
   ============================================================ */
.table-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.table-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.table-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-title-group h3 {
  font-size: .9rem;
  color: var(--navy);
  font-weight: 700;
}
.table-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-rows-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.table-rows-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-family: 'Poppins', sans-serif;
  font-size: .78rem;
  color: var(--navy);
  background: #f8fafd;
  cursor: pointer;
  outline: none;
}
.table-scroll-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
}
.table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 550px;
}
.table-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.table-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.table-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
#amort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
#amort-table thead tr th {
  background: #f0f4f8;
  color: var(--navy);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 12px 16px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
}
#amort-table thead tr th:first-child {
  text-align: center;
}
#amort-table thead tr th:nth-child(2) {
  text-align: center;
}
#amort-table tbody tr {
  border-bottom: 1px solid #f0f2f6;
  transition: background var(--transition);
}
#amort-table tbody tr:hover {
  background: #f5f8fc;
}
#amort-table tbody td {
  padding: 10px 16px;
  text-align: center;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
#amort-table tbody td:first-child {
  text-align: center;
  font-weight: 700;
  color: var(--navy);
}
#amort-table tbody td:nth-child(2) {
  text-align: center;
  font-weight: 600;
  color: var(--navy);
}
#amort-table th.col-num {
  width: 60px;
  text-align: center;
}
#amort-table tbody tr:last-child {
  border-bottom: none;
}
.td-aporte {
  color: var(--green-dark) !important;
  font-weight: 600 !important;
}
.td-saldo {
  font-weight: 500;
}
.row-zero .td-saldo {
  color: var(--green-dark) !important;
}
.table-note {
  font-size: .75rem;
  color: var(--text-muted);
}
.table-floating-footer {
  background: linear-gradient(180deg, rgba(241, 248, 233, 0.96) 0%, rgba(220, 237, 200, 1) 100%);
  border-top: 1px solid #aed581;
  display: flex;
  justify-content: space-around;
  padding: 12px 16px;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.04);
  z-index: 3;
}
.tff-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tff-label {
  font-size: 0.65rem;
  color: #33691e;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.tff-val {
  font-size: .95rem;
  font-weight: 700;
  color: #1b5e20;
}
.table-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}
.table-mini-progress {
  flex-grow: 1;
  max-width: 150px;
}
.tmp-track {
  background: #e2e8f0;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}
.tmp-fill {
  background: var(--navy);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}
/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, .5);
  text-align: center;
  font-size: .72rem;
  padding: 32px 18px;
  margin-top: 20px;
}
.footer-links {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.footer-links a:hover {
  opacity: 0.7;
}
/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.results-section {
  animation: fadeInUp .4s ease;
}
.kpi-card {
  animation: fadeInUp .35s ease both;
}
.kpi-card:nth-child(1) {
  animation-delay: .05s;
}
.kpi-card:nth-child(2) {
  animation-delay: .10s;
}
.kpi-card:nth-child(3) {
  animation-delay: .15s;
}
.kpi-card:nth-child(4) {
  animation-delay: .20s;
}
.kpi-card:nth-child(5) {
  animation-delay: .25s;
}
/* ============================================================
   RESPONSIVE — Mobile First
   ============================================================ */
@media (max-width: 1100px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-ad {
    display: none;
  }
}
@media (max-width: 860px) {
  .charts-section {
    grid-template-columns: 1fr;
  }
  .freedom-card {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    text-align: left;
  }
  .freedom-gauge-wrapper {
    width: 140px;
    height: 140px;
  }
  .freedom-pct {
    font-size: 1.7rem;
  }
}
@media (max-width: 640px) {
  .main-layout {
    padding: 16px 12px 32px;
  }
  .form-card {
    padding: 20px 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-actions {
    flex-direction: column;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .kpi-value {
    font-size: .9rem;
  }
  .ad-banner-horizontal {
    display: none;
  }
  .table-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 420px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}
/* Input number arrows remove */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
input[type=number] {
  -moz-appearance: textfield;
}
/* ============================================================
   MODULE TOGGLES (FGTS / REFI)
   ============================================================ */
.module-divider {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1.5px dashed var(--border);
}
.module-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.module-toggle input[type="checkbox"] {
  display: none;
}
.toggle-track {
  width: 42px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 20px;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}
.toggle-thumb {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.module-toggle input:checked~.toggle-track {
  background: var(--navy);
}
.module-toggle input:checked~.toggle-track .toggle-thumb {
  transform: translateX(18px);
}
.module-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
}
.module-badge {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .8px;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
}
.fgts-badge {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
}
.refi-badge {
  background: #f3e5f5;
  color: #7b1fa2;
  border: 1px solid #ce93d8;
}
/* Collapsible module fields */
.module-fields {
  overflow: hidden;
  max-height: 0;
  transition: max-height .4s cubic-bezier(.4, 0, .2, 1), opacity .3s ease;
  opacity: 0;
}
.module-fields.open {
  max-height: 700px;
  opacity: 1;
}
.module-fields-inner {
  margin-top: 14px;
  padding: 18px;
  background: #f8fafd;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
}
.refi-inner {
  border-color: #ce93d8;
  background: #fdf8ff;
}
/* Info box */
.info-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #e8f0fb;
  border: 1px solid #b8d0f0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: .78rem;
  color: #1a3a6e;
  line-height: 1.5;
}
.info-box svg {
  flex-shrink: 0;
  margin-top: 1px;
}
/* FGTS info-box group colspan workaround */
.fgts-info-box {
  grid-column: 1 / -1;
}
/* ============================================================
   PAYOFF DATE CARD
   ============================================================ */
.payoff-card {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.15);
  border: 1px solid #a5d6a7;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.payoff-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.2);
}
.payoff-icon {
  background: #27ae60;
  color: white;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3);
}
.payoff-content {
  flex-grow: 1;
}
.payoff-title {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2e7d32;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.payoff-date {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #1b5e20;
  line-height: 1.2;
  margin-bottom: 4px;
}
.payoff-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.payoff-duration {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #388e3c;
}
.payoff-badge {
  background: #1b5e20;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
}
.payoff-progress {
  background: white;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #a5d6a7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.payoff-progress-label {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #27ae60;
}
@media (max-width: 600px) {
  .payoff-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
  }
  
  .payoff-progress {
    width: 100%;
    margin-top: 8px;
  }
  
  .payoff-date {
    font-size: 1.75rem;
  }
}
/* ============================================================
   TIMELINE VISUAL
   ============================================================ */
.timeline-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: .85rem;
  font-family: 'Poppins', sans-serif;
}
.tl-paid { color: var(--navy); }
.tl-remaining { color: var(--text-muted); }
.timeline-track {
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.05);
}
.timeline-progress {
  height: 100%;
  background: linear-gradient(90deg, #1565c0, #42a5f5);
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.timeline-percent {
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  color: #1565c0;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
/* Tabela Linha Paga */
#amort-table tbody tr.row-paid {
  background-color: #f1f8e9;
  opacity: 0.8;
}
#amort-table tbody tr.row-paid td {
  color: #558b2f;
}
#amort-table tbody tr.row-paid td:first-child {
  font-weight: normal;
  color: #33691e;
}
.badge-paid {
  display: inline-block;
  background: #7cb342;
  color: white;
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 6px;
  font-weight: bold;
}
/* ─── DIDACTIC SECTION ─────────────────────────────────────────────── */
.didactic-section {
  margin-top: 24px;
}
.didactic-card {
  background: linear-gradient(135deg, #f0f7ff 0%, #f5fdf8 100%);
  border: 1px solid #d4e6f1;
  border-radius: 16px;
  padding: 32px;
}
.didactic-title {
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 24px;
  text-align: center;
}
.didactic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.didactic-item {
  background: rgba(255,255,255,0.85);
  border: 1px solid #e8f0fe;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.didactic-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,63,135,0.08);
}
.didactic-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}
.didactic-item h4 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.didactic-item p {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.5;
}
.didactic-results-info {
  background: rgba(255,255,255,0.9);
  border: 1px solid #c8e6c9;
  border-radius: 12px;
  padding: 24px;
}
.didactic-results-info h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: #27ae60;
  margin-bottom: 14px;
}
.didactic-results-info ul {
  list-style: none;
  padding: 0;
}
.didactic-results-info li {
  font-size: 0.88rem;
  color: #444;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.didactic-results-info li::before {
  content: "✓";
  color: #27ae60;
  font-weight: 700;
  position: absolute;
  left: 0;
}
.didactic-results-info li strong {
  color: var(--navy);
}
/* ─── COOKIE BANNER ───────────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1e293b;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  font-size: 0.88rem;
  transition: transform 0.4s ease-in-out;
}
#cookie-banner.hidden {
  transform: translateY(100%);
}
.cookie-content {
  flex: 1;
  margin-right: 20px;
}
.cookie-content a {
  color: var(--green);
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  gap: 12px;
}
.btn-cookie-accept {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-cookie-accept:hover {
  background: #219150;
}
/* ─── EDUCATIONAL DISCLAIMER ────────────────────────────────────────── */
.edu-disclaimer {
  background: #fff9db;
  border: 1px solid #f9eba0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: #856404;
  cursor: pointer;
  user-select: none;
  width: 100%;
}
.edu-disclaimer.minimized {
  width: fit-content;
  padding: 4px 10px;
}
.edu-disclaimer.minimized span {
  display: none;
}
.edu-disclaimer.minimized::after {
  content: "Ver aviso educacional";
  font-weight: 600;
}
.edu-disclaimer strong {
  font-weight: 700;
}