.team-reference-modal { --ref-navy: #1e3d59; --ref-muted: #697b8c; }
.team-reference-modal .modal-dialog { max-width: 1120px; margin: 1.75rem auto; padding: 0 16px; }
.team-reference-modal .modal-content { border: 1px solid #e2e9f0; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 80px #142f4a30; }
.team-reference-modal .modal-header { padding: 24px 30px 20px; border-bottom: 1px solid #e8eef3; }
.team-reference-modal .modal-title { line-height: 1.3; }
.team-ref-eyebrow { display: block; font-size: 10px; letter-spacing: 1.5px; font-weight: 700; color: var(--ref-muted); margin-bottom: 9px; }
.team-ref-modal-title { display: block; font-size: 25px; font-weight: 700; letter-spacing: -.6px; color: var(--ref-navy); }
.team-reference-modal .modal-body { padding: 24px 30px; background: #fbfcfe; }
.team-ref-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.team-ref-criteria { padding: 14px 0; }
.team-ref-content p { font-size: 13px; line-height: 1.7; color: #536779; margin: 0 0 16px; }
.team-ref-content strong { color: var(--ref-navy); }
.team-ref-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.team-ref-chip { background: #eaf0f6; border: 1px solid #dde7f0; border-radius: 6px; padding: 5px 9px; color: #3d5d77; font-size: 11px; font-weight: 600; }
.team-ref-formula-card { padding: 20px 24px; background: #1e3d59; border-radius: 12px; color: white; }
.team-ref-formula-card .team-ref-eyebrow { color: #b5cbdc; }
.team-ref-formula { font-size: 25px; font-weight: 650; letter-spacing: -.5px; line-height: 1.3; }
.team-ref-equivalence { display: block; color: #b8d9ec; font-size: 12px; margin: 7px 0 14px; }
.team-ref-formula-card p { font-size: 11px; color: #d5e1eb; margin: 0; line-height: 1.6; }
.team-ref-section { margin-top: 26px; }
.team-ref-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.team-ref-section-heading h6 { color: var(--ref-navy); font-size: 14px; font-weight: 700; margin: 0; }
.team-ref-section-meta { color: var(--ref-muted); font-size: 11px; }
.team-ref-table-frame { border: 1px solid #dfe7ef; border-radius: 10px; overflow: hidden; background: white; }
.team-ref-table { margin: 0; font-size: 12px; color: #344e65; font-variant-numeric: tabular-nums; --bs-table-hover-bg: #f3f7fb; }
.team-ref-table > thead > tr > th { background: #eff4f8; color: #516a80; font-size: 11px; font-weight: 650; border-bottom: 1px solid #dfe7ef; vertical-align: middle; }
.team-ref-table > :not(caption) > * > * { padding: 11px 14px; border-color: #edf1f5; text-align: right; white-space: nowrap; }
.team-ref-table th small { display: block; color: #8091a0; font-size: 10px; font-weight: 400; margin-top: 3px; }
.team-ref-table tr > :first-child, .team-ref-matches tr > :nth-child(2) { text-align: left; }
.team-ref-table tbody tr:last-child > * { border-bottom: 0; }
.team-ref-matches tbody tr > :nth-child(2) { font-weight: 600; color: var(--ref-navy); }
.team-ref-calculation tr > :last-child { background: #eaf3fb; color: #174d77; font-weight: 750; }
.team-ref-pending { margin-top: 16px; padding: 10px 14px; border-radius: 8px; background: #fff7e7; color: #886423; font-size: 11px; }
.team-reference-modal .modal-footer { padding: 14px 30px; border-top: 1px solid #e8eef3; background: white; }
.team-reference-modal .modal-footer .btn { background: #1e3d59; border-color: #1e3d59; border-radius: 8px; padding: 8px 24px; font-size: 12px; font-weight: 600; }
@media (max-width: 700px) {
  .team-reference-modal .modal-dialog { padding: 0 8px; margin: .5rem auto; }
  .team-reference-modal .modal-header, .team-reference-modal .modal-body { padding: 18px; }
  .team-ref-summary { grid-template-columns: 1fr; gap: 8px; }
  .team-ref-section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .team-ref-formula { font-size: 23px; }
  .team-ref-table > :not(caption) > * > * { padding: 10px; }
}

.team-reference-modal .modal-body { scrollbar-width: thin; scrollbar-color: #bacbd9 #f1f5f9; }
.team-reference-modal .modal-body::-webkit-scrollbar { width: 7px; }
.team-reference-modal .modal-body::-webkit-scrollbar-thumb { background: #bacbd9; border-radius: 8px; }
