/* ═══════════════════════════════════════════════════════════════
   ZYNQOR — Affiliate Dashboard Styles
   Dark Prime Design System | Injected into .afp-hero-right
   ═══════════════════════════════════════════════════════════════ */

/* ── Dashboard Container ── */
.afd-dashboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

/* ── Header ── */
.afd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.afd-welcome {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.afd-welcome-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #00d4ff;
}

.afd-welcome-name {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.afd-logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.afd-logout-btn:hover {
    border-color: rgba(255, 60, 60, 0.3);
    color: #ff6b6b;
    background: rgba(255, 60, 60, 0.06);
}

/* ── Stats Grid ── */
.afd-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.afd-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: border-color 0.25s ease;
}

.afd-stat-card:hover {
    border-color: rgba(0, 212, 255, 0.15);
}

.afd-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.afd-stat-value.afd-accent {
    color: #00d4ff;
    text-shadow: 0 0 16px rgba(0, 212, 255, 0.3);
}

.afd-stat-value.afd-pending {
    color: #fbbf24;
}

.afd-stat-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Referral Link ── */
.afd-ref-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.afd-ref-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.afd-ref-row {
    display: flex;
    gap: 6px;
}

.afd-ref-input {
    flex: 1;
    padding: 9px 12px;
    background: rgba(0, 212, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    font-family: 'Inter', monospace;
    font-size: 12px;
    color: var(--text-primary);
    outline: none;
}

.afd-copy-btn {
    padding: 9px 12px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
}

.afd-copy-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
}

.afd-ref-code {
    font-size: 11px;
    color: var(--text-muted);
}

.afd-ref-code strong {
    color: #00d4ff;
}

/* ── Tabs ── */
.afd-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 3px;
}

.afd-tab {
    flex: 1;
    padding: 7px 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
}

.afd-tab:hover {
    color: var(--text-secondary);
}

.afd-tab-active {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

/* ── Tab Content ── */
.afd-tab-content {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.2) transparent;
}

.afd-tab-content::-webkit-scrollbar {
    width: 4px;
}

.afd-tab-content::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.2);
    border-radius: 4px;
}

/* ── Table ── */
.afd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.afd-table thead th {
    padding: 6px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.afd-table tbody td {
    padding: 8px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.afd-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.02);
}

/* ── Badges ── */
.afd-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 100px;
}

.afd-badge-registered {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.afd-badge-subscribed,
.afd-badge-active {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

.afd-badge-pending {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.afd-badge-paid,
.afd-badge-completed {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

/* ── Settings ── */
.afd-settings {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.afd-settings-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.afd-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.afd-select,
.afd-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.afd-select:focus,
.afd-input:focus {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.afd-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300d4ff' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.afd-save-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #00d4ff, #0891b2);
    border: none;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
}

.afd-save-btn:hover {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.35);
}

.afd-save-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.afd-settings-note {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

/* ── Empty State ── */
.afd-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* ── TX Link ── */
.afd-tx-link {
    color: #00d4ff;
    text-decoration: none;
    font-family: monospace;
    font-size: 11px;
}

.afd-tx-link:hover {
    text-decoration: underline;
}

/* ── Loading Spinner ── */
.afd-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

.afd-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: afdSpin 0.7s linear infinite;
}

@keyframes afdSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Form Messages ── */
.afd-msg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
    text-align: center;
}

.afd-msg-error {
    background: rgba(255, 60, 60, 0.08);
    border: 1px solid rgba(255, 60, 60, 0.2);
    color: #ff6b6b;
}

.afd-msg-success {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: #00d4ff;
}