@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --aff-primary: #6C63FF;
    --aff-primary-dark: #5a52e0;
    --aff-secondary: #FF6584;
    --aff-accent: #00D4AA;
    --aff-dark: #0f0e17;
    --aff-card: #ffffff;
    --aff-border: #e8e8f4;
    --aff-bg: #f4f4fd;
    --aff-text: #2d2d44;
    --aff-muted: #8b8ba0;
    --aff-green: #22c55e;
    --aff-orange: #f97316;
    --aff-red: #ef4444;
    --aff-shadow: 0 4px 20px rgba(108,99,255,0.12);
}

.affpro-wrap * { box-sizing: border-box; margin: 0; padding: 0; }
.affpro-wrap { font-family: 'Plus Jakarta Sans', sans-serif; color: var(--aff-text); }

/* AUTH */
.affpro-auth-container { min-height: 80vh; display: flex; align-items: center; justify-content: center; background: var(--aff-bg); padding: 40px 20px; }
.affpro-auth-card { background: white; border-radius: 24px; padding: 40px; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(108,99,255,0.15); }
.affpro-auth-header { text-align: center; margin-bottom: 28px; }
.affpro-auth-logo { font-size: 48px; display: block; margin-bottom: 12px; }
.affpro-auth-header h2 { font-size: 26px; font-weight: 800; color: var(--aff-dark); }
.affpro-auth-header p { color: var(--aff-muted); margin-top: 4px; font-size: 14px; }

/* Commission Badges */
.affpro-commission-badges { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 28px; background: linear-gradient(135deg, #f0eeff, #e8f8f4); padding: 16px; border-radius: 14px; }
.affpro-cbadge { text-align: center; }
.affpro-cbadge-num { display: block; font-size: 28px; font-weight: 800; color: var(--aff-primary); }
.affpro-cbadge-label { font-size: 11px; font-weight: 600; color: var(--aff-muted); text-transform: uppercase; letter-spacing: 1px; }
.affpro-cbadge-divider { font-size: 24px; font-weight: 800; color: var(--aff-muted); }

/* FORM */
.affpro-form .affpro-field { margin-bottom: 18px; }
.affpro-form label { display: block; font-weight: 600; font-size: 13px; color: var(--aff-text); margin-bottom: 6px; }
.affpro-form label small { font-weight: 400; color: var(--aff-muted); margin-left: 4px; }
.affpro-input-icon { position: relative; display: flex; align-items: center; }
.affpro-input-icon span { position: absolute; left: 14px; font-size: 16px; }
.affpro-input-icon input { width: 100%; padding: 12px 14px 12px 42px; border: 1.5px solid var(--aff-border); border-radius: 12px; font-size: 14px; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s; }
.affpro-form input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--aff-border); border-radius: 12px; font-size: 14px; font-family: inherit; transition: border-color 0.2s; }
.affpro-form input:focus { outline: none; border-color: var(--aff-primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.1); }
.affpro-submit-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, var(--aff-primary), #a855f7); color: white; border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; transition: opacity 0.2s, transform 0.1s; margin-top: 8px; }
.affpro-submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.affpro-auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--aff-muted); }
.affpro-auth-switch a { color: var(--aff-primary); font-weight: 600; text-decoration: none; }

/* MSG */
.affpro-msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; font-weight: 600; }
.affpro-msg.success { background: #dcfce7; color: #16a34a; }
.affpro-msg.error { background: #fee2e2; color: #dc2626; }
.affpro-info { background: #eff6ff; color: #2563eb; padding: 14px 18px; border-radius: 10px; border-left: 4px solid #3b82f6; font-size: 14px; }

/* DASHBOARD */
.affpro-dashboard { background: var(--aff-bg); min-height: 100vh; padding: 24px; border-radius: 20px; }

.affpro-dash-header { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, #6C63FF, #a855f7); border-radius: 18px; padding: 24px 28px; margin-bottom: 24px; color: white; }
.affpro-dash-header-left { display: flex; align-items: center; gap: 16px; }
.affpro-dash-avatar { width: 52px; height: 52px; background: rgba(255,255,255,0.25); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; }
.affpro-dash-header-left h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.affpro-dash-header-left p { font-size: 13px; opacity: 0.85; display: flex; align-items: center; gap: 6px; }
.affpro-status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.affpro-status-dot.active { background: #4ade80; }
.affpro-status-dot.pending { background: #fbbf24; }
.affpro-status-dot.suspended { background: #f87171; }
.affpro-logout-btn { background: rgba(255,255,255,0.2); color: white; padding: 8px 18px; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 600; }

.affpro-notice { padding: 14px 20px; border-radius: 12px; margin-bottom: 20px; font-size: 14px; font-weight: 500; }
.affpro-notice-warning { background: #fef9c3; color: #854d0e; border-left: 4px solid #eab308; }

/* STATS GRID */
.affpro-dash-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 24px; }
.affpro-ds-card { background: white; border-radius: 16px; padding: 20px 16px; text-align: center; box-shadow: var(--aff-shadow); transition: transform 0.2s; }
.affpro-ds-card:hover { transform: translateY(-4px); }
.affpro-ds-icon { font-size: 28px; margin-bottom: 8px; }
.affpro-ds-value { font-size: 20px; font-weight: 800; color: var(--aff-dark); line-height: 1; margin-bottom: 6px; }
.affpro-ds-label { font-size: 11px; color: var(--aff-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.affpro-ds-earnings { border-top: 3px solid #6C63FF; }
.affpro-ds-pending { border-top: 3px solid #f97316; }
.affpro-ds-paid { border-top: 3px solid #22c55e; }
.affpro-ds-clicks { border-top: 3px solid #3b82f6; }
.affpro-ds-today { border-top: 3px solid #a855f7; }
.affpro-ds-referrals { border-top: 3px solid #FF6584; }

/* REFERRAL BOX */
.affpro-ref-box { background: linear-gradient(135deg, #0f0e17, #1a1040); border-radius: 18px; padding: 28px; margin-bottom: 24px; color: white; }
.affpro-ref-box-inner { }
.affpro-ref-info h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.affpro-ref-info p { font-size: 13px; opacity: 0.75; margin-bottom: 16px; }
.affpro-ref-info p strong { color: #a5f3fc; }
.affpro-ref-link-wrap { display: flex; gap: 10px; margin-bottom: 12px; }
.affpro-ref-link-wrap input { flex: 1; padding: 12px 16px; background: rgba(255,255,255,0.1); border: 1.5px solid rgba(255,255,255,0.2); border-radius: 10px; color: white; font-size: 13px; font-family: monospace; }
.affpro-copy-btn { padding: 12px 20px; background: var(--aff-primary); color: white; border: none; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 14px; white-space: nowrap; }
.affpro-ref-code-wrap { font-size: 13px; opacity: 0.7; }
.affpro-ref-code-wrap strong { color: #a5f3fc; margin-left: 4px; font-size: 15px; letter-spacing: 1px; }

/* TABS */
.affpro-tabs { display: flex; gap: 8px; margin-bottom: 0; flex-wrap: wrap; }
.affpro-tab { padding: 11px 18px; border: none; border-radius: 10px 10px 0 0; cursor: pointer; font-size: 13px; font-weight: 600; background: rgba(255,255,255,0.6); color: var(--aff-muted); font-family: inherit; transition: all 0.2s; }
.affpro-tab.active { background: white; color: var(--aff-primary); box-shadow: 0 -2px 8px rgba(0,0,0,0.06); }
.affpro-tab-content { display: none; background: white; border-radius: 0 16px 16px 16px; box-shadow: var(--aff-shadow); }
.affpro-tab-content.active { display: block; }
.affpro-tab-inner { padding: 28px; }
.affpro-tab-title { font-size: 18px; font-weight: 800; color: var(--aff-dark); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.affpro-count { background: var(--aff-primary); color: white; border-radius: 20px; padding: 2px 10px; font-size: 13px; }

/* DATA TABLE */
.affpro-dtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.affpro-dtable th { background: #f8f8fc; padding: 11px 14px; text-align: left; font-weight: 700; color: var(--aff-muted); border-bottom: 2px solid var(--aff-border); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.affpro-dtable td { padding: 14px; border-bottom: 1px solid var(--aff-border); vertical-align: middle; }
.affpro-dtable tr:hover td { background: #fafafe; }
.affpro-dtable tr:last-child td { border-bottom: none; }
.affpro-amount { color: var(--aff-primary); font-weight: 700; font-size: 15px; }
.affpro-icode { background: #eff6ff; padding: 3px 8px; border-radius: 6px; font-size: 12px; color: #3b82f6; font-weight: 700; }

/* Badges */
.affpro-level-badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.affpro-l1 { background: #eff6ff; color: #2563eb; }
.affpro-l2 { background: #f3e8ff; color: #9333ea; }
.affpro-status-badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.affpro-status-pending { background: #fef9c3; color: #d97706; }
.affpro-status-approved, .affpro-status-active { background: #dcfce7; color: #16a34a; }
.affpro-status-rejected, .affpro-status-suspended { background: #fee2e2; color: #dc2626; }

/* EMPTY STATE */
.affpro-empty-state { text-align: center; padding: 60px 20px; }
.affpro-empty-icon { font-size: 52px; margin-bottom: 12px; }
.affpro-empty-state p { color: var(--aff-muted); font-size: 15px; }

/* WITHDRAWAL FORM */
.affpro-balance-info { display: flex; gap: 20px; margin-bottom: 24px; }
.affpro-balance-item { background: linear-gradient(135deg, #f0eeff, #f8f4ff); border-radius: 12px; padding: 16px 24px; flex: 1; }
.affpro-balance-item span { display: block; font-size: 12px; color: var(--aff-muted); font-weight: 600; margin-bottom: 6px; }
.affpro-balance-item strong { font-size: 22px; font-weight: 800; color: var(--aff-primary); }

.affpro-method-select { display: flex; gap: 12px; }
.affpro-method-option { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; padding: 12px 16px; border: 2px solid var(--aff-border); border-radius: 10px; font-weight: 600; font-size: 14px; transition: all 0.2s; }
.affpro-method-option:has(input:checked) { border-color: var(--aff-primary); background: #f0eeff; color: var(--aff-primary); }
.affpro-method-option input { accent-color: var(--aff-primary); }
.affpro-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

@media (max-width: 768px) {
    .affpro-dash-stats { grid-template-columns: repeat(2, 1fr); }
    .affpro-tabs { flex-wrap: wrap; }
    .affpro-ref-link-wrap { flex-direction: column; }
    .affpro-balance-info { flex-direction: column; }
    .affpro-field-row { grid-template-columns: 1fr; }
    .affpro-dashboard { padding: 12px; }
    .affpro-dash-header { flex-direction: column; gap: 14px; }
}
