/* Portal affiliate (di atas admin.css + guru.css) */
.narrow-wide { max-width: 760px; }
.narrow-wide h2, .card h2 { margin: 4px 0 12px; font-size: 21px; }
.small { font-size: 13px; }
.ok-text { color: var(--green-2); }
.pill.digantung { background: #f9d6d1; color: #8a2216; }
.pill.dibayar { background: #d6e8fb; color: #154a7a; }
.btn.wa { background: linear-gradient(180deg, #4fdc7b, #1fa855); }

.aff-link-card { padding-top: 20px; }
.aff-link-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.aff-link-row > div:first-child { flex: 1 1 280px; min-width: 0; }
.aff-label { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .7; margin-bottom: 4px; }
.aff-link {
  font: 800 clamp(16px, 4vw, 21px)/1.3 ui-monospace, Consolas, monospace; color: var(--forest); word-break: break-all;
  background: #fffbe9; border: 3px dashed var(--wood); border-radius: 12px; padding: 10px 14px;
}
.aff-kod-box .kod { position: static; display: inline-block; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.aff-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.aff-stats .stat { margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.aff-stats .stat span { font-size: 13px; font-weight: 800; opacity: .75; }
.aff-stats .stat b { font-family: 'Baloo 2', sans-serif; font-size: 28px; line-height: 1.1; color: var(--wood); }
.aff-stats .stat small { font-size: 12px; opacity: .7; }
.aff-stats .stat-ok { box-shadow: inset 0 0 0 4px var(--green), var(--shadow); }
.aff-stats .stat-ok b { color: var(--green-2); }

.aff-promo { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.aff-promo-item { background: #fffbe9; border: 2px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.aff-promo-item pre { white-space: pre-wrap; font: 600 13px/1.45 'Nunito', sans-serif; margin: 0; flex: 1; color: var(--ink); }
.aff-gambar { display: flex; gap: 8px; flex-wrap: wrap; }
.aff-gambar img { height: 80px; border-radius: 8px; border: 3px solid var(--wood); display: block; }

/* Semakan kod rujukan semasa daftar */
.kod-status { display: block; margin-top: 6px; font-size: 14px; font-weight: 800; }
.kod-status.kod-ok { color: var(--green-2); }
.kod-status.kod-salah { color: var(--red); }
.kod-cadang {
  font: 800 13px ui-monospace, Consolas, monospace; margin: 4px 6px 0 0; padding: 3px 9px; cursor: pointer;
  color: var(--forest); background: #fffbe9; border: 2px solid var(--green-2); border-radius: 8px;
}
.kod-cadang:hover { background: #e9f8dc; }
