/* Programa de indicação: composição própria sobre os primitives MixFiscalUI. */
.referrals-module { --referrals-ink: #16343b; --referrals-muted: #5b7479; --referrals-line: rgba(24, 67, 75, .14); color: var(--referrals-ink); max-width: 1440px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 42px) 56px; }
.referrals-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.referrals-header h1 { margin: 4px 0 6px; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.03em; }
.referrals-header p { margin: 0; color: var(--referrals-muted); max-width: 680px; }
.referrals-header-actions, .referrals-row-actions, .referrals-toolbar, .referrals-filters__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.referrals-notice { min-height: 24px; color: var(--referrals-muted); margin: 8px 0; }
.referrals-notice[data-tone="error"] { color: #a93232; }
.referrals-tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--referrals-line); overflow-x: auto; margin: 22px 0 20px; scrollbar-width: thin; }
.referrals-tab { flex: 0 0 auto; border: 0; background: transparent; color: var(--referrals-muted); padding: 11px 14px; font: inherit; cursor: pointer; border-bottom: 2px solid transparent; }
.referrals-tab:hover, .referrals-tab:focus-visible { color: var(--referrals-ink); background: rgba(28, 116, 117, .06); outline: none; }
.referrals-tab.is-active { color: #116867; border-color: #12877d; font-weight: 700; }
.referrals-filters { border: 1px solid var(--referrals-line); border-radius: 14px; padding: 16px; margin-bottom: 18px; background: rgba(244, 251, 249, .8); }
.referrals-filters__row { display: grid; grid-template-columns: repeat(6, minmax(125px, 1fr)); gap: 12px; }
.referrals-filters__actions { margin-top: 14px; justify-content: flex-start; }
.referrals-filters__scope, .referrals-muted { color: var(--referrals-muted); font-size: 13px; }
.referrals-link-button { border: 0; background: transparent; color: #116867; cursor: pointer; padding: 7px 4px; font: inherit; }
.referrals-field { display: grid; gap: 6px; min-width: 0; }
.referrals-field > span { font-size: 12px; font-weight: 700; color: var(--referrals-muted); }
.referrals-field--wide { grid-column: 1 / -1; }
.referrals-field input[type="checkbox"] { width: 18px; height: 18px; }
.referrals-metrics { display: grid; grid-template-columns: repeat(8, minmax(120px, 1fr)); gap: 12px; margin: 18px 0; }
.referrals-metric { border: 1px solid var(--referrals-line); background: rgba(255,255,255,.72); border-radius: 12px; padding: 15px; min-height: 86px; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.referrals-metric span, .referrals-metric small { color: var(--referrals-muted); font-size: 12px; }
.referrals-metric strong { font-size: 25px; line-height: 1.1; letter-spacing: -.02em; }
.referrals-card { margin: 18px 0; }
.referrals-grid--two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.referrals-mode-switch { display: inline-flex; background: #e8f2ef; border-radius: 9px; padding: 3px; gap: 2px; margin-bottom: 8px; }
.referrals-mode-switch button { border: 0; border-radius: 7px; padding: 8px 13px; background: transparent; color: var(--referrals-muted); cursor: pointer; font: inherit; }
.referrals-mode-switch button.is-active { background: white; color: var(--referrals-ink); box-shadow: 0 1px 4px rgba(20, 60, 65, .12); font-weight: 700; }
.referrals-funnel { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 16px 0 8px; }
.referrals-funnel-step { position: relative; display: grid; min-width: 116px; text-align: center; gap: 3px; padding: 14px 18px; background: #edf7f3; border: 1px solid rgba(39, 120, 110, .14); }
.referrals-funnel-step:first-child { border-radius: 10px 0 0 10px; }
.referrals-funnel-step:last-child { border-radius: 0 10px 10px 0; }
.referrals-funnel-step strong { font-size: 21px; }
.referrals-funnel-step span { color: var(--referrals-muted); font-size: 12px; }
.referrals-funnel-step i { position: absolute; right: -9px; top: calc(50% - 12px); z-index: 1; color: #16847a; font-size: 23px; font-style: normal; }
.referrals-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.referrals-list li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--referrals-line); }
.referrals-list li:last-child { border-bottom: 0; }
.referrals-list li span { color: var(--referrals-muted); }
.referrals-toolbar { margin: 2px 0 15px; }
.referrals-table-wrap { overflow-x: auto; border: 1px solid var(--referrals-line); border-radius: 14px; background: white; }
.referrals-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 13px; }
.referrals-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.referrals-table th { text-align: left; color: var(--referrals-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 13px 14px; white-space: nowrap; background: #f4faf7; border-bottom: 1px solid var(--referrals-line); }
.referrals-table td { padding: 14px; border-bottom: 1px solid rgba(24,67,75,.09); vertical-align: top; }
.referrals-table tbody tr:last-child td { border-bottom: 0; }
.referrals-table tbody tr:hover { background: rgba(235, 247, 242, .45); }
.referrals-table td strong { display: block; }
.referrals-table td small { display: block; margin-top: 4px; color: var(--referrals-muted); }
.referrals-copy-link { display: flex; align-items: center; gap: 8px; max-width: 330px; }
.referrals-copy-link code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #35666a; font-size: 11px; }
.referrals-number { font-weight: 700; color: #13766f; white-space: nowrap; }
.referrals-number.is-negative { color: #a13a3a; }
.referrals-empty { padding: 24px 12px; color: var(--referrals-muted); text-align: center; }
.referrals-editor { position: relative; border: 1px solid rgba(19, 112, 105, .3); border-radius: 15px; padding: 20px; margin: 20px 0; background: #f8fcfa; box-shadow: 0 8px 25px rgba(20, 74, 72, .08); }
.referrals-editor > header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.referrals-editor h2 { margin: 3px 0; }
.referrals-editor header p { margin: 4px 0 0; color: var(--referrals-muted); font-size: 13px; }
.referrals-close { border: 0; background: transparent; font-size: 25px; color: var(--referrals-muted); cursor: pointer; line-height: 1; }
.referrals-editor__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.referrals-form-grid, .referrals-rule-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.referrals-editor__fields > .referrals-form-grid + h3, .referrals-editor__fields h3 { grid-column: 1 / -1; margin: 8px 0 0; font-size: 15px; }
.referrals-editor__fields > .referrals-rule-row { grid-column: 1 / -1; }
.referrals-editor footer { border-top: 1px solid var(--referrals-line); margin-top: 20px; padding-top: 16px; display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 1080px) { .referrals-metrics { grid-template-columns: repeat(4, minmax(120px, 1fr)); } .referrals-filters__row { grid-template-columns: repeat(3, minmax(140px, 1fr)); } }
@media (max-width: 720px) { .referrals-module { padding-inline: 14px; } .referrals-header { flex-direction: column; } .referrals-header-actions { width: 100%; } .referrals-header-actions .mix-button { flex: 1; } .referrals-metrics, .referrals-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .referrals-filters__row, .referrals-editor__fields, .referrals-form-grid, .referrals-rule-row { grid-template-columns: 1fr; } .referrals-field--wide, .referrals-form-grid, .referrals-rule-row, .referrals-editor__fields h3 { grid-column: auto; } .referrals-table { min-width: 720px; } }
