/* dashboard-affiliates.css 
   Refonte Minimaliste inspirée de landing-minimalist.css 
*/

:root {
    --primary-black: #000000;
    --text-main: #111111;
    --text-muted: #999999;
    --bg-light: #ffffff;
    --border-soft: #eeeeee;
    --input-bg: #fafafa;
    --success: #111111;
    /* Garde le style monochrome même pour le succès */
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    margin: 0;
}

.dashboard-container {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 2rem;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 1. CARTES DE BALANCE (STYLE GRILLE ÉPURÉE) */
.top-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.balance-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    transition: all 0.2s ease;
}

.balance-card:hover {
    border-color: var(--primary-black);
}

.balance-card.highlight {
    background: var(--primary-black);
    color: #fff;
}

.balance-card .label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.balance-card.highlight .label {
    color: #888;
}

.balance-card .amount {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* 2. NAVIGATION PAR ONGLETS (STYLE MINIMAL) */
.tabs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-soft);
}

.tab-btn {
    padding: 1rem 0;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-black);
}

.tab-btn.active {
    color: var(--primary-black);
    border-bottom-color: var(--primary-black);
}

/* 3. SECTION RÉFÉRENCE (REMPLACE LE BLOC BLEU) */
.referral-section {
    background: var(--input-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    border: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ref-box {
    background: #fff;
    border: 1px solid #ddd;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 4. TABLEAUX DE DONNÉES */
.data-card {
    border-radius: 0;
    /* Plus minimaliste sans bords arrondis sur le container */
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--primary-black);
}

.data-table td {
    padding: 1.2rem 0.5rem;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.95rem;
}

.data-table tr:hover td {
    background: var(--input-bg);
}

/* 5. PILLS DE STATUT (DISCRET) */
.status-pill {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.status-pill.paid,
.status-pill.success {
    border-color: var(--primary-black);
    background: var(--primary-black);
    color: #fff;
}

/* Nettoyage du bouton fautif et harmonisation */
.btn-primary,
.crm-btn-primary,
button.header-action {
    /* Sélecteur à adapter selon votre classe HTML exacte */
    background: #000 !important;
    /* Noir pur */
    color: #fff !important;
    /* Texte blanc pour la lisibilité */
    border-radius: 4px !important;
    /* Bords presque droits, beaucoup plus pro */
    padding: 12px 24px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    /* Style header minimaliste */
    letter-spacing: 0.05em !important;
    box-shadow: none !important;
    /* Suppression de l'ombre rose */
    border: 1px solid #000 !important;
    transition: all 0.2s ease-in-out !important;
    cursor: pointer;
}

/* Effet au survol : Minimalisme inversé */
.btn-primary:hover {
    background: #fff !important;
    color: #000 !important;
    transform: none !important;
    /* On évite les flottements inutiles */
}

/* On s'assure que le conteneur du bouton ne force pas de style bizarre */
.header-button-container {
    /* Classe hypothétique du parent */
    background: transparent !important;
    box-shadow: none !important;
}

.copy-btn {
    color: var(--primary-black);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.8rem;
}

@media (max-width: 600px) {
    .dashboard-container {
        margin: 2rem auto;
    }

    .top-bar {
        grid-template-columns: 1fr;
    }

    .tabs {
        gap: 1rem;
        overflow-x: auto;
    }
}