.aff-page,.aff-admin { --aff-primary:#087e8b; --aff-ink:#27313d; --aff-muted:#74808d; --aff-line:#e7eaf0; color:var(--aff-ink); letter-spacing:0; }
.aff-page [hidden],.aff-admin [hidden] { display:none !important; }
.aff-page { max-width:1344px; padding:28px 40px 64px; }
.aff-icon { width:18px; height:18px; flex:0 0 18px; object-fit:contain; display:inline-block; vertical-align:middle; }
.aff-page .button,.aff-admin .button { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:42px; padding:10px 16px; border-radius:6px; font-size:13px; line-height:1.4; font-weight:600; box-shadow:none; transition:background .15s,border-color .15s; }
.aff-page .button:hover,.aff-admin .button:hover { transform:none; background:#f0f4f9; border-color:#c6d0dc; }
.aff-page .button.primary,.aff-admin .button.primary { background:var(--aff-primary); color:#fff; border-color:var(--aff-primary); }
.aff-page .button.primary:hover,.aff-admin .button.primary:hover { background:#076a76; }
.aff-page .button.primary .aff-icon,.aff-admin .button.primary .aff-icon { filter:brightness(0) invert(1); }
.aff-page input,.aff-page select,.aff-admin input,.aff-admin select { font-family:inherit; font-size:13px; font-weight:400; letter-spacing:0; min-height:42px; border:1px solid #dce1e8; background:#fff; color:var(--aff-ink); border-radius:6px; padding:10px 12px; }
.aff-page input:focus,.aff-page select:focus,.aff-admin input:focus,.aff-admin select:focus { outline:2px solid #9bdfe4; outline-offset:2px; }
.aff-account-tabs { gap:28px; margin-bottom:28px; border-color:var(--aff-line); }
.aff-account-tabs a { font-size:13px; }
.aff-account-tabs a[aria-current] { background:transparent; color:var(--aff-primary); border-color:var(--aff-primary); }
.aff-heading { margin:0 0 24px; }
.aff-heading .eyebrow { display:flex; align-items:center; gap:8px; color:#087e8b; font-size:11px; font-weight:700; margin:0 0 10px; }
.aff-heading h1 { font-size:32px; line-height:1.2; margin:0 0 8px; color:#26303e; }
.aff-heading p { font-size:13px; margin:0; color:var(--aff-muted); }
.aff-invite-tag { display:inline-flex; align-items:center; gap:8px; border:1px solid #dce8ea; background:#e9f8f7; color:#25616b; font-size:12px; font-weight:600; padding:9px 12px; border-radius:6px; }
.aff-invite-tag .aff-icon { width:15px; height:15px; }
.aff-badge { border-radius:4px; font-size:11px; font-weight:600; padding:5px 9px; }
.aff-badge::before { content:""; width:5px; height:5px; background:currentColor; border-radius:50%; margin:5px 6px 0 0; flex-shrink:0; }
.aff-application-layout { display:grid; grid-template-columns:minmax(280px,.85fr) minmax(0,1.15fr); gap:44px; align-items:start; padding:24px 0; border-top:1px solid var(--aff-line); }
.aff-intro { padding:0; }
.aff-intro h2 { font-size:25px; line-height:1.3; color:#26303e; margin:0 0 12px; }
.aff-intro > p { font-size:14px; line-height:1.7; color:#6b7786; }
.aff-intro .aff-terms-copy { font-size:12px; line-height:1.8; }
.aff-slots { gap:12px; padding:16px 0 10px; }
.aff-slots > div { border:0; border-radius:8px; padding:20px; gap:9px; }
.aff-slots > div:first-child { background:#e3f6f4; border:0; }
.aff-slots > div:nth-child(2) { background:#f0edff; border:0; }
.aff-slots > div:nth-child(3) { background:#fff0e8; border:0; }
.aff-slots strong { font-size:30px; color:#26303e; }
.aff-slots > div > span { font-size:12px; color:#627281; }
.aff-slots b { font-size:12px; }
.aff-slots > p { font-size:11px; line-height:1.7; margin-top:6px; color:#74808d; }
.aff-slots progress { height:5px; accent-color:var(--aff-primary); }
.aff-slots progress::-webkit-progress-bar { background:#ffffffa6; }
.aff-slots progress::-webkit-progress-value { background:#087e8b; }
.aff-intro .aff-slots { grid-template-columns:1fr; }
.aff-intro .aff-slots > div { display:grid; grid-template-columns:74px 1fr; align-items:center; gap:4px 14px; padding:16px 20px; }
.aff-intro .aff-slots strong { grid-row:1/3; }
.aff-intro .aff-slots progress { grid-column:1/-1; margin-top:8px; }
.aff-application-form { margin:0; padding:28px; border:1px solid #e4e8f0; background:#fff; border-radius:8px; box-shadow:0 4px 20px #28394f05; }
.aff-form-steps { display:flex; gap:24px; padding-bottom:24px; border-bottom:1px solid #edf0f5; }
.aff-form-steps > span { display:flex; align-items:center; gap:9px; font-size:12px; color:#8b94a2; font-weight:600; }
.aff-form-steps b { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:#eef1f7; font-size:11px; }
.aff-form-steps .is-current { color:#087e8b; }
.aff-form-steps .is-current b,.aff-form-steps .is-complete b { background:#d6f1f2; color:#087e8b; }
.aff-form-grid { display:block; }
.aff-form-grid fieldset { border:0; padding:0; margin:22px 0 0; display:grid; grid-template-columns:1fr 1fr; gap:20px 16px; min-width:0; }
.aff-form-grid legend { font-size:18px; font-weight:650; margin-bottom:18px; padding:0; color:#26303e; }
.aff-form-grid label { display:grid; gap:8px; font-size:12px; font-weight:600; color:#526071; }
.aff-form-grid label:has(input[name="bank_holder"]) { grid-column:1/-1; }
.aff-application-form .aff-form-grid fieldset { grid-template-columns:1fr; }
.aff-form-grid input { width:100%; min-width:0; background:#fdfdff; }
.aff-form-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; padding-top:24px; margin-top:8px; border-top:1px solid #edf0f5; }
.aff-profile .aff-check { font-size:11px; line-height:1.7; color:#73808d; margin:20px 0 0; }
.aff-profile .aff-check input { width:16px; min-height:16px; height:16px; margin-top:3px; }
.aff-member-strip { display:flex; gap:20px; flex-wrap:wrap; align-items:center; font-size:12px; color:#6c7b89; padding:14px 0 20px; border-top:1px solid var(--aff-line); }
.aff-member-strip > span { display:flex; align-items:center; gap:7px; }
.aff-member-strip strong { color:#087e8b; padding:5px 9px; background:#e0f5f5; border-radius:4px; }
.aff-member-strip > span:first-child { color:#384754; }
.aff-verified { display:flex; align-items:center; gap:12px; background:#eaf7f2; border:0; border-radius:6px; padding:14px 18px; margin:0 0 20px; }
.aff-verified > .aff-icon { width:22px; height:22px; }
.aff-verified strong { font-size:13px; }
.aff-verified p { margin:3px 0 0; font-size:12px; }
.aff-pending-banner { display:flex; gap:10px; align-items:center; padding:14px 18px; border-radius:6px; background:#fff3dc; color:#755523; font-size:12px; line-height:1.6; }
.aff-quota-details { background:transparent; margin:16px 0; border:0; border-bottom:1px solid var(--aff-line); border-radius:0; padding:0 0 16px; box-shadow:none; }
.aff-quota-details > summary { cursor:pointer; display:flex; align-items:center; gap:12px; font-size:12px; font-weight:600; color:#617184; list-style:none; padding:4px 0; }
.aff-quota-details > summary::-webkit-details-marker { display:none; }
.aff-quota-details > summary small { font-weight:400; margin-left:auto; color:#8a94a3; }
.aff-quota-details > summary > .aff-icon { width:14px; height:14px; margin-left:auto; transition:transform .15s; }
.aff-quota-details[open] > summary > .aff-icon { transform:rotate(90deg); }
.aff-quota-details > summary small + .aff-icon { margin-left:0; }
.aff-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; border:0; background:transparent; padding:0; margin:20px 0 28px; }
.aff-metrics > div { border:1px solid #e3e7ef; border-radius:8px; padding:18px 16px; background:#fff; min-width:0; }
.aff-metrics > div:nth-child(3) { background:#e8f6f6; border-color:#d0e9eb; }
.aff-metrics > div > span { display:flex; align-items:center; gap:7px; font-size:11px; color:#74808e; }
.aff-metrics > div > span .aff-icon { width:15px; height:15px; flex-basis:15px; opacity:.65; }
.aff-metrics strong { margin-top:16px; font-size:25px; font-weight:650; line-height:1.2; color:#27313e; }
.aff-workspace { margin-top:20px; min-width:0; }
.aff-view-tabs { display:flex; align-items:stretch; gap:6px; border-bottom:1px solid #e2e7ee; padding-bottom:8px; margin-bottom:24px; overflow-x:auto; }
.aff-view-tabs > button { display:inline-flex; gap:8px; align-items:center; justify-content:center; flex-shrink:0; padding:11px 16px; min-height:42px; border:0; background:transparent; color:#718092; border-radius:6px; font-family:inherit; font-size:12px; font-weight:600; cursor:pointer; transition:background .15s; white-space:nowrap; }
.aff-view-tabs > button:hover { background:#edf2f8; }
.aff-view-tabs > button[aria-selected="true"] { color:#2c566b; background:#e2f1f5; }
.aff-view-tabs > button .aff-icon { width:16px; height:16px; flex-basis:16px; opacity:.75; }
.aff-view-tabs > button b { min-width:20px; text-align:center; font-size:10px; background:#fff; border-radius:4px; padding:3px 5px; }
.aff-view { min-width:0; padding:0 0 20px; animation:aff-appear .18s ease-out; }
@keyframes aff-appear { from {opacity:.4;transform:translateY(3px);} to {opacity:1;transform:translateY(0);} }
.aff-view-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 20px; min-height:36px; }
.aff-view-head h2,.aff-view-head h3 { font-size:19px; margin:0; color:#27313e; }
.aff-view-head p,.aff-view-head > span { font-size:12px; color:#84909e; margin:6px 0 0; }
.aff-view-head select { max-width:240px; }
.aff-ledger-note { margin:-6px 0 18px; padding:13px 15px; border:1px solid #cde7e4; border-radius:6px; background:#f1faf8; color:#55706f; font-size:12px; line-height:1.6; }
.aff-ledger-note strong { color:#087e8b; }
.aff-action-wait { display:block; max-width:190px; color:#9a7740; font-size:12px; }
.aff-action-wait small,.aff-admin-form button + small { display:block; margin-top:7px; color:#84909e; font-size:10px; line-height:1.5; }
.aff-link-row { display:grid; grid-template-columns:64px minmax(0,1fr) 42px 42px; gap:18px; align-items:center; padding:18px 0; border-top:1px solid #e7ecf2; }
.aff-module-cover { width:64px; height:80px; object-fit:contain; background:#e9edf5; border-radius:5px; }
.aff-link-info strong { display:block; font-size:14px; font-weight:600; }
.aff-link-info > small { display:flex; align-items:center; gap:6px; margin:6px 0 10px; font-size:11px; color:#8a94a3; }
.aff-link-info > small .aff-icon { width:13px; height:13px; flex-basis:13px; opacity:.6; }
.aff-link-info > small > span { margin-left:12px; color:#138391; background:#edf8f7; border-radius:4px; padding:3px 7px; }
.aff-link-info input { max-width:680px; padding:7px 10px; min-height:34px; font-size:12px; font-weight:400; color:#788395; border-color:#e6eaf0; background:#fff; }
.aff-page .aff-icon-button { width:42px; height:42px; min-height:42px; padding:10px; position:relative; }
.aff-copy-success { display:none; }
[data-copied] > .aff-icon { display:none; }
[data-copied] > .aff-copy-success { display:inline-flex; }
.aff-toolbar { display:flex; align-items:center; gap:12px; margin:0 0 16px; }
.aff-search { display:flex; gap:8px; align-items:center; min-width:0; flex:1; max-width:380px; border:1px solid #e1e6ee; border-radius:6px; padding-left:12px; background:#fff; }
.aff-search .aff-icon { width:16px; height:16px; flex-basis:16px; opacity:.45; }
.aff-toolbar .aff-search input { border:0; background:transparent; width:100%; min-width:0; box-shadow:none; font-size:12px; padding-left:0; }
.aff-toolbar > select { margin-left:auto; min-width:140px; font-size:12px; }
.aff-filter-empty { padding:24px 0; font-size:13px; color:#8b96a4; }
.aff-table { border:1px solid #e5e9f0; border-radius:6px; }
.aff-table th { background:#f4f6fb; color:#8993a3; font-size:10px; padding:14px 16px; }
.aff-table td { border-color:#edf0f5; font-size:13px; padding:18px 16px; vertical-align:middle; }
.aff-table td strong { font-size:13px; font-weight:600; }
.aff-table small { color:#7b8797; font-size:11px; font-weight:400; line-height:1.6; }
.aff-table tbody tr:hover { background:#fbfcff; }
.aff-empty-state { display:flex; align-items:center; gap:12px; padding:36px 24px; border:1px dashed #dce4ec; background:#f9fbfe; color:#8c97a5; font-size:13px; border-radius:6px; }
.aff-mini-label { display:block; color:#83909e; font-size:10px; font-weight:600; margin:0 0 10px; }
.aff-wallet-amount { display:block; font-size:36px; font-weight:650; color:#087e8b; line-height:1.3; }
.aff-withdraw { padding:4px 0 24px; margin-bottom:24px; border-color:var(--aff-line); }
.aff-withdraw p { color:#8792a1; font-size:12px; }
.aff-admin { border-radius:8px; padding:24px !important; box-shadow:0 2px 16px #26354b04; border-color:#e5e8ef; background:#fff; }
.aff-admin > .admin-card-head { align-items:center; margin-bottom:20px; }
.aff-admin > .admin-card-head h2 { font-size:23px; margin:0; }
.aff-admin .aff-table table { min-width:780px; }
.aff-admin-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; border-top:1px solid #edf0f5; padding:22px 0; }
.aff-admin-summary > div { display:flex; align-items:center; gap:14px; }
.aff-admin-summary > div > .aff-icon { width:40px; height:40px; padding:11px; border-radius:8px; background:#e9f7f6; flex-basis:40px; }
.aff-admin-summary > div:nth-child(2) > .aff-icon { background:#fff0e7; }
.aff-admin-summary > div:nth-child(3) > .aff-icon { background:#eeebfc; }
.aff-admin-summary span { font-size:11px; color:#84909e; }
.aff-admin-summary strong { display:block; margin-top:5px; color:#283345; font-size:24px; font-weight:650; }
.aff-person { display:flex; align-items:center; gap:10px; }
.aff-avatar { display:grid; place-items:center; width:32px; height:32px; flex-shrink:0; border-radius:50%; background:#ebeff9; color:#777c9e; font-size:12px; font-weight:600; }
.aff-actions { padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; margin:0; min-width:95px; }
.aff-actions > summary { cursor:pointer; display:inline-flex; align-items:center; gap:12px; padding:8px 12px; border:1px solid #e1e7ee; border-radius:5px; font-size:11px; font-weight:600; color:#5d6c7e; list-style:none; }
.aff-actions > summary::-webkit-details-marker { display:none; }
.aff-actions > summary .aff-icon { width:13px; height:13px; flex-basis:13px; }
.aff-actions[open] > summary .aff-icon { transform:rotate(90deg); }
.aff-action-body { width:210px; padding:14px 0 0; }
.aff-action-body label { display:grid; gap:7px; width:100%; font-size:11px; color:#7e8b9b; }
.aff-action-body .aff-admin-form { margin:0 0 10px; }
.aff-action-body input,.aff-action-body select { width:100%; font-size:12px; }
.aff-action-body button { width:100%; }
.aff-module-list { display:block; padding:0; }
.aff-module-list .aff-admin-form { display:flex; align-items:center; gap:14px; border-bottom:1px solid #eef1f6; padding:18px 0; margin:0; flex-wrap:nowrap; }
.aff-module-list strong { flex:1; min-width:0; font-size:13px; }
.aff-module-symbol { padding:10px; background:#edf3fa; border-radius:6px; }
.aff-toggle { display:inline-flex; position:relative; width:38px; height:22px; flex-shrink:0; cursor:pointer; }
.aff-toggle input { position:absolute; width:38px; height:22px; opacity:0; margin:0; min-height:0; }
.aff-toggle > span { width:38px; height:22px; border-radius:15px; background:#dce2ec; transition:background .15s; }
.aff-toggle > span::before { content:""; display:block; width:16px; height:16px; margin:3px; background:white; border-radius:50%; box-shadow:0 1px 3px #19273b26; transition:transform .15s; }
.aff-toggle input:checked + span { background:#148c97; }
.aff-toggle input:checked + span::before { transform:translateX(16px); }
.aff-toggle input:focus-visible + span { outline:2px solid #71cbd5; outline-offset:3px; }
@media(max-width:1000px) {
  .aff-application-layout { gap:24px; grid-template-columns:minmax(220px,.8fr) minmax(0,1.2fr); }
  .aff-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .aff-link-row > div { grid-column:auto; }
}
@media(max-width:700px) {
  .aff-page { padding:22px 20px 44px; }
  .aff-application-layout { grid-template-columns:1fr; gap:28px; }
  .aff-application-form { padding:22px; }
  .aff-form-grid fieldset { grid-template-columns:1fr; }
  .aff-intro h2 { font-size:23px; }
  .aff-heading h1 { font-size:28px; }
  .aff-heading .aff-invite-tag { display:none; }
  .aff-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .aff-metrics > div { padding:15px 12px; }
  .aff-metrics > div:last-child { grid-column:1/-1; }
  .aff-metrics strong { font-size:23px; margin-top:12px; }
  .aff-member-strip { gap:12px; font-size:11px; }
  .aff-view-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-bottom:22px; overflow:visible; }
  .aff-view-tabs > button { justify-content:flex-start; padding:10px 12px; font-size:11px; min-width:0; }
  .aff-view-head { align-items:flex-start; flex-wrap:wrap; }
  .aff-view-head h2,.aff-view-head h3 { font-size:18px; }
  .aff-view-head select { width:100%; max-width:none; }
  .aff-link-row { grid-template-columns:52px minmax(0,1fr) 36px 36px; gap:8px; align-items:start; padding:18px 0; }
  .aff-module-cover { width:52px; height:66px; }
  .aff-link-info strong { font-size:12px; }
  .aff-link-info > small { flex-wrap:wrap; font-size:10px; }
  .aff-link-info > small > span { margin-left:0; }
  .aff-link-info input { grid-column:auto; min-height:34px; width:100%; font-size:10px; }
  .aff-page .aff-icon-button { width:36px; height:36px; min-height:36px; padding:8px; }
  .aff-toolbar { gap:8px; align-items:stretch; }
  .aff-toolbar > select { min-width:108px; max-width:135px; font-size:11px; }
  .aff-toolbar .aff-search input { font-size:11px; }
  .aff-search { padding-left:8px; gap:6px; }
  .aff-admin { padding:16px !important; }
  .aff-admin-summary { gap:12px; }
  .aff-admin-summary > div { flex-direction:column; align-items:flex-start; gap:10px; }
  .aff-admin-summary > div > .aff-icon { width:34px; height:34px; flex-basis:34px; padding:9px; }
  .aff-admin-summary span { font-size:10px; }
  .aff-admin-summary strong { font-size:22px; }
  .aff-admin > .admin-card-head h2 { font-size:21px; }
  .aff-admin > .admin-card-head { display:flex; flex-direction:row; align-items:flex-start; justify-content:space-between; }
  .aff-admin > .admin-card-head > .aff-invite-tag { display:none; }
  .aff-quota-details > summary { flex-wrap:wrap; }
  .aff-quota-details > summary small { margin-left:0; font-size:10px; }
  .aff-slots { grid-template-columns:1fr; }
  .aff-slots > div { display:grid; grid-template-columns:70px 1fr; align-items:center; }
  .aff-slots strong { grid-row:1/3; }
  .aff-slots progress { grid-column:1/-1; }
  .aff-table { overflow:visible; }
  .aff-table table,.aff-admin .aff-table table { display:block; min-width:0; width:100%; }
  .aff-table thead { display:none; }
  .aff-table tbody { display:block; }
  .aff-table tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:8px 0; border-bottom:1px solid #e7edf4; }
  .aff-table tbody tr:last-child { border-bottom:0; }
  .aff-table td { display:block; padding:10px 14px; border:0; min-width:0; text-align:left; }
  .aff-table td:first-child,.aff-table td:last-child { grid-column:1/-1; }
  .aff-table td::before { content:attr(data-label); display:block; font-size:10px; font-weight:400; color:#8592a4; margin-bottom:7px; }
  .aff-action-body { width:100%; max-width:100%; }
}
@media(prefers-reduced-motion:reduce) { .aff-view { animation:none; } .aff-page *,.aff-admin * { transition:none !important; } }
.aff-performance{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:center;margin:20px 0;padding:22px;border:1px solid #d9d4ff;border-radius:22px;background:linear-gradient(135deg,#f5f2ff,#ecfffa)}
.aff-performance h2{margin:4px 0;font-size:30px}.aff-performance p,.aff-performance span{display:block;color:#667085}.aff-performance progress{width:100%;height:10px;margin-top:10px;accent-color:#7557ed}
@media(max-width:720px){.aff-performance{grid-template-columns:1fr;padding:18px;border-radius:18px}.aff-performance h2{font-size:25px}}
