/* برنامج التسويق بالعمولة: الصفحة التعريفية + لوحة المسوّق (عربي فقط) */
.af-hero { position: relative; overflow: hidden; padding: 150px 0 90px; background: radial-gradient(900px 480px at 85% -10%, rgba(58, 76, 219, .55), transparent 70%), radial-gradient(700px 400px at 0% 100%, rgba(242, 177, 52, .16), transparent 70%), var(--night, #0B1533); color: #fff; }
.af-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.af-hero h1 { margin-top: 18px; font-size: clamp(34px, 5vw, 56px); font-weight: 800; line-height: 1.25; }
.af-hero h1 em { font-style: normal; color: var(--accent); }
.af-hero .lead { margin-top: 18px; max-width: 560px; color: var(--soft-ink, #C7D0F2); font-size: 18.5px; line-height: 1.9; }
.af-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; background: rgba(255, 255, 255, .08); color: #DCE3FF; font-size: 14px; font-weight: 700; }
.af-egypt { display: flex; gap: 10px; align-items: flex-start; margin-top: 26px; max-width: 560px; padding: 12px 16px; border: 1px solid rgba(242, 177, 52, .45); border-radius: 14px; background: rgba(242, 177, 52, .1); color: #FFE9B8; font-size: 14.5px; }
.af-egypt .i { flex: none; margin-top: 4px; }

.af-earn { padding: 26px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 24px; background: rgba(255, 255, 255, .07); backdrop-filter: blur(8px); }
.af-earn h3 { font-size: 17px; font-weight: 800; color: #fff; }
.af-earn-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px dashed rgba(255, 255, 255, .18); }
.af-earn-row:last-of-type { border-bottom: 0; }
.af-earn-row span { color: #C7D0F2; font-size: 15px; }
.af-earn-row b { font-size: 30px; font-weight: 800; color: var(--accent); line-height: 1; }
.af-earn-row b small { font-size: 14px; color: #fff; font-weight: 700; margin-inline-start: 4px; }
.af-earn p { margin-top: 12px; color: #AFB9E3; font-size: 13.5px; }

.af-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.af-step { position: relative; padding: 26px 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.af-step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px; border-radius: 12px; background: var(--accent); color: var(--ink); font-weight: 800; font-size: 18px; }
.af-step h3 { font-size: 18px; font-weight: 800; color: var(--ink); }
.af-step p { margin-top: 6px; color: var(--muted); font-size: 15px; }

.af-tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.af-track { padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.af-track.agency { background: linear-gradient(180deg, #F4F6FF, #fff); border-color: #CDD3EA; }
.af-track .ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--brand-soft); color: var(--brand); font-size: 24px; }
.af-track h3 { margin-top: 16px; font-size: 21px; font-weight: 800; color: var(--ink); }
.af-track p { margin-top: 6px; color: var(--muted); }
.af-track ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.af-track li { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); font-weight: 600; font-size: 15.5px; }
.af-track li .i { flex: none; margin-top: 5px; color: var(--ok); }

.af-example { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.af-calc { padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.af-calc h3 { font-size: 19px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.af-calc dl { margin: 0; }
.af-calc dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2, #ECEEF5); font-size: 15.5px; }
.af-calc dl > div:last-child { border-bottom: 0; }
.af-calc dt { color: var(--muted); }
.af-calc dd { margin: 0; font-weight: 800; color: var(--ink); }
.af-calc .big dd { color: #0B8A52; font-size: 20px; }
.af-calc .neg dd { color: #8A6A1F; }

.af-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; margin: 0; padding: 0; list-style: none; }
.af-rules li { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-weight: 600; color: var(--ink); }
.af-rules li .i { flex: none; margin-top: 5px; color: var(--danger); }

/* ---------- تسجيل / دخول ---------- */
.af-roles { display: grid; gap: 8px; margin-bottom: 8px; }
.af-role { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 700; transition: border-color .15s, background .15s; }
.af-role:hover { border-color: #B9C3E8; }
.af-role input { accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.af-role:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.af-role small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.af-group-lab { margin: 12px 0 6px; color: var(--muted); font-size: 13px; font-weight: 800; }
.af-note { display: flex; gap: 10px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid #EFD79B; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 14px; }
.af-note .i { flex: none; margin-top: 3px; }
.af-code-in { text-align: center; font-size: 28px; letter-spacing: 10px; font-weight: 800; }

/* ---------- لوحة المسوّق ---------- */
.af-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.af-status b { font-size: 16px; }
.af-status span.d { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }
.af-status.inactive { border-color: #EFD79B; background: var(--warn-soft); }
.af-status.review { border-color: #C9D6F5; background: #EEF3FF; }
.af-status.active { border-color: #BCE3CE; background: var(--ok-soft); }
.af-status.rejected { border-color: #F0C4C0; background: var(--danger-soft); }
.af-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.af-link input { flex: 1; min-width: 220px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: #F6F7FB; font-weight: 700; direction: ltr; text-align: start; }
.af-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.af-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.af-kpi { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.af-kpi small { display: block; color: var(--muted); font-size: 13.5px; }
.af-kpi b { display: block; margin-top: 2px; font-size: 26px; font-weight: 800; line-height: 1.2; }
.af-kpi b i { font-style: normal; font-size: 14px; color: var(--muted); font-weight: 700; }
.af-kpi.warn b { color: #B7791F; } .af-kpi.ok b { color: #0B8A52; } .af-kpi.brand b { color: var(--brand); }
.af-kpi em { display: block; margin-top: 2px; color: var(--faint); font-size: 12.5px; font-style: normal; }
.af-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.af-table th { padding: 8px 10px; text-align: start; color: var(--muted); font-size: 12.5px; font-weight: 800; border-bottom: 1px solid var(--line); white-space: nowrap; }
.af-table td { padding: 11px 10px; border-bottom: 1px solid var(--line-2, #ECEEF5); vertical-align: middle; }
.af-table tr:last-child td { border-bottom: 0; }
.af-table .num { font-weight: 800; white-space: nowrap; }
.af-scroll { overflow-x: auto; }
.af-pay-radio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.af-terms-box { max-height: 260px; overflow: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #FAFBFE; font-size: 14.5px; line-height: 1.95; }
.af-terms-box h3 { margin: 12px 0 4px; font-size: 15.5px; }
.af-terms-box h3:first-child { margin-top: 0; }
.af-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-weight: 700; }
.af-check input { width: 20px; height: 20px; margin-top: 4px; flex: none; accent-color: var(--brand); }

@media (max-width: 900px) {
    .af-hero { padding: 110px 0 60px; }
    .af-hero-grid, .af-example, .af-tracks { grid-template-columns: 1fr; gap: 28px; }
    .af-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .af-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .af-rules { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .af-steps, .af-grid3, .af-pay-radio { grid-template-columns: 1fr; }
    .af-kpi b { font-size: 22px; }
}
@media print {
    .side, .topbar, .scrim, .no-print, .toast-wrap { display: none !important; }
    .app, .main { display: block !important; margin: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
    body { background: #fff !important; }
}
