/* ==========================================================================
   TRINO — Fundos & Lâminas
   ========================================================================== */

#fundos-root {
  color: #b45a2e;
  background:
    radial-gradient(circle at 12% -10%, rgba(216, 105, 54, .08), transparent 32rem),
    #e5ecf1;
}

.fund-page {
  width: min(1420px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.fund-page-header,
.fund-toolbar,
.fund-admin-card > header,
.fund-record-title,
.operation-fund-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.fund-page-header h2 {
  margin: 7px 0 6px;
  color: #353941;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: -.025em;
}

.fund-page-header p {
  max-width: 750px;
  margin: 0;
  color: #474c57;
  font-size: 13px;
  line-height: 1.65;
}

.fund-kicker {
  color: #e76427;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.fund-header-actions,
.fund-record-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fund-page .btn {
  min-height: 36px;
  border: 1px solid #f6f8fa;
  border-radius: 8px;
  background: #e8eef3;
  color: #212529;
  padding: 0 13px;
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.fund-page .btn:hover,
.fund-link:hover {
  border-color: #864527;
  color: #e76427;
}

.fund-page .btn.primary {
  border-color: #e2642a;
  background: #e2642a;
  color: #e7edf2;
}

.fund-coverage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0 14px;
  overflow: hidden;
  border: 1px solid #f3f6f9;
  border-radius: 12px;
  background: #e8eef2;
}

.fund-metric {
  min-width: 0;
  padding: 17px 20px;
  border-right: 1px solid #f3f6f9;
}

.fund-metric:last-child { border-right: 0; }

.fund-metric span,
.operation-fund-metrics span {
  display: block;
  color: #69717b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.fund-metric strong {
  display: block;
  margin-top: 7px;
  color: #b45a2e;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.fund-metric small {
  display: block;
  margin-top: 4px;
  color: #6e7681;
  font-size: 9px;
}

.fund-metric.positive strong { color: #27865a; }
.fund-metric.negative strong { color: #b81e33; }
.fund-metric.warning strong { color: #e76427; }

.fund-rule-banner {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(226, 100, 42, .3);
  border-radius: 10px;
  background: rgba(226, 100, 42, .065);
}

.fund-rule-banner strong {
  color: #e76427;
  font-size: 11px;
}

.fund-rule-banner p {
  margin: 0;
  color: #5c6470;
  font-size: 11px;
  line-height: 1.5;
}

.fund-link {
  color: #b45a2e;
  font-size: 10px;
  font-weight: 650;
  text-decoration: none;
}

.fund-toolbar {
  margin: 18px 0 10px;
  padding: 12px;
  border: 1px solid #f2f6f8;
  border-radius: 10px;
  background: #e7eef2;
}

.fund-toolbar > input {
  flex: 1;
  min-width: 230px;
  height: 38px;
  border: 1px solid #f6f9fa;
  border-radius: 7px;
  background: #e6ecf1;
  color: #b45a2e;
  padding: 0 13px;
  font-size: 12px;
}

.fund-toolbar > input:focus,
.fund-form-field input:focus,
.fund-form-field select:focus,
.fund-form-field textarea:focus {
  outline: 2px solid rgba(226, 100, 42, .42);
  outline-offset: 1px;
  border-color: #a0532f;
}

.fund-cdi-status {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 9px;
  min-width: 155px;
}

.fund-cdi-status span,
.fund-cdi-status small {
  color: #6c747f;
  font-size: 9px;
}

.fund-cdi-status strong {
  color: #e76427;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.fund-cdi-status small { grid-column: 1 / -1; }

.fund-list {
  display: grid;
  gap: 10px;
}

.fund-admin-card {
  overflow: hidden;
  border: 1px solid #f2f6f8;
  border-radius: 11px;
  background: linear-gradient(180deg, #e8eef3, #e7eef2);
}

.fund-admin-card > header {
  padding: 13px 15px;
  border-bottom: 1px solid #f2f5f8;
}

.fund-admin-card > header > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.fund-admin-card h3 {
  margin: 0;
  color: #b45a2e;
  font-size: 13px;
  letter-spacing: .035em;
}

.fund-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(35, 30, 61, 0.0375);
}

.fund-status-dot.confirmed { background: #27875a; }
.fund-status-dot.partial { background: #e76427; }
.fund-status-dot.pending { background: #78808c; }

.fund-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #fafbfc;
  border-radius: 999px;
  padding: 0 8px;
  color: #4c525d;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.fund-status.confirmed {
  border-color: rgba(39, 135, 90, .35);
  color: #24895a;
  background: rgba(39, 135, 90, .06);
}

.fund-status.partial {
  border-color: rgba(231, 100, 39, .4);
  color: #e76427;
  background: rgba(231, 100, 39, .06);
}

.fund-record-body,
.fund-record-pending {
  padding: 16px;
}

.fund-record-title > div {
  display: grid;
  gap: 4px;
}

.fund-record-title strong {
  color: #b45a2e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

.fund-record-title span:not(.fund-status),
.fund-record-pending p {
  margin: 0;
  color: #494e59;
  font-size: 11px;
  line-height: 1.45;
}

.fund-record-pending small {
  color: #727a86;
  font-size: 9px;
}

.fund-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 15px 0;
  overflow: hidden;
  border: 1px solid #f6f8fa;
  border-radius: 8px;
}

.fund-metrics .fund-metric { padding: 13px 14px; }
.fund-metrics .fund-metric strong { font-size: 14px; }

.fund-strategy {
  display: grid;
  gap: 5px;
  margin: 14px 0;
  padding: 12px 13px;
  border-left: 2px solid #e3652b;
  background: rgba(227, 101, 43, .06);
}

.fund-strategy span {
  color: #666d78;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.fund-strategy strong {
  color: #33373f;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
}

.fund-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 10px;
  color: #727b86;
  font-size: 9px;
}

.fund-other-records {
  border-top: 1px solid #f2f5f8;
  padding: 10px 15px;
  color: #4d535e;
  font-size: 10px;
}

.fund-other-records summary { cursor: pointer; }
.fund-other-records > div { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; }
.fund-other-records button {
  border: 1px solid #f7f9fb;
  border-radius: 6px;
  background: #e6edf2;
  color: #3d414a;
  padding: 7px 9px;
  font-size: 9px;
  cursor: pointer;
}

.fund-empty {
  padding: 40px;
  border: 1px dashed #f7f9fb;
  border-radius: 10px;
  color: #656d77;
  text-align: center;
  font-size: 12px;
}

.fund-page-footer {
  margin-top: 16px;
  color: #7a828d;
  font-size: 9px;
  line-height: 1.5;
}

/* Editor documental */
.fund-editor-overlay {
  z-index: 10030;
  align-items: flex-start;
  overflow-y: auto;
  padding: 28px 14px;
  background: rgba(226, 234, 239, .78);
  backdrop-filter: blur(8px);
}

.fund-editor {
  width: min(920px, calc(100vw - 28px));
  margin: auto;
  border: 1px solid #f8fafb;
  border-radius: 13px;
  background: #e8eef3;
  box-shadow: 0 28px 90px rgba(35, 30, 61, 0.1925);
  color: #b45a2e;
}

.fund-editor > header,
.fund-editor > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}

.fund-editor > header { border-bottom: 1px solid #f2f6f8; }
.fund-editor > footer {
  justify-content: flex-end;
  border-top: 1px solid #f2f6f8;
}
.fund-editor > footer .danger { margin-right: auto; color: #b62034; }

.fund-editor h2 {
  margin: 4px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}

.fund-editor header p {
  margin: 0;
  color: #656c76;
  font-size: 10px;
}

.fund-editor-close {
  width: 34px;
  height: 34px;
  border: 1px solid #f9fbfc;
  border-radius: 8px;
  background: transparent;
  color: #30333a;
  font-size: 20px;
  cursor: pointer;
}

.fund-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
  padding: 18px 20px;
}

.fund-form-field {
  display: grid;
  align-content: start;
  gap: 6px;
  color: #3e424b;
  font-size: 10px;
}

.fund-form-field input,
.fund-form-field select,
.fund-form-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 39px;
  border: 1px solid #f7f9fb;
  border-radius: 7px;
  background: #e6edf2;
  color: #212529;
  padding: 9px 11px;
  font: inherit;
  font-size: 11px;
}

.fund-form-field textarea { resize: vertical; min-height: 74px; }
.fund-form-field small { color: #757d89; font-size: 8px; line-height: 1.4; }

.fund-quota-section {
  margin: 0 20px 18px;
  border: 1px solid #f5f7f9;
  border-radius: 9px;
  background: #e7edf2;
}

.fund-quota-section > div:first-child {
  display: grid;
  gap: 3px;
  padding: 13px 16px 0;
}

.fund-quota-section strong { font-size: 11px; }
.fund-quota-section span { color: #6c747f; font-size: 9px; }
.fund-form-grid.quota { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 12px; }
.fund-form-status { min-height: 20px; padding: 0 20px 8px; color: #b71f33; font-size: 10px; }

/* Resumo dentro da operação */
.operation-fund-summary {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(226, 100, 42, .28);
  border-radius: 9px;
  background: rgba(226, 100, 42, .045);
}

.operation-fund-head { padding: 12px 13px; }
.operation-fund-head > div { display: grid; gap: 3px; }
.operation-fund-head span {
  color: #c4541f;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .11em;
}
.operation-fund-head strong { color: #30343b; font-size: 11px; }
.operation-fund-head button {
  border: 0;
  background: transparent;
  color: #e76427;
  font-size: 9px;
  cursor: pointer;
}

.operation-fund-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(226, 100, 42, .16);
  border-bottom: 1px solid rgba(226, 100, 42, .16);
}

.operation-fund-metrics > div {
  padding: 10px 13px;
  border-right: 1px solid rgba(226, 100, 42, .16);
}
.operation-fund-metrics > div:last-child { border-right: 0; }
.operation-fund-metrics strong {
  display: block;
  margin-top: 4px;
  color: #b45a2e;
  font-size: 10px;
}
.operation-fund-summary > p {
  margin: 0;
  padding: 10px 13px;
  color: #646b75;
  font-size: 9px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .fund-page { width: min(100% - 24px, 1420px); padding-top: 22px; }
  .fund-page-header { align-items: flex-start; }
  .fund-coverage, .fund-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fund-coverage .fund-metric:nth-child(2),
  .fund-metrics .fund-metric:nth-child(2) { border-right: 0; }
  .fund-rule-banner { grid-template-columns: 1fr; gap: 7px; }
  .fund-form-grid.quota { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .fund-page-header, .fund-toolbar, .fund-admin-card > header, .fund-record-title {
    align-items: stretch;
    flex-direction: column;
  }
  .fund-header-actions { width: 100%; }
  .fund-header-actions .btn { flex: 1; justify-content: center; }
  .fund-coverage, .fund-metrics, .fund-form-grid, .fund-form-grid.quota { grid-template-columns: 1fr; }
  .fund-metric { border-right: 0; border-bottom: 1px solid #f3f6f9; }
  .fund-metric:last-child { border-bottom: 0; }
  .fund-toolbar > input { width: 100%; min-width: 0; }
}

/* -------------------------------------------------------------------------
   Aba "Fundo" da operação (substitui a antiga página Fundos & Lâminas).
   Reaproveita .fund-record-body / .fund-metrics / .fund-record-links já
   estilizados acima; aqui ficam só o cabeçalho, o selo de confiança, o
   bloco de fontes oficiais e o rodapé de disclaimer.
   ------------------------------------------------------------------------- */
.operation-fund-analysis {
  margin-top: 4px;
  border: 1px solid rgba(226, 100, 42, .28);
  border-radius: 10px;
  background: rgba(226, 100, 42, .045);
  overflow: hidden;
}
.operation-fund-analysis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226, 100, 42, .16);
}
.operation-fund-analysis-head > div { display: grid; gap: 3px; }
.operation-fund-analysis-head span:first-child {
  color: #c4541f;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .11em;
}
.operation-fund-analysis-head strong { color: #30343b; font-size: 12px; }
.fund-status-chip {
  flex: none;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid rgba(226, 100, 42, .3);
  color: #d16c3e;
}
.fund-status-chip.confirmed { color: #2a835a; border-color: rgba(42, 131, 90, .4); background: rgba(42, 131, 90, .08); }
.fund-status-chip.partial   { color: #e76427; border-color: rgba(226, 100, 42, .42); background: rgba(226, 100, 42, .09); }
.fund-status-chip.pending   { color: #4e535f; border-color: rgba(78, 83, 95, .35); background: rgba(78, 83, 95, .08); }
.operation-fund-analysis-detail {
  margin: 0;
  padding: 10px 14px 0;
  color: #3f444d;
  font-size: 9.5px;
  line-height: 1.5;
}
.operation-fund-analysis .fund-record-body,
.operation-fund-analysis .fund-record-pending { padding: 12px 14px; }
.operation-fund-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 11px 14px;
  border-top: 1px solid rgba(226, 100, 42, .16);
}
.operation-fund-sources a { color: #e76427; font-size: 9px; text-decoration: none; }
.operation-fund-sources a:hover { text-decoration: underline; }
.operation-fund-disclaimer {
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid rgba(226, 100, 42, .12);
  color: #6c747f;
  font-size: 8.5px;
  line-height: 1.5;
}

/* ==========================================================================
   Bloco "Rendimento do crédito contemplado" no card da carta (§21)
   Dark/navy, destaque dourado, compacto. Separado da TIR por design (§22).
   ========================================================================== */
.fund-card-block {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(234, 240, 244, 0.85), rgba(234, 240, 244, 0.65));
  border: 1px solid rgba(231, 102, 41, 0.22);
  font-size: 12px;
}
.fund-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.fund-card-title {
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #e76629;
  font-weight: 700;
}
.fund-card-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid currentColor;
  cursor: help;
}
.fund-card-badge.tone-confirmed { color: #1a7f4f; }
.fund-card-badge.tone-partial   { color: #e76629; }
.fund-card-badge.tone-likely    { color: #a86a12; }
.fund-card-badge.tone-pending   { color: #c1303f; }
.fund-card-badge.tone-neutral   { color: #4a4f5a; }

.fund-card-rows { display: grid; gap: 3px; }
.fund-card-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  line-height: 1.5;
}
.fund-card-row span { opacity: 0.7; }
.fund-card-row strong { text-align: right; font-weight: 600; }
.fund-card-row.tone-good strong { color: #1a7f4f; }
.fund-card-row.tone-pending strong { color: #c1303f; }

.fund-card-note {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.45;
  opacity: 0.82;
}
.fund-card-updated {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  opacity: 0.6;
}
.fund-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.fund-card-link {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid rgba(35, 30, 61, 0.3);
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.fund-card-link:hover { border-color: #e76629; color: #e76629; }
.fund-card-disclaimer {
  margin: 8px 0 0;
  padding-top: 7px;
  border-top: 1px dashed rgba(35, 30, 61, 0.18);
  font-size: 10px;
  line-height: 1.45;
  opacity: 0.62;
}
@media (max-width: 560px) {
  .fund-card-row { flex-direction: column; gap: 0; }
  .fund-card-row strong { text-align: left; }
}

/* laranja escuro: o vivo dá 3,3:1 e este link é texto pequeno */
.operation-fund-head button { color: #c4541f; }
