/* ==================================================================
   Simulador de Renda Fixa · UX/UI redesenhado
   ================================================================== */

/* ======= HERO ======= */
.sim-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  background-image: radial-gradient(circle at top right, rgba(44,122,123,0.05), transparent 50%);
}
.sim-hero-text { min-width: 0; }
.sim-hero .hero-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--teal);
  margin-bottom: 10px;
}
.sim-hero .hero-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 10px;
  max-width: 700px;
}
.sim-hero .hero-sub {
  font-size: 14px;
  color: var(--text-sec);
  max-width: 680px;
  line-height: 1.55;
}
.sim-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 220px;
}

/* ======= CTAs ======= */
.btn-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: #FFF;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30,58,95,0.18), 0 1px 2px rgba(30,58,95,0.08);
  transition: all .2s;
  letter-spacing: -0.1px;
}
.btn-cta-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(30,58,95,0.25); }
.btn-cta-primary:active { transform: translateY(0); }

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
}
.btn-cta-secondary:hover { border-color: var(--text); background: var(--surface-alt); }

/* ======= TOPBAR NAV ======= */
.topbar-nav-main {
  display: flex;
  gap: 4px;
  margin-left: 24px;
  margin-right: auto;
  padding: 3px;
  background: var(--surface-muted);
  border-radius: 8px;
}
.topbar-nav-main a {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 5px;
  color: var(--text-sec);
  text-decoration: none;
  transition: all .15s;
}
.topbar-nav-main a:hover { color: var(--text); }
.topbar-nav-main a.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ======= RATES (automático BCB) ======= */
.sim-rates-auto {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.rates-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.rates-label {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.rates-source {
  font-size: 11px;
  color: var(--text-weak);
  font-weight: 500;
}
.rates-source.ok { color: var(--green); font-weight: 700; }
.rates-source.error { color: var(--red); font-weight: 700; }
.rates-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.rate-card {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
  transition: all .2s;
}
.rate-card:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }
.rate-card.accent {
  background: linear-gradient(135deg, rgba(44,122,123,0.06), rgba(30,58,95,0.04));
  border-color: rgba(44,122,123,0.2);
}
.rate-card-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-sec);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.rate-card-value {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rate-card-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-weak);
  margin-top: 4px;
}
.rate-card-date {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-weak);
  margin-top: 8px;
  opacity: 0.7;
}
@keyframes ratesPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.rate-card-value.loading {
  animation: ratesPulse 1.2s ease-in-out infinite;
  color: var(--text-weak);
}

/* ======= SUMMARY ======= */
.sim-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow .15s;
}
.summary-card:hover { box-shadow: var(--shadow-md); }
.summary-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-sec);
  text-transform: uppercase;
}
.summary-value {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.05;
  margin: 4px 0 2px;
}
.summary-value-suf {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-weak);
  letter-spacing: -0.3px;
}
.summary-value.positive { color: var(--green); }
.summary-value.negative { color: var(--red); }
.summary-sub {
  font-size: 12px;
  color: var(--text-sec);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.summary-tax {
  font-size: 11px;
  color: var(--red);
  font-weight: 700;
  padding: 2px 8px;
  background: var(--red-soft);
  border-radius: 999px;
}
.progress-bar {
  height: 8px;
  background: var(--surface-muted);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--teal));
  border-radius: 4px;
  transition: width .6s ease;
}
.progress-bar-fill.warn { background: var(--yellow); }
.progress-bar-fill.danger { background: var(--red); }

/* ======= SECTION TITLE ROW com action ======= */
.section-title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 32px 0 14px;
}
.section-title-h {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-sec);
  text-transform: uppercase;
  margin: 0;
}
.section-title-meta {
  font-size: 12px;
  color: var(--text-weak);
  font-weight: 500;
  flex: 1;
}
.section-title-actions { display: flex; gap: 8px; align-items: center; }

/* ======= VIEW TOGGLE ======= */
.view-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-muted);
  border-radius: 8px;
}
.view-toggle button {
  font-family: inherit;
  padding: 7px 11px;
  border: none;
  background: transparent;
  color: var(--text-sec);
  cursor: pointer;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.view-toggle button:hover { color: var(--text); }
.view-toggle button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ======= CONGLOMERADOS ======= */
.conglomerados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.conglom-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all .2s;
}
.conglom-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.conglom-card.over {
  border-color: var(--red);
  background: linear-gradient(135deg, var(--red-soft) 0%, #FFF 50%);
}
.conglom-card.over::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
}
.conglom-card.warn { border-color: var(--yellow); }
.conglom-card.warn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--yellow);
}
.conglom-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.conglom-badge.ok { background: var(--green-soft); color: var(--green); }
.conglom-badge.warn { background: var(--yellow-soft); color: var(--yellow); }
.conglom-badge.over { background: var(--red-soft); color: var(--red); }
.conglom-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}
.conglom-apps {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-weak);
  margin-bottom: 16px;
}
.conglom-value {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.conglom-label {
  font-size: 11px;
  color: var(--text-sec);
  margin-bottom: 14px;
}
.conglom-bar {
  height: 10px;
  background: var(--surface-muted);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.conglom-bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 5px;
  transition: width .5s ease;
}
.conglom-bar-fill.warn { background: var(--yellow); }
.conglom-bar-fill.danger { background: var(--red); }
.conglom-remaining {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sec);
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 6px;
}
.conglom-remaining.over { color: var(--red); }
.conglom-remaining.warn { color: var(--yellow); }

/* ======= APPLICATIONS · CARDS VIEW ======= */
.apps-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.app-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.app-card.has-danger { border-color: var(--red); }
.app-card.has-danger::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.app-card-logo {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: contain; background: #f8f9fa;
  border: 1px solid var(--border-soft); padding: 4px;
  flex-shrink: 0;
}
.app-card-logo-fallback {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface-muted); border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--text-sec);
  flex-shrink: 0;
}
.app-card-titles { min-width: 0; flex: 1; }
.app-card-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-card-inst {
  font-size: 12px;
  color: var(--text-sec);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-card-actions {
  display: flex;
  gap: 2px;
  opacity: 0.4;
  transition: opacity .15s;
}
.app-card:hover .app-card-actions { opacity: 1; }
.action-btn {
  background: transparent;
  border: none;
  color: var(--text-sec);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 9px;
  border-radius: 6px;
  line-height: 1;
}
.action-btn:hover { background: var(--surface-muted); color: var(--text); }
.action-btn.danger:hover { background: var(--red-soft); color: var(--red); }

.app-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-tipo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.chip-tipo.fgc { background: var(--green-soft); color: var(--green); }
.chip-tipo.nofgc { background: var(--red-soft); color: var(--red); }
.chip-tipo.tesouro { background: #E0F2FE; color: #0369A1; }
.chip-prazo {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--surface-muted);
  color: var(--text-sec);
  font-variant-numeric: tabular-nums;
}

.app-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.metric-cell { display: flex; flex-direction: column; gap: 2px; }
.metric-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--text-weak);
  text-transform: uppercase;
}
.metric-value {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -0.3px;
}
.metric-value.big { font-size: 20px; }
.metric-value.green { color: var(--green); }
.metric-value.red { color: var(--red); }
.metric-sub {
  font-size: 11px;
  color: var(--text-sec);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.app-card-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
}
.alert-chip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.alert-chip.danger { background: var(--red-soft); color: var(--red); }
.alert-chip.danger::before { background: var(--red); }
.alert-chip.warn { background: var(--yellow-soft); color: var(--yellow); }
.alert-chip.warn::before { background: var(--yellow); }
.alert-chip.info { background: #E0F2FE; color: #0369A1; }
.alert-chip.info::before { background: #0369A1; }
.alert-chip.ok { background: var(--green-soft); color: var(--green); }
.alert-chip.ok::before { background: var(--green); }

/* ======= APPLICATIONS · TABLE VIEW (alternativa) ======= */
.apps-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
}
.apps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 1000px;
}
.apps-table thead th {
  background: var(--surface-alt);
  padding: 12px 16px;
  text-align: left;
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.8px;
  color: var(--text-sec);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.apps-table thead th.num { text-align: right; }
.apps-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.apps-table tbody td.num { text-align: right; font-weight: 700; }
.apps-table tbody tr:hover { background: var(--surface-alt); }
.apps-table tbody tr:last-child td { border-bottom: none; }

.empty-state {
  padding: 60px 30px;
  text-align: center;
  color: var(--text-sec);
}
.empty-state-icon {
  font-size: 42px;
  margin-bottom: 12px;
  opacity: 0.4;
}
.empty-state-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.empty-state-sub {
  font-size: 13px;
  margin-bottom: 18px;
}

/* ======= FAB ======= */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: #FFF;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(30,58,95,0.3), 0 4px 8px rgba(30,58,95,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  transition: all .2s;
}
.fab:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 14px 32px rgba(30,58,95,0.4); }

/* ======= MODAL (refinado) ======= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 25, 0.6);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  backdrop-filter: blur(6px);
  overflow-y: auto;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: 0 30px 70px rgba(15,20,25,0.35);
  animation: modalSlide .25s ease-out;
}
.modal-small { max-width: 540px; }
@keyframes modalSlide {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-header h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 2px;
}
.modal-subtitle {
  font-size: 12.5px;
  color: var(--text-sec);
  font-weight: 500;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 26px;
  color: var(--text-sec);
  cursor: pointer;
  padding: 0;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--surface-muted); color: var(--text); }

.modal-form { padding: 24px 28px; }
.form-section {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-soft);
}
.form-section:last-of-type { border-bottom: none; margin-bottom: 10px; }
.form-section-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.form-row:last-child { margin-bottom: 0; }
.form-row:has(.form-field:only-child) { grid-template-columns: 1fr; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.form-hint {
  font-size: 10.5px;
  color: var(--text-weak);
  font-weight: 500;
  font-style: italic;
  margin-left: 8px;
}
.form-field input,
.form-field select {
  font-family: inherit;
  font-size: 14px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text);
  outline: none;
  transition: all .15s;
  font-variant-numeric: tabular-nums;
}
.form-field input:focus,
.form-field select:focus {
  border-color: var(--text);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(15,20,25,0.05);
}
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  margin-top: 10px;
}

.max-result {
  margin-top: 12px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: #FFF;
  border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
  position: relative;
  overflow: hidden;
}
.max-result::before {
  content: '🛡';
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 38px;
  opacity: 0.25;
}
.max-result-label { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; opacity: 0.85; }
.max-result-value { font-size: 28px; font-weight: 900; letter-spacing: -1px; line-height: 1; margin: 6px 0; }
.max-result-explain { font-size: 11.5px; opacity: 0.92; line-height: 1.5; }

/* ======= EDU (acordeão) ======= */
.sim-edu {
  margin-top: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.edu-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: var(--surface-alt);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  transition: background .15s;
}
.edu-toggle:hover { background: var(--surface-muted); }
.edu-toggle-title { display: flex; align-items: center; gap: 10px; }
.edu-chevron { transition: transform .25s ease; color: var(--text-sec); }
.sim-edu.open .edu-chevron { transform: rotate(180deg); color: var(--text); }
.edu-content { padding: 24px 28px 28px; }
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.edu-card {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.edu-card h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.edu-card p {
  font-size: 12.5px;
  color: var(--text-sec);
  line-height: 1.55;
  margin: 0 0 6px;
}
.edu-card ul { margin: 6px 0 6px 18px; padding: 0; }
.edu-card li { font-size: 12.5px; color: var(--text-sec); margin: 2px 0; }

/* ======= INST SEARCH (modal) ======= */
.inst-search-wrap { position: relative; }
.inst-search-wrap input {
  font-family: inherit; font-size: 14px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-alt); color: var(--text);
  outline: none; width: 100%; transition: all .15s;
}
.inst-search-wrap input:focus {
  border-color: var(--text); background: var(--surface);
  box-shadow: 0 0 0 3px rgba(15,20,25,0.05);
}
.inst-search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 12px 36px rgba(15,20,25,0.12);
  max-height: 240px; overflow-y: auto; z-index: 50;
}
.inst-search-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; transition: background .1s;
}
.inst-search-item:hover { background: var(--surface-alt); }
.inst-search-item img {
  width: 28px; height: 28px; border-radius: 6px;
  object-fit: contain; background: #f8f9fa;
  border: 1px solid var(--border-soft); padding: 3px; flex-shrink: 0;
}
.inst-search-item-fallback {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--surface-muted); border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: var(--text-sec); flex-shrink: 0;
}
.inst-search-item-info { flex: 1; min-width: 0; }
.inst-search-item-name { font-size: 13px; font-weight: 700; }
.inst-search-item-meta { font-size: 11px; color: var(--text-sec); }
.inst-search-item-health {
  font-size: 12px; font-weight: 800; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.inst-search-empty {
  padding: 16px; text-align: center; font-size: 13px;
  color: var(--text-weak);
}

/* Selected institution card */
.inst-selected {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-top: 10px;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 10px;
}
.inst-sel-logo {
  width: 36px; height: 36px; border-radius: 8px;
  object-fit: contain; background: #f8f9fa;
  border: 1px solid var(--border-soft); padding: 4px;
}
.inst-sel-info { flex: 1; min-width: 0; }
.inst-sel-name { font-size: 14px; font-weight: 800; }
.inst-sel-meta { font-size: 11px; color: var(--text-sec); font-weight: 500; }
.inst-sel-health { font-size: 13px; font-weight: 800; flex-shrink: 0; }
.inst-sel-change {
  font-family: inherit; font-size: 11px; font-weight: 700;
  padding: 6px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--teal); cursor: pointer; flex-shrink: 0;
}
.inst-sel-change:hover { border-color: var(--teal); }

/* ======= PRAZO RESUMO ======= */
.prazo-resumo-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--teal);
  padding: 11px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

/* ======= FGC CHART SECTION ======= */
.fgc-chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}
.fgc-chart-section .section-title-row { margin-top: 0; }
.fgc-chart-wrap {
  position: relative;
  height: 280px;
  margin: 14px 0 10px;
}
.fgc-chart-footer {
  display: flex;
  gap: 16px;
  padding: 8px 0 0;
  border-top: 1px solid var(--border-soft);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.fgc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sec);
}
.fgc-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.fgc-legend-dot.green { background: var(--green); }
.fgc-legend-dot.red { background: var(--red); }

.fgc-calc-inline {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.fgc-calc-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.fgc-calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.fgc-calc-row .form-field input,
.fgc-calc-row .form-field select {
  padding: 8px 12px;
  font-size: 13px;
}
.fgc-calc-row .form-label {
  font-size: 11px;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 960px) {
  .sim-hero { grid-template-columns: 1fr; }
  .sim-hero-actions { flex-direction: row; }
  .sim-hero-actions button { flex: 1; }
  .sim-summary { grid-template-columns: repeat(2, 1fr); }
  .apps-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .sim-hero { padding: 28px 24px; }
  .sim-hero .hero-title { font-size: 26px; }
  .sim-summary { grid-template-columns: 1fr; }
  .sim-rates { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sim-hero-actions { flex-direction: column; }
  .rates-label { border-right: none; }
  .fab { bottom: 20px; right: 20px; }
  .fgc-calc-row { grid-template-columns: 1fr; }
  .fgc-chart-wrap { height: 260px; }
  .fgc-chart-section { padding: 20px 18px; }
  .rates-cards { grid-template-columns: 1fr; }
  .sim-rates-auto { padding: 16px 18px; }
}
