/* =========================================================
   1. CONTENEDOR PRINCIPAL
   ========================================================= */

.abc-ganancias-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #F8FAFC;
    border-radius: 24px;
}

/* =========================================================
   2. CABECERA
   ========================================================= */

.abc-ganancias-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px 24px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.abc-ganancias-header-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #005F73 0%, #00bcd4 100%);
    border-radius: 16px;
    flex-shrink: 0;
}

.abc-ganancias-header-icono .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #ffffff;
}

.abc-ganancias-titulo {
    font-size: 28px;
    font-weight: 800;
    color: #005F73;
    margin: 0 0 4px 0;
}

.abc-ganancias-subtitulo {
    font-size: 16px;
    color: #64748B;
    margin: 0;
}

/* =========================================================
   3. RESUMEN DE GANANCIAS
   ========================================================= */

.abc-ganancias-resumen {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.abc-ganancias-resumen-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border-radius: 20px;
    padding: 20px 24px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.abc-ganancias-resumen-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: #00bcd4;
}

.abc-ganancias-resumen-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(0, 95, 115, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
}

.abc-ganancias-resumen-icono .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #005F73;
}

.abc-ganancias-resumen-info {
    display: flex;
    flex-direction: column;
}

.abc-ganancias-resumen-label {
    font-size: 13px;
    color: #94A3B8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.abc-ganancias-resumen-valor {
    font-size: 24px;
    font-weight: 700;
    color: #005F73;
    line-height: 1.2;
}

/* =========================================================
   4. SECCIÓN MENSUAL (GRÁFICO DE BARRAS)
   ========================================================= */

.abc-ganancias-mensual {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 40px;
    border: 1px solid #E2E8F0;
}

.abc-ganancias-section-titulo {
    font-size: 20px;
    font-weight: 700;
    color: #005F73;
    margin: 0 0 24px 0;
}

.abc-ganancias-barras {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.abc-ganancias-barra-item {
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    align-items: center;
    gap: 16px;
}

.abc-ganancias-barra-label {
    font-size: 14px;
    color: #475569;
    font-weight: 500;
    white-space: nowrap;
}

.abc-ganancias-barra-wrapper {
    width: 100%;
    height: 12px;
    background: #F1F5F9;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.abc-ganancias-barra {
    height: 100%;
    background: linear-gradient(90deg, #005F73 0%, #00bcd4 100%);
    border-radius: 20px;
    transition: width 0.8s ease;
    position: relative;
    min-width: 4px;
}

.abc-ganancias-barra-monto {
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 600;
    color: #005F73;
    white-space: nowrap;
}

.abc-ganancias-barra-cantidad {
    font-size: 12px;
    color: #94A3B8;
    text-align: right;
    white-space: nowrap;
}

/* =========================================================
   5. LISTADO DE COMISIONES
   ========================================================= */

.abc-ganancias-comisiones {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 28px;
    border: 1px solid #E2E8F0;
}

.abc-ganancias-comisiones-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.abc-ganancias-comisiones-total {
    font-size: 14px;
    color: #94A3B8;
    font-weight: 500;
}

.abc-ganancias-tabla-wrapper {
    overflow-x: auto;
}

.abc-ganancias-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.abc-ganancias-tabla thead th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: #475569;
    background: #F8FAFC;
    border-bottom: 2px solid #E2E8F0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.abc-ganancias-tabla tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #F1F5F9;
    color: #1E293B;
    vertical-align: middle;
}

.abc-ganancias-tabla tbody tr:hover {
    background: #F8FAFC;
}

.abc-ganancias-usuario {
    color: #005F73;
    text-decoration: none;
    font-weight: 500;
}

.abc-ganancias-usuario:hover {
    color: #00bcd4;
    text-decoration: underline;
}

.abc-ganancias-monto {
    font-weight: 600;
    color: #005F73;
}

/* =========================================================
   6. LOADER Y FIN
   ========================================================= */

.abc-ganancias-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 0;
}

.abc-loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #E2E8F0;
    border-top-color: #005F73;
    border-radius: 50%;
    animation: abcGananciasSpin 0.8s linear infinite;
}

@keyframes abcGananciasSpin {
    to {
        transform: rotate(360deg);
    }
}

.abc-ganancias-loader span {
    font-size: 14px;
    color: #94A3B8;
}

.abc-ganancias-fin {
    text-align: center;
    padding: 30px 0;
    font-size: 14px;
    color: #94A3B8;
}

/* =========================================================
   7. ESTADO VACÍO
   ========================================================= */

.abc-ganancias-vacio {
    text-align: center;
    padding: 60px 20px;
}

.abc-ganancias-vacio .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #94A3B8;
    margin-bottom: 16px;
}

.abc-ganancias-vacio h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 8px 0;
}

.abc-ganancias-vacio p {
    font-size: 16px;
    color: #64748B;
    margin: 0 0 24px 0;
}

.abc-ganancias-btn-invitar {
    display: inline-block;
    background: linear-gradient(135deg, #005F73 0%, #00bcd4 100%);
    color: #ffffff;
    padding: 12px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 95, 115, 0.2);
}

.abc-ganancias-btn-invitar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 95, 115, 0.3);
    color: #ffffff;
}

/* =========================================================
   8. RESPONSIVE
   ========================================================= */

@media screen and (max-width: 1024px) {
    .abc-ganancias-resumen {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .abc-ganancias-container {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .abc-ganancias-header {
        flex-direction: column;
        text-align: center;
        padding: 16px 20px;
    }

    .abc-ganancias-titulo {
        font-size: 24px;
    }

    .abc-ganancias-resumen {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .abc-ganancias-resumen-card {
        padding: 16px 18px;
    }

    .abc-ganancias-resumen-valor {
        font-size: 20px;
    }

    .abc-ganancias-barra-item {
        grid-template-columns: 80px 1fr 60px;
        gap: 12px;
    }

    .abc-ganancias-barra-label {
        font-size: 12px;
    }

    .abc-ganancias-barra-monto {
        font-size: 11px;
        right: -70px;
    }

    .abc-ganancias-comisiones {
        padding: 16px 18px;
    }

    .abc-ganancias-comisiones-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .abc-ganancias-tabla {
        font-size: 13px;
    }

    .abc-ganancias-tabla thead th,
    .abc-ganancias-tabla tbody td {
        padding: 8px 12px;
    }
}

@media screen and (max-width: 480px) {
    .abc-ganancias-resumen {
        grid-template-columns: 1fr;
    }

    .abc-ganancias-resumen-card {
        padding: 14px 16px;
    }

    .abc-ganancias-barra-item {
        grid-template-columns: 60px 1fr 50px;
        gap: 8px;
    }

    .abc-ganancias-barra-label {
        font-size: 11px;
    }

    .abc-ganancias-barra-monto {
        font-size: 10px;
        right: -60px;
    }

    .abc-ganancias-barra-cantidad {
        font-size: 10px;
    }

    .abc-ganancias-tabla {
        font-size: 12px;
    }

    .abc-ganancias-tabla thead th,
    .abc-ganancias-tabla tbody td {
        padding: 6px 8px;
    }

    .abc-ganancias-mensual {
        padding: 16px 18px;
    }
}