/* Партнёрская программа (кабинет и админка). Префикс aff- */
.aff-sec { margin-top: 18px; }
.aff-head { display: flex; justify-content: space-between; gap: 16px; }
.aff-lead { margin-bottom: 6px; }
.aff-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 800; font-size: 14.5px; background: #eaf0ff; color: #2457d6; }
.aff-badge--master { background: #e6f3ff; color: #0b5ea8; }
.aff-badge--expert { background: #fff0d0; color: #8a5200; }
.aff-link { display: flex; gap: 10px; flex-wrap: wrap; }
.aff-link__in, .aff-pay { flex: 1 1 280px; min-width: 0; min-height: 44px; padding: 0 14px; border: 1.5px solid #c9d5ec; border-radius: 12px; font: inherit; font-size: 15px; box-sizing: border-box; width: 100%; background: #fff; color: inherit; }
.aff-link__in { width: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.aff-link__in:focus, .aff-pay:focus { outline: 3px solid #9db8f5; outline-offset: 1px; }
.fn-note code { font-size: 13px; word-break: break-all; }

.aff-tiers { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.aff-tiers li { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1.5px solid #dfe6f3; border-radius: 16px; background: #f8faff; }
.aff-tiers li b { font-size: 16px; }
.aff-tiers li span { font-size: 13.5px; color: var(--ps-muted); }
.aff-tiers li em { font-style: normal; font-size: 26px; font-weight: 800; color: #2457d6; }
.aff-tiers--sm { margin-top: 14px; }
.aff-tiers--sm li { padding: 10px 14px; }
.aff-tiers--sm li em { font-size: 20px; }
.aff-tiers li.is-on { border-color: #2457d6; background: #eaf0ff; }

.aff-prog__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 14.5px; margin-bottom: 8px; }
.aff-top { color: #0b7a5a; font-weight: 700; }
.aff-prog__bar { height: 12px; border-radius: 999px; background: #e7ecf6; overflow: hidden; }
.aff-prog__bar i { display: block; height: 100%; background: linear-gradient(90deg, #2457d6, #3fa7ff); border-radius: 999px; transition: width .4s; }
@media (prefers-reduced-motion: reduce) { .aff-prog__bar i { transition: none; } }

.aff-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.aff-bar .fn-h2 { margin: 0; }
.aff-seg { display: inline-flex; border: 1.5px solid #c9d5ec; border-radius: 12px; overflow: hidden; }
.aff-seg button { min-height: 40px; padding: 0 14px; border: 0; background: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: #31416b; }
.aff-seg button + button { border-left: 1.5px solid #c9d5ec; }
.aff-seg button.is-on { background: #2457d6; color: #fff; }

.aff-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.aff-stats--3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.aff-stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1.5px solid #dfe6f3; border-radius: 16px; background: #fff; text-align: left; font: inherit; color: inherit; }
button.aff-stat { cursor: pointer; }
button.aff-stat:hover { border-color: #9db8f5; }
.aff-stat.is-on { border-color: #2457d6; background: #eaf0ff; }
.aff-stat span { font-size: 13.5px; color: var(--ps-muted); }
.aff-stat b { font-size: 28px; line-height: 1.1; }
.aff-stat small { font-size: 14px; font-weight: 700; color: var(--ps-muted); }
.aff-stat--money { background: #f4faf7; border-color: #cfe9dc; }
.aff-h3 { margin: 22px 0 4px; font-size: 16px; font-weight: 800; }
.aff-ok { margin: 0; padding: 8px 14px; }

.aff-chart { display: block; width: 100%; height: auto; max-height: 240px; }
.aff-chart__grid { stroke: #e3e9f5; stroke-width: 1; }
.aff-chart__t { font-size: 11px; fill: #587099; }
.aff-chart__bar { fill: #2457d6; }

.aff-adm-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
.aff-adm-row label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; flex: 1 1 240px; }
.aff-adm-row input, .fn-tbl input { min-height: 38px; padding: 0 10px; border: 1.5px solid #c9d5ec; border-radius: 10px; font: inherit; width: 100%; box-sizing: border-box; }

@media (max-width: 560px) { .aff-stat b { font-size: 24px; } .aff-seg button { padding: 0 10px; } }
.aff-prog { margin-top: 6px; }
.aff-link { margin-bottom: 4px; }
