/* Affiliate partner portal (sign in, dashboard, password pages) */
:root { --af-blue: #004AAD; --af-ink: #0f172a; --af-mut: #64748b; --af-line: #e2e8f0; --af-bg: #f6f8fb; --af-ok: #0f766e; --af-warn: #b45309; --af-bad: #b91c1c; }
* { box-sizing: border-box; }
body.af { margin: 0; background: var(--af-bg); color: var(--af-ink); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.af-top { background: #fff; border-bottom: 1px solid var(--af-line); }
.af-top-in { max-width: 1120px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.af-top img { height: 30px; width: auto; display: block; }
.af-top a { color: var(--af-blue); text-decoration: none; font-weight: 600; }
.af-wrap { max-width: 1120px; margin: 0 auto; padding: 20px 16px 48px; }
.af-card { background: #fff; border: 1px solid var(--af-line); border-radius: 12px; padding: 20px; }
.af-auth { max-width: 420px; margin: 40px auto; }
.af-auth h1 { margin: 0 0 4px; font-size: 22px; }
.af-auth p.sub { margin: 0 0 16px; color: var(--af-mut); }
.af-field { margin-bottom: 14px; }
.af-field label { display: block; font-weight: 600; margin-bottom: 4px; }
.af-field input, .af-field select, .af-field textarea { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; background: #fff; }
.af-field input:focus, .af-field select:focus, .af-field textarea:focus { outline: 2px solid var(--af-blue); outline-offset: 1px; }
.af-field small { color: var(--af-mut); }
.af-btn { display: inline-block; background: var(--af-blue); color: #fff; border: 1px solid var(--af-blue); box-sizing: border-box; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.af-btn:disabled { opacity: .6; cursor: default; }
.af-btn.ghost { background: #fff; color: var(--af-blue); border: 1px solid var(--af-blue); }
.af-btn.sm { padding: 6px 10px; font-size: 13px; }
.af-msg { padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; }
.af-msg.err { background: #fef2f2; color: var(--af-bad); border: 1px solid #fecaca; }
.af-msg.ok { background: #f0fdf4; color: var(--af-ok); border: 1px solid #bbf7d0; }
.af-links { margin-top: 14px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.af-links a { color: var(--af-blue); }
.af-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.af-head h1 { margin: 0; font-size: 24px; }
.af-head .who { color: var(--af-mut); }
.af-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.af-link code { flex: 1 1 280px; padding: 10px 12px; background: #eef4ff; border: 1px solid #cfe0ff; border-radius: 8px; overflow-wrap: anywhere; }
.af-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.af-tile { background: #fff; border: 1px solid var(--af-line); border-radius: 12px; padding: 14px; }
.af-tile span { display: block; color: var(--af-mut); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.af-tile b { display: block; font-size: 22px; margin-top: 4px; }
.af-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--af-line); margin-bottom: 14px; }
.af-tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--af-mut); cursor: pointer; border-bottom: 2px solid transparent; }
.af-tabs button[aria-selected="true"] { color: var(--af-blue); border-bottom-color: var(--af-blue); }
.af-table-wrap { overflow-x: auto; }
table.af-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.af-table th, .af-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--af-line); white-space: nowrap; }
.af-table th { color: var(--af-mut); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.af-table td.num, .af-table th.num { text-align: right; }
.af-empty { color: var(--af-mut); padding: 18px 4px; }
.af-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e2e8f0; color: #334155; }
.af-pill.good { background: #dcfce7; color: #166534; }
.af-pill.warn { background: #fef3c7; color: #92400e; }
.af-pill.bad { background: #fee2e2; color: #991b1b; }
.af-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.af-note { color: var(--af-mut); font-size: 13px; margin: 8px 0 0; }
.af-tiers { width: 100%; border-collapse: collapse; margin: 8px 0 14px; }
.af-tiers td, .af-tiers th { padding: 8px 10px; border-bottom: 1px solid var(--af-line); text-align: left; }
@media (max-width: 560px) { .af-head h1 { font-size: 20px; } .af-auth { margin: 20px auto; } }
